[xmlsec] Loading a DER-encoded certificate

Jesse Pelton jsp@PKC.com
Mon, 7 Apr 2003 10:57:50 -0400


I'm attempting to use xmlSecKeyReadBinaryFile() in XMLSec 0.1.1 to read a
DER-encoded certificate file. As previously mentioned, it's necessary to
modify the fopen() call to open the file in binary mode. Once I've done
that, the file loads into memory successfully, and we call down to
xmlSecOpenSSLKeyDataRawX509CertBinRead(). This sets up a key info context
specifying a NULL keys manager, then calls
xmlSecOpenSSLKeyDataX509VerifyAndExtractKey(), which promptly fails because
of the absence of a keys manager.

Is there some way to get xmlSecKeyReadBinaryFile() to load a certificate
file successfully?  If not, is there an alternative?