49 WvX509Mgr(WvStringParm _dname,
int bits,
bool ca=
false);
75 virtual bool isok()
const;
105 WvString
signreq(WvStringParm pkcs10req)
const;
117 bool signcrl(WvCRL &unsignedcrl)
const;
130 WvString
sign(WvBuf &data)
const;
131 WvString
sign(WvStringParm data)
const;
157 bool write_p12(WvStringParm _fname, WvStringParm _pkcs12pass)
const;
164 void read_p12(WvStringParm _fname, WvStringParm _pkcs12pass);
172 mutable WvRSAKey *rsa;
An RSA public key or public/private key pair that can be used for encryption.
DumpMode
Type for the encode() and decode() methods.
WvString is an implementation of a simple and efficient printable-string class.
virtual void decode(const WvX509::DumpMode mode, WvStringParm encoded)
Load the information from the format requested by mode into the class - this overwrites the certifica...
WvRSAKey * get_rsa()
Allow us access to the RSA member.
virtual WvString errstr() const
Says what the error is, if isok() is not true.
bool bind_ssl(SSL_CTX *ctx)
Avoid a lot of ugliness by having it so that we are binding to the SSL context, and not the other way...
void read_p12(WvStringParm _fname, WvStringParm _pkcs12pass)
And this reads from the file specified in filename using the password "_pkcs12pass",...
bool signcrl(WvCRL &unsignedcrl) const
Sign the CRL with the rsa key associated with this class.
bool write_p12(WvStringParm _fname, WvStringParm _pkcs12pass) const
This writes the certificate and RSA keys in PKCS12 format to the file specified by filename,...
WvX509Mgr()
Constructor to create a blank certificate + keypair (useful if, for example, you were going to load t...
WvString sign(WvBuf &data) const
Sign the contents of data and return the signature as a BASE64 string.
virtual WvString encode(const WvX509::DumpMode mode) const
Encodes the information requested by mode into a buffer.
bool test() const
Test to make sure that a certificate and a keypair go together.
bool signcert(WvX509 &unsignedcert) const
Sign the certificate with the rsa key associated with this class.
WvString signreq(WvStringParm pkcs10req) const
Take the PKCS#10 request in the string pkcs10req, sign it with the private key in rsa,...
bool operator!() const
The not operator returns true if !isok().
virtual ~WvX509Mgr()
Destructor.
void create_selfissued(WvStringParm dname, bool is_ca=false)
Given the Distinguished Name dname and an already generated keypair in rsa, return a Self Signed Cert...
virtual bool isok() const
Says if this certificate+key pair is good for use.
WvX509()
Initialize a completely empty X509 Object with an X509 certificate that doesn't have anything it it....
DumpMode
Type for the encode() and decode() methods.