提交 f6c1c9e9 编写于 作者: D Dr. Stephen Henson

Fix a bug in the new i2d_{ENUMERATED,INTEGER} that

didn't recognise NULL to mean 'don't output anything'
上级 2dbef509
......@@ -75,6 +75,7 @@ void ASN1_ENUMERATED_free(ASN1_ENUMERATED *x)
int i2d_ASN1_ENUMERATED(ASN1_ENUMERATED *a, unsigned char **pp)
{
int len, ret;
if(!a) return 0;
len = i2c_ASN1_INTEGER(a, NULL);
ret=ASN1_object_size(0,len,V_ASN1_ENUMERATED);
if(pp) {
......
......@@ -77,6 +77,7 @@ int ASN1_INTEGER_cmp(ASN1_INTEGER *x, ASN1_INTEGER *y)
int i2d_ASN1_INTEGER(ASN1_INTEGER *a, unsigned char **pp)
{
int len, ret;
if(!a) return 0;
len = i2c_ASN1_INTEGER(a, NULL);
ret=ASN1_object_size(0,len,V_ASN1_INTEGER);
if(pp) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册