1
SfNetworkLibrary::VerifyResult SfNetworkLibrary::VerifyX509CertChain(
const std::vector<std::string>& cert_chain,
const std::string& hostname,
const std::string& auth_type) {
在此上述代码中的Android Jelly bean 4.2.2用于服务器身份验证。 我需要将此DER编码字符串std::vector<std::string> cert_chain
转换为X509格式。如何在openSSL中将DER编码字符串的向量转换为x509
我想做这个转换,以便我可以在openssl上设置这个服务器证书。 SSL_CTX_use_certificate(ctx,x)
其中ctx
是上下文,x
是x509证书。
我可以使用d2i_x509
将DER编码的字符串转换为x509吗?
但在这种情况下,我们有字符串向量vector<string>&cert_chain
,那么我该如何转换它?
嗨Pallavi,感谢您的答复。是否有一种方法可以将整个cert_chain转换为x509格式? – archana
这有道理吗? cert_chain中的每个字符串对应不同的X509。对?如果是,那么如何从所有cert_chain字符串中获得单个X509? –