diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2016-08-17 13:50:48 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2016-08-17 13:59:04 +0100 |
commit | 8900f3e3982a016a25ad87a2270446e780038ec9 (patch) | |
tree | 686da17998e72e5a54c75bb511459e55bc5344f9 /include | |
parent | 5e6089f0eba7b12f21b3237c57f2bd56049eb1ae (diff) | |
download | openssl-8900f3e3982a016a25ad87a2270446e780038ec9.tar.gz |
Convert X509* functions to use const getters
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/openssl/evp.h | 4 | ||||
-rw-r--r-- | include/openssl/x509.h | 9 |
2 files changed, 7 insertions, 6 deletions
diff --git a/include/openssl/evp.h b/include/openssl/evp.h index 3727545208..b9c83b2b52 100644 --- a/include/openssl/evp.h +++ b/include/openssl/evp.h @@ -895,7 +895,7 @@ int EVP_PKEY_encrypt_old(unsigned char *enc_key, int EVP_PKEY_type(int type); int EVP_PKEY_id(const EVP_PKEY *pkey); int EVP_PKEY_base_id(const EVP_PKEY *pkey); -int EVP_PKEY_bits(EVP_PKEY *pkey); +int EVP_PKEY_bits(const EVP_PKEY *pkey); int EVP_PKEY_security_bits(const EVP_PKEY *pkey); int EVP_PKEY_size(EVP_PKEY *pkey); int EVP_PKEY_set_type(EVP_PKEY *pkey, int type); @@ -1047,7 +1047,7 @@ int EVP_PKEY_asn1_get0_info(int *ppkey_id, int *pkey_base_id, const char **ppem_str, const EVP_PKEY_ASN1_METHOD *ameth); -const EVP_PKEY_ASN1_METHOD *EVP_PKEY_get0_asn1(EVP_PKEY *pkey); +const EVP_PKEY_ASN1_METHOD *EVP_PKEY_get0_asn1(const EVP_PKEY *pkey); EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_new(int id, int flags, const char *pem_str, const char *info); diff --git a/include/openssl/x509.h b/include/openssl/x509.h index 11bcf64da3..7e649eb381 100644 --- a/include/openssl/x509.h +++ b/include/openssl/x509.h @@ -630,14 +630,15 @@ int X509_get_signature_type(const X509 *x); * i2d_X509_NAME(X509_get_X509_PUBKEY(x),&buf) */ X509_PUBKEY *X509_get_X509_PUBKEY(const X509 *x); -STACK_OF(X509_EXTENSION) *X509_get0_extensions(const X509 *x); -void X509_get0_uids(ASN1_BIT_STRING **piuid, ASN1_BIT_STRING **psuid, X509 *x); -X509_ALGOR *X509_get0_tbs_sigalg(X509 *x); +const STACK_OF(X509_EXTENSION) *X509_get0_extensions(const X509 *x); +void X509_get0_uids(const X509 *x, const ASN1_BIT_STRING **piuid, + const ASN1_BIT_STRING **psuid); +const X509_ALGOR *X509_get0_tbs_sigalg(const X509 *x); EVP_PKEY *X509_get0_pubkey(const X509 *x); EVP_PKEY *X509_get_pubkey(X509 *x); ASN1_BIT_STRING *X509_get0_pubkey_bitstr(const X509 *x); -int X509_certificate_type(X509 *x, EVP_PKEY *pubkey /* optional */ ); +int X509_certificate_type(X509 *x, const EVP_PKEY *pubkey /* optional */ ); long X509_REQ_get_version(const X509_REQ *req); int X509_REQ_set_version(X509_REQ *x, long version); |