Make X509_PUBKEY opaque.

Update-Note: Direct accesses of X509_PUBKEY should be replaced with one
of the accessors. I believe all callers have been fixed at this point.

Change-Id: Ib325782867478fb548da1bf5ef0023cf989f125b
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/46944
Reviewed-by: Adam Langley <agl@google.com>
chromium-5359
David Benjamin 4 years ago committed by Adam Langley
parent 468cde90ca
commit e60893c098
  1. 6
      crypto/x509/internal.h
  2. 2
      crypto/x509/t_req.c
  3. 1
      crypto/x509/x509_cmp.c
  4. 1
      crypto/x509/x_pubkey.c
  5. 1
      crypto/x509v3/v3_skey.c
  6. 6
      include/openssl/x509.h

@ -31,6 +31,12 @@ struct X509_val_st {
ASN1_TIME *notAfter;
} /* X509_VAL */;
struct X509_pubkey_st {
X509_ALGOR *algor;
ASN1_BIT_STRING *public_key;
EVP_PKEY *pkey;
} /* X509_PUBKEY */;
/* RSA-PSS functions. */

@ -63,6 +63,8 @@
#include <openssl/x509.h>
#include <openssl/x509v3.h>
#include "internal.h"
int X509_REQ_print_fp(FILE *fp, X509_REQ *x) {
BIO *bio = BIO_new_fp(fp, BIO_NOCLOSE);

@ -68,6 +68,7 @@
#include "../internal.h"
#include "../x509v3/internal.h"
#include "internal.h"
int X509_issuer_and_serial_cmp(const X509 *a, const X509 *b)

@ -68,6 +68,7 @@
#include <openssl/thread.h>
#include "../internal.h"
#include "internal.h"
/* Minor tweak to operation: free up EVP_PKEY */
static int pubkey_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it,

@ -63,6 +63,7 @@
#include <openssl/obj.h>
#include <openssl/x509v3.h>
#include "../x509/internal.h"
#include "internal.h"

@ -115,12 +115,6 @@ DECLARE_ASN1_SET_OF(X509_ALGOR)
typedef STACK_OF(X509_ALGOR) X509_ALGORS;
struct X509_pubkey_st {
X509_ALGOR *algor;
ASN1_BIT_STRING *public_key;
EVP_PKEY *pkey;
};
struct X509_sig_st {
X509_ALGOR *algor;
ASN1_OCTET_STRING *digest;

Loading…
Cancel
Save