相关疑难解决方法(0)

如何从X509证书中获取Keyusage值?

我想从X509结构化证书中检索密钥使用值,我尝试了以下代码

 X509* lcert=NULL;
 lCert=PEM_read(filename); // function will return the certificate in X509
unsigned long lKeyusage= lCert->ex_kusage;
Run Code Online (Sandbox Code Playgroud)

当我打印lKeyusage值...有时我得到128 ...有时我得到0相同的证书..谁能告诉我什么是错误.?如果我做错了请给我一些示例代码或正确的API ..

openssl certificate ssl-certificate x509certificate x509

2
推荐指数
1
解决办法
4614
查看次数