Latest update.
This commit is contained in:
@@ -11,6 +11,8 @@
|
||||
|
||||
/* ASN1 public key method structure */
|
||||
|
||||
#include <openssl/core.h>
|
||||
|
||||
struct evp_pkey_asn1_method_st {
|
||||
int pkey_id;
|
||||
int pkey_base_id;
|
||||
@@ -68,10 +70,12 @@ struct evp_pkey_asn1_method_st {
|
||||
* TODO: Make sure these functions are defined for key types that are
|
||||
* implemented in providers.
|
||||
*/
|
||||
/* Exports to providers */
|
||||
/* Exports and imports to / from providers */
|
||||
size_t (*dirty_cnt) (const EVP_PKEY *pk);
|
||||
int (*export_to) (const EVP_PKEY *pk, void *to_keydata,
|
||||
EVP_KEYMGMT *to_keymgmt);
|
||||
EVP_KEYMGMT *to_keymgmt, OPENSSL_CTX *libctx,
|
||||
const char *propq);
|
||||
OSSL_CALLBACK *import_from;
|
||||
} /* EVP_PKEY_ASN1_METHOD */ ;
|
||||
|
||||
DEFINE_STACK_OF_CONST(EVP_PKEY_ASN1_METHOD)
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#include <openssl/core.h>
|
||||
#include <openssl/dh.h>
|
||||
#include "internal/ffc.h"
|
||||
|
||||
@@ -19,7 +20,10 @@ int dh_generate_public_key(BN_CTX *ctx, DH *dh, const BIGNUM *priv_key,
|
||||
|
||||
FFC_PARAMS *dh_get0_params(DH *dh);
|
||||
int dh_get0_nid(const DH *dh);
|
||||
int dh_key_fromdata(DH *dh, const OSSL_PARAM params[]);
|
||||
|
||||
int dh_check_pub_key_partial(const DH *dh, const BIGNUM *pub_key, int *ret);
|
||||
int dh_check_priv_key(const DH *dh, const BIGNUM *priv_key, int *ret);
|
||||
int dh_check_pairwise(DH *dh);
|
||||
|
||||
const DH_METHOD *dh_get_method(const DH *dh);
|
||||
@@ -7,6 +7,7 @@
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#include <openssl/core.h>
|
||||
#include <openssl/dsa.h>
|
||||
#include "internal/ffc.h"
|
||||
|
||||
@@ -24,6 +25,7 @@ int dsa_sign_int(int type, const unsigned char *dgst,
|
||||
const unsigned char *dsa_algorithmidentifier_encoding(int md_nid, size_t *len);
|
||||
|
||||
FFC_PARAMS *dsa_get0_params(DSA *dsa);
|
||||
int dsa_key_fromdata(DSA *dsa, const OSSL_PARAM params[]);
|
||||
|
||||
int dsa_generate_public_key(BN_CTX *ctx, const DSA *dsa, const BIGNUM *priv_key,
|
||||
BIGNUM *pub_key);
|
||||
|
||||
+15
-1
@@ -14,7 +14,7 @@
|
||||
# include <openssl/opensslconf.h>
|
||||
|
||||
# ifndef OPENSSL_NO_EC
|
||||
|
||||
# include <openssl/core.h>
|
||||
# include <openssl/ec.h>
|
||||
|
||||
/*-
|
||||
@@ -50,5 +50,19 @@ int ecdh_KDF_X9_63(unsigned char *out, size_t outlen,
|
||||
const EVP_MD *md);
|
||||
|
||||
int ec_generate_key(OPENSSL_CTX *libctx, EC_KEY *eckey, int pairwise_test);
|
||||
int ec_key_public_check(const EC_KEY *eckey, BN_CTX *ctx);
|
||||
int ec_key_private_check(const EC_KEY *eckey);
|
||||
int ec_key_pairwise_check(const EC_KEY *eckey, BN_CTX *ctx);
|
||||
OPENSSL_CTX *ec_key_get_libctx(const EC_KEY *eckey);
|
||||
const char *ec_curve_nid2name(int nid);
|
||||
int ec_curve_name2nid(const char *name);
|
||||
const unsigned char *ecdsa_algorithmidentifier_encoding(int md_nid, size_t *len);
|
||||
|
||||
/* Backend support */
|
||||
int ec_key_fromdata(EC_KEY *ecx, const OSSL_PARAM params[], int include_private);
|
||||
int ec_key_domparams_fromdata(EC_KEY *ecx, const OSSL_PARAM params[]);
|
||||
int ec_key_otherparams_fromdata(EC_KEY *ec, const OSSL_PARAM params[]);
|
||||
int ec_set_param_ecdh_cofactor_mode(EC_KEY *ec, const OSSL_PARAM *p);
|
||||
|
||||
# endif /* OPENSSL_NO_EC */
|
||||
#endif
|
||||
+56
-12
@@ -15,40 +15,64 @@
|
||||
|
||||
# ifndef OPENSSL_NO_EC
|
||||
|
||||
# include <openssl/core.h>
|
||||
# include <openssl/e_os2.h>
|
||||
# include <openssl/crypto.h>
|
||||
# include "internal/refcount.h"
|
||||
|
||||
# define X25519_KEYLEN 32
|
||||
# define X448_KEYLEN 56
|
||||
# define ED25519_KEYLEN 32
|
||||
# define ED448_KEYLEN 57
|
||||
# define X25519_KEYLEN 32
|
||||
# define X448_KEYLEN 56
|
||||
# define ED25519_KEYLEN 32
|
||||
# define ED448_KEYLEN 57
|
||||
|
||||
# define MAX_KEYLEN ED448_KEYLEN
|
||||
|
||||
# define X25519_BITS 253
|
||||
# define X25519_SECURITY_BITS 128
|
||||
# define X25519_BITS 253
|
||||
# define X25519_SECURITY_BITS 128
|
||||
|
||||
# define ED25519_SIGSIZE 64
|
||||
# define X448_BITS 448
|
||||
# define X448_SECURITY_BITS 224
|
||||
|
||||
# define X448_BITS 448
|
||||
# define ED448_BITS 456
|
||||
# define X448_SECURITY_BITS 224
|
||||
# define ED25519_BITS 256
|
||||
/* RFC8032 Section 8.5 */
|
||||
# define ED25519_SECURITY_BITS 128
|
||||
# define ED25519_SIGSIZE 64
|
||||
|
||||
# define ED448_SIGSIZE 114
|
||||
# define ED448_BITS 456
|
||||
/* RFC8032 Section 8.5 */
|
||||
# define ED448_SECURITY_BITS 224
|
||||
# define ED448_SIGSIZE 114
|
||||
|
||||
|
||||
typedef enum {
|
||||
ECX_KEY_TYPE_X25519,
|
||||
ECX_KEY_TYPE_X448,
|
||||
ECX_KEY_TYPE_ED25519,
|
||||
ECX_KEY_TYPE_ED448
|
||||
} ECX_KEY_TYPE;
|
||||
|
||||
#define KEYTYPE2NID(type) \
|
||||
((type) == ECX_KEY_TYPE_X25519 \
|
||||
? EVP_PKEY_X25519 \
|
||||
: ((type) == ECX_KEY_TYPE_X448 \
|
||||
? EVP_PKEY_X448 \
|
||||
: ((type) == ECX_KEY_TYPE_ED25519 \
|
||||
? EVP_PKEY_ED25519 \
|
||||
: EVP_PKEY_ED448)))
|
||||
|
||||
struct ecx_key_st {
|
||||
unsigned int haspubkey:1;
|
||||
unsigned char pubkey[MAX_KEYLEN];
|
||||
unsigned char *privkey;
|
||||
size_t keylen;
|
||||
ECX_KEY_TYPE type;
|
||||
CRYPTO_REF_COUNT references;
|
||||
CRYPTO_RWLOCK *lock;
|
||||
};
|
||||
|
||||
typedef struct ecx_key_st ECX_KEY;
|
||||
|
||||
ECX_KEY *ecx_key_new(size_t keylen, int haspubkey);
|
||||
ECX_KEY *ecx_key_new(ECX_KEY_TYPE type, int haspubkey);
|
||||
unsigned char *ecx_key_allocate_privkey(ECX_KEY *key);
|
||||
void ecx_key_free(ECX_KEY *key);
|
||||
int ecx_key_up_ref(ECX_KEY *key);
|
||||
@@ -58,6 +82,22 @@ int X25519(uint8_t out_shared_key[32], const uint8_t private_key[32],
|
||||
void X25519_public_from_private(uint8_t out_public_value[32],
|
||||
const uint8_t private_key[32]);
|
||||
|
||||
int ED25519_sign(uint8_t *out_sig, const uint8_t *message, size_t message_len,
|
||||
const uint8_t public_key[32], const uint8_t private_key[32],
|
||||
OPENSSL_CTX *libctx, const char *propq);
|
||||
int ED25519_verify(const uint8_t *message, size_t message_len,
|
||||
const uint8_t signature[64], const uint8_t public_key[32],
|
||||
OPENSSL_CTX *libctx, const char *propq);
|
||||
|
||||
int ED448_sign(OPENSSL_CTX *ctx, uint8_t *out_sig, const uint8_t *message,
|
||||
size_t message_len, const uint8_t public_key[57],
|
||||
const uint8_t private_key[57], const uint8_t *context,
|
||||
size_t context_len);
|
||||
|
||||
int ED448_verify(OPENSSL_CTX *ctx, const uint8_t *message, size_t message_len,
|
||||
const uint8_t signature[114], const uint8_t public_key[57],
|
||||
const uint8_t *context, size_t context_len);
|
||||
|
||||
int X448(uint8_t out_shared_key[56], const uint8_t private_key[56],
|
||||
const uint8_t peer_public_value[56]);
|
||||
void X448_public_from_private(uint8_t out_public_value[56],
|
||||
@@ -70,5 +110,9 @@ int s390x_x448_mul(unsigned char u_dst[56],
|
||||
const unsigned char u_src[56],
|
||||
const unsigned char d_src[56]);
|
||||
|
||||
/* Backend support */
|
||||
int ecx_key_fromdata(ECX_KEY *ecx, const OSSL_PARAM params[],
|
||||
int include_private);
|
||||
|
||||
# endif /* OPENSSL_NO_EC */
|
||||
#endif
|
||||
+72
-25
@@ -23,17 +23,19 @@ struct evp_pkey_ctx_st {
|
||||
int operation;
|
||||
|
||||
/*
|
||||
* Library context, Key type name and properties associated
|
||||
* with this context
|
||||
* Library context, property query, keytype and keymgmt associated with
|
||||
* this context
|
||||
*/
|
||||
OPENSSL_CTX *libctx;
|
||||
const char *keytype;
|
||||
const char *propquery;
|
||||
|
||||
/* cached key manager */
|
||||
const char *keytype;
|
||||
EVP_KEYMGMT *keymgmt;
|
||||
|
||||
union {
|
||||
struct {
|
||||
void *genctx;
|
||||
} keymgmt;
|
||||
|
||||
struct {
|
||||
EVP_KEYEXCH *exchange;
|
||||
void *exchprovctx;
|
||||
@@ -50,6 +52,14 @@ struct evp_pkey_ctx_st {
|
||||
} ciph;
|
||||
} op;
|
||||
|
||||
/* Application specific data, usually used by the callback */
|
||||
void *app_data;
|
||||
/* Keygen callback */
|
||||
EVP_PKEY_gen_cb *pkey_gencb;
|
||||
/* implementation specific keygen data */
|
||||
int *keygen_info;
|
||||
int keygen_info_count;
|
||||
|
||||
/* Legacy fields below */
|
||||
|
||||
/* Method associated with this operation */
|
||||
@@ -62,13 +72,8 @@ struct evp_pkey_ctx_st {
|
||||
EVP_PKEY *peerkey;
|
||||
/* Algorithm specific data */
|
||||
void *data;
|
||||
/* Application specific data */
|
||||
void *app_data;
|
||||
/* Keygen callback */
|
||||
EVP_PKEY_gen_cb *pkey_gencb;
|
||||
/* implementation specific keygen data */
|
||||
int *keygen_info;
|
||||
int keygen_info_count;
|
||||
/* Indicator if digest_custom needs to be called */
|
||||
unsigned int flag_call_digest_custom:1;
|
||||
} /* EVP_PKEY_CTX */ ;
|
||||
|
||||
#define EVP_PKEY_FLAG_DYNAMIC 1
|
||||
@@ -497,14 +502,31 @@ const EVP_CIPHER *EVP_##cname##_ecb(void) { return &cname##_ecb; }
|
||||
cipher##_init_key, NULL, NULL, NULL, NULL)
|
||||
|
||||
/*
|
||||
* Type needs to be a bit field Sub-type needs to be for variations on the
|
||||
* method, as in, can it do arbitrary encryption....
|
||||
* An EVP_PKEY can have the following states:
|
||||
*
|
||||
* untyped & empty:
|
||||
*
|
||||
* type == EVP_PKEY_NONE && keymgmt == NULL
|
||||
*
|
||||
* typed & empty:
|
||||
*
|
||||
* (type != EVP_PKEY_NONE && pkey.ptr == NULL) ## legacy (libcrypto only)
|
||||
* || (keymgmt != NULL && keydata == NULL) ## provider side
|
||||
*
|
||||
* fully assigned:
|
||||
*
|
||||
* (type != EVP_PKEY_NONE && pkey.ptr != NULL) ## legacy (libcrypto only)
|
||||
* || (keymgmt != NULL && keydata != NULL) ## provider side
|
||||
*
|
||||
* The easiest way to detect a legacy key is: type != EVP_PKEY_NONE
|
||||
* The easiest way to detect a provider side key is: keymgmt != NULL
|
||||
*/
|
||||
struct evp_pkey_st {
|
||||
/* == Legacy attributes == */
|
||||
int type;
|
||||
int save_type;
|
||||
|
||||
# ifndef FIPS_MODE
|
||||
/*
|
||||
* Legacy key "origin" is composed of a pointer to an EVP_PKEY_ASN1_METHOD,
|
||||
* a pointer to a low level key and possibly a pointer to an engine.
|
||||
@@ -514,26 +536,30 @@ struct evp_pkey_st {
|
||||
ENGINE *pmeth_engine; /* If not NULL public key ENGINE to use */
|
||||
union {
|
||||
void *ptr;
|
||||
# ifndef OPENSSL_NO_RSA
|
||||
# ifndef OPENSSL_NO_RSA
|
||||
struct rsa_st *rsa; /* RSA */
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_DSA
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_DSA
|
||||
struct dsa_st *dsa; /* DSA */
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_DH
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_DH
|
||||
struct dh_st *dh; /* DH */
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_EC
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_EC
|
||||
struct ec_key_st *ec; /* ECC */
|
||||
ECX_KEY *ecx; /* X25519, X448, Ed25519, Ed448 */
|
||||
# endif
|
||||
# endif
|
||||
} pkey;
|
||||
# endif
|
||||
|
||||
/* == Common attributes == */
|
||||
CRYPTO_REF_COUNT references;
|
||||
CRYPTO_RWLOCK *lock;
|
||||
STACK_OF(X509_ATTRIBUTE) *attributes; /* [ 0 ] */
|
||||
int save_parameters;
|
||||
#ifndef FIPS_MODE
|
||||
CRYPTO_EX_DATA ex_data;
|
||||
#endif
|
||||
|
||||
/* == Provider attributes == */
|
||||
|
||||
@@ -596,6 +622,10 @@ struct evp_pkey_st {
|
||||
((ctx)->operation == EVP_PKEY_OP_ENCRYPT \
|
||||
|| (ctx)->operation == EVP_PKEY_OP_DECRYPT)
|
||||
|
||||
#define EVP_PKEY_CTX_IS_GEN_OP(ctx) \
|
||||
((ctx)->operation == EVP_PKEY_OP_PARAMGEN \
|
||||
|| (ctx)->operation == EVP_PKEY_OP_KEYGEN)
|
||||
|
||||
void openssl_add_all_ciphers_int(void);
|
||||
void openssl_add_all_digests_int(void);
|
||||
void evp_cleanup_int(void);
|
||||
@@ -603,9 +633,10 @@ void evp_app_cleanup_int(void);
|
||||
void *evp_pkey_export_to_provider(EVP_PKEY *pk, OPENSSL_CTX *libctx,
|
||||
EVP_KEYMGMT **keymgmt,
|
||||
const char *propquery);
|
||||
void *evp_pkey_upgrade_to_provider(EVP_PKEY *pk, OPENSSL_CTX *libctx,
|
||||
EVP_KEYMGMT **keymgmt,
|
||||
const char *propquery);
|
||||
#ifndef FIPS_MODE
|
||||
int evp_pkey_downgrade(EVP_PKEY *pk);
|
||||
void evp_pkey_free_legacy(EVP_PKEY *x);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* KEYMGMT utility functions
|
||||
@@ -622,6 +653,8 @@ void *evp_keymgmt_util_fromdata(EVP_PKEY *target, EVP_KEYMGMT *keymgmt,
|
||||
int evp_keymgmt_util_has(EVP_PKEY *pk, int selection);
|
||||
int evp_keymgmt_util_match(EVP_PKEY *pk1, EVP_PKEY *pk2, int selection);
|
||||
int evp_keymgmt_util_copy(EVP_PKEY *to, EVP_PKEY *from, int selection);
|
||||
void *evp_keymgmt_util_gen(EVP_PKEY *target, EVP_KEYMGMT *keymgmt,
|
||||
void *genctx, OSSL_CALLBACK *cb, void *cbarg);
|
||||
|
||||
|
||||
/*
|
||||
@@ -636,6 +669,20 @@ int evp_keymgmt_set_params(const EVP_KEYMGMT *keymgmt,
|
||||
void *keydata, const OSSL_PARAM params[]);
|
||||
const OSSL_PARAM *evp_keymgmt_settable_params(const EVP_KEYMGMT *keymgmt);
|
||||
|
||||
void *evp_keymgmt_gen_init(const EVP_KEYMGMT *keymgmt, int selection);
|
||||
int evp_keymgmt_gen_set_template(const EVP_KEYMGMT *keymgmt, void *genctx,
|
||||
void *template);
|
||||
int evp_keymgmt_gen_set_params(const EVP_KEYMGMT *keymgmt, void *genctx,
|
||||
const OSSL_PARAM params[]);
|
||||
const OSSL_PARAM *
|
||||
evp_keymgmt_gen_settable_params(const EVP_KEYMGMT *keymgmt);
|
||||
int evp_keymgmt_gen_get_params(const EVP_KEYMGMT *keymgmt, void *genctx,
|
||||
OSSL_PARAM params[]);
|
||||
const OSSL_PARAM *
|
||||
evp_keymgmt_gen_gettable_params(const EVP_KEYMGMT *keymgmt);
|
||||
void *evp_keymgmt_gen(const EVP_KEYMGMT *keymgmt, void *genctx,
|
||||
OSSL_CALLBACK *cb, void *cbarg);
|
||||
void evp_keymgmt_gen_cleanup(const EVP_KEYMGMT *keymgmt, void *genctx);
|
||||
|
||||
int evp_keymgmt_has(const EVP_KEYMGMT *keymgmt, void *keyddata, int selection);
|
||||
int evp_keymgmt_validate(const EVP_KEYMGMT *keymgmt, void *keydata,
|
||||
|
||||
+10
-3
@@ -10,6 +10,7 @@
|
||||
#ifndef OSSL_INTERNAL_RSA_H
|
||||
# define OSSL_INTERNAL_RSA_H
|
||||
|
||||
#include <openssl/core.h>
|
||||
#include <openssl/rsa.h>
|
||||
|
||||
RSA *rsa_new_with_ctx(OPENSSL_CTX *libctx);
|
||||
@@ -20,10 +21,12 @@ int rsa_set0_all_params(RSA *r, const STACK_OF(BIGNUM) *primes,
|
||||
int rsa_get0_all_params(RSA *r, STACK_OF(BIGNUM_const) *primes,
|
||||
STACK_OF(BIGNUM_const) *exps,
|
||||
STACK_OF(BIGNUM_const) *coeffs);
|
||||
int rsa_fromdata(RSA *rsa, const OSSL_PARAM params[]);
|
||||
|
||||
int rsa_padding_check_PKCS1_type_2_TLS(unsigned char *to, size_t tlen,
|
||||
const unsigned char *from, size_t flen,
|
||||
int client_version, int alt_version);
|
||||
int rsa_padding_check_PKCS1_type_2_TLS(OPENSSL_CTX *ctx, unsigned char *to,
|
||||
size_t tlen, const unsigned char *from,
|
||||
size_t flen, int client_version,
|
||||
int alt_version);
|
||||
|
||||
int rsa_validate_public(const RSA *key);
|
||||
int rsa_validate_private(const RSA *key);
|
||||
@@ -37,4 +40,8 @@ int int_rsa_verify(int dtype, const unsigned char *m,
|
||||
const unsigned char *rsa_digestinfo_encoding(int md_nid, size_t *len);
|
||||
const unsigned char *rsa_algorithmidentifier_encoding(int md_nid, size_t *len);
|
||||
|
||||
extern const char *rsa_mp_factor_names[];
|
||||
extern const char *rsa_mp_exp_names[];
|
||||
extern const char *rsa_mp_coeff_names[];
|
||||
|
||||
#endif
|
||||
+14
-8
@@ -71,9 +71,9 @@ struct X509_req_st {
|
||||
ASN1_BIT_STRING *signature; /* signature */
|
||||
CRYPTO_REF_COUNT references;
|
||||
CRYPTO_RWLOCK *lock;
|
||||
# ifndef OPENSSL_NO_SM2
|
||||
ASN1_OCTET_STRING *sm2_id;
|
||||
# endif
|
||||
|
||||
/* Set on live certificates for authentication purposes */
|
||||
ASN1_OCTET_STRING *distinguishing_id;
|
||||
};
|
||||
|
||||
struct X509_crl_info_st {
|
||||
@@ -186,9 +186,9 @@ struct x509_st {
|
||||
X509_CERT_AUX *aux;
|
||||
CRYPTO_RWLOCK *lock;
|
||||
volatile int ex_cached;
|
||||
# ifndef OPENSSL_NO_SM2
|
||||
ASN1_OCTET_STRING *sm2_id;
|
||||
# endif
|
||||
|
||||
/* Set on live certificates for authentication purposes */
|
||||
ASN1_OCTET_STRING *distinguishing_id;
|
||||
} /* X509 */ ;
|
||||
|
||||
/*
|
||||
@@ -227,8 +227,11 @@ struct x509_store_ctx_st { /* X509_STORE_CTX */
|
||||
int (*cert_crl) (X509_STORE_CTX *ctx, X509_CRL *crl, X509 *x);
|
||||
/* Check policy status of the chain */
|
||||
int (*check_policy) (X509_STORE_CTX *ctx);
|
||||
STACK_OF(X509) *(*lookup_certs) (X509_STORE_CTX *ctx, X509_NAME *nm);
|
||||
STACK_OF(X509_CRL) *(*lookup_crls) (X509_STORE_CTX *ctx, X509_NAME *nm);
|
||||
STACK_OF(X509) *(*lookup_certs) (X509_STORE_CTX *ctx,
|
||||
const X509_NAME *nm);
|
||||
/* cannot constify 'ctx' param due to lookup_certs_sk() in x509_vfy.c */
|
||||
STACK_OF(X509_CRL) *(*lookup_crls) (const X509_STORE_CTX *ctx,
|
||||
const X509_NAME *nm);
|
||||
int (*cleanup) (X509_STORE_CTX *ctx);
|
||||
/* The following is built up */
|
||||
/* if 0, rebuild chain */
|
||||
@@ -259,6 +262,9 @@ struct x509_store_ctx_st { /* X509_STORE_CTX */
|
||||
SSL_DANE *dane;
|
||||
/* signed via bare TA public key, rather than CA certificate */
|
||||
int bare_ta_signed;
|
||||
|
||||
OPENSSL_CTX *libctx;
|
||||
char *propq;
|
||||
};
|
||||
|
||||
/* PKCS#8 private key info structure */
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
# include <openssl/crypto.h>
|
||||
# include <openssl/buffer.h>
|
||||
# include <openssl/bio.h>
|
||||
# include <openssl/asn1.h>
|
||||
# include <openssl/err.h>
|
||||
# include "internal/nelem.h"
|
||||
|
||||
@@ -164,6 +165,7 @@ typedef struct openssl_ctx_method {
|
||||
} OPENSSL_CTX_METHOD;
|
||||
|
||||
OPENSSL_CTX *openssl_ctx_get_concrete(OPENSSL_CTX *ctx);
|
||||
int openssl_ctx_is_default(OPENSSL_CTX *ctx);
|
||||
|
||||
/* Functions to retrieve pointers to data by index */
|
||||
void *openssl_ctx_get_data(OPENSSL_CTX *, int /* index */,
|
||||
@@ -234,5 +236,7 @@ static ossl_inline void ossl_sleep(unsigned long millis)
|
||||
}
|
||||
#endif /* defined OPENSSL_SYS_UNIX */
|
||||
|
||||
char *sk_ASN1_UTF8STRING2text(STACK_OF(ASN1_UTF8STRING) *text, const char *sep,
|
||||
size_t max_len);
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,84 @@
|
||||
/*
|
||||
* Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#include <openssl/bn.h>
|
||||
#include "internal/packet.h"
|
||||
|
||||
/*
|
||||
* NOTE: X.690 numbers the identifier octet bits 1 to 8.
|
||||
* We use the same numbering in comments here.
|
||||
*/
|
||||
|
||||
/* Well known primitive tags */
|
||||
|
||||
/*
|
||||
* DER UNIVERSAL tags, occupying bits 1-5 in the DER identifier byte
|
||||
* These are only valid for the UNIVERSAL class. With the other classes,
|
||||
* these bits have a different meaning.
|
||||
*/
|
||||
#define DER_P_EOC 0 /* BER End Of Contents tag */
|
||||
#define DER_P_BOOLEAN 1
|
||||
#define DER_P_INTEGER 2
|
||||
#define DER_P_BIT_STRING 3
|
||||
#define DER_P_OCTET_STRING 4
|
||||
#define DER_P_NULL 5
|
||||
#define DER_P_OBJECT 6
|
||||
#define DER_P_OBJECT_DESCRIPTOR 7
|
||||
#define DER_P_EXTERNAL 8
|
||||
#define DER_P_REAL 9
|
||||
#define DER_P_ENUMERATED 10
|
||||
#define DER_P_UTF8STRING 12
|
||||
#define DER_P_SEQUENCE 16
|
||||
#define DER_P_SET 17
|
||||
#define DER_P_NUMERICSTRING 18
|
||||
#define DER_P_PRINTABLESTRING 19
|
||||
#define DER_P_T61STRING 20
|
||||
#define DER_P_VIDEOTEXSTRING 21
|
||||
#define DER_P_IA5STRING 22
|
||||
#define DER_P_UTCTIME 23
|
||||
#define DER_P_GENERALIZEDTIME 24
|
||||
#define DER_P_GRAPHICSTRING 25
|
||||
#define DER_P_ISO64STRING 26
|
||||
#define DER_P_GENERALSTRING 27
|
||||
#define DER_P_UNIVERSALSTRING 28
|
||||
#define DER_P_BMPSTRING 30
|
||||
|
||||
/* DER Flags, occupying bit 6 in the DER identifier byte */
|
||||
#define DER_F_PRIMITIVE 0x00
|
||||
#define DER_F_CONSTRUCTED 0x20
|
||||
|
||||
/* DER classes tags, occupying bits 7-8 in the DER identifier byte */
|
||||
#define DER_C_UNIVERSAL 0x00
|
||||
#define DER_C_APPLICATION 0x40
|
||||
#define DER_C_CONTEXT 0x80
|
||||
#define DER_C_PRIVATE 0xC0
|
||||
|
||||
/*
|
||||
* Run-time constructors.
|
||||
*
|
||||
* They all construct DER backwards, so care should be taken to use them
|
||||
* that way.
|
||||
*/
|
||||
|
||||
/* This can be used for all items that don't have a context */
|
||||
#define DER_NO_CONTEXT -1
|
||||
|
||||
int DER_w_precompiled(WPACKET *pkt, int tag,
|
||||
const unsigned char *precompiled, size_t precompiled_n);
|
||||
|
||||
int DER_w_boolean(WPACKET *pkt, int tag, int b);
|
||||
int DER_w_ulong(WPACKET *pkt, int tag, unsigned long v);
|
||||
int DER_w_bn(WPACKET *pkt, int tag, const BIGNUM *v);
|
||||
int DER_w_null(WPACKET *pkt, int tag);
|
||||
|
||||
/*
|
||||
* All constructors for constructed elements have a begin and a end function
|
||||
*/
|
||||
int DER_w_begin_sequence(WPACKET *pkt, int tag);
|
||||
int DER_w_end_sequence(WPACKET *pkt, int tag);
|
||||
@@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#ifndef OSSL_INTERNAL_EVP_H
|
||||
# define OSSL_INTERNAL_EVP_H
|
||||
|
||||
# include <openssl/evp.h>
|
||||
|
||||
# ifndef OPENSSL_NO_EC
|
||||
/*
|
||||
* TODO(3.0) While waiting for more generic getters, we have these functions
|
||||
* as an interim solution. This should be removed when the generic getters
|
||||
* appear.
|
||||
*/
|
||||
int evp_pkey_get_EC_KEY_curve_nid(const EVP_PKEY *pkey);
|
||||
# endif
|
||||
#endif
|
||||
@@ -10,6 +10,7 @@
|
||||
#ifndef OSSL_INTERNAL_FFC_H
|
||||
# define OSSL_INTERNAL_FFC_H
|
||||
|
||||
# include <openssl/core.h>
|
||||
# include <openssl/bn.h>
|
||||
# include <openssl/evp.h>
|
||||
# include <openssl/dh.h> /* Uses Error codes from DH */
|
||||
@@ -154,4 +155,6 @@ int ffc_validate_public_key_partial(const FFC_PARAMS *params,
|
||||
int ffc_validate_private_key(const BIGNUM *upper, const BIGNUM *priv_key,
|
||||
int *ret);
|
||||
|
||||
int ffc_fromdata(FFC_PARAMS *ffc, const OSSL_PARAM params[]);
|
||||
|
||||
#endif /* OSSL_INTERNAL_FFC_H */
|
||||
@@ -638,6 +638,9 @@ struct wpacket_st {
|
||||
|
||||
/* Our sub-packets (always at least one if not finished) */
|
||||
WPACKET_SUB *subs;
|
||||
|
||||
/* Writing from the end first? */
|
||||
unsigned int endfirst : 1;
|
||||
};
|
||||
|
||||
/* Flags */
|
||||
@@ -676,6 +679,12 @@ int WPACKET_init(WPACKET *pkt, BUF_MEM *buf);
|
||||
*/
|
||||
int WPACKET_init_null(WPACKET *pkt, size_t lenbytes);
|
||||
|
||||
/*
|
||||
* Same as WPACKET_init_null except we set the WPACKET to assume DER length
|
||||
* encoding for sub-packets.
|
||||
*/
|
||||
int WPACKET_init_null_der(WPACKET *pkt);
|
||||
|
||||
/*
|
||||
* Same as WPACKET_init_len except we do not use a growable BUF_MEM structure.
|
||||
* A fixed buffer of memory |buf| of size |len| is used instead. A failure will
|
||||
@@ -683,6 +692,14 @@ int WPACKET_init_null(WPACKET *pkt, size_t lenbytes);
|
||||
*/
|
||||
int WPACKET_init_static_len(WPACKET *pkt, unsigned char *buf, size_t len,
|
||||
size_t lenbytes);
|
||||
|
||||
/*
|
||||
* Same as WPACKET_init_static_len except lenbytes is always 0, and we set the
|
||||
* WPACKET to write to the end of the buffer moving towards the start and use
|
||||
* DER length encoding for sub-packets.
|
||||
*/
|
||||
int WPACKET_init_der(WPACKET *pkt, unsigned char *buf, size_t len);
|
||||
|
||||
/*
|
||||
* Set the flags to be applied to the current sub-packet
|
||||
*/
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
/*
|
||||
* Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#include <openssl/params.h>
|
||||
#include <openssl/types.h>
|
||||
|
||||
#define OSSL_PARAM_BLD_MAX 25
|
||||
|
||||
typedef struct {
|
||||
const char *key;
|
||||
int type;
|
||||
int secure;
|
||||
size_t size;
|
||||
size_t alloc_blocks;
|
||||
const BIGNUM *bn;
|
||||
const void *string;
|
||||
union {
|
||||
/*
|
||||
* These fields are never directly addressed, but their sizes are
|
||||
* imporant so that all native types can be copied here without overrun.
|
||||
*/
|
||||
ossl_intmax_t i;
|
||||
ossl_uintmax_t u;
|
||||
double d;
|
||||
} num;
|
||||
} OSSL_PARAM_BLD_DEF;
|
||||
|
||||
typedef struct {
|
||||
size_t curr;
|
||||
size_t total_blocks;
|
||||
size_t secure_blocks;
|
||||
OSSL_PARAM_BLD_DEF params[OSSL_PARAM_BLD_MAX];
|
||||
} OSSL_PARAM_BLD;
|
||||
|
||||
void ossl_param_bld_init(OSSL_PARAM_BLD *bld);
|
||||
OSSL_PARAM *ossl_param_bld_to_param(OSSL_PARAM_BLD *bld);
|
||||
void ossl_param_bld_free(OSSL_PARAM *params);
|
||||
|
||||
int ossl_param_bld_push_int(OSSL_PARAM_BLD *bld, const char *key, int val);
|
||||
int ossl_param_bld_push_uint(OSSL_PARAM_BLD *bld, const char *key,
|
||||
unsigned int val);
|
||||
int ossl_param_bld_push_long(OSSL_PARAM_BLD *bld, const char *key,
|
||||
long int val);
|
||||
int ossl_param_bld_push_ulong(OSSL_PARAM_BLD *bld, const char *key,
|
||||
unsigned long int val);
|
||||
int ossl_param_bld_push_int32(OSSL_PARAM_BLD *bld, const char *key,
|
||||
int32_t val);
|
||||
int ossl_param_bld_push_uint32(OSSL_PARAM_BLD *bld, const char *key,
|
||||
uint32_t val);
|
||||
int ossl_param_bld_push_int64(OSSL_PARAM_BLD *bld, const char *key,
|
||||
int64_t val);
|
||||
int ossl_param_bld_push_uint64(OSSL_PARAM_BLD *bld, const char *key,
|
||||
uint64_t val);
|
||||
int ossl_param_bld_push_size_t(OSSL_PARAM_BLD *bld, const char *key,
|
||||
size_t val);
|
||||
int ossl_param_bld_push_double(OSSL_PARAM_BLD *bld, const char *key,
|
||||
double val);
|
||||
int ossl_param_bld_push_BN(OSSL_PARAM_BLD *bld, const char *key,
|
||||
const BIGNUM *bn);
|
||||
int ossl_param_bld_push_BN_pad(OSSL_PARAM_BLD *bld, const char *key,
|
||||
const BIGNUM *bn, size_t sz);
|
||||
int ossl_param_bld_push_utf8_string(OSSL_PARAM_BLD *bld, const char *key,
|
||||
const char *buf, size_t bsize);
|
||||
int ossl_param_bld_push_utf8_ptr(OSSL_PARAM_BLD *bld, const char *key,
|
||||
char *buf, size_t bsize);
|
||||
int ossl_param_bld_push_octet_string(OSSL_PARAM_BLD *bld, const char *key,
|
||||
const void *buf, size_t bsize);
|
||||
int ossl_param_bld_push_octet_ptr(OSSL_PARAM_BLD *bld, const char *key,
|
||||
void *buf, size_t bsize);
|
||||
@@ -0,0 +1,27 @@
|
||||
/*
|
||||
* Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#include <openssl/safestack.h>
|
||||
#include <openssl/param_build.h>
|
||||
|
||||
int ossl_param_build_set_int(OSSL_PARAM_BLD *bld, OSSL_PARAM *p,
|
||||
const char *key, int num);
|
||||
int ossl_param_build_set_utf8_string(OSSL_PARAM_BLD *bld, OSSL_PARAM *p,
|
||||
const char *key, const char *buf);
|
||||
int ossl_param_build_set_octet_string(OSSL_PARAM_BLD *bld, OSSL_PARAM *p,
|
||||
const char *key,
|
||||
const unsigned char *data,
|
||||
size_t data_len);
|
||||
int ossl_param_build_set_bn(OSSL_PARAM_BLD *bld, OSSL_PARAM *p,
|
||||
const char *key, const BIGNUM *bn);
|
||||
int ossl_param_build_set_bn_pad(OSSL_PARAM_BLD *bld, OSSL_PARAM *p,
|
||||
const char *key, const BIGNUM *bn, size_t sz);
|
||||
int ossl_param_build_set_multi_key_bn(OSSL_PARAM_BLD *bld, OSSL_PARAM *p,
|
||||
const char *names[],
|
||||
STACK_OF(BIGNUM_const) *stk);
|
||||
@@ -12,11 +12,6 @@
|
||||
# define OPENSSL_ASN1ERR_H
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_ASN1ERR_H
|
||||
# endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
# include <openssl/symhacks.h>
|
||||
|
||||
|
||||
@@ -12,11 +12,6 @@
|
||||
# define OPENSSL_ASYNCERR_H
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_ASYNCERR_H
|
||||
# endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
# include <openssl/symhacks.h>
|
||||
|
||||
|
||||
@@ -566,7 +566,7 @@ int BIO_ctrl_reset_read_request(BIO *b);
|
||||
#define BIO_get_ex_new_index(l, p, newf, dupf, freef) \
|
||||
CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_BIO, l, p, newf, dupf, freef)
|
||||
int BIO_set_ex_data(BIO *bio, int idx, void *data);
|
||||
void *BIO_get_ex_data(BIO *bio, int idx);
|
||||
void *BIO_get_ex_data(const BIO *bio, int idx);
|
||||
uint64_t BIO_number_read(BIO *bio);
|
||||
uint64_t BIO_number_written(BIO *bio);
|
||||
|
||||
|
||||
@@ -12,11 +12,6 @@
|
||||
# define OPENSSL_BIOERR_H
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_BIOERR_H
|
||||
# endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
# include <openssl/symhacks.h>
|
||||
|
||||
|
||||
@@ -12,11 +12,6 @@
|
||||
# define OPENSSL_BNERR_H
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_BNERR_H
|
||||
# endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
# include <openssl/symhacks.h>
|
||||
|
||||
|
||||
@@ -12,11 +12,6 @@
|
||||
# define OPENSSL_BUFFERERR_H
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_BUFERR_H
|
||||
# endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
# include <openssl/symhacks.h>
|
||||
|
||||
|
||||
+96
-21
@@ -207,13 +207,17 @@ typedef struct ossl_cmp_ctx_st OSSL_CMP_CTX;
|
||||
typedef struct ossl_cmp_pkiheader_st OSSL_CMP_PKIHEADER;
|
||||
DECLARE_ASN1_FUNCTIONS(OSSL_CMP_PKIHEADER)
|
||||
typedef struct ossl_cmp_msg_st OSSL_CMP_MSG;
|
||||
DECLARE_ASN1_DUP_FUNCTION(OSSL_CMP_MSG)
|
||||
DECLARE_ASN1_ENCODE_FUNCTIONS(OSSL_CMP_MSG, OSSL_CMP_MSG, OSSL_CMP_MSG)
|
||||
typedef struct ossl_cmp_certstatus_st OSSL_CMP_CERTSTATUS;
|
||||
DEFINE_STACK_OF(OSSL_CMP_CERTSTATUS)
|
||||
typedef struct ossl_cmp_itav_st OSSL_CMP_ITAV;
|
||||
DECLARE_ASN1_DUP_FUNCTION(OSSL_CMP_ITAV)
|
||||
DEFINE_STACK_OF(OSSL_CMP_ITAV)
|
||||
typedef struct ossl_cmp_revrepcontent_st OSSL_CMP_REVREPCONTENT;
|
||||
typedef struct ossl_cmp_pkisi_st OSSL_CMP_PKISI;
|
||||
DECLARE_ASN1_FUNCTIONS(OSSL_CMP_PKISI)
|
||||
DECLARE_ASN1_DUP_FUNCTION(OSSL_CMP_PKISI)
|
||||
DEFINE_STACK_OF(OSSL_CMP_PKISI)
|
||||
typedef struct ossl_cmp_certrepmessage_st OSSL_CMP_CERTREPMESSAGE;
|
||||
DEFINE_STACK_OF(OSSL_CMP_CERTREPMESSAGE)
|
||||
@@ -244,19 +248,19 @@ void OSSL_CMP_CTX_free(OSSL_CMP_CTX *ctx);
|
||||
int OSSL_CMP_CTX_reinit(OSSL_CMP_CTX *ctx);
|
||||
/* various CMP options: */
|
||||
# define OSSL_CMP_OPT_LOG_VERBOSITY 0
|
||||
# define OSSL_CMP_OPT_MSGTIMEOUT 1
|
||||
# define OSSL_CMP_OPT_TOTALTIMEOUT 2
|
||||
# define OSSL_CMP_OPT_VALIDITYDAYS 3
|
||||
# define OSSL_CMP_OPT_MSG_TIMEOUT 1
|
||||
# define OSSL_CMP_OPT_TOTAL_TIMEOUT 2
|
||||
# define OSSL_CMP_OPT_VALIDITY_DAYS 3
|
||||
# define OSSL_CMP_OPT_SUBJECTALTNAME_NODEFAULT 4
|
||||
# define OSSL_CMP_OPT_SUBJECTALTNAME_CRITICAL 5
|
||||
# define OSSL_CMP_OPT_POLICIES_CRITICAL 6
|
||||
# define OSSL_CMP_OPT_POPOMETHOD 7
|
||||
# define OSSL_CMP_OPT_POPO_METHOD 7
|
||||
# define OSSL_CMP_OPT_DIGEST_ALGNID 8
|
||||
# define OSSL_CMP_OPT_OWF_ALGNID 9
|
||||
# define OSSL_CMP_OPT_MAC_ALGNID 10
|
||||
# define OSSL_CMP_OPT_REVOCATION_REASON 11
|
||||
# define OSSL_CMP_OPT_IMPLICITCONFIRM 12
|
||||
# define OSSL_CMP_OPT_DISABLECONFIRM 13
|
||||
# define OSSL_CMP_OPT_IMPLICIT_CONFIRM 12
|
||||
# define OSSL_CMP_OPT_DISABLE_CONFIRM 13
|
||||
# define OSSL_CMP_OPT_UNPROTECTED_SEND 14
|
||||
# define OSSL_CMP_OPT_UNPROTECTED_ERRORS 15
|
||||
# define OSSL_CMP_OPT_IGNORE_KEYUSAGE 16
|
||||
@@ -264,23 +268,22 @@ int OSSL_CMP_CTX_reinit(OSSL_CMP_CTX *ctx);
|
||||
int OSSL_CMP_CTX_set_option(OSSL_CMP_CTX *ctx, int opt, int val);
|
||||
int OSSL_CMP_CTX_get_option(const OSSL_CMP_CTX *ctx, int opt);
|
||||
/* CMP-specific callback for logging and outputting the error queue: */
|
||||
int OSSL_CMP_CTX_set_log_cb(OSSL_CMP_CTX *ctx, OSSL_cmp_log_cb_t cb);
|
||||
int OSSL_CMP_CTX_set_log_cb(OSSL_CMP_CTX *ctx, OSSL_CMP_log_cb_t cb);
|
||||
# define OSSL_CMP_CTX_set_log_verbosity(ctx, level) \
|
||||
OSSL_CMP_CTX_set_option(ctx, OSSL_CMP_OPT_LOG_VERBOSITY, level)
|
||||
void OSSL_CMP_CTX_print_errors(OSSL_CMP_CTX *ctx);
|
||||
/* message transfer: */
|
||||
int OSSL_CMP_CTX_set1_serverPath(OSSL_CMP_CTX *ctx, const char *path);
|
||||
int OSSL_CMP_CTX_set1_serverName(OSSL_CMP_CTX *ctx, const char *name);
|
||||
int OSSL_CMP_CTX_set1_server(OSSL_CMP_CTX *ctx, const char *address);
|
||||
int OSSL_CMP_CTX_set_serverPort(OSSL_CMP_CTX *ctx, int port);
|
||||
int OSSL_CMP_CTX_set1_proxyName(OSSL_CMP_CTX *ctx, const char *name);
|
||||
int OSSL_CMP_CTX_set_proxyPort(OSSL_CMP_CTX *ctx, int port);
|
||||
# define OSSL_CMP_DEFAULT_PORT 80
|
||||
int OSSL_CMP_CTX_set1_proxy(OSSL_CMP_CTX *ctx, const char *name);
|
||||
int OSSL_CMP_CTX_set1_no_proxy(OSSL_CMP_CTX *ctx, const char *names);
|
||||
int OSSL_CMP_CTX_set_http_cb(OSSL_CMP_CTX *ctx, OSSL_HTTP_bio_cb_t cb);
|
||||
int OSSL_CMP_CTX_set_http_cb_arg(OSSL_CMP_CTX *ctx, void *arg);
|
||||
void *OSSL_CMP_CTX_get_http_cb_arg(const OSSL_CMP_CTX *ctx);
|
||||
typedef OSSL_CMP_MSG *(*OSSL_cmp_transfer_cb_t) (OSSL_CMP_CTX *ctx,
|
||||
typedef OSSL_CMP_MSG *(*OSSL_CMP_transfer_cb_t) (OSSL_CMP_CTX *ctx,
|
||||
const OSSL_CMP_MSG *req);
|
||||
int OSSL_CMP_CTX_set_transfer_cb(OSSL_CMP_CTX *ctx, OSSL_cmp_transfer_cb_t cb);
|
||||
int OSSL_CMP_CTX_set_transfer_cb(OSSL_CMP_CTX *ctx, OSSL_CMP_transfer_cb_t cb);
|
||||
int OSSL_CMP_CTX_set_transfer_cb_arg(OSSL_CMP_CTX *ctx, void *arg);
|
||||
void *OSSL_CMP_CTX_get_transfer_cb_arg(const OSSL_CMP_CTX *ctx);
|
||||
/* server authentication: */
|
||||
@@ -316,9 +319,9 @@ int OSSL_CMP_CTX_set1_p10CSR(OSSL_CMP_CTX *ctx, const X509_REQ *csr);
|
||||
/* misc body contents: */
|
||||
int OSSL_CMP_CTX_push0_genm_ITAV(OSSL_CMP_CTX *ctx, OSSL_CMP_ITAV *itav);
|
||||
/* certificate confirmation: */
|
||||
typedef int (*OSSL_cmp_certConf_cb_t) (OSSL_CMP_CTX *ctx, X509 *cert,
|
||||
typedef int (*OSSL_CMP_certConf_cb_t) (OSSL_CMP_CTX *ctx, X509 *cert,
|
||||
int fail_info, const char **txt);
|
||||
int OSSL_CMP_CTX_set_certConf_cb(OSSL_CMP_CTX *ctx, OSSL_cmp_certConf_cb_t cb);
|
||||
int OSSL_CMP_CTX_set_certConf_cb(OSSL_CMP_CTX *ctx, OSSL_CMP_certConf_cb_t cb);
|
||||
int OSSL_CMP_CTX_set_certConf_cb_arg(OSSL_CMP_CTX *ctx, void *arg);
|
||||
void *OSSL_CMP_CTX_get_certConf_cb_arg(const OSSL_CMP_CTX *ctx);
|
||||
/* result fetching: */
|
||||
@@ -329,32 +332,104 @@ int OSSL_CMP_CTX_get_failInfoCode(const OSSL_CMP_CTX *ctx);
|
||||
X509 *OSSL_CMP_CTX_get0_newCert(const OSSL_CMP_CTX *ctx);
|
||||
STACK_OF(X509) *OSSL_CMP_CTX_get1_caPubs(const OSSL_CMP_CTX *ctx);
|
||||
STACK_OF(X509) *OSSL_CMP_CTX_get1_extraCertsIn(const OSSL_CMP_CTX *ctx);
|
||||
/* support application-level CMP debugging in cmp.c: */
|
||||
int OSSL_CMP_CTX_set1_transactionID(OSSL_CMP_CTX *ctx,
|
||||
const ASN1_OCTET_STRING *id);
|
||||
int OSSL_CMP_CTX_set1_senderNonce(OSSL_CMP_CTX *ctx,
|
||||
const ASN1_OCTET_STRING *nonce);
|
||||
|
||||
/* from cmp_status.c */
|
||||
char *OSSL_CMP_CTX_snprint_PKIStatus(OSSL_CMP_CTX *ctx, char *buf,
|
||||
char *OSSL_CMP_CTX_snprint_PKIStatus(const OSSL_CMP_CTX *ctx, char *buf,
|
||||
size_t bufsize);
|
||||
char *OSSL_CMP_snprint_PKIStatusInfo(const OSSL_CMP_PKISI *statusInfo,
|
||||
char *buf, size_t bufsize);
|
||||
OSSL_CMP_PKISI *
|
||||
OSSL_CMP_STATUSINFO_new(int status, int fail_info, const char *text);
|
||||
|
||||
/* from cmp_hdr.c */
|
||||
/* support application-level CMP debugging in cmp.c: */
|
||||
ASN1_OCTET_STRING *OSSL_CMP_HDR_get0_transactionID(const OSSL_CMP_PKIHEADER *hdr);
|
||||
ASN1_OCTET_STRING *OSSL_CMP_HDR_get0_recipNonce(const OSSL_CMP_PKIHEADER *hdr);
|
||||
|
||||
/* from cmp_msg.c */
|
||||
/* support application-level CMP debugging in cmp.c: */
|
||||
OSSL_CMP_PKIHEADER *OSSL_CMP_MSG_get0_header(const OSSL_CMP_MSG *msg);
|
||||
OSSL_CMP_MSG *d2i_OSSL_CMP_MSG_bio(BIO *bio, OSSL_CMP_MSG **msg);
|
||||
int i2d_OSSL_CMP_MSG_bio(BIO *bio, const OSSL_CMP_MSG *msg);
|
||||
|
||||
/* from cmp_vfy.c */
|
||||
int OSSL_CMP_validate_msg(OSSL_CMP_CTX *ctx, const OSSL_CMP_MSG *msg);
|
||||
int OSSL_CMP_validate_cert_path(OSSL_CMP_CTX *ctx,
|
||||
X509_STORE *trusted_store, X509 *cert);
|
||||
|
||||
/* from cmp_http.c */
|
||||
OSSL_CMP_MSG *OSSL_CMP_MSG_http_perform(OSSL_CMP_CTX *ctx,
|
||||
const OSSL_CMP_MSG *req);
|
||||
|
||||
/* from cmp_server.c */
|
||||
typedef struct ossl_cmp_srv_ctx_st OSSL_CMP_SRV_CTX;
|
||||
OSSL_CMP_MSG *OSSL_CMP_SRV_process_request(OSSL_CMP_SRV_CTX *srv_ctx,
|
||||
const OSSL_CMP_MSG *req);
|
||||
OSSL_CMP_MSG * OSSL_CMP_CTX_server_perform(OSSL_CMP_CTX *client_ctx,
|
||||
const OSSL_CMP_MSG *req);
|
||||
OSSL_CMP_SRV_CTX *OSSL_CMP_SRV_CTX_new(void);
|
||||
void OSSL_CMP_SRV_CTX_free(OSSL_CMP_SRV_CTX *srv_ctx);
|
||||
typedef OSSL_CMP_PKISI *(*OSSL_CMP_SRV_cert_request_cb_t)
|
||||
(OSSL_CMP_SRV_CTX *srv_ctx, const OSSL_CMP_MSG *req, int certReqId,
|
||||
const OSSL_CRMF_MSG *crm, const X509_REQ *p10cr,
|
||||
X509 **certOut, STACK_OF(X509) **chainOut, STACK_OF(X509) **caPubs);
|
||||
typedef OSSL_CMP_PKISI *(*OSSL_CMP_SRV_rr_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
||||
const OSSL_CMP_MSG *req,
|
||||
const X509_NAME *issuer,
|
||||
const ASN1_INTEGER *serial);
|
||||
typedef int (*OSSL_CMP_SRV_genm_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
||||
const OSSL_CMP_MSG *req,
|
||||
const STACK_OF(OSSL_CMP_ITAV) *in,
|
||||
STACK_OF(OSSL_CMP_ITAV) **out);
|
||||
typedef void (*OSSL_CMP_SRV_error_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
||||
const OSSL_CMP_MSG *req,
|
||||
const OSSL_CMP_PKISI *statusInfo,
|
||||
const ASN1_INTEGER *errorCode,
|
||||
const OSSL_CMP_PKIFREETEXT *errorDetails);
|
||||
typedef int (*OSSL_CMP_SRV_certConf_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
||||
const OSSL_CMP_MSG *req,
|
||||
int certReqId,
|
||||
const ASN1_OCTET_STRING *certHash,
|
||||
const OSSL_CMP_PKISI *si);
|
||||
typedef int (*OSSL_CMP_SRV_pollReq_cb_t)(OSSL_CMP_SRV_CTX *srv_ctx,
|
||||
const OSSL_CMP_MSG *req, int certReqId,
|
||||
OSSL_CMP_MSG **certReq,
|
||||
int64_t *check_after);
|
||||
int OSSL_CMP_SRV_CTX_init(OSSL_CMP_SRV_CTX *srv_ctx, void *custom_ctx,
|
||||
OSSL_CMP_SRV_cert_request_cb_t process_cert_request,
|
||||
OSSL_CMP_SRV_rr_cb_t process_rr,
|
||||
OSSL_CMP_SRV_genm_cb_t process_genm,
|
||||
OSSL_CMP_SRV_error_cb_t process_error,
|
||||
OSSL_CMP_SRV_certConf_cb_t process_certConf,
|
||||
OSSL_CMP_SRV_pollReq_cb_t process_pollReq);
|
||||
OSSL_CMP_CTX *OSSL_CMP_SRV_CTX_get0_cmp_ctx(const OSSL_CMP_SRV_CTX *srv_ctx);
|
||||
void *OSSL_CMP_SRV_CTX_get0_custom_ctx(const OSSL_CMP_SRV_CTX *srv_ctx);
|
||||
int OSSL_CMP_SRV_CTX_set_send_unprotected_errors(OSSL_CMP_SRV_CTX *srv_ctx,
|
||||
int val);
|
||||
int OSSL_CMP_SRV_CTX_set_accept_unprotected(OSSL_CMP_SRV_CTX *srv_ctx, int val);
|
||||
int OSSL_CMP_SRV_CTX_set_accept_raverified(OSSL_CMP_SRV_CTX *srv_ctx, int val);
|
||||
int OSSL_CMP_SRV_CTX_set_grant_implicit_confirm(OSSL_CMP_SRV_CTX *srv_ctx,
|
||||
int val);
|
||||
|
||||
/* from cmp_client.c */
|
||||
X509 *OSSL_CMP_exec_IR_ses(OSSL_CMP_CTX *ctx);
|
||||
X509 *OSSL_CMP_exec_CR_ses(OSSL_CMP_CTX *ctx);
|
||||
X509 *OSSL_CMP_exec_P10CR_ses(OSSL_CMP_CTX *ctx);
|
||||
X509 *OSSL_CMP_exec_KUR_ses(OSSL_CMP_CTX *ctx);
|
||||
# define OSSL_CMP_IR OSSL_CMP_PKIBODY_IR
|
||||
# define OSSL_CMP_CR OSSL_CMP_PKIBODY_CR
|
||||
# define OSSL_CMP_P10CR OSSL_CMP_PKIBODY_P10CR
|
||||
# define OSSL_CMP_KUR OSSL_CMP_PKIBODY_KUR
|
||||
int OSSL_CMP_try_certreq(OSSL_CMP_CTX *ctx, int req_type, int *checkAfter);
|
||||
int OSSL_CMP_certConf_cb(OSSL_CMP_CTX *ctx, X509 *cert, int fail_info,
|
||||
const char **text);
|
||||
X509 *OSSL_CMP_exec_RR_ses(OSSL_CMP_CTX *ctx);
|
||||
STACK_OF(OSSL_CMP_ITAV) *OSSL_CMP_exec_GENM_ses(OSSL_CMP_CTX *ctx);
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
# endif /* !defined OPENSSL_NO_CMP */
|
||||
#endif /* !defined OPENSSL_CMP_H */
|
||||
# endif /* !defined(OPENSSL_NO_CMP) */
|
||||
#endif /* !defined(OPENSSL_CMP_H) */
|
||||
@@ -17,7 +17,6 @@
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# include <openssl/trace.h>
|
||||
# include <openssl/x509.h>
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -39,16 +38,16 @@ typedef int OSSL_CMP_severity;
|
||||
# define OSSL_CMP_LOG_NOTICE 5
|
||||
# define OSSL_CMP_LOG_INFO 6
|
||||
# define OSSL_CMP_LOG_DEBUG 7
|
||||
typedef int (*OSSL_cmp_log_cb_t)(const char *func, const char *file, int line,
|
||||
typedef int (*OSSL_CMP_log_cb_t)(const char *func, const char *file, int line,
|
||||
OSSL_CMP_severity level, const char *msg);
|
||||
|
||||
int OSSL_CMP_print_to_bio(BIO *bio, const char *component, const char *file,
|
||||
int line, OSSL_CMP_severity level, const char *msg);
|
||||
/* use of the logging callback for outputting error queue */
|
||||
void OSSL_CMP_print_errors_cb(OSSL_cmp_log_cb_t log_fn);
|
||||
void OSSL_CMP_print_errors_cb(OSSL_CMP_log_cb_t log_fn);
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
# endif /* !defined OPENSSL_NO_CMP */
|
||||
#endif /* !defined OPENSSL_CMP_UTIL_H */
|
||||
# endif /* !defined(OPENSSL_NO_CMP) */
|
||||
#endif /* !defined(OPENSSL_CMP_UTIL_H) */
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Generated by util/mkerr.pl DO NOT EDIT
|
||||
* Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
# ifndef OPENSSL_NO_CMP
|
||||
|
||||
# ifdef __cplusplus
|
||||
# ifdef __cplusplus
|
||||
extern "C"
|
||||
# endif
|
||||
int ERR_load_CMP_strings(void);
|
||||
@@ -27,24 +27,35 @@ int ERR_load_CMP_strings(void);
|
||||
/*
|
||||
* CMP function codes.
|
||||
*/
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# endif
|
||||
|
||||
/*
|
||||
* CMP reason codes.
|
||||
*/
|
||||
# define CMP_R_ALGORITHM_NOT_SUPPORTED 139
|
||||
# define CMP_R_BAD_CHECKAFTER_IN_POLLREP 167
|
||||
# define CMP_R_BAD_REQUEST_ID 108
|
||||
# define CMP_R_CERTHASH_UNMATCHED 156
|
||||
# define CMP_R_CERTID_NOT_FOUND 109
|
||||
# define CMP_R_CERTIFICATE_NOT_ACCEPTED 169
|
||||
# define CMP_R_CERTIFICATE_NOT_FOUND 112
|
||||
# define CMP_R_CERTREQMSG_NOT_FOUND 157
|
||||
# define CMP_R_CERTRESPONSE_NOT_FOUND 113
|
||||
# define CMP_R_CERT_AND_KEY_DO_NOT_MATCH 114
|
||||
# define CMP_R_CHECKAFTER_OUT_OF_RANGE 181
|
||||
# define CMP_R_CHECKING_PBM_NO_SECRET_AVAILABLE 166
|
||||
# define CMP_R_ENCOUNTERED_KEYUPDATEWARNING 176
|
||||
# define CMP_R_ENCOUNTERED_WAITING 162
|
||||
# define CMP_R_ERROR_CALCULATING_PROTECTION 115
|
||||
# define CMP_R_ERROR_CREATING_CERTCONF 116
|
||||
# define CMP_R_ERROR_CREATING_CERTREP 117
|
||||
# define CMP_R_ERROR_CREATING_CR 163
|
||||
# define CMP_R_ERROR_CREATING_ERROR 118
|
||||
# define CMP_R_ERROR_CREATING_GENM 119
|
||||
# define CMP_R_ERROR_CREATING_GENP 120
|
||||
# define CMP_R_ERROR_CREATING_IR 164
|
||||
# define CMP_R_ERROR_CREATING_KUR 165
|
||||
# define CMP_R_ERROR_CREATING_P10CR 121
|
||||
# define CMP_R_ERROR_CREATING_PKICONF 122
|
||||
# define CMP_R_ERROR_CREATING_POLLREP 123
|
||||
@@ -52,8 +63,10 @@ int ERR_load_CMP_strings(void);
|
||||
# define CMP_R_ERROR_CREATING_RP 125
|
||||
# define CMP_R_ERROR_CREATING_RR 126
|
||||
# define CMP_R_ERROR_PARSING_PKISTATUS 107
|
||||
# define CMP_R_ERROR_PROCESSING_MESSAGE 158
|
||||
# define CMP_R_ERROR_PROTECTING_MESSAGE 127
|
||||
# define CMP_R_ERROR_SETTING_CERTHASH 128
|
||||
# define CMP_R_ERROR_UNEXPECTED_CERTCONF 160
|
||||
# define CMP_R_ERROR_VALIDATING_PROTECTION 140
|
||||
# define CMP_R_FAILED_EXTRACTING_PUBKEY 141
|
||||
# define CMP_R_FAILURE_OBTAINING_RANDOM 110
|
||||
@@ -65,27 +78,39 @@ int ERR_load_CMP_strings(void);
|
||||
# define CMP_R_MISSING_PROTECTION 143
|
||||
# define CMP_R_MISSING_SENDER_IDENTIFICATION 111
|
||||
# define CMP_R_MISSING_TRUST_STORE 144
|
||||
# define CMP_R_MULTIPLE_REQUESTS_NOT_SUPPORTED 161
|
||||
# define CMP_R_MULTIPLE_RESPONSES_NOT_SUPPORTED 170
|
||||
# define CMP_R_MULTIPLE_SAN_SOURCES 102
|
||||
# define CMP_R_NO_STDIO 194
|
||||
# define CMP_R_NO_SUITABLE_SENDER_CERT 145
|
||||
# define CMP_R_NULL_ARGUMENT 103
|
||||
# define CMP_R_PKIBODY_ERROR 146
|
||||
# define CMP_R_PKISTATUSINFO_NOT_FOUND 132
|
||||
# define CMP_R_POLLING_FAILED 172
|
||||
# define CMP_R_POTENTIALLY_INVALID_CERTIFICATE 147
|
||||
# define CMP_R_RECEIVED_ERROR 180
|
||||
# define CMP_R_RECIPNONCE_UNMATCHED 148
|
||||
# define CMP_R_REQUEST_NOT_ACCEPTED 149
|
||||
# define CMP_R_REQUEST_REJECTED_BY_SERVER 182
|
||||
# define CMP_R_SENDER_GENERALNAME_TYPE_NOT_SUPPORTED 150
|
||||
# define CMP_R_SRVCERT_DOES_NOT_VALIDATE_MSG 151
|
||||
# define CMP_R_TOTAL_TIMEOUT 184
|
||||
# define CMP_R_TRANSACTIONID_UNMATCHED 152
|
||||
# define CMP_R_TRANSFER_ERROR 159
|
||||
# define CMP_R_UNEXPECTED_PKIBODY 133
|
||||
# define CMP_R_UNEXPECTED_PKISTATUS 185
|
||||
# define CMP_R_UNEXPECTED_PVNO 153
|
||||
# define CMP_R_UNKNOWN_ALGORITHM_ID 134
|
||||
# define CMP_R_UNKNOWN_CERT_TYPE 135
|
||||
# define CMP_R_UNKNOWN_PKISTATUS 186
|
||||
# define CMP_R_UNSUPPORTED_ALGORITHM 136
|
||||
# define CMP_R_UNSUPPORTED_KEY_TYPE 137
|
||||
# define CMP_R_UNSUPPORTED_PROTECTION_ALG_DHBASEDMAC 154
|
||||
# define CMP_R_WRONG_ALGORITHM_OID 138
|
||||
# define CMP_R_WRONG_CERTID_IN_RP 187
|
||||
# define CMP_R_WRONG_PBM_VALUE 155
|
||||
# define CMP_R_WRONG_RP_COMPONENT_COUNT 188
|
||||
# define CMP_R_WRONG_SERIAL_IN_RP 173
|
||||
|
||||
# endif
|
||||
#endif
|
||||
@@ -12,11 +12,6 @@
|
||||
# define OPENSSL_CMSERR_H
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_CMSERR_H
|
||||
# endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
# include <openssl/symhacks.h>
|
||||
|
||||
@@ -87,6 +82,7 @@ int ERR_load_CMS_strings(void);
|
||||
# define CMS_F_CMS_RECEIPT_VERIFY 0
|
||||
# define CMS_F_CMS_RECIPIENTINFO_DECRYPT 0
|
||||
# define CMS_F_CMS_RECIPIENTINFO_ENCRYPT 0
|
||||
# define CMS_F_CMS_RECIPIENTINFO_KARI_DECRYPT 0
|
||||
# define CMS_F_CMS_RECIPIENTINFO_KARI_ENCRYPT 0
|
||||
# define CMS_F_CMS_RECIPIENTINFO_KARI_GET0_ALG 0
|
||||
# define CMS_F_CMS_RECIPIENTINFO_KARI_GET0_ORIG_ID 0
|
||||
|
||||
@@ -12,11 +12,6 @@
|
||||
# define OPENSSL_COMPERR_H
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_COMPERR_H
|
||||
# endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
# include <openssl/symhacks.h>
|
||||
|
||||
|
||||
@@ -111,8 +111,10 @@ struct conf_st {
|
||||
void *meth_data;
|
||||
LHASH_OF(CONF_VALUE) *data;
|
||||
unsigned int flag_dollarid:1;
|
||||
OPENSSL_CTX *libctx;
|
||||
};
|
||||
|
||||
CONF *NCONF_new_with_libctx(OPENSSL_CTX *libctx, CONF_METHOD *meth);
|
||||
CONF *NCONF_new(CONF_METHOD *meth);
|
||||
CONF_METHOD *NCONF_default(void);
|
||||
DEPRECATEDIN_3_0(CONF_METHOD *NCONF_WIN32(void))
|
||||
@@ -140,6 +142,8 @@ int NCONF_dump_bio(const CONF *conf, BIO *out);
|
||||
|
||||
int CONF_modules_load(const CONF *cnf, const char *appname,
|
||||
unsigned long flags);
|
||||
int CONF_modules_load_file_with_libctx(OPENSSL_CTX *libctx, const char *filename,
|
||||
const char *appname, unsigned long flags);
|
||||
int CONF_modules_load_file(const char *filename, const char *appname,
|
||||
unsigned long flags);
|
||||
void CONF_modules_unload(int all);
|
||||
|
||||
@@ -12,11 +12,6 @@
|
||||
# define OPENSSL_CONFERR_H
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_CONFERR_H
|
||||
# endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
# include <openssl/symhacks.h>
|
||||
|
||||
|
||||
@@ -124,6 +124,9 @@ struct ossl_param_st {
|
||||
*
|
||||
* WARNING! Using these is FRAGILE, as it assumes that the actual
|
||||
* data and its location are constant.
|
||||
*
|
||||
* EXTRA WARNING! If you are not completely sure you most likely want
|
||||
* to use the OSSL_PARAM_UTF8_STRING type.
|
||||
*/
|
||||
# define OSSL_PARAM_UTF8_PTR 6
|
||||
/*-
|
||||
@@ -140,6 +143,9 @@ struct ossl_param_st {
|
||||
*
|
||||
* WARNING! Using these is FRAGILE, as it assumes that the actual
|
||||
* data and its location are constant.
|
||||
*
|
||||
* EXTRA WARNING! If you are not completely sure you most likely want
|
||||
* to use the OSSL_PARAM_OCTET_STRING type.
|
||||
*/
|
||||
# define OSSL_PARAM_OCTET_PTR 7
|
||||
|
||||
|
||||
@@ -220,6 +220,40 @@ extern "C" {
|
||||
#define OSSL_PKEY_PARAM_RSA_FACTOR "rsa-factor"
|
||||
#define OSSL_PKEY_PARAM_RSA_EXPONENT "rsa-exponent"
|
||||
#define OSSL_PKEY_PARAM_RSA_COEFFICIENT "rsa-coefficient"
|
||||
#define OSSL_PKEY_PARAM_RSA_FACTOR1 OSSL_PKEY_PARAM_RSA_FACTOR"1"
|
||||
#define OSSL_PKEY_PARAM_RSA_FACTOR2 OSSL_PKEY_PARAM_RSA_FACTOR"2"
|
||||
#define OSSL_PKEY_PARAM_RSA_FACTOR3 OSSL_PKEY_PARAM_RSA_FACTOR"3"
|
||||
#define OSSL_PKEY_PARAM_RSA_FACTOR4 OSSL_PKEY_PARAM_RSA_FACTOR"4"
|
||||
#define OSSL_PKEY_PARAM_RSA_FACTOR5 OSSL_PKEY_PARAM_RSA_FACTOR"5"
|
||||
#define OSSL_PKEY_PARAM_RSA_FACTOR6 OSSL_PKEY_PARAM_RSA_FACTOR"6"
|
||||
#define OSSL_PKEY_PARAM_RSA_FACTOR7 OSSL_PKEY_PARAM_RSA_FACTOR"7"
|
||||
#define OSSL_PKEY_PARAM_RSA_FACTOR8 OSSL_PKEY_PARAM_RSA_FACTOR"8"
|
||||
#define OSSL_PKEY_PARAM_RSA_FACTOR9 OSSL_PKEY_PARAM_RSA_FACTOR"9"
|
||||
#define OSSL_PKEY_PARAM_RSA_FACTOR10 OSSL_PKEY_PARAM_RSA_FACTOR"10"
|
||||
#define OSSL_PKEY_PARAM_RSA_EXPONENT1 OSSL_PKEY_PARAM_RSA_EXPONENT"1"
|
||||
#define OSSL_PKEY_PARAM_RSA_EXPONENT2 OSSL_PKEY_PARAM_RSA_EXPONENT"2"
|
||||
#define OSSL_PKEY_PARAM_RSA_EXPONENT3 OSSL_PKEY_PARAM_RSA_EXPONENT"3"
|
||||
#define OSSL_PKEY_PARAM_RSA_EXPONENT4 OSSL_PKEY_PARAM_RSA_EXPONENT"4"
|
||||
#define OSSL_PKEY_PARAM_RSA_EXPONENT5 OSSL_PKEY_PARAM_RSA_EXPONENT"5"
|
||||
#define OSSL_PKEY_PARAM_RSA_EXPONENT6 OSSL_PKEY_PARAM_RSA_EXPONENT"6"
|
||||
#define OSSL_PKEY_PARAM_RSA_EXPONENT7 OSSL_PKEY_PARAM_RSA_EXPONENT"7"
|
||||
#define OSSL_PKEY_PARAM_RSA_EXPONENT8 OSSL_PKEY_PARAM_RSA_EXPONENT"8"
|
||||
#define OSSL_PKEY_PARAM_RSA_EXPONENT9 OSSL_PKEY_PARAM_RSA_EXPONENT"9"
|
||||
#define OSSL_PKEY_PARAM_RSA_EXPONENT10 OSSL_PKEY_PARAM_RSA_EXPONENT"10"
|
||||
#define OSSL_PKEY_PARAM_RSA_COEFFICIENT1 OSSL_PKEY_PARAM_RSA_COEFFICIENT"1"
|
||||
#define OSSL_PKEY_PARAM_RSA_COEFFICIENT2 OSSL_PKEY_PARAM_RSA_COEFFICIENT"2"
|
||||
#define OSSL_PKEY_PARAM_RSA_COEFFICIENT3 OSSL_PKEY_PARAM_RSA_COEFFICIENT"3"
|
||||
#define OSSL_PKEY_PARAM_RSA_COEFFICIENT4 OSSL_PKEY_PARAM_RSA_COEFFICIENT"4"
|
||||
#define OSSL_PKEY_PARAM_RSA_COEFFICIENT5 OSSL_PKEY_PARAM_RSA_COEFFICIENT"5"
|
||||
#define OSSL_PKEY_PARAM_RSA_COEFFICIENT6 OSSL_PKEY_PARAM_RSA_COEFFICIENT"6"
|
||||
#define OSSL_PKEY_PARAM_RSA_COEFFICIENT7 OSSL_PKEY_PARAM_RSA_COEFFICIENT"7"
|
||||
#define OSSL_PKEY_PARAM_RSA_COEFFICIENT8 OSSL_PKEY_PARAM_RSA_COEFFICIENT"8"
|
||||
#define OSSL_PKEY_PARAM_RSA_COEFFICIENT9 OSSL_PKEY_PARAM_RSA_COEFFICIENT"9"
|
||||
|
||||
|
||||
/* Key generation parameters */
|
||||
#define OSSL_PKEY_PARAM_RSA_BITS OSSL_PKEY_PARAM_BITS
|
||||
#define OSSL_PKEY_PARAM_RSA_PRIMES "primes"
|
||||
|
||||
/* Key Exchange parameters */
|
||||
|
||||
@@ -254,6 +288,8 @@ extern "C" {
|
||||
#define OSSL_SIGNATURE_PARAM_MGF1_DIGEST OSSL_PKEY_PARAM_MGF1_DIGEST
|
||||
#define OSSL_SIGNATURE_PARAM_MGF1_PROPERTIES \
|
||||
OSSL_PKEY_PARAM_MGF1_PROPERTIES
|
||||
#define OSSL_SIGNATURE_PARAM_DIGEST_SIZE OSSL_PKEY_PARAM_DIGEST_SIZE
|
||||
#define OSSL_SIGNATURE_PARAM_KAT "kat"
|
||||
|
||||
/* Asym cipher parameters */
|
||||
#define OSSL_ASYM_CIPHER_PARAM_PAD_MODE OSSL_PKEY_PARAM_PAD_MODE
|
||||
@@ -279,6 +315,10 @@ extern "C" {
|
||||
/* Passphrase callback parameters */
|
||||
#define OSSL_PASSPHRASE_PARAM_INFO "info"
|
||||
|
||||
/* Keygen callback parameters, from provider to libcrypto */
|
||||
#define OSSL_GEN_PARAM_POTENTIAL "potential" /* integer */
|
||||
#define OSSL_GEN_PARAM_ITERATION "iteration" /* integer */
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
|
||||
@@ -85,7 +85,7 @@ OSSL_CORE_MAKE_FUNC(int, core_set_error_mark, (const OSSL_PROVIDER *prov))
|
||||
# define OSSL_FUNC_CORE_CLEAR_LAST_ERROR_MARK 9
|
||||
OSSL_CORE_MAKE_FUNC(int, core_clear_last_error_mark,
|
||||
(const OSSL_PROVIDER *prov))
|
||||
# define OSSL_FUNC_CORE_POP_ERROR_TO_MARK 10
|
||||
# define OSSL_FUNC_CORE_POP_ERROR_TO_MARK 10
|
||||
OSSL_CORE_MAKE_FUNC(int, core_pop_error_to_mark, (const OSSL_PROVIDER *prov))
|
||||
|
||||
/* Memory allocation, freeing, clearing. */
|
||||
@@ -134,6 +134,7 @@ OSSL_CORE_MAKE_FUNC(void,
|
||||
#define OSSL_FUNC_BIO_READ_EX 42
|
||||
#define OSSL_FUNC_BIO_FREE 43
|
||||
#define OSSL_FUNC_BIO_VPRINTF 44
|
||||
#define OSSL_FUNC_BIO_VSNPRINTF 45
|
||||
|
||||
OSSL_CORE_MAKE_FUNC(BIO *, BIO_new_file, (const char *filename, const char *mode))
|
||||
OSSL_CORE_MAKE_FUNC(BIO *, BIO_new_membuf, (const void *buf, int len))
|
||||
@@ -142,6 +143,8 @@ OSSL_CORE_MAKE_FUNC(int, BIO_read_ex, (BIO *bio, void *data, size_t data_len,
|
||||
OSSL_CORE_MAKE_FUNC(int, BIO_free, (BIO *bio))
|
||||
OSSL_CORE_MAKE_FUNC(int, BIO_vprintf, (BIO *bio, const char *format,
|
||||
va_list args))
|
||||
OSSL_CORE_MAKE_FUNC(int, BIO_vsnprintf,
|
||||
(char *buf, size_t n, const char *fmt, va_list args))
|
||||
|
||||
#define OSSL_FUNC_SELF_TEST_CB 100
|
||||
OSSL_CORE_MAKE_FUNC(void, self_test_cb, (OPENSSL_CTX *ctx, OSSL_CALLBACK **cb,
|
||||
@@ -380,21 +383,48 @@ OSSL_CORE_MAKE_FUNC(int, OP_kdf_set_ctx_params,
|
||||
# define OSSL_KEYMGMT_SELECT_ALL \
|
||||
( OSSL_KEYMGMT_SELECT_KEYPAIR | OSSL_KEYMGMT_SELECT_ALL_PARAMETERS )
|
||||
|
||||
/* Basic key object creation, destruction */
|
||||
/* Basic key object creation */
|
||||
# define OSSL_FUNC_KEYMGMT_NEW 1
|
||||
# define OSSL_FUNC_KEYMGMT_FREE 9
|
||||
OSSL_CORE_MAKE_FUNC(void *, OP_keymgmt_new, (void *provctx))
|
||||
|
||||
/* Generation, a more complex constructor */
|
||||
# define OSSL_FUNC_KEYMGMT_GEN_INIT 2
|
||||
# define OSSL_FUNC_KEYMGMT_GEN_SET_TEMPLATE 3
|
||||
# define OSSL_FUNC_KEYMGMT_GEN_SET_PARAMS 4
|
||||
# define OSSL_FUNC_KEYMGMT_GEN_SETTABLE_PARAMS 5
|
||||
# define OSSL_FUNC_KEYMGMT_GEN_GET_PARAMS 6
|
||||
# define OSSL_FUNC_KEYMGMT_GEN_GETTABLE_PARAMS 7
|
||||
# define OSSL_FUNC_KEYMGMT_GEN 8
|
||||
# define OSSL_FUNC_KEYMGMT_GEN_CLEANUP 9
|
||||
OSSL_CORE_MAKE_FUNC(void *, OP_keymgmt_gen_init,
|
||||
(void *provctx, int selection))
|
||||
OSSL_CORE_MAKE_FUNC(int, OP_keymgmt_gen_set_template,
|
||||
(void *genctx, void *templ))
|
||||
OSSL_CORE_MAKE_FUNC(int, OP_keymgmt_gen_set_params,
|
||||
(void *genctx, const OSSL_PARAM params[]))
|
||||
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *,
|
||||
OP_keymgmt_gen_settable_params, (void *provctx))
|
||||
OSSL_CORE_MAKE_FUNC(int, OP_keymgmt_gen_get_params,
|
||||
(void *genctx, OSSL_PARAM params[]))
|
||||
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *,
|
||||
OP_keymgmt_gen_gettable_params, (void *provctx))
|
||||
OSSL_CORE_MAKE_FUNC(void *, OP_keymgmt_gen,
|
||||
(void *genctx, OSSL_CALLBACK *cb, void *cbarg))
|
||||
OSSL_CORE_MAKE_FUNC(void, OP_keymgmt_gen_cleanup, (void *genctx))
|
||||
|
||||
/* Basic key object destruction */
|
||||
# define OSSL_FUNC_KEYMGMT_FREE 10
|
||||
OSSL_CORE_MAKE_FUNC(void, OP_keymgmt_free, (void *keydata))
|
||||
|
||||
/* Key object information, with discovery */
|
||||
#define OSSL_FUNC_KEYMGMT_GET_PARAMS 10
|
||||
#define OSSL_FUNC_KEYMGMT_GETTABLE_PARAMS 11
|
||||
#define OSSL_FUNC_KEYMGMT_GET_PARAMS 11
|
||||
#define OSSL_FUNC_KEYMGMT_GETTABLE_PARAMS 12
|
||||
OSSL_CORE_MAKE_FUNC(int, OP_keymgmt_get_params,
|
||||
(void *keydata, OSSL_PARAM params[]))
|
||||
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_keymgmt_gettable_params, (void))
|
||||
|
||||
#define OSSL_FUNC_KEYMGMT_SET_PARAMS 12
|
||||
#define OSSL_FUNC_KEYMGMT_SETTABLE_PARAMS 13
|
||||
#define OSSL_FUNC_KEYMGMT_SET_PARAMS 13
|
||||
#define OSSL_FUNC_KEYMGMT_SETTABLE_PARAMS 14
|
||||
OSSL_CORE_MAKE_FUNC(int, OP_keymgmt_set_params,
|
||||
(void *keydata, const OSSL_PARAM params[]))
|
||||
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_keymgmt_settable_params, (void))
|
||||
@@ -480,19 +510,21 @@ OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_keyexch_gettable_ctx_params,
|
||||
# define OSSL_FUNC_SIGNATURE_DIGEST_SIGN_INIT 8
|
||||
# define OSSL_FUNC_SIGNATURE_DIGEST_SIGN_UPDATE 9
|
||||
# define OSSL_FUNC_SIGNATURE_DIGEST_SIGN_FINAL 10
|
||||
# define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_INIT 11
|
||||
# define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_UPDATE 12
|
||||
# define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_FINAL 13
|
||||
# define OSSL_FUNC_SIGNATURE_FREECTX 14
|
||||
# define OSSL_FUNC_SIGNATURE_DUPCTX 15
|
||||
# define OSSL_FUNC_SIGNATURE_GET_CTX_PARAMS 16
|
||||
# define OSSL_FUNC_SIGNATURE_GETTABLE_CTX_PARAMS 17
|
||||
# define OSSL_FUNC_SIGNATURE_SET_CTX_PARAMS 18
|
||||
# define OSSL_FUNC_SIGNATURE_SETTABLE_CTX_PARAMS 19
|
||||
# define OSSL_FUNC_SIGNATURE_GET_CTX_MD_PARAMS 20
|
||||
# define OSSL_FUNC_SIGNATURE_GETTABLE_CTX_MD_PARAMS 21
|
||||
# define OSSL_FUNC_SIGNATURE_SET_CTX_MD_PARAMS 22
|
||||
# define OSSL_FUNC_SIGNATURE_SETTABLE_CTX_MD_PARAMS 23
|
||||
# define OSSL_FUNC_SIGNATURE_DIGEST_SIGN 11
|
||||
# define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_INIT 12
|
||||
# define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_UPDATE 13
|
||||
# define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_FINAL 14
|
||||
# define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY 15
|
||||
# define OSSL_FUNC_SIGNATURE_FREECTX 16
|
||||
# define OSSL_FUNC_SIGNATURE_DUPCTX 17
|
||||
# define OSSL_FUNC_SIGNATURE_GET_CTX_PARAMS 18
|
||||
# define OSSL_FUNC_SIGNATURE_GETTABLE_CTX_PARAMS 19
|
||||
# define OSSL_FUNC_SIGNATURE_SET_CTX_PARAMS 20
|
||||
# define OSSL_FUNC_SIGNATURE_SETTABLE_CTX_PARAMS 21
|
||||
# define OSSL_FUNC_SIGNATURE_GET_CTX_MD_PARAMS 22
|
||||
# define OSSL_FUNC_SIGNATURE_GETTABLE_CTX_MD_PARAMS 23
|
||||
# define OSSL_FUNC_SIGNATURE_SET_CTX_MD_PARAMS 24
|
||||
# define OSSL_FUNC_SIGNATURE_SETTABLE_CTX_MD_PARAMS 25
|
||||
|
||||
OSSL_CORE_MAKE_FUNC(void *, OP_signature_newctx, (void *provctx))
|
||||
OSSL_CORE_MAKE_FUNC(int, OP_signature_sign_init, (void *ctx, void *provkey))
|
||||
@@ -522,6 +554,9 @@ OSSL_CORE_MAKE_FUNC(int, OP_signature_digest_sign_update,
|
||||
OSSL_CORE_MAKE_FUNC(int, OP_signature_digest_sign_final,
|
||||
(void *ctx, unsigned char *sig, size_t *siglen,
|
||||
size_t sigsize))
|
||||
OSSL_CORE_MAKE_FUNC(int, OP_signature_digest_sign,
|
||||
(void *ctx, unsigned char *sigret, size_t *siglen,
|
||||
size_t sigsize, const unsigned char *tbs, size_t tbslen))
|
||||
OSSL_CORE_MAKE_FUNC(int, OP_signature_digest_verify_init,
|
||||
(void *ctx, const char *mdname, const char *props,
|
||||
void *provkey))
|
||||
@@ -529,6 +564,9 @@ OSSL_CORE_MAKE_FUNC(int, OP_signature_digest_verify_update,
|
||||
(void *ctx, const unsigned char *data, size_t datalen))
|
||||
OSSL_CORE_MAKE_FUNC(int, OP_signature_digest_verify_final,
|
||||
(void *ctx, const unsigned char *sig, size_t siglen))
|
||||
OSSL_CORE_MAKE_FUNC(int, OP_signature_digest_verify,
|
||||
(void *ctx, const unsigned char *sig, size_t siglen,
|
||||
const unsigned char *tbs, size_t tbslen))
|
||||
OSSL_CORE_MAKE_FUNC(void, OP_signature_freectx, (void *ctx))
|
||||
OSSL_CORE_MAKE_FUNC(void *, OP_signature_dupctx, (void *ctx))
|
||||
OSSL_CORE_MAKE_FUNC(int, OP_signature_get_ctx_params,
|
||||
|
||||
+12
-8
@@ -106,7 +106,7 @@ int OSSL_CRMF_MSG_set1_regInfo_certReq(OSSL_CRMF_MSG *msg,
|
||||
|
||||
int OSSL_CRMF_MSG_set_validity(OSSL_CRMF_MSG *crm, time_t from, time_t to);
|
||||
int OSSL_CRMF_MSG_set_certReqId(OSSL_CRMF_MSG *crm, int rid);
|
||||
int OSSL_CRMF_MSG_get_certReqId(OSSL_CRMF_MSG *crm);
|
||||
int OSSL_CRMF_MSG_get_certReqId(const OSSL_CRMF_MSG *crm);
|
||||
int OSSL_CRMF_MSG_set0_extensions(OSSL_CRMF_MSG *crm, X509_EXTENSIONS *exts);
|
||||
|
||||
int OSSL_CRMF_MSG_push0_extension(OSSL_CRMF_MSG *crm, X509_EXTENSION *ext);
|
||||
@@ -120,20 +120,24 @@ int OSSL_CRMF_MSG_create_popo(OSSL_CRMF_MSG *crm, EVP_PKEY *pkey,
|
||||
int OSSL_CRMF_MSGS_verify_popo(const OSSL_CRMF_MSGS *reqs,
|
||||
int rid, int acceptRAVerified);
|
||||
OSSL_CRMF_CERTTEMPLATE *OSSL_CRMF_MSG_get0_tmpl(const OSSL_CRMF_MSG *crm);
|
||||
ASN1_INTEGER *OSSL_CRMF_CERTTEMPLATE_get0_serialNumber(OSSL_CRMF_CERTTEMPLATE *t);
|
||||
X509_NAME *OSSL_CRMF_CERTTEMPLATE_get0_issuer(OSSL_CRMF_CERTTEMPLATE *tmpl);
|
||||
X509_NAME *OSSL_CRMF_CERTID_get0_issuer(const OSSL_CRMF_CERTID *cid);
|
||||
ASN1_INTEGER
|
||||
*OSSL_CRMF_CERTTEMPLATE_get0_serialNumber(const OSSL_CRMF_CERTTEMPLATE *tmpl);
|
||||
const X509_NAME
|
||||
*OSSL_CRMF_CERTTEMPLATE_get0_issuer(const OSSL_CRMF_CERTTEMPLATE *tmpl);
|
||||
const X509_NAME
|
||||
*OSSL_CRMF_CERTID_get0_issuer(const OSSL_CRMF_CERTID *cid);
|
||||
ASN1_INTEGER *OSSL_CRMF_CERTID_get0_serialNumber(const OSSL_CRMF_CERTID *cid);
|
||||
int OSSL_CRMF_CERTTEMPLATE_fill(OSSL_CRMF_CERTTEMPLATE *tmpl,
|
||||
EVP_PKEY *pubkey,
|
||||
const X509_NAME *subject,
|
||||
const X509_NAME *issuer,
|
||||
const ASN1_INTEGER *serial);
|
||||
X509 *OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert(OSSL_CRMF_ENCRYPTEDVALUE *ecert,
|
||||
EVP_PKEY *pkey);
|
||||
X509
|
||||
*OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert(const OSSL_CRMF_ENCRYPTEDVALUE *ecert,
|
||||
EVP_PKEY *pkey);
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
# endif /* !defined OPENSSL_NO_CRMF */
|
||||
#endif /* !defined OPENSSL_CRMF_H */
|
||||
# endif /* !defined(OPENSSL_NO_CRMF) */
|
||||
#endif /* !defined(OPENSSL_CRMF_H) */
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Generated by util/mkerr.pl DO NOT EDIT
|
||||
* Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
# ifndef OPENSSL_NO_CRMF
|
||||
|
||||
# ifdef __cplusplus
|
||||
# ifdef __cplusplus
|
||||
extern "C"
|
||||
# endif
|
||||
int ERR_load_CRMF_strings(void);
|
||||
@@ -27,7 +27,7 @@ int ERR_load_CRMF_strings(void);
|
||||
/*
|
||||
* CRMF function codes.
|
||||
*/
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define CRMF_F_CRMF_POPOSIGNINGKEY_INIT 0
|
||||
# define CRMF_F_OSSL_CRMF_CERTID_GEN 0
|
||||
# define CRMF_F_OSSL_CRMF_CERTTEMPLATE_FILL 0
|
||||
@@ -47,7 +47,7 @@ int ERR_load_CRMF_strings(void);
|
||||
# define CRMF_F_OSSL_CRMF_MSG_SET_VALIDITY 0
|
||||
# define CRMF_F_OSSL_CRMF_PBMP_NEW 0
|
||||
# define CRMF_F_OSSL_CRMF_PBM_NEW 0
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/*
|
||||
* CRMF reason codes.
|
||||
@@ -62,6 +62,11 @@ int ERR_load_CRMF_strings(void);
|
||||
# define CRMF_R_ITERATIONCOUNT_BELOW_100 108
|
||||
# define CRMF_R_MALFORMED_IV 101
|
||||
# define CRMF_R_NULL_ARGUMENT 109
|
||||
# define CRMF_R_POPO_INCONSISTENT_PUBLIC_KEY 117
|
||||
# define CRMF_R_POPO_MISSING 121
|
||||
# define CRMF_R_POPO_MISSING_PUBLIC_KEY 118
|
||||
# define CRMF_R_POPO_MISSING_SUBJECT 119
|
||||
# define CRMF_R_POPO_RAVERIFIED_NOT_ACCEPTED 120
|
||||
# define CRMF_R_SETTING_MAC_ALGOR_FAILURE 110
|
||||
# define CRMF_R_SETTING_OWF_ALGOR_FAILURE 111
|
||||
# define CRMF_R_UNSUPPORTED_ALGORITHM 112
|
||||
@@ -69,7 +74,6 @@ int ERR_load_CRMF_strings(void);
|
||||
# define CRMF_R_UNSUPPORTED_CIPHER 114
|
||||
# define CRMF_R_UNSUPPORTED_METHOD_FOR_CREATING_POPO 115
|
||||
# define CRMF_R_UNSUPPORTED_POPO_METHOD 116
|
||||
# define CRMF_R_UNSUPPORTED_POPO_NOT_ACCEPTED 117
|
||||
|
||||
# endif
|
||||
#endif
|
||||
@@ -192,7 +192,8 @@ DEFINE_STACK_OF(void)
|
||||
# define CRYPTO_EX_INDEX_RAND_DRBG 15
|
||||
# define CRYPTO_EX_INDEX_DRBG CRYPTO_EX_INDEX_RAND_DRBG
|
||||
# define CRYPTO_EX_INDEX_OPENSSL_CTX 16
|
||||
# define CRYPTO_EX_INDEX__COUNT 17
|
||||
# define CRYPTO_EX_INDEX_EVP_PKEY 17
|
||||
# define CRYPTO_EX_INDEX__COUNT 18
|
||||
|
||||
typedef void CRYPTO_EX_new (void *parent, void *ptr, CRYPTO_EX_DATA *ad,
|
||||
int idx, long argl, void *argp);
|
||||
@@ -493,6 +494,7 @@ CRYPTO_THREAD_ID CRYPTO_THREAD_get_current_id(void);
|
||||
int CRYPTO_THREAD_compare_id(CRYPTO_THREAD_ID a, CRYPTO_THREAD_ID b);
|
||||
|
||||
OPENSSL_CTX *OPENSSL_CTX_new(void);
|
||||
int OPENSSL_CTX_load_config(OPENSSL_CTX *ctx, const char *config_file);
|
||||
void OPENSSL_CTX_free(OPENSSL_CTX *);
|
||||
|
||||
# ifdef __cplusplus
|
||||
|
||||
@@ -12,11 +12,6 @@
|
||||
# define OPENSSL_CRYPTOERR_H
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_CRYPTOERR_H
|
||||
# endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
# include <openssl/symhacks.h>
|
||||
|
||||
|
||||
+40
-4
@@ -69,10 +69,18 @@ DEFINE_STACK_OF(CTLOG)
|
||||
******************************************/
|
||||
|
||||
/*
|
||||
* Creates a new, empty policy evaluation context.
|
||||
* Creates a new, empty policy evaluation context associated with the given
|
||||
* library context and property query string.
|
||||
* The caller is responsible for calling CT_POLICY_EVAL_CTX_free when finished
|
||||
* with the CT_POLICY_EVAL_CTX.
|
||||
*/
|
||||
CT_POLICY_EVAL_CTX *CT_POLICY_EVAL_CTX_new_with_libctx(OPENSSL_CTX *libctx,
|
||||
const char *propq);
|
||||
|
||||
/*
|
||||
* The same as CT_POLICY_EVAL_CTX_new_with_libctx() but the default library
|
||||
* context and property query string is used.
|
||||
*/
|
||||
CT_POLICY_EVAL_CTX *CT_POLICY_EVAL_CTX_new(void);
|
||||
|
||||
/* Deletes a policy evaluation context and anything it owns. */
|
||||
@@ -409,19 +417,39 @@ SCT *o2i_SCT(SCT **psct, const unsigned char **in, size_t len);
|
||||
********************/
|
||||
|
||||
/*
|
||||
* Creates a new CT log instance with the given |public_key| and |name|.
|
||||
* Creates a new CT log instance with the given |public_key| and |name| and
|
||||
* associates it with the give library context |libctx| and property query
|
||||
* string |propq|.
|
||||
* Takes ownership of |public_key| but copies |name|.
|
||||
* Returns NULL if malloc fails or if |public_key| cannot be converted to DER.
|
||||
* Should be deleted by the caller using CTLOG_free when no longer needed.
|
||||
*/
|
||||
CTLOG *CTLOG_new_with_libctx(EVP_PKEY *public_key, const char *name,
|
||||
OPENSSL_CTX *libctx, const char *propq);
|
||||
|
||||
/*
|
||||
* The same as CTLOG_new_with_libctx except that the default library context and
|
||||
* property query string are used.
|
||||
*/
|
||||
CTLOG *CTLOG_new(EVP_PKEY *public_key, const char *name);
|
||||
|
||||
/*
|
||||
* Creates a new CTLOG instance with the base64-encoded SubjectPublicKeyInfo DER
|
||||
* in |pkey_base64|. The |name| is a string to help users identify this log.
|
||||
* in |pkey_base64| and associated with the given library context |libctx| and
|
||||
* property query string |propq|. The |name| is a string to help users identify
|
||||
* this log.
|
||||
* Returns 1 on success, 0 on failure.
|
||||
* Should be deleted by the caller using CTLOG_free when no longer needed.
|
||||
*/
|
||||
int CTLOG_new_from_base64_with_libctx(CTLOG **ct_log, const char *pkey_base64,
|
||||
const char *name, OPENSSL_CTX *libctx,
|
||||
const char *propq);
|
||||
|
||||
/*
|
||||
* The same as CTLOG_new_from_base64_with_libctx() except that the default
|
||||
* library context and property query string are used.
|
||||
* Returns 1 on success, 0 on failure.
|
||||
*/
|
||||
int CTLOG_new_from_base64(CTLOG ** ct_log,
|
||||
const char *pkey_base64, const char *name);
|
||||
|
||||
@@ -443,7 +471,15 @@ EVP_PKEY *CTLOG_get0_public_key(const CTLOG *log);
|
||||
**************************/
|
||||
|
||||
/*
|
||||
* Creates a new CT log store.
|
||||
* Creates a new CT log store and associates it with the given libctx and
|
||||
* property query string.
|
||||
* Should be deleted by the caller using CTLOG_STORE_free when no longer needed.
|
||||
*/
|
||||
CTLOG_STORE *CTLOG_STORE_new_with_libctx(OPENSSL_CTX *libctx, const char *propq);
|
||||
|
||||
/*
|
||||
* Same as CTLOG_STORE_new_with_libctx except that the default libctx and
|
||||
* property query string are used.
|
||||
* Should be deleted by the caller using CTLOG_STORE_free when no longer needed.
|
||||
*/
|
||||
CTLOG_STORE *CTLOG_STORE_new(void);
|
||||
|
||||
@@ -12,11 +12,6 @@
|
||||
# define OPENSSL_CTERR_H
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_CTERR_H
|
||||
# endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
# include <openssl/symhacks.h>
|
||||
|
||||
|
||||
@@ -155,7 +155,7 @@ DEPRECATEDIN_3_0(int DH_security_bits(const DH *dh))
|
||||
CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_DH, l, p, newf, dupf, freef)
|
||||
# endif
|
||||
DEPRECATEDIN_3_0(int DH_set_ex_data(DH *d, int idx, void *arg))
|
||||
DEPRECATEDIN_3_0(void *DH_get_ex_data(DH *d, int idx))
|
||||
DEPRECATEDIN_3_0(void *DH_get_ex_data(const DH *d, int idx))
|
||||
|
||||
/* Deprecated version */
|
||||
DEPRECATEDIN_0_9_8(DH *DH_generate_parameters(int prime_len, int generator,
|
||||
|
||||
@@ -12,11 +12,6 @@
|
||||
# define OPENSSL_DHERR_H
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_DHERR_H
|
||||
# endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
# include <openssl/symhacks.h>
|
||||
|
||||
|
||||
@@ -130,7 +130,7 @@ DEPRECATEDIN_3_0(int DSA_verify(int type, const unsigned char *dgst,
|
||||
CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_DSA, l, p, newf, dupf, freef)
|
||||
# endif
|
||||
DEPRECATEDIN_3_0(int DSA_set_ex_data(DSA *d, int idx, void *arg))
|
||||
DEPRECATEDIN_3_0(void *DSA_get_ex_data(DSA *d, int idx))
|
||||
DEPRECATEDIN_3_0(void *DSA_get_ex_data(const DSA *d, int idx))
|
||||
|
||||
DECLARE_ASN1_ENCODE_FUNCTIONS_only(DSA, DSAPublicKey)
|
||||
DECLARE_ASN1_ENCODE_FUNCTIONS_only(DSA, DSAPrivateKey)
|
||||
|
||||
@@ -12,11 +12,6 @@
|
||||
# define OPENSSL_DSAERR_H
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_DSAERR_H
|
||||
# endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
# include <openssl/symhacks.h>
|
||||
|
||||
|
||||
@@ -1450,10 +1450,11 @@ DEPRECATEDIN_3_0(void EC_KEY_METHOD_get_verify
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# define EVP_PKEY_CTX_set_ec_paramgen_curve_nid(ctx, nid) \
|
||||
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \
|
||||
EVP_PKEY_OP_PARAMGEN|EVP_PKEY_OP_KEYGEN, \
|
||||
EVP_PKEY_CTRL_EC_PARAMGEN_CURVE_NID, nid, NULL)
|
||||
int EVP_PKEY_CTX_set_ec_paramgen_curve_name(EVP_PKEY_CTX *ctx,
|
||||
const char *name);
|
||||
int EVP_PKEY_CTX_get_ec_paramgen_curve_name(EVP_PKEY_CTX *ctx,
|
||||
char *name, size_t namelen);
|
||||
int EVP_PKEY_CTX_set_ec_paramgen_curve_nid(EVP_PKEY_CTX *ctx, int nid);
|
||||
|
||||
# define EVP_PKEY_CTX_set_ec_param_enc(ctx, flag) \
|
||||
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \
|
||||
|
||||
@@ -12,11 +12,6 @@
|
||||
# define OPENSSL_ECERR_H
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_ECERR_H
|
||||
# endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
# include <openssl/symhacks.h>
|
||||
|
||||
|
||||
@@ -12,11 +12,6 @@
|
||||
# define OPENSSL_ENGINEERR_H
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_ENGINEERR_H
|
||||
# endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
# include <openssl/symhacks.h>
|
||||
|
||||
|
||||
+22
-3
@@ -686,8 +686,8 @@ __owur int EVP_DigestVerify(EVP_MD_CTX *ctx, const unsigned char *sigret,
|
||||
size_t tbslen);
|
||||
|
||||
int EVP_DigestSignInit_ex(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
|
||||
const char *mdname, const char *props,
|
||||
EVP_PKEY *pkey);
|
||||
const char *mdname, const char *props, EVP_PKEY *pkey,
|
||||
OPENSSL_CTX *libctx);
|
||||
/*__owur*/ int EVP_DigestSignInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
|
||||
const EVP_MD *type, ENGINE *e,
|
||||
EVP_PKEY *pkey);
|
||||
@@ -697,7 +697,7 @@ __owur int EVP_DigestSignFinal(EVP_MD_CTX *ctx, unsigned char *sigret,
|
||||
|
||||
int EVP_DigestVerifyInit_ex(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
|
||||
const char *mdname, const char *props,
|
||||
EVP_PKEY *pkey);
|
||||
EVP_PKEY *pkey, OPENSSL_CTX *libctx);
|
||||
__owur int EVP_DigestVerifyInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
|
||||
const EVP_MD *type, ENGINE *e,
|
||||
EVP_PKEY *pkey);
|
||||
@@ -1105,14 +1105,17 @@ DEPRECATEDIN_3_0(int EVP_PKEY_decrypt_old(unsigned char *dec_key,
|
||||
DEPRECATEDIN_3_0(int EVP_PKEY_encrypt_old(unsigned char *enc_key,
|
||||
const unsigned char *key,
|
||||
int key_len, EVP_PKEY *pub_key))
|
||||
int EVP_PKEY_is_a(const EVP_PKEY *pkey, const char *name);
|
||||
int EVP_PKEY_type(int type);
|
||||
int EVP_PKEY_id(const EVP_PKEY *pkey);
|
||||
int EVP_PKEY_base_id(const EVP_PKEY *pkey);
|
||||
int EVP_PKEY_bits(const EVP_PKEY *pkey);
|
||||
int EVP_PKEY_security_bits(const EVP_PKEY *pkey);
|
||||
int EVP_PKEY_size(const EVP_PKEY *pkey);
|
||||
int EVP_PKEY_can_sign(const EVP_PKEY *pkey);
|
||||
int EVP_PKEY_set_type(EVP_PKEY *pkey, int type);
|
||||
int EVP_PKEY_set_type_str(EVP_PKEY *pkey, const char *str, int len);
|
||||
int EVP_PKEY_set_type_by_keymgmt(EVP_PKEY *pkey, EVP_KEYMGMT *keymgmt);
|
||||
int EVP_PKEY_set_alias_type(EVP_PKEY *pkey, int type);
|
||||
# ifndef OPENSSL_NO_ENGINE
|
||||
int EVP_PKEY_set1_engine(EVP_PKEY *pkey, ENGINE *e);
|
||||
@@ -1593,16 +1596,32 @@ int EVP_PKEY_key_fromdata_init(EVP_PKEY_CTX *ctx);
|
||||
int EVP_PKEY_fromdata(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey, OSSL_PARAM param[]);
|
||||
const OSSL_PARAM *EVP_PKEY_param_fromdata_settable(EVP_PKEY_CTX *ctx);
|
||||
const OSSL_PARAM *EVP_PKEY_key_fromdata_settable(EVP_PKEY_CTX *ctx);
|
||||
const OSSL_PARAM *EVP_PKEY_gettable_params(EVP_PKEY *pkey);
|
||||
int EVP_PKEY_get_int_param(EVP_PKEY *pkey, const char *key_name, int *out);
|
||||
int EVP_PKEY_get_size_t_param(EVP_PKEY *pkey, const char *key_name, size_t *out);
|
||||
int EVP_PKEY_get_bn_param(EVP_PKEY *pkey, const char *key_name, BIGNUM **bn);
|
||||
int EVP_PKEY_get_utf8_string_param(EVP_PKEY *pkey, const char *key_name,
|
||||
char *str, size_t max_buf_sz, size_t *out_sz);
|
||||
int EVP_PKEY_get_octet_string_param(EVP_PKEY *pkey, const char *key_name,
|
||||
unsigned char *buf, size_t max_buf_sz,
|
||||
size_t *out_sz);
|
||||
|
||||
int EVP_PKEY_paramgen_init(EVP_PKEY_CTX *ctx);
|
||||
int EVP_PKEY_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey);
|
||||
int EVP_PKEY_keygen_init(EVP_PKEY_CTX *ctx);
|
||||
int EVP_PKEY_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey);
|
||||
int EVP_PKEY_gen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey);
|
||||
int EVP_PKEY_check(EVP_PKEY_CTX *ctx);
|
||||
int EVP_PKEY_public_check(EVP_PKEY_CTX *ctx);
|
||||
int EVP_PKEY_param_check(EVP_PKEY_CTX *ctx);
|
||||
int EVP_PKEY_private_check(EVP_PKEY_CTX *ctx);
|
||||
int EVP_PKEY_pairwise_check(EVP_PKEY_CTX *ctx);
|
||||
|
||||
# define EVP_PKEY_get_ex_new_index(l, p, newf, dupf, freef) \
|
||||
CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_EVP_PKEY, l, p, newf, dupf, freef)
|
||||
int EVP_PKEY_set_ex_data(EVP_PKEY *key, int idx, void *arg);
|
||||
void *EVP_PKEY_get_ex_data(const EVP_PKEY *key, int idx);
|
||||
|
||||
void EVP_PKEY_CTX_set_cb(EVP_PKEY_CTX *ctx, EVP_PKEY_gen_cb *cb);
|
||||
EVP_PKEY_gen_cb *EVP_PKEY_CTX_get_cb(EVP_PKEY_CTX *ctx);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Generated by util/mkerr.pl DO NOT EDIT
|
||||
* Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
@@ -10,12 +10,6 @@
|
||||
|
||||
#ifndef OPENSSL_EVPERR_H
|
||||
# define OPENSSL_EVPERR_H
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_EVPERR_H
|
||||
# endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
# include <openssl/symhacks.h>
|
||||
@@ -194,10 +188,13 @@ int ERR_load_EVP_strings(void);
|
||||
# define EVP_R_EXPECTING_A_EC_KEY 142
|
||||
# define EVP_R_EXPECTING_A_POLY1305_KEY 164
|
||||
# define EVP_R_EXPECTING_A_SIPHASH_KEY 175
|
||||
# define EVP_R_FETCH_FAILED 202
|
||||
# define EVP_R_FINAL_ERROR 188
|
||||
# define EVP_R_FIPS_MODE_NOT_SUPPORTED 167
|
||||
# define EVP_R_GET_RAW_KEY_FAILED 182
|
||||
# define EVP_R_ILLEGAL_SCRYPT_PARAMETERS 171
|
||||
# define EVP_R_INACCESSIBLE_DOMAIN_PARAMETERS 204
|
||||
# define EVP_R_INACCESSIBLE_KEY 203
|
||||
# define EVP_R_INITIALIZATION_ERROR 134
|
||||
# define EVP_R_INPUT_NOT_INITIALIZED 111
|
||||
# define EVP_R_INVALID_CUSTOM_LENGTH 185
|
||||
@@ -210,6 +207,7 @@ int ERR_load_EVP_strings(void);
|
||||
# define EVP_R_INVALID_PROVIDER_FUNCTIONS 193
|
||||
# define EVP_R_INVALID_SALT_LENGTH 186
|
||||
# define EVP_R_KEYGEN_FAILURE 120
|
||||
# define EVP_R_KEYMGMT_EXPORT_FAILURE 205
|
||||
# define EVP_R_KEY_SETUP_FAILED 180
|
||||
# define EVP_R_MEMORY_LIMIT_EXCEEDED 172
|
||||
# define EVP_R_MESSAGE_DIGEST_IS_NULL 159
|
||||
@@ -220,6 +218,7 @@ int ERR_load_EVP_strings(void);
|
||||
# define EVP_R_NO_CIPHER_SET 131
|
||||
# define EVP_R_NO_DEFAULT_DIGEST 158
|
||||
# define EVP_R_NO_DIGEST_SET 139
|
||||
# define EVP_R_NO_IMPORT_FUNCTION 206
|
||||
# define EVP_R_NO_KEYMGMT_AVAILABLE 199
|
||||
# define EVP_R_NO_KEYMGMT_PRESENT 196
|
||||
# define EVP_R_NO_KEY_SET 154
|
||||
@@ -237,6 +236,7 @@ int ERR_load_EVP_strings(void);
|
||||
# define EVP_R_TOO_MANY_RECORDS 183
|
||||
# define EVP_R_UNKNOWN_CIPHER 160
|
||||
# define EVP_R_UNKNOWN_DIGEST 161
|
||||
# define EVP_R_UNKNOWN_KEY_TYPE 207
|
||||
# define EVP_R_UNKNOWN_OPTION 169
|
||||
# define EVP_R_UNKNOWN_PBE_ALGORITHM 121
|
||||
# define EVP_R_UNSUPPORTED_ALGORITHM 156
|
||||
|
||||
+15
-5
@@ -25,14 +25,24 @@ extern "C" {
|
||||
|
||||
typedef BIO *(*OSSL_HTTP_bio_cb_t)(BIO *bio, void *arg, int connect, int detail);
|
||||
|
||||
BIO *OSSL_HTTP_get(const char *url, const char *proxy, const char *proxy_port,
|
||||
# define OSSL_HTTP_NAME "http"
|
||||
# define OSSL_HTTPS_NAME "https"
|
||||
# define OSSL_HTTP_PREFIX OSSL_HTTP_NAME"://"
|
||||
# define OSSL_HTTPS_PREFIX OSSL_HTTPS_NAME"://"
|
||||
# define OSSL_HTTP_PORT "80"
|
||||
# define OSSL_HTTPS_PORT "443"
|
||||
# define OPENSSL_NO_PROXY "NO_PROXY"
|
||||
# define OPENSSL_HTTP_PROXY "HTTP_PROXY"
|
||||
# define OPENSSL_HTTPS_PROXY "HTTPS_PROXY"
|
||||
|
||||
BIO *OSSL_HTTP_get(const char *url, const char *proxy, const char *no_proxy,
|
||||
BIO *bio, BIO *rbio,
|
||||
OSSL_HTTP_bio_cb_t bio_update_fn, void *arg,
|
||||
const STACK_OF(CONF_VALUE) *headers,
|
||||
int maxline, unsigned long max_resp_len, int timeout,
|
||||
const char *expected_content_type, int expect_asn1);
|
||||
ASN1_VALUE *OSSL_HTTP_get_asn1(const char *url,
|
||||
const char *proxy, const char *proxy_port,
|
||||
const char *proxy, const char *no_proxy,
|
||||
BIO *bio, BIO *rbio,
|
||||
OSSL_HTTP_bio_cb_t bio_update_fn, void *arg,
|
||||
const STACK_OF(CONF_VALUE) *headers,
|
||||
@@ -41,7 +51,7 @@ ASN1_VALUE *OSSL_HTTP_get_asn1(const char *url,
|
||||
const ASN1_ITEM *it);
|
||||
ASN1_VALUE *OSSL_HTTP_post_asn1(const char *server, const char *port,
|
||||
const char *path, int use_ssl,
|
||||
const char *proxy, const char *proxy_port,
|
||||
const char *proxy, const char *no_proxy,
|
||||
BIO *bio, BIO *rbio,
|
||||
OSSL_HTTP_bio_cb_t bio_update_fn, void *arg,
|
||||
const STACK_OF(CONF_VALUE) *headers,
|
||||
@@ -51,7 +61,7 @@ ASN1_VALUE *OSSL_HTTP_post_asn1(const char *server, const char *port,
|
||||
int timeout, const char *expected_ct,
|
||||
const ASN1_ITEM *rsp_it);
|
||||
BIO *OSSL_HTTP_transfer(const char *server, const char *port, const char *path,
|
||||
int use_ssl, const char *proxy, const char *proxy_port,
|
||||
int use_ssl, const char *proxy, const char *no_proxy,
|
||||
BIO *bio, BIO *rbio,
|
||||
OSSL_HTTP_bio_cb_t bio_update_fn, void *arg,
|
||||
const STACK_OF(CONF_VALUE) *headers,
|
||||
@@ -69,4 +79,4 @@ int OSSL_HTTP_parse_url(const char *url, char **phost, char **pport,
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
#endif /* !defined OPENSSL_HTTP_H */
|
||||
#endif /* !defined(OPENSSL_HTTP_H) */
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Generated by util/mkerr.pl DO NOT EDIT
|
||||
* Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
@@ -41,12 +41,13 @@ int ERR_load_HTTP_strings(void);
|
||||
# define HTTP_R_MISSING_ASN1_ENCODING 110
|
||||
# define HTTP_R_MISSING_CONTENT_TYPE 121
|
||||
# define HTTP_R_MISSING_REDIRECT_LOCATION 111
|
||||
# define HTTP_R_RECEIVED_ERROR 105
|
||||
# define HTTP_R_RECEIVED_WRONG_HTTP_VERSION 106
|
||||
# define HTTP_R_REDIRECTION_FROM_HTTPS_TO_HTTP 112
|
||||
# define HTTP_R_REDIRECTION_NOT_ENABLED 116
|
||||
# define HTTP_R_RESPONSE_LINE_TOO_LONG 113
|
||||
# define HTTP_R_SERVER_RESPONSE_PARSE_ERROR 104
|
||||
# define HTTP_R_SERVER_SENT_ERROR 105
|
||||
# define HTTP_R_SERVER_SENT_WRONG_HTTP_VERSION 106
|
||||
# define HTTP_R_RESPONSE_PARSE_ERROR 104
|
||||
# define HTTP_R_SOCK_NOT_SUPPORTED 122
|
||||
# define HTTP_R_STATUS_CODE_UNSUPPORTED 114
|
||||
# define HTTP_R_TLS_NOT_ENABLED 107
|
||||
# define HTTP_R_TOO_MANY_REDIRECTIONS 115
|
||||
|
||||
@@ -12,11 +12,6 @@
|
||||
# define OPENSSL_KDFERR_H
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_OSSL_KDFERR_H
|
||||
# endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
# include <openssl/symhacks.h>
|
||||
|
||||
|
||||
@@ -12,11 +12,6 @@
|
||||
# define OPENSSL_OBJECTSERR_H
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_OBJERR_H
|
||||
# endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
# include <openssl/symhacks.h>
|
||||
|
||||
|
||||
@@ -177,8 +177,8 @@ typedef struct ocsp_service_locator_st OCSP_SERVICELOC;
|
||||
ASN1_item_digest(ASN1_ITEM_rptr(ASN1_BIT_STRING),type,data,md,len)
|
||||
|
||||
# define OCSP_CERTSTATUS_dup(cs)\
|
||||
(OCSP_CERTSTATUS*)ASN1_dup((int(*)())i2d_OCSP_CERTSTATUS,\
|
||||
(char *(*)())d2i_OCSP_CERTSTATUS,(char *)(cs))
|
||||
(OCSP_CERTSTATUS*)ASN1_dup((i2d_of_void *)i2d_OCSP_CERTSTATUS,\
|
||||
(d2i_of_void *)d2i_OCSP_CERTSTATUS,(char *)(cs))
|
||||
|
||||
DECLARE_ASN1_DUP_FUNCTION(OCSP_CERTID)
|
||||
|
||||
@@ -205,7 +205,7 @@ int OCSP_basic_add1_nonce(OCSP_BASICRESP *resp, unsigned char *val, int len);
|
||||
int OCSP_check_nonce(OCSP_REQUEST *req, OCSP_BASICRESP *bs);
|
||||
int OCSP_copy_nonce(OCSP_BASICRESP *resp, OCSP_REQUEST *req);
|
||||
|
||||
int OCSP_request_set1_name(OCSP_REQUEST *req, X509_NAME *nm);
|
||||
int OCSP_request_set1_name(OCSP_REQUEST *req, const X509_NAME *nm);
|
||||
int OCSP_request_add1_cert(OCSP_REQUEST *req, X509 *cert);
|
||||
|
||||
int OCSP_request_sign(OCSP_REQUEST *req,
|
||||
@@ -277,7 +277,11 @@ int OCSP_basic_sign_ctx(OCSP_BASICRESP *brsp,
|
||||
X509 *signer, EVP_MD_CTX *ctx,
|
||||
STACK_OF(X509) *certs, unsigned long flags);
|
||||
int OCSP_RESPID_set_by_name(OCSP_RESPID *respid, X509 *cert);
|
||||
int OCSP_RESPID_set_by_key_ex(OCSP_RESPID *respid, X509 *cert,
|
||||
OPENSSL_CTX *libctx, const char *propq);
|
||||
int OCSP_RESPID_set_by_key(OCSP_RESPID *respid, X509 *cert);
|
||||
int OCSP_RESPID_match_ex(OCSP_RESPID *respid, X509 *cert, OPENSSL_CTX *libctx,
|
||||
const char *propq);
|
||||
int OCSP_RESPID_match(OCSP_RESPID *respid, X509 *cert);
|
||||
|
||||
X509_EXTENSION *OCSP_crlID_new(const char *url, long *n, char *tim);
|
||||
@@ -286,7 +290,7 @@ X509_EXTENSION *OCSP_accept_responses_new(char **oids);
|
||||
|
||||
X509_EXTENSION *OCSP_archive_cutoff_new(char *tim);
|
||||
|
||||
X509_EXTENSION *OCSP_url_svcloc_new(X509_NAME *issuer, const char **urls);
|
||||
X509_EXTENSION *OCSP_url_svcloc_new(const X509_NAME *issuer, const char **urls);
|
||||
|
||||
int OCSP_REQUEST_get_ext_count(OCSP_REQUEST *x);
|
||||
int OCSP_REQUEST_get_ext_by_NID(OCSP_REQUEST *x, int nid, int lastpos);
|
||||
@@ -371,5 +375,5 @@ int OCSP_basic_verify(OCSP_BASICRESP *bs, STACK_OF(X509) *certs,
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
# endif /* !defined OPENSSL_NO_OCSP */
|
||||
# endif /* !defined(OPENSSL_NO_OCSP) */
|
||||
#endif
|
||||
@@ -12,11 +12,6 @@
|
||||
# define OPENSSL_OCSPERR_H
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_OCSPERR_H
|
||||
# endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
# include <openssl/symhacks.h>
|
||||
|
||||
|
||||
@@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
* this file except in compliance with the License. You can obtain a copy
|
||||
* in the file LICENSE in the source distribution or at
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#include <openssl/params.h>
|
||||
#include <openssl/types.h>
|
||||
|
||||
OSSL_PARAM_BLD *OSSL_PARAM_BLD_new(void);
|
||||
OSSL_PARAM *OSSL_PARAM_BLD_to_param(OSSL_PARAM_BLD *bld);
|
||||
void OSSL_PARAM_BLD_free(OSSL_PARAM_BLD *bld);
|
||||
void OSSL_PARAM_BLD_free_params(OSSL_PARAM *params);
|
||||
|
||||
int OSSL_PARAM_BLD_push_int(OSSL_PARAM_BLD *bld, const char *key, int val);
|
||||
int OSSL_PARAM_BLD_push_uint(OSSL_PARAM_BLD *bld, const char *key,
|
||||
unsigned int val);
|
||||
int OSSL_PARAM_BLD_push_long(OSSL_PARAM_BLD *bld, const char *key,
|
||||
long int val);
|
||||
int OSSL_PARAM_BLD_push_ulong(OSSL_PARAM_BLD *bld, const char *key,
|
||||
unsigned long int val);
|
||||
int OSSL_PARAM_BLD_push_int32(OSSL_PARAM_BLD *bld, const char *key,
|
||||
int32_t val);
|
||||
int OSSL_PARAM_BLD_push_uint32(OSSL_PARAM_BLD *bld, const char *key,
|
||||
uint32_t val);
|
||||
int OSSL_PARAM_BLD_push_int64(OSSL_PARAM_BLD *bld, const char *key,
|
||||
int64_t val);
|
||||
int OSSL_PARAM_BLD_push_uint64(OSSL_PARAM_BLD *bld, const char *key,
|
||||
uint64_t val);
|
||||
int OSSL_PARAM_BLD_push_size_t(OSSL_PARAM_BLD *bld, const char *key,
|
||||
size_t val);
|
||||
int OSSL_PARAM_BLD_push_double(OSSL_PARAM_BLD *bld, const char *key,
|
||||
double val);
|
||||
int OSSL_PARAM_BLD_push_BN(OSSL_PARAM_BLD *bld, const char *key,
|
||||
const BIGNUM *bn);
|
||||
int OSSL_PARAM_BLD_push_BN_pad(OSSL_PARAM_BLD *bld, const char *key,
|
||||
const BIGNUM *bn, size_t sz);
|
||||
int OSSL_PARAM_BLD_push_utf8_string(OSSL_PARAM_BLD *bld, const char *key,
|
||||
const char *buf, size_t bsize);
|
||||
int OSSL_PARAM_BLD_push_utf8_ptr(OSSL_PARAM_BLD *bld, const char *key,
|
||||
char *buf, size_t bsize);
|
||||
int OSSL_PARAM_BLD_push_octet_string(OSSL_PARAM_BLD *bld, const char *key,
|
||||
const void *buf, size_t bsize);
|
||||
int OSSL_PARAM_BLD_push_octet_ptr(OSSL_PARAM_BLD *bld, const char *key,
|
||||
void *buf, size_t bsize);
|
||||
@@ -12,11 +12,6 @@
|
||||
# define OPENSSL_PEMERR_H
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_PEMERR_H
|
||||
# endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
# include <openssl/symhacks.h>
|
||||
|
||||
|
||||
@@ -12,11 +12,6 @@
|
||||
# define OPENSSL_PKCS12ERR_H
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_PKCS12ERR_H
|
||||
# endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
# include <openssl/symhacks.h>
|
||||
|
||||
|
||||
@@ -12,11 +12,6 @@
|
||||
# define OPENSSL_PKCS7ERR_H
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_PKCS7ERR_H
|
||||
# endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
# include <openssl/symhacks.h>
|
||||
|
||||
|
||||
@@ -12,11 +12,6 @@
|
||||
# define OPENSSL_RANDERR_H
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_RANDERR_H
|
||||
# endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
# include <openssl/symhacks.h>
|
||||
|
||||
|
||||
+4
-12
@@ -106,6 +106,10 @@ int EVP_PKEY_CTX_get_rsa_padding(EVP_PKEY_CTX *ctx, int *pad_mode);
|
||||
int EVP_PKEY_CTX_set_rsa_pss_saltlen(EVP_PKEY_CTX *ctx, int saltlen);
|
||||
int EVP_PKEY_CTX_get_rsa_pss_saltlen(EVP_PKEY_CTX *ctx, int *saltlen);
|
||||
|
||||
int EVP_PKEY_CTX_set_rsa_keygen_bits(EVP_PKEY_CTX *ctx, int bits);
|
||||
int EVP_PKEY_CTX_set_rsa_keygen_pubexp(EVP_PKEY_CTX *ctx, BIGNUM *pubexp);
|
||||
int EVP_PKEY_CTX_set_rsa_keygen_primes(EVP_PKEY_CTX *ctx, int primes);
|
||||
|
||||
/* Salt length matches digest */
|
||||
# define RSA_PSS_SALTLEN_DIGEST -1
|
||||
/* Verify only: auto detect salt length */
|
||||
@@ -119,18 +123,6 @@ int EVP_PKEY_CTX_get_rsa_pss_saltlen(EVP_PKEY_CTX *ctx, int *saltlen);
|
||||
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA_PSS, EVP_PKEY_OP_KEYGEN, \
|
||||
EVP_PKEY_CTRL_RSA_PSS_SALTLEN, len, NULL)
|
||||
|
||||
# define EVP_PKEY_CTX_set_rsa_keygen_bits(ctx, bits) \
|
||||
RSA_pkey_ctx_ctrl(ctx, EVP_PKEY_OP_KEYGEN, \
|
||||
EVP_PKEY_CTRL_RSA_KEYGEN_BITS, bits, NULL)
|
||||
|
||||
# define EVP_PKEY_CTX_set_rsa_keygen_pubexp(ctx, pubexp) \
|
||||
RSA_pkey_ctx_ctrl(ctx, EVP_PKEY_OP_KEYGEN, \
|
||||
EVP_PKEY_CTRL_RSA_KEYGEN_PUBEXP, 0, pubexp)
|
||||
|
||||
# define EVP_PKEY_CTX_set_rsa_keygen_primes(ctx, primes) \
|
||||
RSA_pkey_ctx_ctrl(ctx, EVP_PKEY_OP_KEYGEN, \
|
||||
EVP_PKEY_CTRL_RSA_KEYGEN_PRIMES, primes, NULL)
|
||||
|
||||
int EVP_PKEY_CTX_set_rsa_mgf1_md(EVP_PKEY_CTX *ctx, const EVP_MD *md);
|
||||
int EVP_PKEY_CTX_set_rsa_mgf1_md_name(EVP_PKEY_CTX *ctx, const char *mdname,
|
||||
const char *mdprops);
|
||||
|
||||
@@ -12,11 +12,6 @@
|
||||
# define OPENSSL_RSAERR_H
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_RSAERR_H
|
||||
# endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
# include <openssl/symhacks.h>
|
||||
|
||||
|
||||
@@ -52,9 +52,10 @@ extern "C" {
|
||||
# define OSSL_SELF_TEST_DESC_DRBG_CTR "CTR"
|
||||
# define OSSL_SELF_TEST_DESC_DRBG_HASH "HASH"
|
||||
# define OSSL_SELF_TEST_DESC_DRBG_HMAC "HMAC"
|
||||
# define OSSL_SELF_TEST_DESC_KA_DH "DH"
|
||||
# define OSSL_SELF_TEST_DESC_KA_ECDH "ECDH"
|
||||
# define OSSL_SELF_TEST_DESC_KA_ECDSA "ECDSA"
|
||||
# define OSSL_SELF_TEST_DESC_KDF_HKDF "HKDF"
|
||||
# define OSSL_SELF_TEST_DESC_KDF_SSKDF "SSKDF"
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -92,8 +92,15 @@ DEPRECATEDIN_1_1_0(SRP_user_pwd *SRP_VBASE_get_by_user(SRP_VBASE *vb, char *user
|
||||
/* NOTE: unlike in SRP_VBASE_get_by_user, caller owns the returned pointer.*/
|
||||
SRP_user_pwd *SRP_VBASE_get1_by_user(SRP_VBASE *vb, char *username);
|
||||
|
||||
char *SRP_create_verifier_ex(const char *user, const char *pass, char **salt,
|
||||
char **verifier, const char *N, const char *g,
|
||||
OPENSSL_CTX *libctx, const char *propq);
|
||||
char *SRP_create_verifier(const char *user, const char *pass, char **salt,
|
||||
char **verifier, const char *N, const char *g);
|
||||
int SRP_create_verifier_BN_ex(const char *user, const char *pass, BIGNUM **salt,
|
||||
BIGNUM **verifier, const BIGNUM *N,
|
||||
const BIGNUM *g, OPENSSL_CTX *libctx,
|
||||
const char *propq);
|
||||
int SRP_create_verifier_BN(const char *user, const char *pass, BIGNUM **salt,
|
||||
BIGNUM **verifier, const BIGNUM *N,
|
||||
const BIGNUM *g);
|
||||
@@ -125,14 +132,23 @@ SRP_gN *SRP_get_default_gN(const char *id);
|
||||
/* server side .... */
|
||||
BIGNUM *SRP_Calc_server_key(const BIGNUM *A, const BIGNUM *v, const BIGNUM *u,
|
||||
const BIGNUM *b, const BIGNUM *N);
|
||||
BIGNUM *SRP_Calc_B_ex(const BIGNUM *b, const BIGNUM *N, const BIGNUM *g,
|
||||
const BIGNUM *v, OPENSSL_CTX *libctx, const char *propq);
|
||||
BIGNUM *SRP_Calc_B(const BIGNUM *b, const BIGNUM *N, const BIGNUM *g,
|
||||
const BIGNUM *v);
|
||||
int SRP_Verify_A_mod_N(const BIGNUM *A, const BIGNUM *N);
|
||||
BIGNUM *SRP_Calc_u_ex(const BIGNUM *A, const BIGNUM *B, const BIGNUM *N,
|
||||
OPENSSL_CTX *libctx, const char *propq);
|
||||
BIGNUM *SRP_Calc_u(const BIGNUM *A, const BIGNUM *B, const BIGNUM *N);
|
||||
|
||||
/* client side .... */
|
||||
BIGNUM *SRP_Calc_x_ex(const BIGNUM *s, const char *user, const char *pass,
|
||||
OPENSSL_CTX *libctx, const char *propq);
|
||||
BIGNUM *SRP_Calc_x(const BIGNUM *s, const char *user, const char *pass);
|
||||
BIGNUM *SRP_Calc_A(const BIGNUM *a, const BIGNUM *N, const BIGNUM *g);
|
||||
BIGNUM *SRP_Calc_client_key_ex(const BIGNUM *N, const BIGNUM *B, const BIGNUM *g,
|
||||
const BIGNUM *x, const BIGNUM *a, const BIGNUM *u,
|
||||
OPENSSL_CTX *libctx, const char *propq);
|
||||
BIGNUM *SRP_Calc_client_key(const BIGNUM *N, const BIGNUM *B, const BIGNUM *g,
|
||||
const BIGNUM *x, const BIGNUM *a, const BIGNUM *u);
|
||||
int SRP_Verify_B_mod_N(const BIGNUM *B, const BIGNUM *N);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
|
||||
* Copyright 2005 Nokia. All rights reserved.
|
||||
*
|
||||
@@ -137,6 +137,7 @@ extern "C" {
|
||||
# define SSL_TXT_ARIA_GCM "ARIAGCM"
|
||||
# define SSL_TXT_ARIA128 "ARIA128"
|
||||
# define SSL_TXT_ARIA256 "ARIA256"
|
||||
# define SSL_TXT_GOST2012_GOST8912_GOST8912 "GOST2012-GOST8912-GOST8912"
|
||||
|
||||
# define SSL_TXT_MD5 "MD5"
|
||||
# define SSL_TXT_SHA1 "SHA1"
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
|
||||
#ifndef OPENSSL_SSLERR_H
|
||||
# define OPENSSL_SSLERR_H
|
||||
# pragma once
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
# include <openssl/symhacks.h>
|
||||
@@ -88,6 +89,7 @@ int ERR_load_SSL_strings(void);
|
||||
# define SSL_F_OSSL_STATEM_SERVER_CONSTRUCT_MESSAGE 0
|
||||
# define SSL_F_OSSL_STATEM_SERVER_POST_PROCESS_MESSAGE 0
|
||||
# define SSL_F_OSSL_STATEM_SERVER_POST_WORK 0
|
||||
# define SSL_F_OSSL_STATEM_SERVER_PRE_WORK 0
|
||||
# define SSL_F_OSSL_STATEM_SERVER_PROCESS_MESSAGE 0
|
||||
# define SSL_F_OSSL_STATEM_SERVER_READ_TRANSITION 0
|
||||
# define SSL_F_OSSL_STATEM_SERVER_WRITE_TRANSITION 0
|
||||
@@ -455,6 +457,7 @@ int ERR_load_SSL_strings(void);
|
||||
/*
|
||||
* SSL reason codes.
|
||||
*/
|
||||
# define SSL_R_ALGORITHM_FETCH_FAILED 295
|
||||
# define SSL_R_APPLICATION_DATA_AFTER_CLOSE_NOTIFY 291
|
||||
# define SSL_R_APP_DATA_IN_HANDSHAKE 100
|
||||
# define SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT 272
|
||||
@@ -603,8 +606,8 @@ int ERR_load_SSL_strings(void);
|
||||
# define SSL_R_MISSING_TMP_DH_KEY 171
|
||||
# define SSL_R_MISSING_TMP_ECDH_KEY 311
|
||||
# define SSL_R_MIXED_HANDSHAKE_AND_NON_HANDSHAKE_DATA 293
|
||||
# define SSL_R_MIXED_SPECIAL_OPERATOR_WITH_GROUPS 295
|
||||
# define SSL_R_NESTED_GROUP 296
|
||||
# define SSL_R_MIXED_SPECIAL_OPERATOR_WITH_GROUPS 296
|
||||
# define SSL_R_NESTED_GROUP 297
|
||||
# define SSL_R_NOT_ON_RECORD_BOUNDARY 182
|
||||
# define SSL_R_NOT_REPLACING_CERTIFICATE 289
|
||||
# define SSL_R_NOT_SERVER 284
|
||||
@@ -736,9 +739,9 @@ int ERR_load_SSL_strings(void);
|
||||
# define SSL_R_UNEXPECTED_CCS_MESSAGE 262
|
||||
# define SSL_R_UNEXPECTED_END_OF_EARLY_DATA 178
|
||||
# define SSL_R_UNEXPECTED_EOF_WHILE_READING 294
|
||||
# define SSL_R_UNEXPECTED_GROUP_CLOSE 297
|
||||
# define SSL_R_UNEXPECTED_GROUP_CLOSE 299
|
||||
# define SSL_R_UNEXPECTED_MESSAGE 244
|
||||
# define SSL_R_UNEXPECTED_OPERATOR_IN_GROUP 299
|
||||
# define SSL_R_UNEXPECTED_OPERATOR_IN_GROUP 305
|
||||
# define SSL_R_UNEXPECTED_RECORD 245
|
||||
# define SSL_R_UNINITIALIZED 276
|
||||
# define SSL_R_UNKNOWN_ALERT_TYPE 246
|
||||
|
||||
@@ -12,11 +12,6 @@
|
||||
# define OPENSSL_STOREERR_H
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_OSSL_STOREERR_H
|
||||
# endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
# include <openssl/symhacks.h>
|
||||
|
||||
|
||||
@@ -12,11 +12,6 @@
|
||||
# define OPENSSL_TSERR_H
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_TSERR_H
|
||||
# endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
# include <openssl/symhacks.h>
|
||||
|
||||
|
||||
@@ -203,6 +203,7 @@ typedef struct ossl_dispatch_st OSSL_DISPATCH;
|
||||
typedef struct ossl_item_st OSSL_ITEM;
|
||||
typedef struct ossl_algorithm_st OSSL_ALGORITHM;
|
||||
typedef struct ossl_param_st OSSL_PARAM;
|
||||
typedef struct ossl_param_bld_st OSSL_PARAM_BLD;
|
||||
|
||||
typedef int pem_password_cb (char *buf, int size, int rwflag, void *userdata);
|
||||
|
||||
|
||||
@@ -214,7 +214,7 @@ int UI_ctrl(UI *ui, int cmd, long i, void *p, void (*f) (void));
|
||||
# define UI_get_ex_new_index(l, p, newf, dupf, freef) \
|
||||
CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_UI, l, p, newf, dupf, freef)
|
||||
int UI_set_ex_data(UI *r, int idx, void *arg);
|
||||
void *UI_get_ex_data(UI *r, int idx);
|
||||
void *UI_get_ex_data(const UI *r, int idx);
|
||||
|
||||
/* Use specific methods instead of the built-in one */
|
||||
void UI_set_default_method(const UI_METHOD *meth);
|
||||
|
||||
@@ -12,11 +12,6 @@
|
||||
# define OPENSSL_UIERR_H
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_UIERR_H
|
||||
# endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
# include <openssl/symhacks.h>
|
||||
|
||||
|
||||
+29
-27
@@ -342,7 +342,9 @@ X509_CRL_METHOD *X509_CRL_METHOD_new(int (*crl_init) (X509_CRL *crl),
|
||||
int (*crl_free) (X509_CRL *crl),
|
||||
int (*crl_lookup) (X509_CRL *crl,
|
||||
X509_REVOKED **ret,
|
||||
ASN1_INTEGER *ser,
|
||||
const
|
||||
ASN1_INTEGER *serial,
|
||||
const
|
||||
X509_NAME *issuer),
|
||||
int (*crl_verify) (X509_CRL *crl,
|
||||
EVP_PKEY *pk));
|
||||
@@ -382,6 +384,7 @@ int X509_pubkey_digest(const X509 *data, const EVP_MD *type,
|
||||
unsigned char *md, unsigned int *len);
|
||||
int X509_digest(const X509 *data, const EVP_MD *type,
|
||||
unsigned char *md, unsigned int *len);
|
||||
ASN1_OCTET_STRING *X509_digest_sig(const X509 *cert);
|
||||
int X509_CRL_digest(const X509_CRL *data, const EVP_MD *type,
|
||||
unsigned char *md, unsigned int *len);
|
||||
int X509_REQ_digest(const X509_REQ *data, const EVP_MD *type,
|
||||
@@ -563,7 +566,7 @@ DECLARE_ASN1_FUNCTIONS(X509_CERT_AUX)
|
||||
#define X509_get_ex_new_index(l, p, newf, dupf, freef) \
|
||||
CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_X509, l, p, newf, dupf, freef)
|
||||
int X509_set_ex_data(X509 *r, int idx, void *arg);
|
||||
void *X509_get_ex_data(X509 *r, int idx);
|
||||
void *X509_get_ex_data(const X509 *r, int idx);
|
||||
DECLARE_ASN1_ENCODE_FUNCTIONS_only(X509,X509_AUX)
|
||||
|
||||
int i2d_re_X509_tbs(X509 *x, unsigned char **pp);
|
||||
@@ -580,12 +583,10 @@ void X509_get0_signature(const ASN1_BIT_STRING **psig,
|
||||
const X509_ALGOR **palg, const X509 *x);
|
||||
int X509_get_signature_nid(const X509 *x);
|
||||
|
||||
# ifndef OPENSSL_NO_SM2
|
||||
void X509_set0_sm2_id(X509 *x, ASN1_OCTET_STRING *sm2_id);
|
||||
ASN1_OCTET_STRING *X509_get0_sm2_id(X509 *x);
|
||||
void X509_REQ_set0_sm2_id(X509_REQ *x, ASN1_OCTET_STRING *sm2_id);
|
||||
ASN1_OCTET_STRING *X509_REQ_get0_sm2_id(X509_REQ *x);
|
||||
# endif
|
||||
void X509_set0_distinguishing_id(X509 *x, ASN1_OCTET_STRING *d_id);
|
||||
ASN1_OCTET_STRING *X509_get0_distinguishing_id(X509 *x);
|
||||
void X509_REQ_set0_distinguishing_id(X509_REQ *x, ASN1_OCTET_STRING *d_id);
|
||||
ASN1_OCTET_STRING *X509_REQ_get0_distinguishing_id(X509_REQ *x);
|
||||
|
||||
int X509_trusted(const X509 *x);
|
||||
int X509_alias_set1(X509 *x, const unsigned char *name, int len);
|
||||
@@ -609,7 +610,7 @@ DECLARE_ASN1_FUNCTIONS(X509_CRL)
|
||||
|
||||
int X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev);
|
||||
int X509_CRL_get0_by_serial(X509_CRL *crl,
|
||||
X509_REVOKED **ret, ASN1_INTEGER *serial);
|
||||
X509_REVOKED **ret, const ASN1_INTEGER *serial);
|
||||
int X509_CRL_get0_by_cert(X509_CRL *crl, X509_REVOKED **ret, X509 *x);
|
||||
|
||||
X509_PKEY *X509_PKEY_new(void);
|
||||
@@ -656,10 +657,10 @@ int X509_set_version(X509 *x, long version);
|
||||
int X509_set_serialNumber(X509 *x, ASN1_INTEGER *serial);
|
||||
ASN1_INTEGER *X509_get_serialNumber(X509 *x);
|
||||
const ASN1_INTEGER *X509_get0_serialNumber(const X509 *x);
|
||||
int X509_set_issuer_name(X509 *x, X509_NAME *name);
|
||||
X509_NAME *X509_get_issuer_name(const X509 *a);
|
||||
int X509_set_subject_name(X509 *x, X509_NAME *name);
|
||||
X509_NAME *X509_get_subject_name(const X509 *a);
|
||||
int X509_set_issuer_name(X509 *x, const X509_NAME *name);
|
||||
X509_NAME *X509_get_issuer_name(const X509 *a); /* TODO change to get0_ */
|
||||
int X509_set_subject_name(X509 *x, const X509_NAME *name);
|
||||
X509_NAME *X509_get_subject_name(const X509 *a); /* TODO change to get0_ */
|
||||
const ASN1_TIME * X509_get0_notBefore(const X509 *x);
|
||||
ASN1_TIME *X509_getm_notBefore(const X509 *x);
|
||||
int X509_set1_notBefore(X509 *x, const ASN1_TIME *tm);
|
||||
@@ -695,8 +696,8 @@ int X509_certificate_type(const X509 *x, const EVP_PKEY *pubkey);
|
||||
|
||||
long X509_REQ_get_version(const X509_REQ *req);
|
||||
int X509_REQ_set_version(X509_REQ *x, long version);
|
||||
X509_NAME *X509_REQ_get_subject_name(const X509_REQ *req);
|
||||
int X509_REQ_set_subject_name(X509_REQ *req, X509_NAME *name);
|
||||
X509_NAME *X509_REQ_get_subject_name(const X509_REQ *req); /* TODO change to get0_ */
|
||||
int X509_REQ_set_subject_name(X509_REQ *req, const X509_NAME *name);
|
||||
void X509_REQ_get0_signature(const X509_REQ *req, const ASN1_BIT_STRING **psig,
|
||||
const X509_ALGOR **palg);
|
||||
int X509_REQ_get_signature_nid(const X509_REQ *req);
|
||||
@@ -730,7 +731,7 @@ int X509_REQ_add1_attr_by_txt(X509_REQ *req,
|
||||
const unsigned char *bytes, int len);
|
||||
|
||||
int X509_CRL_set_version(X509_CRL *x, long version);
|
||||
int X509_CRL_set_issuer_name(X509_CRL *x, X509_NAME *name);
|
||||
int X509_CRL_set_issuer_name(X509_CRL *x, const X509_NAME *name);
|
||||
int X509_CRL_set1_lastUpdate(X509_CRL *x, const ASN1_TIME *tm);
|
||||
int X509_CRL_set1_nextUpdate(X509_CRL *x, const ASN1_TIME *tm);
|
||||
int X509_CRL_sort(X509_CRL *crl);
|
||||
@@ -746,7 +747,7 @@ const ASN1_TIME *X509_CRL_get0_lastUpdate(const X509_CRL *crl);
|
||||
const ASN1_TIME *X509_CRL_get0_nextUpdate(const X509_CRL *crl);
|
||||
DEPRECATEDIN_1_1_0(ASN1_TIME *X509_CRL_get_lastUpdate(X509_CRL *crl))
|
||||
DEPRECATEDIN_1_1_0(ASN1_TIME *X509_CRL_get_nextUpdate(X509_CRL *crl))
|
||||
X509_NAME *X509_CRL_get_issuer(const X509_CRL *crl);
|
||||
X509_NAME *X509_CRL_get_issuer(const X509_CRL *crl); /* TODO change to get0_ */
|
||||
const STACK_OF(X509_EXTENSION) *X509_CRL_get0_extensions(const X509_CRL *crl);
|
||||
STACK_OF(X509_REVOKED) *X509_CRL_get_REVOKED(X509_CRL *crl);
|
||||
void X509_CRL_get0_signature(const X509_CRL *crl, const ASN1_BIT_STRING **psig,
|
||||
@@ -789,8 +790,8 @@ unsigned long X509_subject_name_hash_old(X509 *x);
|
||||
|
||||
int X509_cmp(const X509 *a, const X509 *b);
|
||||
int X509_NAME_cmp(const X509_NAME *a, const X509_NAME *b);
|
||||
unsigned long X509_NAME_hash(X509_NAME *x);
|
||||
unsigned long X509_NAME_hash_old(X509_NAME *x);
|
||||
unsigned long X509_NAME_hash(const X509_NAME *x);
|
||||
unsigned long X509_NAME_hash_old(const X509_NAME *x);
|
||||
|
||||
int X509_CRL_cmp(const X509_CRL *a, const X509_CRL *b);
|
||||
int X509_CRL_match(const X509_CRL *a, const X509_CRL *b);
|
||||
@@ -819,16 +820,17 @@ int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflag,
|
||||
int X509_REQ_print(BIO *bp, X509_REQ *req);
|
||||
|
||||
int X509_NAME_entry_count(const X509_NAME *name);
|
||||
int X509_NAME_get_text_by_NID(X509_NAME *name, int nid, char *buf, int len);
|
||||
int X509_NAME_get_text_by_OBJ(X509_NAME *name, const ASN1_OBJECT *obj,
|
||||
int X509_NAME_get_text_by_NID(const X509_NAME *name, int nid,
|
||||
char *buf, int len);
|
||||
int X509_NAME_get_text_by_OBJ(const X509_NAME *name, const ASN1_OBJECT *obj,
|
||||
char *buf, int len);
|
||||
|
||||
/*
|
||||
* NOTE: you should be passing -1, not 0 as lastpos. The functions that use
|
||||
* lastpos, search after that position on.
|
||||
*/
|
||||
int X509_NAME_get_index_by_NID(X509_NAME *name, int nid, int lastpos);
|
||||
int X509_NAME_get_index_by_OBJ(X509_NAME *name, const ASN1_OBJECT *obj,
|
||||
int X509_NAME_get_index_by_NID(const X509_NAME *name, int nid, int lastpos);
|
||||
int X509_NAME_get_index_by_OBJ(const X509_NAME *name, const ASN1_OBJECT *obj,
|
||||
int lastpos);
|
||||
X509_NAME_ENTRY *X509_NAME_get_entry(const X509_NAME *name, int loc);
|
||||
X509_NAME_ENTRY *X509_NAME_delete_entry(X509_NAME *name, int loc);
|
||||
@@ -862,7 +864,7 @@ ASN1_OBJECT *X509_NAME_ENTRY_get_object(const X509_NAME_ENTRY *ne);
|
||||
ASN1_STRING * X509_NAME_ENTRY_get_data(const X509_NAME_ENTRY *ne);
|
||||
int X509_NAME_ENTRY_set(const X509_NAME_ENTRY *ne);
|
||||
|
||||
int X509_NAME_get0_der(X509_NAME *nm, const unsigned char **pder,
|
||||
int X509_NAME_get0_der(const X509_NAME *nm, const unsigned char **pder,
|
||||
size_t *pderlen);
|
||||
|
||||
int X509v3_get_ext_count(const STACK_OF(X509_EXTENSION) *x);
|
||||
@@ -992,9 +994,9 @@ int EVP_PKEY_add1_attr_by_txt(EVP_PKEY *key,
|
||||
int X509_verify_cert(X509_STORE_CTX *ctx);
|
||||
|
||||
/* lookup a cert from a X509 STACK */
|
||||
X509 *X509_find_by_issuer_and_serial(STACK_OF(X509) *sk, X509_NAME *name,
|
||||
ASN1_INTEGER *serial);
|
||||
X509 *X509_find_by_subject(STACK_OF(X509) *sk, X509_NAME *name);
|
||||
X509 *X509_find_by_issuer_and_serial(STACK_OF(X509) *sk, const X509_NAME *name,
|
||||
const ASN1_INTEGER *serial);
|
||||
X509 *X509_find_by_subject(STACK_OF(X509) *sk, const X509_NAME *name);
|
||||
|
||||
DECLARE_ASN1_FUNCTIONS(PBEPARAM)
|
||||
DECLARE_ASN1_FUNCTIONS(PBE2PARAM)
|
||||
|
||||
+83
-77
@@ -80,10 +80,12 @@ typedef int (*X509_STORE_CTX_check_crl_fn)(X509_STORE_CTX *ctx, X509_CRL *crl);
|
||||
typedef int (*X509_STORE_CTX_cert_crl_fn)(X509_STORE_CTX *ctx,
|
||||
X509_CRL *crl, X509 *x);
|
||||
typedef int (*X509_STORE_CTX_check_policy_fn)(X509_STORE_CTX *ctx);
|
||||
typedef STACK_OF(X509) *(*X509_STORE_CTX_lookup_certs_fn)(X509_STORE_CTX *ctx,
|
||||
X509_NAME *nm);
|
||||
typedef STACK_OF(X509_CRL) *(*X509_STORE_CTX_lookup_crls_fn)(X509_STORE_CTX *ctx,
|
||||
X509_NAME *nm);
|
||||
typedef STACK_OF(X509)
|
||||
*(*X509_STORE_CTX_lookup_certs_fn)(X509_STORE_CTX *ctx,
|
||||
const X509_NAME *nm);
|
||||
typedef STACK_OF(X509_CRL)
|
||||
*(*X509_STORE_CTX_lookup_crls_fn)(const X509_STORE_CTX *ctx,
|
||||
const X509_NAME *nm);
|
||||
typedef int (*X509_STORE_CTX_cleanup_fn)(X509_STORE_CTX *ctx);
|
||||
|
||||
|
||||
@@ -269,10 +271,10 @@ void X509_STORE_CTX_set_depth(X509_STORE_CTX *ctx, int depth);
|
||||
| X509_V_FLAG_INHIBIT_MAP)
|
||||
|
||||
int X509_OBJECT_idx_by_subject(STACK_OF(X509_OBJECT) *h, X509_LOOKUP_TYPE type,
|
||||
X509_NAME *name);
|
||||
const X509_NAME *name);
|
||||
X509_OBJECT *X509_OBJECT_retrieve_by_subject(STACK_OF(X509_OBJECT) *h,
|
||||
X509_LOOKUP_TYPE type,
|
||||
X509_NAME *name);
|
||||
const X509_NAME *name);
|
||||
X509_OBJECT *X509_OBJECT_retrieve_match(STACK_OF(X509_OBJECT) *h,
|
||||
X509_OBJECT *x);
|
||||
int X509_OBJECT_up_ref_count(X509_OBJECT *a);
|
||||
@@ -281,73 +283,77 @@ void X509_OBJECT_free(X509_OBJECT *a);
|
||||
X509_LOOKUP_TYPE X509_OBJECT_get_type(const X509_OBJECT *a);
|
||||
X509 *X509_OBJECT_get0_X509(const X509_OBJECT *a);
|
||||
int X509_OBJECT_set1_X509(X509_OBJECT *a, X509 *obj);
|
||||
X509_CRL *X509_OBJECT_get0_X509_CRL(X509_OBJECT *a);
|
||||
X509_CRL *X509_OBJECT_get0_X509_CRL(const X509_OBJECT *a);
|
||||
int X509_OBJECT_set1_X509_CRL(X509_OBJECT *a, X509_CRL *obj);
|
||||
X509_STORE *X509_STORE_new(void);
|
||||
void X509_STORE_free(X509_STORE *v);
|
||||
int X509_STORE_lock(X509_STORE *ctx);
|
||||
int X509_STORE_unlock(X509_STORE *ctx);
|
||||
int X509_STORE_up_ref(X509_STORE *v);
|
||||
|
||||
STACK_OF(X509_OBJECT) *X509_STORE_get0_objects(X509_STORE *v);
|
||||
STACK_OF(X509_OBJECT) *X509_STORE_get0_objects(const X509_STORE *v);
|
||||
STACK_OF(X509) *X509_STORE_get1_all_certs(X509_STORE *st);
|
||||
STACK_OF(X509) *X509_STORE_CTX_get1_certs(X509_STORE_CTX *st, X509_NAME *nm);
|
||||
STACK_OF(X509_CRL) *X509_STORE_CTX_get1_crls(X509_STORE_CTX *st, X509_NAME *nm);
|
||||
STACK_OF(X509) *X509_STORE_CTX_get1_certs(X509_STORE_CTX *st,
|
||||
const X509_NAME *nm);
|
||||
STACK_OF(X509_CRL) *X509_STORE_CTX_get1_crls(const X509_STORE_CTX *st,
|
||||
const X509_NAME *nm);
|
||||
int X509_STORE_set_flags(X509_STORE *ctx, unsigned long flags);
|
||||
int X509_STORE_set_purpose(X509_STORE *ctx, int purpose);
|
||||
int X509_STORE_set_trust(X509_STORE *ctx, int trust);
|
||||
int X509_STORE_set1_param(X509_STORE *ctx, X509_VERIFY_PARAM *pm);
|
||||
X509_VERIFY_PARAM *X509_STORE_get0_param(X509_STORE *ctx);
|
||||
int X509_STORE_set1_param(X509_STORE *ctx, const X509_VERIFY_PARAM *pm);
|
||||
X509_VERIFY_PARAM *X509_STORE_get0_param(const X509_STORE *ctx);
|
||||
|
||||
void X509_STORE_set_verify(X509_STORE *ctx, X509_STORE_CTX_verify_fn verify);
|
||||
#define X509_STORE_set_verify_func(ctx, func) \
|
||||
X509_STORE_set_verify((ctx),(func))
|
||||
void X509_STORE_CTX_set_verify(X509_STORE_CTX *ctx,
|
||||
X509_STORE_CTX_verify_fn verify);
|
||||
X509_STORE_CTX_verify_fn X509_STORE_get_verify(X509_STORE *ctx);
|
||||
X509_STORE_CTX_verify_fn X509_STORE_get_verify(const X509_STORE *ctx);
|
||||
void X509_STORE_set_verify_cb(X509_STORE *ctx,
|
||||
X509_STORE_CTX_verify_cb verify_cb);
|
||||
# define X509_STORE_set_verify_cb_func(ctx,func) \
|
||||
X509_STORE_set_verify_cb((ctx),(func))
|
||||
X509_STORE_CTX_verify_cb X509_STORE_get_verify_cb(X509_STORE *ctx);
|
||||
X509_STORE_CTX_verify_cb X509_STORE_get_verify_cb(const X509_STORE *ctx);
|
||||
void X509_STORE_set_get_issuer(X509_STORE *ctx,
|
||||
X509_STORE_CTX_get_issuer_fn get_issuer);
|
||||
X509_STORE_CTX_get_issuer_fn X509_STORE_get_get_issuer(X509_STORE *ctx);
|
||||
X509_STORE_CTX_get_issuer_fn X509_STORE_get_get_issuer(const X509_STORE *ctx);
|
||||
void X509_STORE_set_check_issued(X509_STORE *ctx,
|
||||
X509_STORE_CTX_check_issued_fn check_issued);
|
||||
X509_STORE_CTX_check_issued_fn X509_STORE_get_check_issued(X509_STORE *ctx);
|
||||
X509_STORE_CTX_check_issued_fn X509_STORE_get_check_issued(const X509_STORE *ctx);
|
||||
void X509_STORE_set_check_revocation(X509_STORE *ctx,
|
||||
X509_STORE_CTX_check_revocation_fn check_revocation);
|
||||
X509_STORE_CTX_check_revocation_fn X509_STORE_get_check_revocation(X509_STORE *ctx);
|
||||
X509_STORE_CTX_check_revocation_fn
|
||||
X509_STORE_get_check_revocation(const X509_STORE *ctx);
|
||||
void X509_STORE_set_get_crl(X509_STORE *ctx,
|
||||
X509_STORE_CTX_get_crl_fn get_crl);
|
||||
X509_STORE_CTX_get_crl_fn X509_STORE_get_get_crl(X509_STORE *ctx);
|
||||
X509_STORE_CTX_get_crl_fn X509_STORE_get_get_crl(const X509_STORE *ctx);
|
||||
void X509_STORE_set_check_crl(X509_STORE *ctx,
|
||||
X509_STORE_CTX_check_crl_fn check_crl);
|
||||
X509_STORE_CTX_check_crl_fn X509_STORE_get_check_crl(X509_STORE *ctx);
|
||||
X509_STORE_CTX_check_crl_fn X509_STORE_get_check_crl(const X509_STORE *ctx);
|
||||
void X509_STORE_set_cert_crl(X509_STORE *ctx,
|
||||
X509_STORE_CTX_cert_crl_fn cert_crl);
|
||||
X509_STORE_CTX_cert_crl_fn X509_STORE_get_cert_crl(X509_STORE *ctx);
|
||||
X509_STORE_CTX_cert_crl_fn X509_STORE_get_cert_crl(const X509_STORE *ctx);
|
||||
void X509_STORE_set_check_policy(X509_STORE *ctx,
|
||||
X509_STORE_CTX_check_policy_fn check_policy);
|
||||
X509_STORE_CTX_check_policy_fn X509_STORE_get_check_policy(X509_STORE *ctx);
|
||||
X509_STORE_CTX_check_policy_fn X509_STORE_get_check_policy(const X509_STORE *ctx);
|
||||
void X509_STORE_set_lookup_certs(X509_STORE *ctx,
|
||||
X509_STORE_CTX_lookup_certs_fn lookup_certs);
|
||||
X509_STORE_CTX_lookup_certs_fn X509_STORE_get_lookup_certs(X509_STORE *ctx);
|
||||
X509_STORE_CTX_lookup_certs_fn X509_STORE_get_lookup_certs(const X509_STORE *ctx);
|
||||
void X509_STORE_set_lookup_crls(X509_STORE *ctx,
|
||||
X509_STORE_CTX_lookup_crls_fn lookup_crls);
|
||||
#define X509_STORE_set_lookup_crls_cb(ctx, func) \
|
||||
X509_STORE_set_lookup_crls((ctx), (func))
|
||||
X509_STORE_CTX_lookup_crls_fn X509_STORE_get_lookup_crls(X509_STORE *ctx);
|
||||
X509_STORE_CTX_lookup_crls_fn X509_STORE_get_lookup_crls(const X509_STORE *ctx);
|
||||
void X509_STORE_set_cleanup(X509_STORE *ctx,
|
||||
X509_STORE_CTX_cleanup_fn cleanup);
|
||||
X509_STORE_CTX_cleanup_fn X509_STORE_get_cleanup(X509_STORE *ctx);
|
||||
X509_STORE_CTX_cleanup_fn X509_STORE_get_cleanup(const X509_STORE *ctx);
|
||||
|
||||
#define X509_STORE_get_ex_new_index(l, p, newf, dupf, freef) \
|
||||
CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_X509_STORE, l, p, newf, dupf, freef)
|
||||
int X509_STORE_set_ex_data(X509_STORE *ctx, int idx, void *data);
|
||||
void *X509_STORE_get_ex_data(X509_STORE *ctx, int idx);
|
||||
void *X509_STORE_get_ex_data(const X509_STORE *ctx, int idx);
|
||||
|
||||
X509_STORE_CTX *X509_STORE_CTX_new_with_libctx(OPENSSL_CTX *libctx,
|
||||
const char *propq);
|
||||
X509_STORE_CTX *X509_STORE_CTX_new(void);
|
||||
|
||||
int X509_STORE_CTX_get1_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x);
|
||||
@@ -358,24 +364,24 @@ int X509_STORE_CTX_init(X509_STORE_CTX *ctx, X509_STORE *store,
|
||||
void X509_STORE_CTX_set0_trusted_stack(X509_STORE_CTX *ctx, STACK_OF(X509) *sk);
|
||||
void X509_STORE_CTX_cleanup(X509_STORE_CTX *ctx);
|
||||
|
||||
X509_STORE *X509_STORE_CTX_get0_store(X509_STORE_CTX *ctx);
|
||||
X509 *X509_STORE_CTX_get0_cert(X509_STORE_CTX *ctx);
|
||||
STACK_OF(X509)* X509_STORE_CTX_get0_untrusted(X509_STORE_CTX *ctx);
|
||||
X509_STORE *X509_STORE_CTX_get0_store(const X509_STORE_CTX *ctx);
|
||||
X509 *X509_STORE_CTX_get0_cert(const X509_STORE_CTX *ctx);
|
||||
STACK_OF(X509)* X509_STORE_CTX_get0_untrusted(const X509_STORE_CTX *ctx);
|
||||
void X509_STORE_CTX_set0_untrusted(X509_STORE_CTX *ctx, STACK_OF(X509) *sk);
|
||||
void X509_STORE_CTX_set_verify_cb(X509_STORE_CTX *ctx,
|
||||
X509_STORE_CTX_verify_cb verify);
|
||||
X509_STORE_CTX_verify_cb X509_STORE_CTX_get_verify_cb(X509_STORE_CTX *ctx);
|
||||
X509_STORE_CTX_verify_fn X509_STORE_CTX_get_verify(X509_STORE_CTX *ctx);
|
||||
X509_STORE_CTX_get_issuer_fn X509_STORE_CTX_get_get_issuer(X509_STORE_CTX *ctx);
|
||||
X509_STORE_CTX_check_issued_fn X509_STORE_CTX_get_check_issued(X509_STORE_CTX *ctx);
|
||||
X509_STORE_CTX_check_revocation_fn X509_STORE_CTX_get_check_revocation(X509_STORE_CTX *ctx);
|
||||
X509_STORE_CTX_get_crl_fn X509_STORE_CTX_get_get_crl(X509_STORE_CTX *ctx);
|
||||
X509_STORE_CTX_check_crl_fn X509_STORE_CTX_get_check_crl(X509_STORE_CTX *ctx);
|
||||
X509_STORE_CTX_cert_crl_fn X509_STORE_CTX_get_cert_crl(X509_STORE_CTX *ctx);
|
||||
X509_STORE_CTX_check_policy_fn X509_STORE_CTX_get_check_policy(X509_STORE_CTX *ctx);
|
||||
X509_STORE_CTX_lookup_certs_fn X509_STORE_CTX_get_lookup_certs(X509_STORE_CTX *ctx);
|
||||
X509_STORE_CTX_lookup_crls_fn X509_STORE_CTX_get_lookup_crls(X509_STORE_CTX *ctx);
|
||||
X509_STORE_CTX_cleanup_fn X509_STORE_CTX_get_cleanup(X509_STORE_CTX *ctx);
|
||||
X509_STORE_CTX_verify_cb X509_STORE_CTX_get_verify_cb(const X509_STORE_CTX *ctx);
|
||||
X509_STORE_CTX_verify_fn X509_STORE_CTX_get_verify(const X509_STORE_CTX *ctx);
|
||||
X509_STORE_CTX_get_issuer_fn X509_STORE_CTX_get_get_issuer(const X509_STORE_CTX *ctx);
|
||||
X509_STORE_CTX_check_issued_fn X509_STORE_CTX_get_check_issued(const X509_STORE_CTX *ctx);
|
||||
X509_STORE_CTX_check_revocation_fn X509_STORE_CTX_get_check_revocation(const X509_STORE_CTX *ctx);
|
||||
X509_STORE_CTX_get_crl_fn X509_STORE_CTX_get_get_crl(const X509_STORE_CTX *ctx);
|
||||
X509_STORE_CTX_check_crl_fn X509_STORE_CTX_get_check_crl(const X509_STORE_CTX *ctx);
|
||||
X509_STORE_CTX_cert_crl_fn X509_STORE_CTX_get_cert_crl(const X509_STORE_CTX *ctx);
|
||||
X509_STORE_CTX_check_policy_fn X509_STORE_CTX_get_check_policy(const X509_STORE_CTX *ctx);
|
||||
X509_STORE_CTX_lookup_certs_fn X509_STORE_CTX_get_lookup_certs(const X509_STORE_CTX *ctx);
|
||||
X509_STORE_CTX_lookup_crls_fn X509_STORE_CTX_get_lookup_crls(const X509_STORE_CTX *ctx);
|
||||
X509_STORE_CTX_cleanup_fn X509_STORE_CTX_get_cleanup(const X509_STORE_CTX *ctx);
|
||||
|
||||
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# define X509_STORE_CTX_get_chain X509_STORE_CTX_get0_chain
|
||||
@@ -399,12 +405,12 @@ typedef int (*X509_LOOKUP_ctrl_fn)(X509_LOOKUP *ctx, int cmd, const char *argc,
|
||||
long argl, char **ret);
|
||||
typedef int (*X509_LOOKUP_get_by_subject_fn)(X509_LOOKUP *ctx,
|
||||
X509_LOOKUP_TYPE type,
|
||||
X509_NAME *name,
|
||||
const X509_NAME *name,
|
||||
X509_OBJECT *ret);
|
||||
typedef int (*X509_LOOKUP_get_by_issuer_serial_fn)(X509_LOOKUP *ctx,
|
||||
X509_LOOKUP_TYPE type,
|
||||
X509_NAME *name,
|
||||
ASN1_INTEGER *serial,
|
||||
const X509_NAME *name,
|
||||
const ASN1_INTEGER *serial,
|
||||
X509_OBJECT *ret);
|
||||
typedef int (*X509_LOOKUP_get_by_fingerprint_fn)(X509_LOOKUP *ctx,
|
||||
X509_LOOKUP_TYPE type,
|
||||
@@ -468,11 +474,12 @@ X509_LOOKUP_get_by_alias_fn X509_LOOKUP_meth_get_get_by_alias(
|
||||
int X509_STORE_add_cert(X509_STORE *ctx, X509 *x);
|
||||
int X509_STORE_add_crl(X509_STORE *ctx, X509_CRL *x);
|
||||
|
||||
int X509_STORE_CTX_get_by_subject(X509_STORE_CTX *vs, X509_LOOKUP_TYPE type,
|
||||
X509_NAME *name, X509_OBJECT *ret);
|
||||
int X509_STORE_CTX_get_by_subject(const X509_STORE_CTX *vs,
|
||||
X509_LOOKUP_TYPE type,
|
||||
const X509_NAME *name, X509_OBJECT *ret);
|
||||
X509_OBJECT *X509_STORE_CTX_get_obj_by_subject(X509_STORE_CTX *vs,
|
||||
X509_LOOKUP_TYPE type,
|
||||
X509_NAME *name);
|
||||
const X509_NAME *name);
|
||||
|
||||
int X509_LOOKUP_ctrl(X509_LOOKUP *ctx, int cmd, const char *argc,
|
||||
long argl, char **ret);
|
||||
@@ -485,9 +492,10 @@ X509_LOOKUP *X509_LOOKUP_new(X509_LOOKUP_METHOD *method);
|
||||
void X509_LOOKUP_free(X509_LOOKUP *ctx);
|
||||
int X509_LOOKUP_init(X509_LOOKUP *ctx);
|
||||
int X509_LOOKUP_by_subject(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type,
|
||||
X509_NAME *name, X509_OBJECT *ret);
|
||||
const X509_NAME *name, X509_OBJECT *ret);
|
||||
int X509_LOOKUP_by_issuer_serial(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type,
|
||||
X509_NAME *name, ASN1_INTEGER *serial,
|
||||
const X509_NAME *name,
|
||||
const ASN1_INTEGER *serial,
|
||||
X509_OBJECT *ret);
|
||||
int X509_LOOKUP_by_fingerprint(X509_LOOKUP *ctx, X509_LOOKUP_TYPE type,
|
||||
const unsigned char *bytes, int len,
|
||||
@@ -502,25 +510,26 @@ int X509_LOOKUP_shutdown(X509_LOOKUP *ctx);
|
||||
int X509_STORE_load_file(X509_STORE *ctx, const char *file);
|
||||
int X509_STORE_load_path(X509_STORE *ctx, const char *path);
|
||||
int X509_STORE_load_store(X509_STORE *ctx, const char *store);
|
||||
DEPRECATEDIN_3_0(int X509_STORE_load_locations(X509_STORE *ctx, const char *file,
|
||||
const char *dir))
|
||||
DEPRECATEDIN_3_0(int X509_STORE_load_locations(X509_STORE *ctx,
|
||||
const char *file,
|
||||
const char *dir))
|
||||
int X509_STORE_set_default_paths(X509_STORE *ctx);
|
||||
|
||||
#define X509_STORE_CTX_get_ex_new_index(l, p, newf, dupf, freef) \
|
||||
CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_X509_STORE_CTX, l, p, newf, dupf, freef)
|
||||
int X509_STORE_CTX_set_ex_data(X509_STORE_CTX *ctx, int idx, void *data);
|
||||
void *X509_STORE_CTX_get_ex_data(X509_STORE_CTX *ctx, int idx);
|
||||
int X509_STORE_CTX_get_error(X509_STORE_CTX *ctx);
|
||||
void *X509_STORE_CTX_get_ex_data(const X509_STORE_CTX *ctx, int idx);
|
||||
int X509_STORE_CTX_get_error(const X509_STORE_CTX *ctx);
|
||||
void X509_STORE_CTX_set_error(X509_STORE_CTX *ctx, int s);
|
||||
int X509_STORE_CTX_get_error_depth(X509_STORE_CTX *ctx);
|
||||
int X509_STORE_CTX_get_error_depth(const X509_STORE_CTX *ctx);
|
||||
void X509_STORE_CTX_set_error_depth(X509_STORE_CTX *ctx, int depth);
|
||||
X509 *X509_STORE_CTX_get_current_cert(X509_STORE_CTX *ctx);
|
||||
X509 *X509_STORE_CTX_get_current_cert(const X509_STORE_CTX *ctx);
|
||||
void X509_STORE_CTX_set_current_cert(X509_STORE_CTX *ctx, X509 *x);
|
||||
X509 *X509_STORE_CTX_get0_current_issuer(X509_STORE_CTX *ctx);
|
||||
X509_CRL *X509_STORE_CTX_get0_current_crl(X509_STORE_CTX *ctx);
|
||||
X509_STORE_CTX *X509_STORE_CTX_get0_parent_ctx(X509_STORE_CTX *ctx);
|
||||
STACK_OF(X509) *X509_STORE_CTX_get0_chain(X509_STORE_CTX *ctx);
|
||||
STACK_OF(X509) *X509_STORE_CTX_get1_chain(X509_STORE_CTX *ctx);
|
||||
X509 *X509_STORE_CTX_get0_current_issuer(const X509_STORE_CTX *ctx);
|
||||
X509_CRL *X509_STORE_CTX_get0_current_crl(const X509_STORE_CTX *ctx);
|
||||
X509_STORE_CTX *X509_STORE_CTX_get0_parent_ctx(const X509_STORE_CTX *ctx);
|
||||
STACK_OF(X509) *X509_STORE_CTX_get0_chain(const X509_STORE_CTX *ctx);
|
||||
STACK_OF(X509) *X509_STORE_CTX_get1_chain(const X509_STORE_CTX *ctx);
|
||||
void X509_STORE_CTX_set_cert(X509_STORE_CTX *c, X509 *x);
|
||||
void X509_STORE_CTX_set0_verified_chain(X509_STORE_CTX *c, STACK_OF(X509) *sk);
|
||||
void X509_STORE_CTX_set0_crls(X509_STORE_CTX *c, STACK_OF(X509_CRL) *sk);
|
||||
@@ -532,11 +541,11 @@ void X509_STORE_CTX_set_flags(X509_STORE_CTX *ctx, unsigned long flags);
|
||||
void X509_STORE_CTX_set_time(X509_STORE_CTX *ctx, unsigned long flags,
|
||||
time_t t);
|
||||
|
||||
X509_POLICY_TREE *X509_STORE_CTX_get0_policy_tree(X509_STORE_CTX *ctx);
|
||||
int X509_STORE_CTX_get_explicit_policy(X509_STORE_CTX *ctx);
|
||||
int X509_STORE_CTX_get_num_untrusted(X509_STORE_CTX *ctx);
|
||||
X509_POLICY_TREE *X509_STORE_CTX_get0_policy_tree(const X509_STORE_CTX *ctx);
|
||||
int X509_STORE_CTX_get_explicit_policy(const X509_STORE_CTX *ctx);
|
||||
int X509_STORE_CTX_get_num_untrusted(const X509_STORE_CTX *ctx);
|
||||
|
||||
X509_VERIFY_PARAM *X509_STORE_CTX_get0_param(X509_STORE_CTX *ctx);
|
||||
X509_VERIFY_PARAM *X509_STORE_CTX_get0_param(const X509_STORE_CTX *ctx);
|
||||
void X509_STORE_CTX_set0_param(X509_STORE_CTX *ctx, X509_VERIFY_PARAM *param);
|
||||
int X509_STORE_CTX_set_default(X509_STORE_CTX *ctx, const char *name);
|
||||
|
||||
@@ -583,7 +592,7 @@ int X509_VERIFY_PARAM_add1_host(X509_VERIFY_PARAM *param,
|
||||
void X509_VERIFY_PARAM_set_hostflags(X509_VERIFY_PARAM *param,
|
||||
unsigned int flags);
|
||||
unsigned int X509_VERIFY_PARAM_get_hostflags(const X509_VERIFY_PARAM *param);
|
||||
char *X509_VERIFY_PARAM_get0_peername(X509_VERIFY_PARAM *);
|
||||
char *X509_VERIFY_PARAM_get0_peername(const X509_VERIFY_PARAM *param);
|
||||
void X509_VERIFY_PARAM_move_peername(X509_VERIFY_PARAM *, X509_VERIFY_PARAM *);
|
||||
int X509_VERIFY_PARAM_set1_email(X509_VERIFY_PARAM *param,
|
||||
const char *email, size_t emaillen);
|
||||
@@ -625,26 +634,23 @@ int X509_policy_tree_level_count(const X509_POLICY_TREE *tree);
|
||||
X509_POLICY_LEVEL *X509_policy_tree_get0_level(const X509_POLICY_TREE *tree,
|
||||
int i);
|
||||
|
||||
STACK_OF(X509_POLICY_NODE) *X509_policy_tree_get0_policies(const
|
||||
X509_POLICY_TREE
|
||||
*tree);
|
||||
STACK_OF(X509_POLICY_NODE)
|
||||
*X509_policy_tree_get0_policies(const X509_POLICY_TREE *tree);
|
||||
|
||||
STACK_OF(X509_POLICY_NODE) *X509_policy_tree_get0_user_policies(const
|
||||
X509_POLICY_TREE
|
||||
*tree);
|
||||
STACK_OF(X509_POLICY_NODE)
|
||||
*X509_policy_tree_get0_user_policies(const X509_POLICY_TREE *tree);
|
||||
|
||||
int X509_policy_level_node_count(X509_POLICY_LEVEL *level);
|
||||
|
||||
X509_POLICY_NODE *X509_policy_level_get0_node(X509_POLICY_LEVEL *level,
|
||||
X509_POLICY_NODE *X509_policy_level_get0_node(const X509_POLICY_LEVEL *level,
|
||||
int i);
|
||||
|
||||
const ASN1_OBJECT *X509_policy_node_get0_policy(const X509_POLICY_NODE *node);
|
||||
|
||||
STACK_OF(POLICYQUALINFO) *X509_policy_node_get0_qualifiers(const
|
||||
X509_POLICY_NODE
|
||||
*node);
|
||||
const X509_POLICY_NODE *X509_policy_node_get0_parent(const X509_POLICY_NODE
|
||||
*node);
|
||||
STACK_OF(POLICYQUALINFO)
|
||||
*X509_policy_node_get0_qualifiers(const X509_POLICY_NODE *node);
|
||||
const X509_POLICY_NODE
|
||||
*X509_policy_node_get0_parent(const X509_POLICY_NODE *node);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -12,11 +12,6 @@
|
||||
# define OPENSSL_X509ERR_H
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_X509ERR_H
|
||||
# endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
# include <openssl/symhacks.h>
|
||||
|
||||
|
||||
@@ -230,6 +230,13 @@ typedef struct SXNET_st {
|
||||
STACK_OF(SXNETID) *ids;
|
||||
} SXNET;
|
||||
|
||||
typedef struct ISSUER_SIGN_TOOL_st {
|
||||
ASN1_UTF8STRING *signTool;
|
||||
ASN1_UTF8STRING *cATool;
|
||||
ASN1_UTF8STRING *signToolCert;
|
||||
ASN1_UTF8STRING *cAToolCert;
|
||||
} ISSUER_SIGN_TOOL;
|
||||
|
||||
typedef struct NOTICEREF_st {
|
||||
ASN1_STRING *organization;
|
||||
STACK_OF(ASN1_INTEGER) *noticenos;
|
||||
@@ -458,6 +465,8 @@ DECLARE_ASN1_FUNCTIONS(BASIC_CONSTRAINTS)
|
||||
DECLARE_ASN1_FUNCTIONS(SXNET)
|
||||
DECLARE_ASN1_FUNCTIONS(SXNETID)
|
||||
|
||||
DECLARE_ASN1_FUNCTIONS(ISSUER_SIGN_TOOL)
|
||||
|
||||
int SXNET_add_id_asc(SXNET **psx, const char *zone, const char *user, int userlen);
|
||||
int SXNET_add_id_ulong(SXNET **psx, unsigned long lzone, const char *user,
|
||||
int userlen);
|
||||
@@ -530,7 +539,7 @@ DECLARE_ASN1_FUNCTIONS(DIST_POINT)
|
||||
DECLARE_ASN1_FUNCTIONS(DIST_POINT_NAME)
|
||||
DECLARE_ASN1_FUNCTIONS(ISSUING_DIST_POINT)
|
||||
|
||||
int DIST_POINT_set_dpname(DIST_POINT_NAME *dpn, X509_NAME *iname);
|
||||
int DIST_POINT_set_dpname(DIST_POINT_NAME *dpn, const X509_NAME *iname);
|
||||
|
||||
int NAME_CONSTRAINTS_check(X509 *x, NAME_CONSTRAINTS *nc);
|
||||
int NAME_CONSTRAINTS_check_CN(X509 *x, NAME_CONSTRAINTS *nc);
|
||||
@@ -563,6 +572,9 @@ GENERAL_NAME *v2i_GENERAL_NAME_ex(GENERAL_NAME *out,
|
||||
const X509V3_EXT_METHOD *method,
|
||||
X509V3_CTX *ctx, CONF_VALUE *cnf,
|
||||
int is_nc);
|
||||
|
||||
int X509v3_cache_extensions(X509 *x, OPENSSL_CTX *libctx, const char *propq);
|
||||
|
||||
void X509V3_conf_free(CONF_VALUE *val);
|
||||
|
||||
X509_EXTENSION *X509V3_EXT_nconf_nid(CONF *conf, X509V3_CTX *ctx, int ext_nid,
|
||||
|
||||
@@ -12,11 +12,6 @@
|
||||
# define OPENSSL_X509V3ERR_H
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_X509V3ERR_H
|
||||
# endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
# include <openssl/symhacks.h>
|
||||
|
||||
@@ -41,6 +36,7 @@ int ERR_load_X509V3_strings(void);
|
||||
# define X509V3_F_DO_EXT_I2D 0
|
||||
# define X509V3_F_DO_EXT_NCONF 0
|
||||
# define X509V3_F_GNAMES_FROM_SECTNAME 0
|
||||
# define X509V3_F_I2R_ISSUER_SIGN_TOOL 0
|
||||
# define X509V3_F_I2S_ASN1_ENUMERATED 0
|
||||
# define X509V3_F_I2S_ASN1_IA5STRING 0
|
||||
# define X509V3_F_I2S_ASN1_INTEGER 0
|
||||
@@ -80,6 +76,7 @@ int ERR_load_X509V3_strings(void);
|
||||
# define X509V3_F_V2I_IDP 0
|
||||
# define X509V3_F_V2I_IPADDRBLOCKS 0
|
||||
# define X509V3_F_V2I_ISSUER_ALT 0
|
||||
# define X509V3_F_V2I_ISSUER_SIGN_TOOL 0
|
||||
# define X509V3_F_V2I_NAME_CONSTRAINTS 0
|
||||
# define X509V3_F_V2I_POLICY_CONSTRAINTS 0
|
||||
# define X509V3_F_V2I_POLICY_MAPPINGS 0
|
||||
|
||||
Reference in New Issue
Block a user