#include <wvx509.h>
Public Methods | |
WvX509Mgr (X509 *cert=NULL) | |
WvX509Mgr (WvString dName, int bits, WvRSAKey *_keypair=NULL) | |
virtual | ~WvX509Mgr () |
void | createSScert (WvString dName, int keysize) |
WvString | createcertreq (WvString dName, int keysize) |
void | decodecert (WvString encodedcert) |
void | encodecert () |
bool | validate () |
bool | signedbyCAindir (WvString certdir) |
bool | signedbyCAinfile (WvString certfile) |
void | signcert (WvRSAKey CAKeypair) |
bool | isinCRL () |
void | dumpcert (WvString outfile, bool append=false) |
void | dumpkeypair (WvString outfile, bool append=false) |
void | dumprawkeypair (WvString outfile, bool append=false) |
void | seterr (const WvString &s) |
WvX509Mgr (X509 *cert=NULL) | |
WvX509Mgr (WvString dName, int bits, WvRSAKey *_keypair=NULL) | |
virtual | ~WvX509Mgr () |
void | createSScert (WvString dName, int keysize) |
WvString | createcertreq (WvString dName, int keysize) |
void | decodecert (WvString encodedcert) |
void | encodecert () |
bool | validate () |
bool | signedbyCAindir (WvString certdir) |
bool | signedbyCAinfile (WvString certfile) |
void | signcert (WvRSAKey CAKeypair) |
bool | isinCRL () |
void | dumpcert (WvString outfile, bool append=false) |
void | dumpkeypair (WvString outfile, bool append=false) |
void | dumprawkeypair (WvString outfile, bool append=false) |
void | seterr (const WvString &s) |
Public Attributes | |
X509 * | cert |
WvRSAKey * | keypair |
WvString | enccert |
WvLog | debug |
bool | err |
WvString | errstr |
X509 * | cert |
WvRSAKey * | keypair |
Definition at line 23 of file crypto/wvx509.h.
|
Initialize a blank X509 Object with the certificate *cert (used for client side operations...) |
|
Constructor to create a selfsigned certificate for dn dName NOTE: If you already have an RSAKey, then you can shove it in here in the third parameter (i.e.: If you wanted to generate a cert for an existing TunnelVision connection). Also: For SSL Servers: the dName MUST be in the form: cn=FQDN,o=foo,c=CA (actually, any part after the cn=FQDN is up to you... dc= works as well..) But the important bit is to use the Fully Qualified Domain Name in the cn= part - otherwise Web Clients get confused...(I imaging other server clients will get equally confused, but I haven't checked). I don't check for this, since other kinds of certificates are perfectly valid without this... If you want to generate invalid certs, that's up to you. Definition at line 21 of file wvx509.cc. References cert, createSScert, debug, err, and keypair. |
|
Destructor Definition at line 32 of file wvx509.cc. References cert. |
|
Initialize a blank X509 Object with the certificate *cert (used for client side operations...) |
|
Constructor to create a selfsigned certificate for dn dName NOTE: If you already have an RSAKey, then you can shove it in here in the third parameter (i.e.: If you wanted to generate a cert for an existing TunnelVision connection). Also: For SSL Servers: the dName MUST be in the form: cn=FQDN,o=foo,c=CA (actually, any part after the cn=FQDN is up to you... dc= works as well..) But the important bit is to use the Fully Qualified Domain Name in the cn= part - otherwise Web Clients get confused...(I imaging other server clients will get equally confused, but I haven't checked). I don't check for this, since other kinds of certificates are perfectly valid without this... If you want to generate invalid certs, that's up to you. |
|
Destructor |
|
Create a certificate request (PKCS#10) using this function.. this request is what you would send off to Verisign, or Entrust.net (or any other CA), to get your real certificate. It leaves the RSA key pair in keypair, where you MUST save it for the certificate to be AT ALL valid when you get it back. Returns a PEM Encoded PKCS#10 certificate request. |
|
Create a certificate request (PKCS#10) using this function.. this request is what you would send off to Verisign, or Entrust.net (or any other CA), to get your real certificate. It leaves the RSA key pair in keypair, where you MUST save it for the certificate to be AT ALL valid when you get it back. Returns a PEM Encoded PKCS#10 certificate request. Definition at line 223 of file wvx509.cc. References WvString::edit, keypair, WvRSAKey::rsa, set_name_entry, seterr, and WvString::setsize. |
|
Given the Distinguished Name dName and the number of bits for the Private key in keysize, return a Self Signed Certificate, and the RSA Private/Public Keypair in keypair |
|
Given the Distinguished Name dName and the number of bits for the Private key in keysize, return a Self Signed Certificate, and the RSA Private/Public Keypair in keypair Definition at line 124 of file wvx509.cc. References cert, debug, WvString::edit, encodecert, keypair, WvRSAKey::rsa, set_name_entry, and seterr. Referenced by WvX509Mgr. |
|
Given a hexified encodedcert, fill the cert member |
|
Given a hexified encodedcert, fill the cert member |
|
Dump the X509 Certificate in Cert to outfile in PEM |
|
Dump the X509 Certificate in Cert to outfile in PEM |
|
Dump RSA Keypair to outfile in PEM format |
|
Dump RSA Keypair to outfile in PEM format Definition at line 430 of file wvx509.cc. References debug, keypair, WvRSAKey::rsa, and seterr. |
|
Dump RSA Keypair to outfile in RAW format (suitable for FreeS/WAN) |
|
Dump RSA Keypair to outfile in RAW format (suitable for FreeS/WAN) Definition at line 460 of file wvx509.cc. References debug, keypair, WvRSAKey::rsa, and seterr. |
|
Given the X509 certificate object cert, return a hexified string (in enccert) - Suitable for inclusion in a WvConf object ;) |
|
Given the X509 certificate object cert, return a hexified string (in enccert) - Suitable for inclusion in a WvConf object ;) Definition at line 300 of file wvx509.cc. References cert, WvString::edit, enccert, hexify, WvString::setsize, and size. Referenced by createSScert. |
|
Check and see if the certificate in cert has been revoked... currently relies on the CRL Distribution Point X509v3 extension... returns true if it has expired |
|
Check and see if the certificate in cert has been revoked... currently relies on the CRL Distribution Point X509v3 extension... returns true if it has expired |
|
Definition at line 161 of file include/wvx509.h. References err. |
|
Definition at line 161 of file crypto/wvx509.h. References err. Referenced by createcertreq, createSScert, dumpcert, dumpkeypair, dumprawkeypair, signedbyCAinfile, and validate. |
|
Sign the X509 certificate in cert with CAKeypair |
|
Sign the X509 certificate in cert with CAKeypair |
|
Check the certificate in cert against the CA certificates in certfile - returns true if cert was signed by one of the CA certificates. |
|
Check the certificate in cert against the CA certificates in certfile - returns true if cert was signed by one of the CA certificates. Definition at line 382 of file wvx509.cc. References WvDirIter::next, WvDirIter::rewind, and signedbyCAinfile. |
|
Check the certificate in cert against the CA certificates in certdir - returns true if cert was signed by one of the CA certificates. |
|
Check the certificate in cert against the CA certificates in certdir - returns true if cert was signed by one of the CA certificates. Definition at line 344 of file wvx509.cc. Referenced by signedbyCAindir. |
|
Function to verify the validity of a certificate that has been placed in cert. Currently, this only outputs some information about the certificate but eventually, it should be used to verify that the certificate is valid (has not expired, and was issued by a valid and trusted CA) |
|
Function to verify the validity of a certificate that has been placed in cert. Currently, this only outputs some information about the certificate but eventually, it should be used to verify that the certificate is valid (has not expired, and was issued by a valid and trusted CA) Definition at line 316 of file wvx509.cc. References cert, debug, and seterr. Referenced by WvSSLStream::post_select. |
|
Certificate - this is why this class exists Definition at line 61 of file include/wvx509.h. |
|
Certificate - this is why this class exists Definition at line 61 of file crypto/wvx509.h. Referenced by createSScert, decodecert, dumpcert, encodecert, signedbyCAinfile, validate, WvSSLStream::WvSSLStream, WvX509Mgr, and ~WvX509Mgr. |
|
Definition at line 153 of file include/wvx509.h. Referenced by createSScert, dumpcert, dumpkeypair, dumprawkeypair, validate, and WvX509Mgr. |
|
A hexified encoding of cert for use in getting it in and out of WvConf objects. I don't provide a similar entry for that for keypair, because you can always call keypair->private_str() and keypair->public_str() for that information. Definition at line 76 of file include/wvx509.h. Referenced by encodecert. |
|
Error Handling - if true, there was an error... check errstr for a description... Definition at line 158 of file include/wvx509.h. Referenced by WvSSLStream::post_select, seterr, and WvX509Mgr. |
|
Definition at line 159 of file include/wvx509.h. Referenced by WvSSLStream::post_select. |
|
The Public and Private RSA keypair associated with this certificate Make sure that you save this somewhere!!! If you don't, then you won't really be able to use the certificate for anything... Definition at line 68 of file include/wvx509.h. |
|
The Public and Private RSA keypair associated with this certificate Make sure that you save this somewhere!!! If you don't, then you won't really be able to use the certificate for anything... Definition at line 68 of file crypto/wvx509.h. Referenced by createcertreq, createSScert, dumpkeypair, dumprawkeypair, WvSSLStream::WvSSLStream, and WvX509Mgr. |