xca/lib/pki_base.cpp
chris 240e03b597 code review started many errors catched
translation to english started using tr()
2002-07-15 22:32:44 +00:00

62 lines
836 B
C++

#include "pki_base.h"
pki_base::pki_base(const string d)
{
error = "";
desc = d;
}
pki_base::pki_base()
{
error = "";
desc = "";
}
pki_base::~pki_base(void)
{}
string pki_base::getDescription()
{
string x = desc;
return x;
}
string pki_base::getError()
{
string x = error;
error = "";
return x;
}
void pki_base::setDescription(const string d)
{
desc = d;
}
bool pki_base::openssl_error()
{
error = "";
string errtxt = "";
while (int i = ERR_get_error() ) {
errtxt = ERR_error_string(i ,NULL);
CERR << "OpenSSL: " << errtxt << endl;
error += errtxt + "\n";
}
return (!error.empty());
}
void pki_base::ign_openssl_error()
{
// ignore openssl errors
string errtxt;
while (int i = ERR_get_error() ) {
errtxt = ERR_error_string(i ,NULL);
CERR << "IGNORE:OpenSSL: " << errtxt << endl;
}
}