summaryrefslogtreecommitdiffstats
path: root/crypto/x509/x_pubkey.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/x509/x_pubkey.c')
-rw-r--r--crypto/x509/x_pubkey.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/crypto/x509/x_pubkey.c b/crypto/x509/x_pubkey.c
index 126c2400f6..c8d76f882e 100644
--- a/crypto/x509/x_pubkey.c
+++ b/crypto/x509/x_pubkey.c
@@ -981,9 +981,7 @@ void X509_PUBKEY_set0_public_key(X509_PUBKEY *pub,
unsigned char *penc, int penclen)
{
ASN1_STRING_set0(pub->public_key, penc, penclen);
- /* Set number of unused bits to zero */
- pub->public_key->flags &= ~(ASN1_STRING_FLAG_BITS_LEFT | 0x07);
- pub->public_key->flags |= ASN1_STRING_FLAG_BITS_LEFT;
+ ossl_asn1_string_set_bits_left(pub->public_key, 0);
}
int X509_PUBKEY_set0_param(X509_PUBKEY *pub, ASN1_OBJECT *aobj,