Correctly encode FALSE for BOOL in ASN1_TYPE.
This commit is contained in:
parent
0c91b0eaff
commit
c1e67d9856
1 changed files with 6 additions and 3 deletions
|
@ -445,9 +445,12 @@ int asn1_ex_i2c(ASN1_VALUE **pval, unsigned char *cout, int *putype, const ASN1_
|
|||
case V_ASN1_BOOLEAN:
|
||||
tbool = (ASN1_BOOLEAN *)pval;
|
||||
if(*tbool == -1) return -1;
|
||||
/* Default handling if value == size field then omit */
|
||||
if(*tbool && (it->size > 0)) return -1;
|
||||
if(!*tbool && !it->size) return -1;
|
||||
if (it->utype != V_ASN1_ANY)
|
||||
{
|
||||
/* Default handling if value == size field then omit */
|
||||
if(*tbool && (it->size > 0)) return -1;
|
||||
if(!*tbool && !it->size) return -1;
|
||||
}
|
||||
c = (unsigned char)*tbool;
|
||||
cont = &c;
|
||||
len = 1;
|
||||
|
|
Loading…
Reference in a new issue