mirror of
https://github.com/openssl/openssl.git
synced 2025-03-25 20:00:44 +08:00
Make PKCS12 structures opaque
Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
parent
b577fd0b81
commit
54c38b7f0d
@ -59,6 +59,7 @@
|
||||
#include <stdio.h>
|
||||
#include "internal/cryptlib.h"
|
||||
#include <openssl/pkcs12.h>
|
||||
#include "p12_lcl.h"
|
||||
|
||||
/* Pack an object into an OCTET STRING and turn into a safebag */
|
||||
|
||||
|
@ -60,6 +60,7 @@
|
||||
#include "internal/cryptlib.h"
|
||||
#include <openssl/asn1t.h>
|
||||
#include <openssl/pkcs12.h>
|
||||
#include "p12_lcl.h"
|
||||
|
||||
/* PKCS#12 ASN1 module */
|
||||
|
||||
|
@ -59,6 +59,7 @@
|
||||
#include <stdio.h>
|
||||
#include "internal/cryptlib.h"
|
||||
#include <openssl/pkcs12.h>
|
||||
#include "p12_lcl.h"
|
||||
|
||||
/* Add a local keyid to a safebag */
|
||||
|
||||
|
@ -59,6 +59,7 @@
|
||||
#include <stdio.h>
|
||||
#include "internal/cryptlib.h"
|
||||
#include <openssl/pkcs12.h>
|
||||
#include "p12_lcl.h"
|
||||
|
||||
static int pkcs12_add_bag(STACK_OF(PKCS12_SAFEBAG) **pbags,
|
||||
PKCS12_SAFEBAG *bag);
|
||||
|
@ -59,6 +59,7 @@
|
||||
#include <stdio.h>
|
||||
#include "internal/cryptlib.h"
|
||||
#include <openssl/pkcs12.h>
|
||||
#include "p12_lcl.h"
|
||||
|
||||
/* Initialise a PKCS12 structure to take data */
|
||||
|
||||
|
@ -98,42 +98,15 @@ extern "C" {
|
||||
# define KEY_EX 0x10
|
||||
# define KEY_SIG 0x80
|
||||
|
||||
typedef struct {
|
||||
X509_SIG *dinfo;
|
||||
ASN1_OCTET_STRING *salt;
|
||||
ASN1_INTEGER *iter; /* defaults to 1 */
|
||||
} PKCS12_MAC_DATA;
|
||||
typedef struct PKCS12_MAC_DATA_st PKCS12_MAC_DATA;
|
||||
|
||||
typedef struct {
|
||||
ASN1_INTEGER *version;
|
||||
PKCS12_MAC_DATA *mac;
|
||||
PKCS7 *authsafes;
|
||||
} PKCS12;
|
||||
typedef struct PKCS12_st PKCS12;
|
||||
|
||||
typedef struct {
|
||||
ASN1_OBJECT *type;
|
||||
union {
|
||||
struct pkcs12_bag_st *bag; /* secret, crl and certbag */
|
||||
struct pkcs8_priv_key_info_st *keybag; /* keybag */
|
||||
X509_SIG *shkeybag; /* shrouded key bag */
|
||||
STACK_OF(PKCS12_SAFEBAG) *safes;
|
||||
ASN1_TYPE *other;
|
||||
} value;
|
||||
STACK_OF(X509_ATTRIBUTE) *attrib;
|
||||
} PKCS12_SAFEBAG;
|
||||
typedef struct PKCS12_SAFEBAG_st PKCS12_SAFEBAG;
|
||||
|
||||
DEFINE_STACK_OF(PKCS12_SAFEBAG)
|
||||
|
||||
typedef struct pkcs12_bag_st {
|
||||
ASN1_OBJECT *type;
|
||||
union {
|
||||
ASN1_OCTET_STRING *x509cert;
|
||||
ASN1_OCTET_STRING *x509crl;
|
||||
ASN1_OCTET_STRING *octet;
|
||||
ASN1_IA5STRING *sdsicert;
|
||||
ASN1_TYPE *other; /* Secret or other bag */
|
||||
} value;
|
||||
} PKCS12_BAGS;
|
||||
typedef struct pkcs12_bag_st PKCS12_BAGS;
|
||||
|
||||
# define PKCS12_ERROR 0
|
||||
# define PKCS12_OK 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user