mirror of
https://github.com/openssl/openssl.git
synced 2026-01-18 17:11:31 +01:00
Constify the return value of X509_get0_pubkey_bitstr()
Part of #28654 Fixes: https://github.com/openssl/project/issues/1772 Reviewed-by: Neil Horman <nhorman@openssl.org> Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/29434)
This commit is contained in:
@@ -24,7 +24,7 @@ OCSP_CERTID *OCSP_cert_to_id(const EVP_MD *dgst, const X509 *subject,
|
||||
{
|
||||
const X509_NAME *iname;
|
||||
const ASN1_INTEGER *serial;
|
||||
ASN1_BIT_STRING *ikey;
|
||||
const ASN1_BIT_STRING *ikey;
|
||||
|
||||
if (!dgst)
|
||||
dgst = EVP_sha1();
|
||||
|
||||
@@ -204,7 +204,7 @@ int X509_ocspid_print(BIO *bp, const X509 *x)
|
||||
int derlen;
|
||||
int i;
|
||||
unsigned char SHA1md[SHA_DIGEST_LENGTH];
|
||||
ASN1_BIT_STRING *keybstr;
|
||||
const ASN1_BIT_STRING *keybstr;
|
||||
const X509_NAME *subj;
|
||||
EVP_MD *md = NULL;
|
||||
|
||||
|
||||
@@ -488,7 +488,7 @@ int i2d_ECPrivateKey_bio(BIO *bp, const EC_KEY *eckey)
|
||||
int X509_pubkey_digest(const X509 *data, const EVP_MD *type,
|
||||
unsigned char *md, unsigned int *len)
|
||||
{
|
||||
ASN1_BIT_STRING *key = X509_get0_pubkey_bitstr(data);
|
||||
const ASN1_BIT_STRING *key = X509_get0_pubkey_bitstr(data);
|
||||
|
||||
if (key == NULL)
|
||||
return 0;
|
||||
|
||||
@@ -1028,7 +1028,7 @@ int X509_PUBKEY_get0_param(ASN1_OBJECT **ppkalg,
|
||||
return 1;
|
||||
}
|
||||
|
||||
ASN1_BIT_STRING *X509_get0_pubkey_bitstr(const X509 *x)
|
||||
const ASN1_BIT_STRING *X509_get0_pubkey_bitstr(const X509 *x)
|
||||
{
|
||||
if (x == NULL)
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user