Correct a comment in serializing a CBS_ASN1_BITSTRING The additional 0 byte represents the fact that it has 0 unused bits. It is confusing/imprecise to describe it as "padding". Change-Id: I16aa5397312f614fb510002465c359896a6a6964 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/93028 Commit-Queue: David Benjamin <davidben@google.com> Auto-Submit: Lily Chen <chlily@google.com> Commit-Queue: Lily Chen <chlily@google.com> Reviewed-by: David Benjamin <davidben@google.com>
diff --git a/crypto/evp/p_mldsa.cc b/crypto/evp/p_mldsa.cc index 1e83147..3e4c662 100644 --- a/crypto/evp/p_mldsa.cc +++ b/crypto/evp/p_mldsa.cc
@@ -271,7 +271,7 @@ !CBB_add_asn1_element(&algorithm, CBS_ASN1_OBJECT, Traits::kOID.data(), Traits::kOID.size()) || !CBB_add_asn1(&spki, &key_bitstring, CBS_ASN1_BITSTRING) || - !CBB_add_u8(&key_bitstring, 0 /* padding */) || + !CBB_add_u8(&key_bitstring, 0 /* no unused bits */) || !Traits::MarshalPublicKey(&key_bitstring, pub) || !CBB_flush(out)) { OPENSSL_PUT_ERROR(EVP, EVP_R_ENCODE_ERROR);