Fix ASN1_INTEGER_to_BN properly this time...
authorDr. Stephen Henson <steve@openssl.org>
Tue, 22 Aug 2000 16:06:24 +0000 (16:06 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 22 Aug 2000 16:06:24 +0000 (16:06 +0000)
crypto/asn1/a_enum.c
crypto/asn1/a_int.c

index 53b30f2..afd8e9a 100644 (file)
@@ -219,6 +219,6 @@ BIGNUM *ASN1_ENUMERATED_to_BN(ASN1_ENUMERATED *ai, BIGNUM *bn)
 
        if ((ret=BN_bin2bn(ai->data,ai->length,bn)) == NULL)
                ASN1err(ASN1_F_ASN1_ENUMERATED_TO_BN,ASN1_R_BN_LIB);
-       if(ai->type == V_ASN1_NEG_ENUMERATED) bn->neg = 1;
+       else if(ai->type == V_ASN1_NEG_ENUMERATED) ret->neg = 1;
        return(ret);
        }
index 0db747e..6f0413f 100644 (file)
@@ -465,7 +465,7 @@ BIGNUM *ASN1_INTEGER_to_BN(ASN1_INTEGER *ai, BIGNUM *bn)
 
        if ((ret=BN_bin2bn(ai->data,ai->length,bn)) == NULL)
                ASN1err(ASN1_F_ASN1_INTEGER_TO_BN,ASN1_R_BN_LIB);
-       if(ai->type == V_ASN1_NEG_INTEGER) ret->neg = 1;
+       else if(ai->type == V_ASN1_NEG_INTEGER) ret->neg = 1;
        return(ret);
        }