提交 54c38b7f 编写于 作者: D Dr. Stephen Henson

Make PKCS12 structures opaque

Reviewed-by: NRich Salz <rsalz@openssl.org>
上级 b577fd0b
......@@ -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 {
ASN1_INTEGER *version;
PKCS12_MAC_DATA *mac;
PKCS7 *authsafes;
} 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_MAC_DATA_st PKCS12_MAC_DATA;
typedef struct PKCS12_st PKCS12;
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册