diff options
author | Dr. David von Oheimb <David.von.Oheimb@siemens.com> | 2022-06-28 07:53:59 +0200 |
---|---|---|
committer | Dr. David von Oheimb <dev@ddvo.net> | 2022-07-19 08:44:19 +0200 |
commit | 7c310e872e72977432b3520c5d27641e13815548 (patch) | |
tree | 6a280ea938354730e9421c1b375ab689f9fa3224 /crypto/cmp | |
parent | 33847508d5605d8dbe868d7694a4eff79d785404 (diff) |
libcrypto refactoring: introduce and use ossl_asn1_string_set_bits_left()
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
(Merged from https://github.com/openssl/openssl/pull/18668)
Diffstat (limited to 'crypto/cmp')
-rw-r--r-- | crypto/cmp/cmp_protect.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crypto/cmp/cmp_protect.c b/crypto/cmp/cmp_protect.c index 937b713c23..93b6116ef3 100644 --- a/crypto/cmp/cmp_protect.c +++ b/crypto/cmp/cmp_protect.c @@ -93,8 +93,7 @@ ASN1_BIT_STRING *ossl_cmp_calc_protection(const OSSL_CMP_CTX *ctx, if ((prot = ASN1_BIT_STRING_new()) == NULL) goto end; /* OpenSSL defaults all bit strings to be encoded as ASN.1 NamedBitList */ - prot->flags &= ~(ASN1_STRING_FLAG_BITS_LEFT | 0x07); - prot->flags |= ASN1_STRING_FLAG_BITS_LEFT; + ossl_asn1_string_set_bits_left(prot, 0); if (!ASN1_BIT_STRING_set(prot, protection, sig_len)) { ASN1_BIT_STRING_free(prot); prot = NULL; |