ASN1_item_ex_d2i的参数
pval: 由caller传入,用于接收返回值。
in: 由caller传入,是输入字符串,待decode的buffer
len:待decode buffer的长度
it: X509_it
tag: –1
aclass: 0
opt: 0
ctx: caller的local variable,已经clear,其valid field为0.
展开
ASN1_SEQUENCE_ref(X509, x509_cb, CRYPTO_LOCK_X509) = {
ASN1_SIMPLE(X509, cert_info, X509_CINF),
ASN1_SIMPLE(X509, sig_alg, X509_ALGOR),
ASN1_SIMPLE(X509, signature, ASN1_BIT_STRING)
} ASN1_SEQUENCE_END_ref(X509, X509)
如下:
const static ASN1_AUX X509_aux = {NULL, ASN1_AFLG_REFCOUNT, offsetof(X509, references), CRYPTO_LOCK_X509, x509_cb, 0};
const static ASN1_TEMPLATE X509_seq_tt[] ={
{(0),(0),offsetof(X509,cert_info),”cert_info”, &X509_CINF_it},
{(0),(0),offsetof(X509,sig_alg),”sig_alg”, &X509_ALGOR_it},
{(0),(0),offsetof(X509,signature),”signature”, &ASN1
openssl 代码分析(4) ASN1_item_ex_d2i
最新推荐文章于 2024-06-18 09:29:53 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)