diff options
Diffstat (limited to 'src/crypto/bn_extra/bn_asn1.c')
-rw-r--r-- | src/crypto/bn_extra/bn_asn1.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/crypto/bn_extra/bn_asn1.c b/src/crypto/bn_extra/bn_asn1.c index efb23355..8b939da5 100644 --- a/src/crypto/bn_extra/bn_asn1.c +++ b/src/crypto/bn_extra/bn_asn1.c @@ -31,7 +31,7 @@ int BN_parse_asn1_unsigned(CBS *cbs, BIGNUM *ret) { return 0; } - /* INTEGERs must be minimal. */ + // INTEGERs must be minimal. if (CBS_data(&child)[0] == 0x00 && CBS_len(&child) > 1 && !(CBS_data(&child)[1] & 0x80)) { @@ -50,16 +50,16 @@ int BN_parse_asn1_unsigned_buggy(CBS *cbs, BIGNUM *ret) { return 0; } - /* This function intentionally does not reject negative numbers or non-minimal - * encodings. Estonian IDs issued between September 2014 to September 2015 are - * broken. See https://crbug.com/532048 and https://crbug.com/534766. - * - * TODO(davidben): Remove this code and callers in March 2016. */ + // This function intentionally does not reject negative numbers or non-minimal + // encodings. Estonian IDs issued between September 2014 to September 2015 are + // broken. See https://crbug.com/532048 and https://crbug.com/534766. + // + // TODO(davidben): Remove this code and callers in March 2016. return BN_bin2bn(CBS_data(&child), CBS_len(&child), ret) != NULL; } int BN_marshal_asn1(CBB *cbb, const BIGNUM *bn) { - /* Negative numbers are unsupported. */ + // Negative numbers are unsupported. if (BN_is_negative(bn)) { OPENSSL_PUT_ERROR(BN, BN_R_NEGATIVE_NUMBER); return 0; @@ -67,8 +67,8 @@ int BN_marshal_asn1(CBB *cbb, const BIGNUM *bn) { CBB child; if (!CBB_add_asn1(cbb, &child, CBS_ASN1_INTEGER) || - /* The number must be padded with a leading zero if the high bit would - * otherwise be set or if |bn| is zero. */ + // The number must be padded with a leading zero if the high bit would + // otherwise be set or if |bn| is zero. (BN_num_bits(bn) % 8 == 0 && !CBB_add_u8(&child, 0x00)) || !BN_bn2cbb_padded(&child, BN_num_bytes(bn), bn) || !CBB_flush(cbb)) { |