开发者

In OpenSSL, given a certificate, how can I get a string representation of the signature algorithm?

开发者 https://www.devze.com 2023-02-03 08:29 出处:网络
X509_get_开发者_StackOverflow社区signature_type() returns an int. I need to convert this to a string.Signature algorithm string name I receive by this way:

X509_get_开发者_StackOverflow社区signature_type() returns an int. I need to convert this to a string.


Signature algorithm string name I receive by this way:

X509 *certificate;
char alg[256];
...
OBJ_obj2txt(alg, sizeof(alg), certificate->sig_alg->algorithm, 0);


OBJ_nid2ln() perhaps? There's also OBJ_nid2sn() for a few signature types which have short names.

0

精彩评论

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