DSA public key certificate

Ed Curren <[email protected]>
Newsgroups gmane.comp.encryption.cryptlib
Message-ID <[email protected]>
I would like to use a DSA key pair for signing messages.  When the public key is given to the other party that will be validating the signature, I would like for it to be stored in a CryptLib public key database.  As I understand it, in order to store a public key in a CryptLib public key database it must be formatted as a certificate.
 
I am getting an error when I attempt to use the simple certificate creation.  The cryptSignCert function is returning error code -26 (CRYPT_ERROR_INVALID).
 
result = cryptCreateCert(&cryptCert, CRYPT_UNUSED, CRYPT_CERTTYPE_CERTIFICATE);
result = cryptSetAttribute(cryptCert, CRYPT_CERTINFO_XYZZY, 1);
result = cryptSetAttribute(cryptCert, CRYPT_CERTINFO_SUBJECTPUBLICKEYINFO, cryptContext);
result = cryptSetAttributeString(cryptCert, CRYPT_CERTINFO_COMMONNAME, commonName.c_str(), commonName.length());
result = cryptSignCert(cryptCert, cryptContext);
 
Since this is not the way to create the public key certificate two questions have come to mind.  First, can I create a public key certificate for a DSA public key?  Second, if so,  what is the correct way to do it?
 
Thanks!

_______________________________________________
Cryptlib mailing list
[email protected] via Mail: [email protected]
Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
http://news.gmane.org/gmane.comp.encryption.cryptlib
Posts from non-subscribed addresses are blocked to prevent spam, please
subscribe in order to post messages.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.