Latest update.
This commit is contained in:
@@ -61,6 +61,7 @@ typedef enum {
|
||||
: EVP_PKEY_ED448)))
|
||||
|
||||
struct ecx_key_st {
|
||||
OPENSSL_CTX *libctx;
|
||||
unsigned int haspubkey:1;
|
||||
unsigned char pubkey[MAX_KEYLEN];
|
||||
unsigned char *privkey;
|
||||
@@ -73,7 +74,7 @@ struct ecx_key_st {
|
||||
typedef struct ecx_key_st ECX_KEY;
|
||||
|
||||
size_t ecx_key_length(ECX_KEY_TYPE type);
|
||||
ECX_KEY *ecx_key_new(ECX_KEY_TYPE type, int haspubkey);
|
||||
ECX_KEY *ecx_key_new(OPENSSL_CTX *libctx, 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);
|
||||
@@ -109,6 +110,7 @@ void X448_public_from_private(uint8_t out_public_value[56],
|
||||
const uint8_t private_key[56]);
|
||||
|
||||
/* Backend support */
|
||||
int ecx_public_from_private(ECX_KEY *key);
|
||||
int ecx_key_fromdata(ECX_KEY *ecx, const OSSL_PARAM params[],
|
||||
int include_private);
|
||||
|
||||
|
||||
+6
-10
@@ -526,7 +526,7 @@ struct evp_pkey_st {
|
||||
int type;
|
||||
int save_type;
|
||||
|
||||
# ifndef FIPS_MODE
|
||||
# ifndef FIPS_MODULE
|
||||
/*
|
||||
* 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.
|
||||
@@ -557,7 +557,7 @@ struct evp_pkey_st {
|
||||
CRYPTO_RWLOCK *lock;
|
||||
STACK_OF(X509_ATTRIBUTE) *attributes; /* [ 0 ] */
|
||||
int save_parameters;
|
||||
#ifndef FIPS_MODE
|
||||
#ifndef FIPS_MODULE
|
||||
CRYPTO_EX_DATA ex_data;
|
||||
#endif
|
||||
|
||||
@@ -633,7 +633,7 @@ void evp_app_cleanup_int(void);
|
||||
void *evp_pkey_export_to_provider(EVP_PKEY *pk, OPENSSL_CTX *libctx,
|
||||
EVP_KEYMGMT **keymgmt,
|
||||
const char *propquery);
|
||||
#ifndef FIPS_MODE
|
||||
#ifndef FIPS_MODULE
|
||||
int evp_pkey_downgrade(EVP_PKEY *pk);
|
||||
void evp_pkey_free_legacy(EVP_PKEY *x);
|
||||
#endif
|
||||
@@ -678,10 +678,6 @@ 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);
|
||||
@@ -723,7 +719,7 @@ void evp_encode_ctx_set_flags(EVP_ENCODE_CTX *ctx, unsigned int flags);
|
||||
const EVP_CIPHER *evp_get_cipherbyname_ex(OPENSSL_CTX *libctx, const char *name);
|
||||
const EVP_MD *evp_get_digestbyname_ex(OPENSSL_CTX *libctx, const char *name);
|
||||
|
||||
#ifndef FIPS_MODE
|
||||
#ifndef FIPS_MODULE
|
||||
/*
|
||||
* Internal helpers for stricter EVP_PKEY_CTX_{set,get}_params().
|
||||
*
|
||||
@@ -731,7 +727,7 @@ const EVP_MD *evp_get_digestbyname_ex(OPENSSL_CTX *libctx, const char *name);
|
||||
*
|
||||
* In particular they return -2 if any of the params is not supported.
|
||||
*
|
||||
* They are not available in FIPS_MODE as they depend on
|
||||
* They are not available in FIPS_MODULE as they depend on
|
||||
* - EVP_PKEY_CTX_{get,set}_params()
|
||||
* - EVP_PKEY_CTX_{gettable,settable}_params()
|
||||
*
|
||||
@@ -741,4 +737,4 @@ int evp_pkey_ctx_get_params_strict(EVP_PKEY_CTX *ctx, OSSL_PARAM *params);
|
||||
|
||||
EVP_PKEY *evp_pkcs82pkey_int(const PKCS8_PRIV_KEY_INFO *p8, OPENSSL_CTX *libctx,
|
||||
const char *propq);
|
||||
#endif /* !defined(FIPS_MODE) */
|
||||
#endif /* !defined(FIPS_MODULE) */
|
||||
@@ -13,7 +13,43 @@
|
||||
#include <openssl/core.h>
|
||||
#include <openssl/rsa.h>
|
||||
|
||||
typedef struct rsa_pss_params_30_st {
|
||||
int hash_algorithm_nid;
|
||||
struct {
|
||||
int algorithm_nid; /* Currently always NID_mgf1 */
|
||||
int hash_algorithm_nid;
|
||||
} mask_gen;
|
||||
unsigned int salt_len;
|
||||
unsigned int trailer_field;
|
||||
} RSA_PSS_PARAMS_30;
|
||||
|
||||
RSA_PSS_PARAMS_30 *rsa_get0_pss_params_30(RSA *r);
|
||||
int rsa_pss_params_30_set_defaults(RSA_PSS_PARAMS_30 *rsa_pss_params);
|
||||
int rsa_pss_params_30_copy(RSA_PSS_PARAMS_30 *to,
|
||||
const RSA_PSS_PARAMS_30 *from);
|
||||
int rsa_pss_params_30_is_unrestricted(const RSA_PSS_PARAMS_30 *rsa_pss_params);
|
||||
int rsa_pss_params_30_set_hashalg(RSA_PSS_PARAMS_30 *rsa_pss_params,
|
||||
int hashalg_nid);
|
||||
int rsa_pss_params_30_set_maskgenalg(RSA_PSS_PARAMS_30 *rsa_pss_params,
|
||||
int maskgenalg_nid);
|
||||
int rsa_pss_params_30_set_maskgenhashalg(RSA_PSS_PARAMS_30 *rsa_pss_params,
|
||||
int maskgenhashalg_nid);
|
||||
int rsa_pss_params_30_set_saltlen(RSA_PSS_PARAMS_30 *rsa_pss_params,
|
||||
int saltlen);
|
||||
int rsa_pss_params_30_set_trailerfield(RSA_PSS_PARAMS_30 *rsa_pss_params,
|
||||
int trailerfield);
|
||||
int rsa_pss_params_30_hashalg(const RSA_PSS_PARAMS_30 *rsa_pss_params);
|
||||
int rsa_pss_params_30_maskgenalg(const RSA_PSS_PARAMS_30 *rsa_pss_params);
|
||||
int rsa_pss_params_30_maskgenhashalg(const RSA_PSS_PARAMS_30 *rsa_pss_params);
|
||||
int rsa_pss_params_30_saltlen(const RSA_PSS_PARAMS_30 *rsa_pss_params);
|
||||
int rsa_pss_params_30_trailerfield(const RSA_PSS_PARAMS_30 *rsa_pss_params);
|
||||
|
||||
const char *rsa_mgf_nid2name(int mgf);
|
||||
int rsa_oaeppss_md2nid(const EVP_MD *md);
|
||||
const char *rsa_oaeppss_nid2name(int md);
|
||||
|
||||
RSA *rsa_new_with_ctx(OPENSSL_CTX *libctx);
|
||||
OPENSSL_CTX *rsa_get0_libctx(RSA *r);
|
||||
|
||||
int rsa_set0_all_params(RSA *r, const STACK_OF(BIGNUM) *primes,
|
||||
const STACK_OF(BIGNUM) *exps,
|
||||
@@ -21,7 +57,13 @@ 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_todata(RSA *rsa, OSSL_PARAM_BLD *bld, OSSL_PARAM params[]);
|
||||
int rsa_fromdata(RSA *rsa, const OSSL_PARAM params[]);
|
||||
int rsa_pss_params_30_todata(const RSA_PSS_PARAMS_30 *pss, const char *propq,
|
||||
OSSL_PARAM_BLD *bld, OSSL_PARAM params[]);
|
||||
int rsa_pss_params_30_fromdata(RSA_PSS_PARAMS_30 *pss_params,
|
||||
const OSSL_PARAM params[], OPENSSL_CTX *libctx);
|
||||
|
||||
int rsa_padding_check_PKCS1_type_2_TLS(OPENSSL_CTX *ctx, unsigned char *to,
|
||||
size_t tlen, const unsigned char *from,
|
||||
|
||||
Reference in New Issue
Block a user