diff options
Diffstat (limited to 'src/lib/libcrypto/asn1/tasn_enc.c')
-rw-r--r-- | src/lib/libcrypto/asn1/tasn_enc.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/lib/libcrypto/asn1/tasn_enc.c b/src/lib/libcrypto/asn1/tasn_enc.c index c675c3c832..f6c8ddef0a 100644 --- a/src/lib/libcrypto/asn1/tasn_enc.c +++ b/src/lib/libcrypto/asn1/tasn_enc.c | |||
@@ -445,12 +445,9 @@ int asn1_ex_i2c(ASN1_VALUE **pval, unsigned char *cout, int *putype, const ASN1_ | |||
445 | case V_ASN1_BOOLEAN: | 445 | case V_ASN1_BOOLEAN: |
446 | tbool = (ASN1_BOOLEAN *)pval; | 446 | tbool = (ASN1_BOOLEAN *)pval; |
447 | if(*tbool == -1) return -1; | 447 | if(*tbool == -1) return -1; |
448 | if (it->utype != V_ASN1_ANY) | 448 | /* Default handling if value == size field then omit */ |
449 | { | 449 | if(*tbool && (it->size > 0)) return -1; |
450 | /* Default handling if value == size field then omit */ | 450 | if(!*tbool && !it->size) return -1; |
451 | if(*tbool && (it->size > 0)) return -1; | ||
452 | if(!*tbool && !it->size) return -1; | ||
453 | } | ||
454 | c = (unsigned char)*tbool; | 451 | c = (unsigned char)*tbool; |
455 | cont = &c; | 452 | cont = &c; |
456 | len = 1; | 453 | len = 1; |