#include <openssl/pkcs8.h>
#include <limits.h>
#include <openssl/asn1t.h>
#include <openssl/asn1.h>
#include <openssl/bio.h>
#include <openssl/buf.h>
#include <openssl/bytestring.h>
#include <openssl/err.h>
#include <openssl/evp.h>
#include <openssl/digest.h>
#include <openssl/hmac.h>
#include <openssl/mem.h>
#include <openssl/rand.h>
#include <openssl/x509.h>
#include "internal.h"
#include "../bytestring/internal.h"
#include "../internal.h"
Go to the source code of this file.
Classes | |
struct | pkcs12_st |
Functions | |
static int | add_bag_attributes (CBB *bag, const char *name, const uint8_t *key_id, size_t key_id_len) |
static int | add_cert_bag (CBB *cbb, X509 *cert, const char *name, const uint8_t *key_id, size_t key_id_len) |
static int | add_cert_safe_contents (CBB *cbb, X509 *cert, const STACK_OF(X509) *chain, const char *name, const uint8_t *key_id, size_t key_id_len) |
static int | add_encrypted_data (CBB *out, int pbe_nid, const char *password, size_t password_len, unsigned iterations, const uint8_t *in, size_t in_len) |
ASN1_SEQUENCE_cb (PKCS8_PRIV_KEY_INFO, pkey_cb) | |
PKCS12 * | d2i_PKCS12 (PKCS12 **out_p12, const uint8_t **ber_bytes, size_t ber_len) |
PKCS12 * | d2i_PKCS12_bio (BIO *bio, PKCS12 **out_p12) |
PKCS12 * | d2i_PKCS12_fp (FILE *fp, PKCS12 **out_p12) |
int | i2d_PKCS12 (const PKCS12 *p12, uint8_t **out) |
int | i2d_PKCS12_bio (BIO *bio, const PKCS12 *p12) |
int | i2d_PKCS12_fp (FILE *fp, const PKCS12 *p12) |
static int | parse_bag_attributes (CBS *attrs, uint8_t **out_friendly_name, size_t *out_friendly_name_len) |
static int | pkcs12_check_mac (int *out_mac_ok, const char *password, size_t password_len, const CBS *salt, unsigned iterations, const EVP_MD *md, const CBS *authsafes, const CBS *expected_mac) |
PKCS12 * | PKCS12_create (const char *password, const char *name, const EVP_PKEY *pkey, X509 *cert, const STACK_OF(X509) *chain, int key_nid, int cert_nid, int iterations, int mac_iterations, int key_type) |
void | PKCS12_free (PKCS12 *p12) |
int | PKCS12_get_key_and_certs (EVP_PKEY **out_key, STACK_OF(X509) *out_certs, CBS *ber_in, const char *password) |
static int | PKCS12_handle_content_info (CBS *content_info, struct pkcs12_context *ctx) |
static int | PKCS12_handle_safe_bag (CBS *safe_bag, struct pkcs12_context *ctx) |
static int | PKCS12_handle_sequence (CBS *sequence, struct pkcs12_context *ctx, int(*handle_element)(CBS *cbs, struct pkcs12_context *ctx)) |
int | pkcs12_iterations_acceptable (uint64_t iterations) |
int | PKCS12_parse (const PKCS12 *p12, const char *password, EVP_PKEY **out_pkey, X509 **out_cert, STACK_OF(X509) **out_ca_certs) |
void | PKCS12_PBE_add (void) |
int | PKCS12_verify_mac (const PKCS12 *p12, const char *password, int password_len) |
static int | pkey_cb (int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, void *exarg) |
Variables | |
static const uint8_t | kCertBag [] |
static const uint8_t | kFriendlyName [] |
static const uint8_t | kKeyBag [] |
static const uint8_t | kLocalKeyID [] |
static const uint8_t | kPKCS7Data [] |
static const uint8_t | kPKCS7EncryptedData [] |
static const uint8_t | kPKCS8ShroudedKeyBag [] |
static const uint8_t | kX509Certificate [] |
|
static |
Definition at line 996 of file pkcs8_x509.c.
|
static |
Definition at line 1042 of file pkcs8_x509.c.
|
static |
Definition at line 1072 of file pkcs8_x509.c.
|
static |
Definition at line 1092 of file pkcs8_x509.c.
ASN1_SEQUENCE_cb | ( | PKCS8_PRIV_KEY_INFO | , |
pkey_cb | |||
) |
Definition at line 787 of file pkcs8_x509.c.
Definition at line 815 of file pkcs8_x509.c.
Definition at line 864 of file pkcs8_x509.c.
Definition at line 906 of file pkcs8_x509.c.
|
static |
Definition at line 355 of file pkcs8_x509.c.
|
static |
Definition at line 603 of file pkcs8_x509.c.
PKCS12* PKCS12_create | ( | const char * | password, |
const char * | name, | ||
const EVP_PKEY * | pkey, | ||
X509 * | cert, | ||
const STACK_OF(X509) * | chain, | ||
int | key_nid, | ||
int | cert_nid, | ||
int | iterations, | ||
int | mac_iterations, | ||
int | key_type | ||
) |
Definition at line 1153 of file pkcs8_x509.c.
void PKCS12_free | ( | PKCS12 * | p12 | ) |
Definition at line 1377 of file pkcs8_x509.c.
int PKCS12_get_key_and_certs | ( | EVP_PKEY ** | out_key, |
STACK_OF(X509) * | out_certs, | ||
CBS * | ber_in, | ||
const char * | password | ||
) |
Definition at line 634 of file pkcs8_x509.c.
Definition at line 526 of file pkcs8_x509.c.
Definition at line 414 of file pkcs8_x509.c.
|
static |
Definition at line 285 of file pkcs8_x509.c.
Definition at line 78 of file pkcs8_x509.c.
int PKCS12_parse | ( | const PKCS12 * | p12, |
const char * | password, | ||
EVP_PKEY ** | out_pkey, | ||
X509 ** | out_cert, | ||
STACK_OF(X509) ** | out_ca_certs | ||
) |
Definition at line 917 of file pkcs8_x509.c.
void PKCS12_PBE_add | ( | void | ) |
Definition at line 780 of file pkcs8_x509.c.
Definition at line 969 of file pkcs8_x509.c.
|
static |
Definition at line 94 of file pkcs8_x509.c.
Definition at line 336 of file pkcs8_x509.c.
Definition at line 340 of file pkcs8_x509.c.
Definition at line 328 of file pkcs8_x509.c.
Definition at line 344 of file pkcs8_x509.c.
Definition at line 517 of file pkcs8_x509.c.
Definition at line 521 of file pkcs8_x509.c.
Definition at line 332 of file pkcs8_x509.c.
Definition at line 348 of file pkcs8_x509.c.