diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2016-03-22 13:16:42 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2016-03-22 15:28:11 +0000 |
commit | 29fa0a1af45a1037850b29f5851f4a054124781b (patch) | |
tree | 15f8e47117a0b14782700d6d9feab7fa2a71af1b /crypto/x509/x_pubkey.c | |
parent | 91829e456c998eb9c2e565307b8f1022481049ce (diff) | |
download | openssl-29fa0a1af45a1037850b29f5851f4a054124781b.zip openssl-29fa0a1af45a1037850b29f5851f4a054124781b.tar.gz openssl-29fa0a1af45a1037850b29f5851f4a054124781b.tar.bz2 |
Make X509_PUBKEY opaque
Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'crypto/x509/x_pubkey.c')
-rw-r--r-- | crypto/x509/x_pubkey.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/crypto/x509/x_pubkey.c b/crypto/x509/x_pubkey.c index 158d1d2..55d5594 100644 --- a/crypto/x509/x_pubkey.c +++ b/crypto/x509/x_pubkey.c @@ -61,9 +61,17 @@ #include <openssl/x509.h> #include "internal/asn1_int.h" #include "internal/evp_int.h" +#include "internal/x509_int.h" #include <openssl/rsa.h> #include <openssl/dsa.h> +struct X509_pubkey_st { + X509_ALGOR *algor; + ASN1_BIT_STRING *public_key; + EVP_PKEY *pkey; + CRYPTO_RWLOCK *lock; +}; + /* Minor tweak to operation: free up EVP_PKEY */ static int pubkey_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, void *exarg) @@ -375,3 +383,10 @@ int X509_PUBKEY_get0_param(ASN1_OBJECT **ppkalg, *pa = pub->algor; return 1; } + +ASN1_BIT_STRING *X509_get0_pubkey_bitstr(const X509 *x) +{ + if (x == NULL) + return NULL; + return x->cert_info.key->public_key; +} |