开发者

how can i verify the self signed certificate using openssl library in C++?

开发者 https://www.devze.com 2023-03-17 16:56 出处:网络
i n开发者_运维技巧eed to verify the X509 v3 certificate .the Certificate is self signed so i have the private key and public key with me .

i n开发者_运维技巧eed to verify the X509 v3 certificate .the Certificate is self signed so i have the private key and public key with me .

I tried

ki=X509_verify(Cert,X509_get_pubkey(Cert));

i always getting the Ki = -1 . can any one tell me how to do this verification.


I am answering my own question. before call X509_verify(,) function
OpenSSL_add_all_digests();
this function set the digests algorithm in the local table which is used internally for verification.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号