Latest update.
This commit is contained in:
+73
-57
@@ -12,7 +12,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_AES_H
|
||||
# endif
|
||||
|
||||
@@ -23,74 +23,90 @@
|
||||
extern "C" {
|
||||
# endif
|
||||
|
||||
# define AES_ENCRYPT 1
|
||||
# define AES_DECRYPT 0
|
||||
|
||||
/*
|
||||
* Because array size can't be a const in C, the following two are macros.
|
||||
* Both sizes are in bytes.
|
||||
*/
|
||||
# define AES_MAXNR 14
|
||||
# define AES_BLOCK_SIZE 16
|
||||
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
|
||||
# define AES_ENCRYPT 1
|
||||
# define AES_DECRYPT 0
|
||||
|
||||
# define AES_MAXNR 14
|
||||
|
||||
|
||||
/* This should be a hidden type, but EVP requires that the size be known */
|
||||
struct aes_key_st {
|
||||
# ifdef AES_LONG
|
||||
# ifdef AES_LONG
|
||||
unsigned long rd_key[4 * (AES_MAXNR + 1)];
|
||||
# else
|
||||
# else
|
||||
unsigned int rd_key[4 * (AES_MAXNR + 1)];
|
||||
# endif
|
||||
# endif
|
||||
int rounds;
|
||||
};
|
||||
typedef struct aes_key_st AES_KEY;
|
||||
|
||||
const char *AES_options(void);
|
||||
|
||||
int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
|
||||
AES_KEY *key);
|
||||
int AES_set_decrypt_key(const unsigned char *userKey, const int bits,
|
||||
AES_KEY *key);
|
||||
|
||||
void AES_encrypt(const unsigned char *in, unsigned char *out,
|
||||
const AES_KEY *key);
|
||||
void AES_decrypt(const unsigned char *in, unsigned char *out,
|
||||
const AES_KEY *key);
|
||||
|
||||
void AES_ecb_encrypt(const unsigned char *in, unsigned char *out,
|
||||
const AES_KEY *key, const int enc);
|
||||
void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
|
||||
size_t length, const AES_KEY *key,
|
||||
unsigned char *ivec, const int enc);
|
||||
void AES_cfb128_encrypt(const unsigned char *in, unsigned char *out,
|
||||
size_t length, const AES_KEY *key,
|
||||
unsigned char *ivec, int *num, const int enc);
|
||||
void AES_cfb1_encrypt(const unsigned char *in, unsigned char *out,
|
||||
size_t length, const AES_KEY *key,
|
||||
unsigned char *ivec, int *num, const int enc);
|
||||
void AES_cfb8_encrypt(const unsigned char *in, unsigned char *out,
|
||||
size_t length, const AES_KEY *key,
|
||||
unsigned char *ivec, int *num, const int enc);
|
||||
void AES_ofb128_encrypt(const unsigned char *in, unsigned char *out,
|
||||
size_t length, const AES_KEY *key,
|
||||
unsigned char *ivec, int *num);
|
||||
# if !OPENSSL_API_3
|
||||
/* NB: the IV is _two_ blocks long */
|
||||
void AES_ige_encrypt(const unsigned char *in, unsigned char *out,
|
||||
size_t length, const AES_KEY *key,
|
||||
unsigned char *ivec, const int enc);
|
||||
/* NB: the IV is _four_ blocks long */
|
||||
void AES_bi_ige_encrypt(const unsigned char *in, unsigned char *out,
|
||||
size_t length, const AES_KEY *key,
|
||||
const AES_KEY *key2, const unsigned char *ivec,
|
||||
const int enc);
|
||||
# endif
|
||||
|
||||
int AES_wrap_key(AES_KEY *key, const unsigned char *iv,
|
||||
unsigned char *out,
|
||||
const unsigned char *in, unsigned int inlen);
|
||||
int AES_unwrap_key(AES_KEY *key, const unsigned char *iv,
|
||||
unsigned char *out,
|
||||
const unsigned char *in, unsigned int inlen);
|
||||
DEPRECATEDIN_3_0(const char *AES_options(void))
|
||||
|
||||
DEPRECATEDIN_3_0(int
|
||||
AES_set_encrypt_key(const unsigned char *userKey,
|
||||
const int bits, AES_KEY *key))
|
||||
DEPRECATEDIN_3_0(int
|
||||
AES_set_decrypt_key(const unsigned char *userKey,
|
||||
const int bits, AES_KEY *key))
|
||||
|
||||
DEPRECATEDIN_3_0(void
|
||||
AES_encrypt(const unsigned char *in, unsigned char *out,
|
||||
const AES_KEY *key))
|
||||
DEPRECATEDIN_3_0(void
|
||||
AES_decrypt(const unsigned char *in, unsigned char *out,
|
||||
const AES_KEY *key))
|
||||
|
||||
DEPRECATEDIN_3_0(void
|
||||
AES_ecb_encrypt(const unsigned char *in, unsigned char *out,
|
||||
const AES_KEY *key, const int enc))
|
||||
DEPRECATEDIN_3_0(void
|
||||
AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
|
||||
size_t length, const AES_KEY *key,
|
||||
unsigned char *ivec, const int enc))
|
||||
DEPRECATEDIN_3_0(void
|
||||
AES_cfb128_encrypt(const unsigned char *in, unsigned char *out,
|
||||
size_t length, const AES_KEY *key,
|
||||
unsigned char *ivec, int *num,
|
||||
const int enc))
|
||||
DEPRECATEDIN_3_0(void
|
||||
AES_cfb1_encrypt(const unsigned char *in, unsigned char *out,
|
||||
size_t length, const AES_KEY *key,
|
||||
unsigned char *ivec, int *num, const int enc))
|
||||
DEPRECATEDIN_3_0(void
|
||||
AES_cfb8_encrypt(const unsigned char *in, unsigned char *out,
|
||||
size_t length, const AES_KEY *key,
|
||||
unsigned char *ivec, int *num, const int enc))
|
||||
DEPRECATEDIN_3_0(void
|
||||
AES_ofb128_encrypt(const unsigned char *in, unsigned char *out,
|
||||
size_t length, const AES_KEY *key,
|
||||
unsigned char *ivec, int *num))
|
||||
|
||||
/* NB: the IV is _two_ blocks long */
|
||||
DEPRECATEDIN_3_0(void
|
||||
AES_ige_encrypt(const unsigned char *in, unsigned char *out,
|
||||
size_t length, const AES_KEY *key,
|
||||
unsigned char *ivec, const int enc))
|
||||
/* NB: the IV is _four_ blocks long */
|
||||
DEPRECATEDIN_3_0(void
|
||||
AES_bi_ige_encrypt(const unsigned char *in, unsigned char *out,
|
||||
size_t length, const AES_KEY *key,
|
||||
const AES_KEY *key2,
|
||||
const unsigned char *ivec, const int enc))
|
||||
|
||||
DEPRECATEDIN_3_0(int
|
||||
AES_wrap_key(AES_KEY *key, const unsigned char *iv,
|
||||
unsigned char *out, const unsigned char *in,
|
||||
unsigned int inlen))
|
||||
DEPRECATEDIN_3_0(int
|
||||
AES_unwrap_key(AES_KEY *key, const unsigned char *iv,
|
||||
unsigned char *out, const unsigned char *in,
|
||||
unsigned int inlen))
|
||||
|
||||
|
||||
# ifdef __cplusplus
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_ASN1_H
|
||||
# endif
|
||||
|
||||
@@ -25,9 +25,7 @@
|
||||
# include <openssl/symhacks.h>
|
||||
|
||||
# include <openssl/types.h>
|
||||
# if !OPENSSL_API_1_1_0
|
||||
# include <openssl/bn.h>
|
||||
# endif
|
||||
# include <openssl/bn.h>
|
||||
|
||||
# ifdef OPENSSL_BUILD_SHLIBCRYPTO
|
||||
# undef OPENSSL_EXTERN
|
||||
@@ -278,7 +276,8 @@ typedef struct ASN1_VALUE_st ASN1_VALUE;
|
||||
# define TYPEDEF_I2D_OF(type) typedef int i2d_of_##type(const type *,unsigned char **)
|
||||
# define TYPEDEF_D2I2D_OF(type) TYPEDEF_D2I_OF(type); TYPEDEF_I2D_OF(type)
|
||||
|
||||
TYPEDEF_D2I2D_OF(void);
|
||||
typedef void *d2i_of_void(void **, const unsigned char **, long);
|
||||
typedef int i2d_of_void(const void *, unsigned char **);
|
||||
|
||||
/*-
|
||||
* The following macros and typedefs allow an ASN1_ITEM
|
||||
@@ -600,6 +599,10 @@ DECLARE_ASN1_FUNCTIONS(ASN1_UTCTIME)
|
||||
DECLARE_ASN1_FUNCTIONS(ASN1_GENERALIZEDTIME)
|
||||
DECLARE_ASN1_FUNCTIONS(ASN1_TIME)
|
||||
|
||||
DECLARE_ASN1_DUP_FUNCTION(ASN1_TIME)
|
||||
DECLARE_ASN1_DUP_FUNCTION(ASN1_UTCTIME)
|
||||
DECLARE_ASN1_DUP_FUNCTION(ASN1_GENERALIZEDTIME)
|
||||
|
||||
DECLARE_ASN1_ITEM(ASN1_OCTET_STRING_NDEF)
|
||||
|
||||
ASN1_TIME *ASN1_TIME_set(ASN1_TIME *s, time_t t);
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_ASN1ERR_H
|
||||
# endif
|
||||
|
||||
@@ -29,7 +29,7 @@ int ERR_load_ASN1_strings(void);
|
||||
/*
|
||||
* ASN1 function codes.
|
||||
*/
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define ASN1_F_A2D_ASN1_OBJECT 0
|
||||
# define ASN1_F_A2I_ASN1_INTEGER 0
|
||||
# define ASN1_F_A2I_ASN1_STRING 0
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_ASN1T_H
|
||||
# endif
|
||||
|
||||
@@ -870,7 +870,7 @@ DECLARE_ASN1_ITEM(ZINT64)
|
||||
DECLARE_ASN1_ITEM(UINT64)
|
||||
DECLARE_ASN1_ITEM(ZUINT64)
|
||||
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
/*
|
||||
* LONG and ZLONG are strongly discouraged for use as stored data, as the
|
||||
* underlying C type (long) differs in size depending on the architecture.
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_ASYNC_H
|
||||
# endif
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_ASYNCERR_H
|
||||
# endif
|
||||
|
||||
@@ -29,7 +29,7 @@ int ERR_load_ASYNC_strings(void);
|
||||
/*
|
||||
* ASYNC function codes.
|
||||
*/
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define ASYNC_F_ASYNC_CTX_NEW 0
|
||||
# define ASYNC_F_ASYNC_INIT_THREAD 0
|
||||
# define ASYNC_F_ASYNC_JOB_NEW 0
|
||||
|
||||
+16
-7
@@ -12,7 +12,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_BIO_H
|
||||
# endif
|
||||
|
||||
@@ -160,13 +160,16 @@ extern "C" {
|
||||
# define BIO_CTRL_DGRAM_SCTP_WAIT_FOR_DRY 77
|
||||
# define BIO_CTRL_DGRAM_SCTP_MSG_WAITING 78
|
||||
|
||||
/* BIO_f_prefix controls */
|
||||
# define BIO_CTRL_SET_PREFIX 79
|
||||
# define BIO_CTRL_SET_INDENT 80
|
||||
# define BIO_CTRL_GET_INDENT 81
|
||||
|
||||
# ifndef OPENSSL_NO_KTLS
|
||||
# define BIO_get_ktls_send(b) \
|
||||
(BIO_method_type(b) == BIO_TYPE_SOCKET \
|
||||
&& BIO_ctrl(b, BIO_CTRL_GET_KTLS_SEND, 0, NULL))
|
||||
BIO_ctrl(b, BIO_CTRL_GET_KTLS_SEND, 0, NULL)
|
||||
# define BIO_get_ktls_recv(b) \
|
||||
(BIO_method_type(b) == BIO_TYPE_SOCKET \
|
||||
&& BIO_ctrl(b, BIO_CTRL_GET_KTLS_RECV, 0, NULL))
|
||||
BIO_ctrl(b, BIO_CTRL_GET_KTLS_RECV, 0, NULL)
|
||||
# else
|
||||
# define BIO_get_ktls_send(b) (0)
|
||||
# define BIO_get_ktls_recv(b) (0)
|
||||
@@ -183,7 +186,7 @@ extern "C" {
|
||||
# define BIO_FLAGS_IO_SPECIAL 0x04
|
||||
# define BIO_FLAGS_RWS (BIO_FLAGS_READ|BIO_FLAGS_WRITE|BIO_FLAGS_IO_SPECIAL)
|
||||
# define BIO_FLAGS_SHOULD_RETRY 0x08
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
/* This #define was replaced by an internal constant and should not be used. */
|
||||
# define BIO_FLAGS_UPLINK 0
|
||||
# endif
|
||||
@@ -554,6 +557,11 @@ int BIO_ctrl_reset_read_request(BIO *b);
|
||||
# define BIO_dgram_get_mtu_overhead(b) \
|
||||
(unsigned int)BIO_ctrl((b), BIO_CTRL_DGRAM_GET_MTU_OVERHEAD, 0, NULL)
|
||||
|
||||
/* ctrl macros for BIO_f_prefix */
|
||||
# define BIO_set_prefix(b,p) BIO_ctrl((b), BIO_CTRL_SET_PREFIX, 0, (void *)(p))
|
||||
# define BIO_set_indent(b,i) BIO_ctrl((b), BIO_CTRL_SET_INDENT, (i), NULL)
|
||||
# define BIO_get_indent(b) BIO_ctrl((b), BIO_CTRL_GET_INDENT, 0, NULL)
|
||||
|
||||
#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);
|
||||
@@ -632,6 +640,7 @@ const BIO_METHOD *BIO_f_null(void);
|
||||
const BIO_METHOD *BIO_f_buffer(void);
|
||||
const BIO_METHOD *BIO_f_linebuffer(void);
|
||||
const BIO_METHOD *BIO_f_nbio_test(void);
|
||||
const BIO_METHOD *BIO_f_prefix(void);
|
||||
# ifndef OPENSSL_NO_DGRAM
|
||||
const BIO_METHOD *BIO_s_datagram(void);
|
||||
int BIO_dgram_non_fatal_error(int error);
|
||||
@@ -706,7 +715,7 @@ int BIO_sock_error(int sock);
|
||||
int BIO_socket_ioctl(int fd, long type, void *arg);
|
||||
int BIO_socket_nbio(int fd, int mode);
|
||||
int BIO_sock_init(void);
|
||||
# if !OPENSSL_API_1_1_0
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# define BIO_sock_cleanup() while(0) continue
|
||||
# endif
|
||||
int BIO_set_tcp_ndelay(int sock, int turn_on);
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_BIOERR_H
|
||||
# endif
|
||||
|
||||
@@ -29,7 +29,7 @@ int ERR_load_BIO_strings(void);
|
||||
/*
|
||||
* BIO function codes.
|
||||
*/
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define BIO_F_ACPT_STATE 0
|
||||
# define BIO_F_ADDRINFO_WRAP 0
|
||||
# define BIO_F_ADDR_STRINGS 0
|
||||
|
||||
+31
-20
@@ -12,7 +12,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_BLOWFISH_H
|
||||
# endif
|
||||
|
||||
@@ -24,40 +24,51 @@
|
||||
extern "C" {
|
||||
# endif
|
||||
|
||||
# define BF_ENCRYPT 1
|
||||
# define BF_DECRYPT 0
|
||||
# define BF_BLOCK 8
|
||||
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
|
||||
# define BF_ENCRYPT 1
|
||||
# define BF_DECRYPT 0
|
||||
|
||||
/*-
|
||||
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
* ! BF_LONG has to be at least 32 bits wide. !
|
||||
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
*/
|
||||
# define BF_LONG unsigned int
|
||||
# define BF_LONG unsigned int
|
||||
|
||||
# define BF_ROUNDS 16
|
||||
# define BF_BLOCK 8
|
||||
# define BF_ROUNDS 16
|
||||
|
||||
typedef struct bf_key_st {
|
||||
BF_LONG P[BF_ROUNDS + 2];
|
||||
BF_LONG S[4 * 256];
|
||||
} BF_KEY;
|
||||
|
||||
void BF_set_key(BF_KEY *key, int len, const unsigned char *data);
|
||||
# endif /* OPENSSL_NO_DEPRECATED_3_0 */
|
||||
|
||||
void BF_encrypt(BF_LONG *data, const BF_KEY *key);
|
||||
void BF_decrypt(BF_LONG *data, const BF_KEY *key);
|
||||
DEPRECATEDIN_3_0(void BF_set_key(BF_KEY *key, int len,
|
||||
const unsigned char *data))
|
||||
|
||||
void BF_ecb_encrypt(const unsigned char *in, unsigned char *out,
|
||||
const BF_KEY *key, int enc);
|
||||
void BF_cbc_encrypt(const unsigned char *in, unsigned char *out, long length,
|
||||
const BF_KEY *schedule, unsigned char *ivec, int enc);
|
||||
void BF_cfb64_encrypt(const unsigned char *in, unsigned char *out,
|
||||
long length, const BF_KEY *schedule,
|
||||
unsigned char *ivec, int *num, int enc);
|
||||
void BF_ofb64_encrypt(const unsigned char *in, unsigned char *out,
|
||||
long length, const BF_KEY *schedule,
|
||||
unsigned char *ivec, int *num);
|
||||
const char *BF_options(void);
|
||||
DEPRECATEDIN_3_0(void BF_encrypt(BF_LONG *data, const BF_KEY *key))
|
||||
DEPRECATEDIN_3_0(void BF_decrypt(BF_LONG *data, const BF_KEY *key))
|
||||
|
||||
DEPRECATEDIN_3_0(void BF_ecb_encrypt(const unsigned char *in,
|
||||
unsigned char *out, const BF_KEY *key,
|
||||
int enc))
|
||||
DEPRECATEDIN_3_0(void BF_cbc_encrypt(const unsigned char *in,
|
||||
unsigned char *out, long length,
|
||||
const BF_KEY *schedule,
|
||||
unsigned char *ivec, int enc))
|
||||
DEPRECATEDIN_3_0(void BF_cfb64_encrypt(const unsigned char *in,
|
||||
unsigned char *out,
|
||||
long length, const BF_KEY *schedule,
|
||||
unsigned char *ivec, int *num, int enc))
|
||||
DEPRECATEDIN_3_0(void BF_ofb64_encrypt(const unsigned char *in,
|
||||
unsigned char *out,
|
||||
long length, const BF_KEY *schedule,
|
||||
unsigned char *ivec, int *num))
|
||||
DEPRECATEDIN_3_0(const char *BF_options(void))
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_BN_H
|
||||
# endif
|
||||
|
||||
@@ -67,7 +67,7 @@ extern "C" {
|
||||
# define BN_FLG_CONSTTIME 0x04
|
||||
# define BN_FLG_SECURE 0x08
|
||||
|
||||
# if !OPENSSL_API_0_9_8
|
||||
# ifndef OPENSSL_NO_DEPRECATED_0_9_8
|
||||
/* deprecated name for the flag */
|
||||
# define BN_FLG_EXP_CONSTTIME BN_FLG_CONSTTIME
|
||||
# define BN_FLG_FREE 0x8000 /* used for debugging */
|
||||
@@ -109,7 +109,7 @@ void BN_GENCB_set(BN_GENCB *gencb, int (*callback) (int, int, BN_GENCB *),
|
||||
|
||||
void *BN_GENCB_get_arg(BN_GENCB *cb);
|
||||
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define BN_prime_checks 0 /* default: select number of iterations based
|
||||
* on the size of the number */
|
||||
|
||||
@@ -198,7 +198,7 @@ int BN_is_odd(const BIGNUM *a);
|
||||
|
||||
void BN_zero_ex(BIGNUM *a);
|
||||
|
||||
# if OPENSSL_API_0_9_8
|
||||
# if OPENSSL_API_LEVEL > 908
|
||||
# define BN_zero(a) BN_zero_ex(a)
|
||||
# else
|
||||
# define BN_zero(a) (BN_set_word((a),0))
|
||||
@@ -355,8 +355,8 @@ DEPRECATEDIN_0_9_8(int
|
||||
BN_CTX *ctx, void *cb_arg,
|
||||
int do_trial_division))
|
||||
|
||||
DEPRECATEDIN_3(int BN_is_prime_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx, BN_GENCB *cb))
|
||||
DEPRECATEDIN_3(int BN_is_prime_fasttest_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx,
|
||||
DEPRECATEDIN_3_0(int BN_is_prime_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx, BN_GENCB *cb))
|
||||
DEPRECATEDIN_3_0(int BN_is_prime_fasttest_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx,
|
||||
int do_trial_division, BN_GENCB *cb))
|
||||
/* Newer versions */
|
||||
int BN_generate_prime_ex2(BIGNUM *ret, int bits, int safe,
|
||||
@@ -539,7 +539,7 @@ BIGNUM *BN_get_rfc3526_prime_4096(BIGNUM *bn);
|
||||
BIGNUM *BN_get_rfc3526_prime_6144(BIGNUM *bn);
|
||||
BIGNUM *BN_get_rfc3526_prime_8192(BIGNUM *bn);
|
||||
|
||||
# if !OPENSSL_API_1_1_0
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# define get_rfc2409_prime_768 BN_get_rfc2409_prime_768
|
||||
# define get_rfc2409_prime_1024 BN_get_rfc2409_prime_1024
|
||||
# define get_rfc3526_prime_1536 BN_get_rfc3526_prime_1536
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_BNERR_H
|
||||
# endif
|
||||
|
||||
@@ -29,7 +29,7 @@ int ERR_load_BN_strings(void);
|
||||
/*
|
||||
* BN function codes.
|
||||
*/
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define BN_F_BNRAND 0
|
||||
# define BN_F_BNRAND_RANGE 0
|
||||
# define BN_F_BN_BLINDING_CONVERT_EX 0
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_BUFFER_H
|
||||
# endif
|
||||
|
||||
@@ -30,16 +30,14 @@ extern "C" {
|
||||
# include <stddef.h>
|
||||
# include <sys/types.h>
|
||||
|
||||
/*
|
||||
* These names are outdated as of OpenSSL 1.1; a future release
|
||||
* will move them to be deprecated.
|
||||
*/
|
||||
# define BUF_strdup(s) OPENSSL_strdup(s)
|
||||
# define BUF_strndup(s, size) OPENSSL_strndup(s, size)
|
||||
# define BUF_memdup(data, size) OPENSSL_memdup(data, size)
|
||||
# define BUF_strlcpy(dst, src, size) OPENSSL_strlcpy(dst, src, size)
|
||||
# define BUF_strlcat(dst, src, size) OPENSSL_strlcat(dst, src, size)
|
||||
# define BUF_strnlen(str, maxlen) OPENSSL_strnlen(str, maxlen)
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define BUF_strdup(s) OPENSSL_strdup(s)
|
||||
# define BUF_strndup(s, size) OPENSSL_strndup(s, size)
|
||||
# define BUF_memdup(data, size) OPENSSL_memdup(data, size)
|
||||
# define BUF_strlcpy(dst, src, size) OPENSSL_strlcpy(dst, src, size)
|
||||
# define BUF_strlcat(dst, src, size) OPENSSL_strlcat(dst, src, size)
|
||||
# define BUF_strnlen(str, maxlen) OPENSSL_strnlen(str, maxlen)
|
||||
# endif
|
||||
|
||||
struct buf_mem_st {
|
||||
size_t length; /* current number of bytes */
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_BUFERR_H
|
||||
# endif
|
||||
|
||||
@@ -29,7 +29,7 @@ int ERR_load_BUF_strings(void);
|
||||
/*
|
||||
* BUF function codes.
|
||||
*/
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define BUF_F_BUF_MEM_GROW 0
|
||||
# define BUF_F_BUF_MEM_GROW_CLEAN 0
|
||||
# define BUF_F_BUF_MEM_NEW 0
|
||||
|
||||
+63
-34
@@ -12,7 +12,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_CAMELLIA_H
|
||||
# endif
|
||||
|
||||
@@ -24,8 +24,12 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
# define CAMELLIA_ENCRYPT 1
|
||||
# define CAMELLIA_DECRYPT 0
|
||||
# define CAMELLIA_BLOCK_SIZE 16
|
||||
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
|
||||
# define CAMELLIA_ENCRYPT 1
|
||||
# define CAMELLIA_DECRYPT 0
|
||||
|
||||
/*
|
||||
* Because array size can't be a const in C, the following two are macros.
|
||||
@@ -34,9 +38,8 @@ extern "C" {
|
||||
|
||||
/* This should be a hidden type, but EVP requires that the size be known */
|
||||
|
||||
# define CAMELLIA_BLOCK_SIZE 16
|
||||
# define CAMELLIA_TABLE_BYTE_LEN 272
|
||||
# define CAMELLIA_TABLE_WORD_LEN (CAMELLIA_TABLE_BYTE_LEN / 4)
|
||||
# define CAMELLIA_TABLE_BYTE_LEN 272
|
||||
# define CAMELLIA_TABLE_WORD_LEN (CAMELLIA_TABLE_BYTE_LEN / 4)
|
||||
|
||||
typedef unsigned int KEY_TABLE_TYPE[CAMELLIA_TABLE_WORD_LEN]; /* to match
|
||||
* with WORD */
|
||||
@@ -50,36 +53,62 @@ struct camellia_key_st {
|
||||
};
|
||||
typedef struct camellia_key_st CAMELLIA_KEY;
|
||||
|
||||
int Camellia_set_key(const unsigned char *userKey, const int bits,
|
||||
CAMELLIA_KEY *key);
|
||||
# endif /* OPENSSL_NO_DEPRECATED_3_0 */
|
||||
|
||||
void Camellia_encrypt(const unsigned char *in, unsigned char *out,
|
||||
const CAMELLIA_KEY *key);
|
||||
void Camellia_decrypt(const unsigned char *in, unsigned char *out,
|
||||
const CAMELLIA_KEY *key);
|
||||
DEPRECATEDIN_3_0(int Camellia_set_key(const unsigned char *userKey,
|
||||
const int bits,
|
||||
CAMELLIA_KEY *key))
|
||||
|
||||
void Camellia_ecb_encrypt(const unsigned char *in, unsigned char *out,
|
||||
const CAMELLIA_KEY *key, const int enc);
|
||||
void Camellia_cbc_encrypt(const unsigned char *in, unsigned char *out,
|
||||
size_t length, const CAMELLIA_KEY *key,
|
||||
unsigned char *ivec, const int enc);
|
||||
void Camellia_cfb128_encrypt(const unsigned char *in, unsigned char *out,
|
||||
size_t length, const CAMELLIA_KEY *key,
|
||||
unsigned char *ivec, int *num, const int enc);
|
||||
void Camellia_cfb1_encrypt(const unsigned char *in, unsigned char *out,
|
||||
size_t length, const CAMELLIA_KEY *key,
|
||||
unsigned char *ivec, int *num, const int enc);
|
||||
void Camellia_cfb8_encrypt(const unsigned char *in, unsigned char *out,
|
||||
size_t length, const CAMELLIA_KEY *key,
|
||||
unsigned char *ivec, int *num, const int enc);
|
||||
void Camellia_ofb128_encrypt(const unsigned char *in, unsigned char *out,
|
||||
size_t length, const CAMELLIA_KEY *key,
|
||||
unsigned char *ivec, int *num);
|
||||
void Camellia_ctr128_encrypt(const unsigned char *in, unsigned char *out,
|
||||
size_t length, const CAMELLIA_KEY *key,
|
||||
unsigned char ivec[CAMELLIA_BLOCK_SIZE],
|
||||
unsigned char ecount_buf[CAMELLIA_BLOCK_SIZE],
|
||||
unsigned int *num);
|
||||
DEPRECATEDIN_3_0(void Camellia_encrypt(const unsigned char *in,
|
||||
unsigned char *out,
|
||||
const CAMELLIA_KEY *key))
|
||||
DEPRECATEDIN_3_0(void Camellia_decrypt(const unsigned char *in,
|
||||
unsigned char *out,
|
||||
const CAMELLIA_KEY *key))
|
||||
|
||||
DEPRECATEDIN_3_0(void Camellia_ecb_encrypt(const unsigned char *in,
|
||||
unsigned char *out,
|
||||
const CAMELLIA_KEY *key,
|
||||
const int enc))
|
||||
DEPRECATEDIN_3_0(void Camellia_cbc_encrypt(const unsigned char *in,
|
||||
unsigned char *out,
|
||||
size_t length, const
|
||||
CAMELLIA_KEY *key,
|
||||
unsigned char *ivec, const int enc))
|
||||
DEPRECATEDIN_3_0(void Camellia_cfb128_encrypt(const unsigned char *in,
|
||||
unsigned char *out,
|
||||
size_t length,
|
||||
const CAMELLIA_KEY *key,
|
||||
unsigned char *ivec,
|
||||
int *num,
|
||||
const int enc))
|
||||
DEPRECATEDIN_3_0(void Camellia_cfb1_encrypt(const unsigned char *in,
|
||||
unsigned char *out,
|
||||
size_t length,
|
||||
const CAMELLIA_KEY *key,
|
||||
unsigned char *ivec,
|
||||
int *num,
|
||||
const int enc))
|
||||
DEPRECATEDIN_3_0(void Camellia_cfb8_encrypt(const unsigned char *in,
|
||||
unsigned char *out,
|
||||
size_t length,
|
||||
const CAMELLIA_KEY *key,
|
||||
unsigned char *ivec,
|
||||
int *num,
|
||||
const int enc))
|
||||
DEPRECATEDIN_3_0(void Camellia_ofb128_encrypt(const unsigned char *in,
|
||||
unsigned char *out,
|
||||
size_t length,
|
||||
const CAMELLIA_KEY *key,
|
||||
unsigned char *ivec,
|
||||
int *num))
|
||||
DEPRECATEDIN_3_0(void Camellia_ctr128_encrypt(const unsigned char *in,
|
||||
unsigned char *out,
|
||||
size_t length,
|
||||
const CAMELLIA_KEY *key,
|
||||
unsigned char ivec[CAMELLIA_BLOCK_SIZE],
|
||||
unsigned char ecount_buf[CAMELLIA_BLOCK_SIZE],
|
||||
unsigned int *num))
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
|
||||
+39
-20
@@ -12,7 +12,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_CAST_H
|
||||
# endif
|
||||
|
||||
@@ -23,33 +23,52 @@
|
||||
extern "C" {
|
||||
# endif
|
||||
|
||||
# define CAST_ENCRYPT 1
|
||||
# define CAST_DECRYPT 0
|
||||
|
||||
# define CAST_LONG unsigned int
|
||||
|
||||
# define CAST_BLOCK 8
|
||||
# define CAST_KEY_LENGTH 16
|
||||
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
|
||||
# define CAST_ENCRYPT 1
|
||||
# define CAST_DECRYPT 0
|
||||
|
||||
# define CAST_LONG unsigned int
|
||||
|
||||
typedef struct cast_key_st {
|
||||
CAST_LONG data[32];
|
||||
int short_key; /* Use reduced rounds for short key */
|
||||
} CAST_KEY;
|
||||
|
||||
void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data);
|
||||
void CAST_ecb_encrypt(const unsigned char *in, unsigned char *out,
|
||||
const CAST_KEY *key, int enc);
|
||||
void CAST_encrypt(CAST_LONG *data, const CAST_KEY *key);
|
||||
void CAST_decrypt(CAST_LONG *data, const CAST_KEY *key);
|
||||
void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out,
|
||||
long length, const CAST_KEY *ks, unsigned char *iv,
|
||||
int enc);
|
||||
void CAST_cfb64_encrypt(const unsigned char *in, unsigned char *out,
|
||||
long length, const CAST_KEY *schedule,
|
||||
unsigned char *ivec, int *num, int enc);
|
||||
void CAST_ofb64_encrypt(const unsigned char *in, unsigned char *out,
|
||||
long length, const CAST_KEY *schedule,
|
||||
unsigned char *ivec, int *num);
|
||||
# endif /* OPENSSL_NO_DEPRECATED_3_0 */
|
||||
|
||||
DEPRECATEDIN_3_0(void CAST_set_key(CAST_KEY *key, int len,
|
||||
const unsigned char *data))
|
||||
DEPRECATEDIN_3_0(void CAST_ecb_encrypt(const unsigned char *in,
|
||||
unsigned char *out,
|
||||
const CAST_KEY *key,
|
||||
int enc))
|
||||
DEPRECATEDIN_3_0(void CAST_encrypt(CAST_LONG *data,
|
||||
const CAST_KEY *key))
|
||||
DEPRECATEDIN_3_0(void CAST_decrypt(CAST_LONG *data,
|
||||
const CAST_KEY *key))
|
||||
DEPRECATEDIN_3_0(void CAST_cbc_encrypt(const unsigned char *in,
|
||||
unsigned char *out,
|
||||
long length,
|
||||
const CAST_KEY *ks,
|
||||
unsigned char *iv,
|
||||
int enc))
|
||||
DEPRECATEDIN_3_0(void CAST_cfb64_encrypt(const unsigned char *in,
|
||||
unsigned char *out,
|
||||
long length,
|
||||
const CAST_KEY *schedule,
|
||||
unsigned char *ivec,
|
||||
int *num,
|
||||
int enc))
|
||||
DEPRECATEDIN_3_0(void CAST_ofb64_encrypt(const unsigned char *in,
|
||||
unsigned char *out,
|
||||
long length,
|
||||
const CAST_KEY *schedule,
|
||||
unsigned char *ivec,
|
||||
int *num))
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_CMAC_H
|
||||
# endif
|
||||
|
||||
|
||||
+16
-3
@@ -264,7 +264,7 @@ 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);
|
||||
#define OSSL_CMP_CTX_set_log_verbosity(ctx, level) \
|
||||
# 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: */
|
||||
@@ -337,8 +337,21 @@ int OSSL_CMP_CTX_set1_transactionID(OSSL_CMP_CTX *ctx,
|
||||
int OSSL_CMP_CTX_set1_senderNonce(OSSL_CMP_CTX *ctx,
|
||||
const ASN1_OCTET_STRING *nonce);
|
||||
|
||||
# ifdef __cplusplus
|
||||
/* from cmp_status.c */
|
||||
char *OSSL_CMP_CTX_snprint_PKIStatus(OSSL_CMP_CTX *ctx, char *buf,
|
||||
size_t bufsize);
|
||||
|
||||
/* 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);
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
# endif /* !defined OPENSSL_NO_CMP */
|
||||
#endif /* !defined OPENSSL_CMP_H */
|
||||
@@ -26,13 +26,12 @@ extern "C" {
|
||||
/*
|
||||
* convenience functions for CMP-specific logging via the trace API
|
||||
*/
|
||||
|
||||
int OSSL_CMP_log_open(void);
|
||||
void OSSL_CMP_log_close(void);
|
||||
# define OSSL_CMP_LOG_PREFIX "CMP "
|
||||
/* in OSSL_CMP_LOG_START, cannot use OPENSSL_FUNC when expands to __func__ */
|
||||
# define OSSL_CMP_LOG_START "%s:" OPENSSL_FILE ":" \
|
||||
OPENSSL_MSTR(OPENSSL_LINE) ":" OSSL_CMP_LOG_PREFIX
|
||||
OPENSSL_MSTR(OPENSSL_LINE) ":" OSSL_CMP_LOG_PREFIX
|
||||
# define OSSL_CMP_alert(msg) OSSL_CMP_log(ALERT, msg)
|
||||
# define OSSL_CMP_err(msg) OSSL_CMP_log(ERROR, msg)
|
||||
# define OSSL_CMP_warn(msg) OSSL_CMP_log(WARN, msg)
|
||||
@@ -72,8 +71,8 @@ typedef int (*OSSL_cmp_log_cb_t)(const char *func, const char *file, int line,
|
||||
/* use of the logging callback for outputting error queue */
|
||||
void OSSL_CMP_print_errors_cb(OSSL_cmp_log_cb_t log_fn);
|
||||
|
||||
# ifdef __cplusplus
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
# endif /* !defined OPENSSL_NO_CMP */
|
||||
#endif /* !defined OPENSSL_CMP_UTIL_H */
|
||||
@@ -27,16 +27,48 @@ int ERR_load_CMP_strings(void);
|
||||
/*
|
||||
* CMP function codes.
|
||||
*/
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# endif
|
||||
|
||||
/*
|
||||
* CMP reason codes.
|
||||
*/
|
||||
# define CMP_R_BAD_REQUEST_ID 108
|
||||
# define CMP_R_CERTID_NOT_FOUND 109
|
||||
# define CMP_R_CERTIFICATE_NOT_FOUND 112
|
||||
# define CMP_R_CERTRESPONSE_NOT_FOUND 113
|
||||
# define CMP_R_CERT_AND_KEY_DO_NOT_MATCH 114
|
||||
# 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_ERROR 118
|
||||
# define CMP_R_ERROR_CREATING_GENM 119
|
||||
# define CMP_R_ERROR_CREATING_GENP 120
|
||||
# define CMP_R_ERROR_CREATING_P10CR 121
|
||||
# define CMP_R_ERROR_CREATING_PKICONF 122
|
||||
# define CMP_R_ERROR_CREATING_POLLREP 123
|
||||
# define CMP_R_ERROR_CREATING_POLLREQ 124
|
||||
# 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_PROTECTING_MESSAGE 127
|
||||
# define CMP_R_ERROR_SETTING_CERTHASH 128
|
||||
# define CMP_R_FAILURE_OBTAINING_RANDOM 110
|
||||
# define CMP_R_FAIL_INFO_OUT_OF_RANGE 129
|
||||
# define CMP_R_INVALID_ARGS 100
|
||||
# define CMP_R_MISSING_KEY_INPUT_FOR_CREATING_PROTECTION 130
|
||||
# define CMP_R_MISSING_PRIVATE_KEY 131
|
||||
# define CMP_R_MISSING_SENDER_IDENTIFICATION 111
|
||||
# define CMP_R_MULTIPLE_SAN_SOURCES 102
|
||||
# define CMP_R_NO_STDIO 194
|
||||
# define CMP_R_NULL_ARGUMENT 103
|
||||
# define CMP_R_PKISTATUSINFO_NOT_FOUND 132
|
||||
# define CMP_R_UNEXPECTED_PKIBODY 133
|
||||
# define CMP_R_UNKNOWN_ALGORITHM_ID 134
|
||||
# define CMP_R_UNKNOWN_CERT_TYPE 135
|
||||
# define CMP_R_UNSUPPORTED_ALGORITHM 136
|
||||
# define CMP_R_UNSUPPORTED_KEY_TYPE 137
|
||||
# define CMP_R_WRONG_ALGORITHM_OID 138
|
||||
|
||||
# endif
|
||||
#endif
|
||||
@@ -12,7 +12,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_CMS_H
|
||||
# endif
|
||||
|
||||
@@ -91,7 +91,7 @@ int CMS_is_detached(CMS_ContentInfo *cms);
|
||||
int CMS_set_detached(CMS_ContentInfo *cms, int detached);
|
||||
|
||||
# ifdef OPENSSL_PEM_H
|
||||
DECLARE_PEM_rw_const(CMS, CMS_ContentInfo)
|
||||
DECLARE_PEM_rw(CMS, CMS_ContentInfo)
|
||||
# endif
|
||||
int CMS_stream(unsigned char ***boundary, CMS_ContentInfo *cms);
|
||||
CMS_ContentInfo *d2i_CMS_bio(BIO *bp, CMS_ContentInfo **cms);
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_CMSERR_H
|
||||
# endif
|
||||
|
||||
@@ -33,7 +33,7 @@ int ERR_load_CMS_strings(void);
|
||||
/*
|
||||
* CMS function codes.
|
||||
*/
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define CMS_F_CHECK_CONTENT 0
|
||||
# define CMS_F_CMS_ADD0_CERT 0
|
||||
# define CMS_F_CMS_ADD0_RECIPIENT_KEY 0
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_COMP_H
|
||||
# endif
|
||||
|
||||
@@ -41,8 +41,8 @@ int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen,
|
||||
|
||||
COMP_METHOD *COMP_zlib(void);
|
||||
|
||||
#if !OPENSSL_API_1_1_0
|
||||
#define COMP_zlib_cleanup() while(0) continue
|
||||
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# define COMP_zlib_cleanup() while(0) continue
|
||||
#endif
|
||||
|
||||
# ifdef OPENSSL_BIO_H
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_COMPERR_H
|
||||
# endif
|
||||
|
||||
@@ -33,7 +33,7 @@ int ERR_load_COMP_strings(void);
|
||||
/*
|
||||
* COMP function codes.
|
||||
*/
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define COMP_F_BIO_ZLIB_FLUSH 0
|
||||
# define COMP_F_BIO_ZLIB_NEW 0
|
||||
# define COMP_F_BIO_ZLIB_READ 0
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_CONF_H
|
||||
# endif
|
||||
|
||||
@@ -96,7 +96,7 @@ int CONF_dump_bio(LHASH_OF(CONF_VALUE) *conf, BIO *out);
|
||||
|
||||
DEPRECATEDIN_1_1_0(void OPENSSL_config(const char *config_name))
|
||||
|
||||
#if !OPENSSL_API_1_1_0
|
||||
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# define OPENSSL_no_config() \
|
||||
OPENSSL_init_crypto(OPENSSL_INIT_NO_LOAD_CONFIG, NULL)
|
||||
#endif
|
||||
@@ -110,11 +110,12 @@ struct conf_st {
|
||||
CONF_METHOD *meth;
|
||||
void *meth_data;
|
||||
LHASH_OF(CONF_VALUE) *data;
|
||||
unsigned int flag_dollarid:1;
|
||||
};
|
||||
|
||||
CONF *NCONF_new(CONF_METHOD *meth);
|
||||
CONF_METHOD *NCONF_default(void);
|
||||
DEPRECATEDIN_3(CONF_METHOD *NCONF_WIN32(void))
|
||||
DEPRECATEDIN_3_0(CONF_METHOD *NCONF_WIN32(void))
|
||||
void NCONF_free(CONF *conf);
|
||||
void NCONF_free_data(CONF *conf);
|
||||
|
||||
@@ -143,7 +144,7 @@ int CONF_modules_load_file(const char *filename, const char *appname,
|
||||
unsigned long flags);
|
||||
void CONF_modules_unload(int all);
|
||||
void CONF_modules_finish(void);
|
||||
#if !OPENSSL_API_1_1_0
|
||||
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# define CONF_modules_free() while(0) continue
|
||||
#endif
|
||||
int CONF_module_add(const char *name, conf_init_func *ifunc,
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_CONF_API_H
|
||||
# endif
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_CONFERR_H
|
||||
# endif
|
||||
|
||||
@@ -29,7 +29,7 @@ int ERR_load_CONF_strings(void);
|
||||
/*
|
||||
* CONF function codes.
|
||||
*/
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define CONF_F_CONF_DUMP_FP 0
|
||||
# define CONF_F_CONF_LOAD 0
|
||||
# define CONF_F_CONF_LOAD_FP 0
|
||||
@@ -59,7 +59,9 @@ int ERR_load_CONF_strings(void);
|
||||
* CONF reason codes.
|
||||
*/
|
||||
# define CONF_R_ERROR_LOADING_DSO 110
|
||||
# define CONF_R_INVALID_PRAGMA 122
|
||||
# define CONF_R_LIST_CANNOT_BE_NULL 115
|
||||
# define CONF_R_MANDATORY_BRACES_IN_VARIABLE_EXPANSION 123
|
||||
# define CONF_R_MISSING_CLOSE_SQUARE_BRACKET 100
|
||||
# define CONF_R_MISSING_EQUAL_SIGN 101
|
||||
# define CONF_R_MISSING_INIT_FUNCTION 112
|
||||
|
||||
@@ -9,8 +9,8 @@
|
||||
* https://www.openssl.org/source/license.html
|
||||
*/
|
||||
|
||||
#ifndef OPENSSL_OPENSSLCONF_H
|
||||
# define OPENSSL_OPENSSLCONF_H
|
||||
#ifndef OPENSSL_CONFIGURATION_H
|
||||
# define OPENSSL_CONFIGURATION_H
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -65,9 +65,4 @@ extern "C" {
|
||||
}
|
||||
# endif
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# define HEADER_FILE_H /* deprecated in version 3.0 */
|
||||
# endif
|
||||
|
||||
#endif /* OPENSSL_OPENSSLCONF_H */
|
||||
#endif /* OPENSSL_CONFIGURATION_H */
|
||||
@@ -187,6 +187,31 @@ extern OSSL_provider_init_fn OSSL_provider_init;
|
||||
# pragma names restore
|
||||
# endif
|
||||
|
||||
/*
|
||||
* Generic callback function signature.
|
||||
*
|
||||
* The expectation is that any provider function that wants to offer
|
||||
* a callback / hook can do so by taking an argument with this type,
|
||||
* as well as a pointer to caller-specific data. When calling the
|
||||
* callback, the provider function can populate an OSSL_PARAM array
|
||||
* with data of its choice and pass that in the callback call, along
|
||||
* with the caller data argument.
|
||||
*
|
||||
* libcrypto may use the OSSL_PARAM array to create arguments for an
|
||||
* application callback it knows about.
|
||||
*/
|
||||
typedef int (OSSL_CALLBACK)(const OSSL_PARAM params[], void *arg);
|
||||
|
||||
/*
|
||||
* Passphrase callback function signature
|
||||
*
|
||||
* This is similar to the generic callback function above, but adds a
|
||||
* result parameter.
|
||||
*/
|
||||
typedef int (OSSL_PASSPHRASE_CALLBACK)(char *pass, size_t pass_size,
|
||||
size_t *pass_len,
|
||||
const OSSL_PARAM params[], void *arg);
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
|
||||
+103
-47
@@ -14,31 +14,16 @@
|
||||
extern "C" {
|
||||
# endif
|
||||
|
||||
/*
|
||||
* Well known parameter names that Providers can define
|
||||
*/
|
||||
/* Well known parameter names that Providers can define */
|
||||
#define OSSL_PROV_PARAM_NAME "name" /* utf8_string */
|
||||
#define OSSL_PROV_PARAM_VERSION "version" /* utf8_string */
|
||||
#define OSSL_PROV_PARAM_BUILDINFO "buildinfo" /* utf8_string */
|
||||
#define OSSL_PROV_PARAM_MODULE_FILENAME "module-filename" /* octet_string */
|
||||
|
||||
/*
|
||||
* A printable name for this provider
|
||||
* Type: OSSL_PARAM_UTF8_STRING
|
||||
*/
|
||||
#define OSSL_PROV_PARAM_NAME "name"
|
||||
/*
|
||||
* A version string for this provider
|
||||
* Type: OSSL_PARAM_UTF8_STRING
|
||||
*/
|
||||
#define OSSL_PROV_PARAM_VERSION "version"
|
||||
/*
|
||||
* A string providing provider specific build information
|
||||
* Type: OSSL_PARAM_UTF8_STRING
|
||||
*/
|
||||
#define OSSL_PROV_PARAM_BUILDINFO "buildinfo"
|
||||
|
||||
/*
|
||||
* The module filename
|
||||
* Type: OSSL_PARAM_OCTET_STRING
|
||||
*/
|
||||
#define OSSL_PROV_PARAM_MODULE_FILENAME "module-filename"
|
||||
/* Self test callback parameters */
|
||||
#define OSSL_PROV_PARAM_SELF_TEST_PHASE "st-phase" /* utf8_string */
|
||||
#define OSSL_PROV_PARAM_SELF_TEST_TYPE "st-type" /* utf8_string */
|
||||
#define OSSL_PROV_PARAM_SELF_TEST_DESC "st-desc" /* utf8_string */
|
||||
|
||||
/*
|
||||
* Algorithm parameters
|
||||
@@ -51,26 +36,46 @@ extern "C" {
|
||||
#define OSSL_ALG_PARAM_PROPERTIES "properties"/* utf8_string */
|
||||
|
||||
/* cipher parameters */
|
||||
#define OSSL_CIPHER_PARAM_PADDING "padding" /* uint */
|
||||
#define OSSL_CIPHER_PARAM_MODE "mode" /* uint */
|
||||
#define OSSL_CIPHER_PARAM_BLOCK_SIZE "blocksize" /* size_t */
|
||||
#define OSSL_CIPHER_PARAM_FLAGS "flags" /* ulong */
|
||||
#define OSSL_CIPHER_PARAM_KEYLEN "keylen" /* size_t */
|
||||
#define OSSL_CIPHER_PARAM_IVLEN "ivlen" /* size_t */
|
||||
#define OSSL_CIPHER_PARAM_IV "iv" /* octet_string OR octet_ptr */
|
||||
#define OSSL_CIPHER_PARAM_NUM "num" /* uint */
|
||||
#define OSSL_CIPHER_PARAM_ROUNDS "rounds" /* uint */
|
||||
#define OSSL_CIPHER_PARAM_AEAD_TAG "tag" /* octet_string */
|
||||
#define OSSL_CIPHER_PARAM_AEAD_TLS1_AAD "tlsaad" /* octet_string */
|
||||
#define OSSL_CIPHER_PARAM_AEAD_TLS1_AAD_PAD "tlsaadpad" /* size_t */
|
||||
#define OSSL_CIPHER_PARAM_AEAD_TLS1_IV_FIXED "tlsivfixed" /* octet_string */
|
||||
#define OSSL_CIPHER_PARAM_AEAD_IVLEN OSSL_CIPHER_PARAM_IVLEN
|
||||
#define OSSL_CIPHER_PARAM_AEAD_TAGLEN "taglen" /* size_t */
|
||||
#define OSSL_CIPHER_PARAM_AEAD_MAC_KEY "mackey" /* octet_string */
|
||||
#define OSSL_CIPHER_PARAM_RANDOM_KEY "randkey" /* octet_string */
|
||||
#define OSSL_CIPHER_PARAM_RC2_KEYBITS "keybits" /* size_t */
|
||||
#define OSSL_CIPHER_PARAM_PADDING "padding" /* uint */
|
||||
#define OSSL_CIPHER_PARAM_MODE "mode" /* uint */
|
||||
#define OSSL_CIPHER_PARAM_BLOCK_SIZE "blocksize" /* size_t */
|
||||
#define OSSL_CIPHER_PARAM_FLAGS "flags" /* ulong */
|
||||
#define OSSL_CIPHER_PARAM_KEYLEN "keylen" /* size_t */
|
||||
#define OSSL_CIPHER_PARAM_IVLEN "ivlen" /* size_t */
|
||||
#define OSSL_CIPHER_PARAM_IV "iv" /* octet_string OR octet_ptr */
|
||||
#define OSSL_CIPHER_PARAM_NUM "num" /* uint */
|
||||
#define OSSL_CIPHER_PARAM_ROUNDS "rounds" /* uint */
|
||||
#define OSSL_CIPHER_PARAM_AEAD_TAG "tag" /* octet_string */
|
||||
#define OSSL_CIPHER_PARAM_AEAD_TLS1_AAD "tlsaad" /* octet_string */
|
||||
#define OSSL_CIPHER_PARAM_AEAD_TLS1_AAD_PAD "tlsaadpad" /* size_t */
|
||||
#define OSSL_CIPHER_PARAM_AEAD_TLS1_IV_FIXED "tlsivfixed" /* octet_string */
|
||||
#define OSSL_CIPHER_PARAM_AEAD_TLS1_GET_IV_GEN "tlsivgen" /* octet_string */
|
||||
#define OSSL_CIPHER_PARAM_AEAD_TLS1_SET_IV_INV "tlsivinv" /* octet_string */
|
||||
#define OSSL_CIPHER_PARAM_AEAD_IVLEN OSSL_CIPHER_PARAM_IVLEN
|
||||
#define OSSL_CIPHER_PARAM_AEAD_TAGLEN "taglen" /* size_t */
|
||||
#define OSSL_CIPHER_PARAM_AEAD_MAC_KEY "mackey" /* octet_string */
|
||||
#define OSSL_CIPHER_PARAM_RANDOM_KEY "randkey" /* octet_string */
|
||||
#define OSSL_CIPHER_PARAM_RC2_KEYBITS "keybits" /* size_t */
|
||||
#define OSSL_CIPHER_PARAM_SPEED "speed" /* uint */
|
||||
/* For passing the AlgorithmIdentifier parameter in DER form */
|
||||
#define OSSL_CIPHER_PARAM_ALG_ID "alg_id_param" /* octet_string */
|
||||
#define OSSL_CIPHER_PARAM_ALG_ID "alg_id_param" /* octet_string */
|
||||
|
||||
#define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_MAX_SEND_FRAGMENT \
|
||||
"tls1multi_maxsndfrag" /* uint */
|
||||
#define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_MAX_BUFSIZE \
|
||||
"tls1multi_maxbufsz" /* size_t */
|
||||
#define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_INTERLEAVE \
|
||||
"tls1multi_interleave" /* uint */
|
||||
#define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_AAD \
|
||||
"tls1multi_aad" /* octet_string */
|
||||
#define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_AAD_PACKLEN \
|
||||
"tls1multi_aadpacklen" /* uint */
|
||||
#define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_ENC \
|
||||
"tls1multi_enc" /* octet_string */
|
||||
#define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_ENC_IN \
|
||||
"tls1multi_encin" /* octet_string */
|
||||
#define OSSL_CIPHER_PARAM_TLS1_MULTIBLOCK_ENC_LEN \
|
||||
"tls1multi_enclen" /* size_t */
|
||||
|
||||
/* digest parameters */
|
||||
#define OSSL_DIGEST_PARAM_XOFLEN "xoflen" /* size_t */
|
||||
@@ -83,8 +88,8 @@ extern "C" {
|
||||
|
||||
/* Known DIGEST names (not a complete list) */
|
||||
#define OSSL_DIGEST_NAME_MD5 "MD5"
|
||||
#define OSSL_DIGEST_NAME_KECCAK_KMAC128 "KECCAK_KMAC128"
|
||||
#define OSSL_DIGEST_NAME_KECCAK_KMAC256 "KECCAK_KMAC256"
|
||||
#define OSSL_DIGEST_NAME_KECCAK_KMAC128 "KECCAK-KMAC-128"
|
||||
#define OSSL_DIGEST_NAME_KECCAK_KMAC256 "KECCAK-KMAC-256"
|
||||
|
||||
/* MAC parameters */
|
||||
#define OSSL_MAC_PARAM_KEY "key" /* octet string */
|
||||
@@ -133,19 +138,27 @@ extern "C" {
|
||||
#define OSSL_KDF_PARAM_SSHKDF_SESSION_ID "session_id" /* octet string */
|
||||
#define OSSL_KDF_PARAM_SSHKDF_TYPE "type" /* int */
|
||||
#define OSSL_KDF_PARAM_SIZE "size" /* size_t */
|
||||
#define OSSL_KDF_PARAM_CIPHER OSSL_ALG_PARAM_CIPHER /* utf8 string */
|
||||
#define OSSL_KDF_PARAM_CONSTANT "constant" /* octet string */
|
||||
|
||||
/* Known KDF names */
|
||||
#define OSSL_KDF_NAME_HKDF "HKDF"
|
||||
#define OSSL_KDF_NAME_PBKDF2 "PBKDF2"
|
||||
#define OSSL_KDF_NAME_SCRYPT "id-scrypt"
|
||||
#define OSSL_KDF_NAME_SCRYPT "SCRYPT"
|
||||
#define OSSL_KDF_NAME_SSHKDF "SSHKDF"
|
||||
#define OSSL_KDF_NAME_SSKDF "SSKDF"
|
||||
#define OSSL_KDF_NAME_TLS1_PRF "TLS1-PRF"
|
||||
#define OSSL_KDF_NAME_X942KDF "X942KDF"
|
||||
#define OSSL_KDF_NAME_X963KDF "X963KDF"
|
||||
#define OSSL_KDF_NAME_KBKDF "KBKDF"
|
||||
#define OSSL_KDF_NAME_KRB5KDF "KRB5KDF"
|
||||
|
||||
/* PKEY parameters */
|
||||
/* Common PKEY parameters */
|
||||
#define OSSL_PKEY_PARAM_BITS "bits" /* integer */
|
||||
#define OSSL_PKEY_PARAM_MAX_SIZE "max-size" /* integer */
|
||||
#define OSSL_PKEY_PARAM_SECURITY_BITS "security-bits" /* integer */
|
||||
|
||||
/* Diffie-Hellman/DSA Parameters */
|
||||
#define OSSL_PKEY_PARAM_FFC_P "p"
|
||||
#define OSSL_PKEY_PARAM_FFC_G "g"
|
||||
@@ -159,14 +172,57 @@ extern "C" {
|
||||
#define OSSL_PKEY_PARAM_DSA_PUB_KEY "pub"
|
||||
#define OSSL_PKEY_PARAM_DSA_PRIV_KEY "priv"
|
||||
|
||||
/* RSA Keys */
|
||||
/*
|
||||
* n, e, d are the usual public and private key components
|
||||
*
|
||||
* rsa-num is the number of factors, including p and q
|
||||
* rsa-factor is used for each factor: p, q, r_i (i = 3, ...)
|
||||
* rsa-exponent is used for each exponent: dP, dQ, d_i (i = 3, ...)
|
||||
* rsa-coefficient is used for each coefficient: qInv, t_i (i = 3, ...)
|
||||
*
|
||||
* The number of rsa-factor items must be equal to the number of rsa-exponent
|
||||
* items, and the number of rsa-coefficients must be one less.
|
||||
* (the base i for the coefficients is 2, not 1, at least as implied by
|
||||
* RFC 8017)
|
||||
*/
|
||||
#define OSSL_PKEY_PARAM_RSA_N "n"
|
||||
#define OSSL_PKEY_PARAM_RSA_E "e"
|
||||
#define OSSL_PKEY_PARAM_RSA_D "d"
|
||||
#define OSSL_PKEY_PARAM_RSA_FACTOR "rsa-factor"
|
||||
#define OSSL_PKEY_PARAM_RSA_EXPONENT "rsa-exponent"
|
||||
#define OSSL_PKEY_PARAM_RSA_COEFFICIENT "rsa-coefficient"
|
||||
|
||||
/* Key Exchange parameters */
|
||||
|
||||
#define OSSL_EXCHANGE_PARAM_PAD "pad" /* uint */
|
||||
|
||||
/* Signature parameters */
|
||||
#define OSSL_SIGNATURE_PARAM_DIGEST "digest"
|
||||
#define OSSL_SIGNATURE_PARAM_DIGEST OSSL_ALG_PARAM_DIGEST
|
||||
#define OSSL_SIGNATURE_PARAM_DIGEST_SIZE "digest-size"
|
||||
|
||||
/* Asym cipher parameters */
|
||||
#define OSSL_ASYM_CIPHER_PARAM_PAD_MODE "pad-mode"
|
||||
#define OSSL_ASYM_CIPHER_PARAM_OAEP_DIGEST OSSL_ALG_PARAM_DIGEST
|
||||
#define OSSL_ASYM_CIPHER_PARAM_OAEP_DIGEST_PROPS "digest-props"
|
||||
#define OSSL_ASYM_CIPHER_PARAM_MGF1_DIGEST "mgf1-digest"
|
||||
#define OSSL_ASYM_CIPHER_PARAM_MGF1_DIGEST_PROPS "mgf1-digest-props"
|
||||
#define OSSL_ASYM_CIPHER_PARAM_OAEP_LABEL "oaep-label"
|
||||
#define OSSL_ASYM_CIPHER_PARAM_OAEP_LABEL_LEN "oaep-label-len"
|
||||
#define OSSL_ASYM_CIPHER_PARAM_TLS_CLIENT_VERSION "tls-client-version"
|
||||
#define OSSL_ASYM_CIPHER_PARAM_TLS_NEGOTIATED_VERSION "tls-negotiated-version"
|
||||
|
||||
/*
|
||||
* Serializer parameters
|
||||
*/
|
||||
/* The passphrase may be passed as a utf8 string or an octet string */
|
||||
#define OSSL_SERIALIZER_PARAM_CIPHER OSSL_ALG_PARAM_CIPHER
|
||||
#define OSSL_SERIALIZER_PARAM_PROPERTIES OSSL_ALG_PARAM_PROPERTIES
|
||||
#define OSSL_SERIALIZER_PARAM_PASS "passphrase"
|
||||
|
||||
/* Passphrase callback parameters */
|
||||
#define OSSL_PASSPHRASE_PARAM_INFO "info"
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
|
||||
+120
-21
@@ -12,6 +12,7 @@
|
||||
|
||||
# include <stdarg.h>
|
||||
# include <openssl/core.h>
|
||||
# include <openssl/self_test.h>
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
@@ -29,7 +30,7 @@ extern "C" {
|
||||
* Names:
|
||||
* for any function base name 'foo' (uppercase form 'FOO'), we will have
|
||||
* the following:
|
||||
* - a macro for the identity with the name OSSL_FUNC_'FOO' or derivates
|
||||
* - a macro for the identity with the name OSSL_FUNC_'FOO' or derivatives
|
||||
* thereof (to be specified further down)
|
||||
* - a function signature typedef with the name OSSL_'foo'_fn
|
||||
* - a function pointer extractor function with the name OSSL_'foo'
|
||||
@@ -121,16 +122,23 @@ OSSL_CORE_MAKE_FUNC(void,
|
||||
OPENSSL_cleanse, (void *ptr, size_t len))
|
||||
|
||||
/* Bio functions provided by the core */
|
||||
#define OSSL_FUNC_BIO_NEW_FILE 22
|
||||
#define OSSL_FUNC_BIO_NEW_MEMBUF 23
|
||||
#define OSSL_FUNC_BIO_READ_EX 24
|
||||
#define OSSL_FUNC_BIO_FREE 25
|
||||
#define OSSL_FUNC_BIO_NEW_FILE 23
|
||||
#define OSSL_FUNC_BIO_NEW_MEMBUF 24
|
||||
#define OSSL_FUNC_BIO_READ_EX 25
|
||||
#define OSSL_FUNC_BIO_FREE 26
|
||||
#define OSSL_FUNC_BIO_VPRINTF 27
|
||||
|
||||
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))
|
||||
OSSL_CORE_MAKE_FUNC(int, BIO_read_ex, (BIO *bio, void *data, size_t data_len,
|
||||
size_t *bytes_read))
|
||||
OSSL_CORE_MAKE_FUNC(int, BIO_free, (BIO *bio))
|
||||
OSSL_CORE_MAKE_FUNC(int, BIO_vprintf, (BIO *bio, const char *format,
|
||||
va_list args))
|
||||
|
||||
#define OSSL_FUNC_SELF_TEST_CB 28
|
||||
OSSL_CORE_MAKE_FUNC(void, self_test_cb, (OPENSSL_CTX *ctx, OSSL_CALLBACK **cb,
|
||||
void **cbarg))
|
||||
|
||||
/* Functions provided by the provider to the Core, reserved numbers 1024-1535 */
|
||||
# define OSSL_FUNC_PROVIDER_TEARDOWN 1024
|
||||
@@ -157,8 +165,11 @@ OSSL_CORE_MAKE_FUNC(const OSSL_ITEM *,provider_get_reason_strings,
|
||||
# define OSSL_OP_KEYMGMT 10
|
||||
# define OSSL_OP_KEYEXCH 11
|
||||
# define OSSL_OP_SIGNATURE 12
|
||||
# define OSSL_OP_ASYM_CIPHER 13
|
||||
/* New section for non-EVP operations */
|
||||
# define OSSL_OP_SERIALIZER 20
|
||||
/* Highest known operation number */
|
||||
# define OSSL_OP__HIGHEST 12
|
||||
# define OSSL_OP__HIGHEST 20
|
||||
|
||||
/* Digests */
|
||||
|
||||
@@ -334,9 +345,9 @@ OSSL_CORE_MAKE_FUNC(int, OP_kdf_set_ctx_params,
|
||||
*/
|
||||
|
||||
/* Key domain parameter creation and destruction */
|
||||
# define OSSL_FUNC_KEYMGMT_IMPORTDOMPARAMS 1
|
||||
# define OSSL_FUNC_KEYMGMT_GENDOMPARAMS 2
|
||||
# define OSSL_FUNC_KEYMGMT_FREEDOMPARAMS 3
|
||||
# define OSSL_FUNC_KEYMGMT_IMPORTDOMPARAMS 1
|
||||
# define OSSL_FUNC_KEYMGMT_GENDOMPARAMS 2
|
||||
# define OSSL_FUNC_KEYMGMT_FREEDOMPARAMS 3
|
||||
OSSL_CORE_MAKE_FUNC(void *, OP_keymgmt_importdomparams,
|
||||
(void *provctx, const OSSL_PARAM params[]))
|
||||
OSSL_CORE_MAKE_FUNC(void *, OP_keymgmt_gendomparams,
|
||||
@@ -344,23 +355,35 @@ OSSL_CORE_MAKE_FUNC(void *, OP_keymgmt_gendomparams,
|
||||
OSSL_CORE_MAKE_FUNC(void, OP_keymgmt_freedomparams, (void *domparams))
|
||||
|
||||
/* Key domain parameter export */
|
||||
# define OSSL_FUNC_KEYMGMT_EXPORTDOMPARAMS 4
|
||||
# define OSSL_FUNC_KEYMGMT_EXPORTDOMPARAMS 4
|
||||
OSSL_CORE_MAKE_FUNC(int, OP_keymgmt_exportdomparams,
|
||||
(void *domparams, OSSL_PARAM params[]))
|
||||
(void *domparams, OSSL_CALLBACK *param_cb, void *cbarg))
|
||||
|
||||
/* Key domain parameter discovery */
|
||||
# define OSSL_FUNC_KEYMGMT_IMPORTDOMPARAM_TYPES 5
|
||||
# define OSSL_FUNC_KEYMGMT_EXPORTDOMPARAM_TYPES 6
|
||||
/*
|
||||
* TODO(v3.0) investigate if we need OP_keymgmt_exportdomparam_types.
|
||||
* 'openssl provider' may be a caller...
|
||||
*/
|
||||
# define OSSL_FUNC_KEYMGMT_IMPORTDOMPARAM_TYPES 5
|
||||
# define OSSL_FUNC_KEYMGMT_EXPORTDOMPARAM_TYPES 6
|
||||
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_keymgmt_importdomparam_types,
|
||||
(void))
|
||||
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_keymgmt_exportdomparam_types,
|
||||
(void))
|
||||
|
||||
/* Key domain parameter information */
|
||||
#define OSSL_FUNC_KEYMGMT_GET_DOMPARAM_PARAMS 7
|
||||
#define OSSL_FUNC_KEYMGMT_GETTABLE_DOMPARAM_PARAMS 8
|
||||
OSSL_CORE_MAKE_FUNC(int, OP_keymgmt_get_domparam_params,
|
||||
(void *domparam, OSSL_PARAM params[]))
|
||||
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_keymgmt_gettable_domparam_params,
|
||||
(void))
|
||||
|
||||
/* Key creation and destruction */
|
||||
# define OSSL_FUNC_KEYMGMT_IMPORTKEY 10
|
||||
# define OSSL_FUNC_KEYMGMT_GENKEY 11
|
||||
# define OSSL_FUNC_KEYMGMT_LOADKEY 12
|
||||
# define OSSL_FUNC_KEYMGMT_FREEKEY 13
|
||||
# define OSSL_FUNC_KEYMGMT_IMPORTKEY 20
|
||||
# define OSSL_FUNC_KEYMGMT_GENKEY 21
|
||||
# define OSSL_FUNC_KEYMGMT_LOADKEY 22
|
||||
# define OSSL_FUNC_KEYMGMT_FREEKEY 23
|
||||
OSSL_CORE_MAKE_FUNC(void *, OP_keymgmt_importkey,
|
||||
(void *provctx, const OSSL_PARAM params[]))
|
||||
OSSL_CORE_MAKE_FUNC(void *, OP_keymgmt_genkey,
|
||||
@@ -371,16 +394,32 @@ OSSL_CORE_MAKE_FUNC(void *, OP_keymgmt_loadkey,
|
||||
OSSL_CORE_MAKE_FUNC(void, OP_keymgmt_freekey, (void *key))
|
||||
|
||||
/* Key export */
|
||||
# define OSSL_FUNC_KEYMGMT_EXPORTKEY 14
|
||||
# define OSSL_FUNC_KEYMGMT_EXPORTKEY 24
|
||||
OSSL_CORE_MAKE_FUNC(int, OP_keymgmt_exportkey,
|
||||
(void *key, OSSL_PARAM params[]))
|
||||
(void *key, OSSL_CALLBACK *param_cb, void *cbarg))
|
||||
|
||||
/* Key discovery */
|
||||
# define OSSL_FUNC_KEYMGMT_IMPORTKEY_TYPES 15
|
||||
# define OSSL_FUNC_KEYMGMT_EXPORTKEY_TYPES 16
|
||||
/*
|
||||
* TODO(v3.0) investigate if we need OP_keymgmt_exportkey_types.
|
||||
* 'openssl provider' may be a caller...
|
||||
*/
|
||||
# define OSSL_FUNC_KEYMGMT_IMPORTKEY_TYPES 25
|
||||
# define OSSL_FUNC_KEYMGMT_EXPORTKEY_TYPES 26
|
||||
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_keymgmt_importkey_types, (void))
|
||||
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_keymgmt_exportkey_types, (void))
|
||||
|
||||
/* Key information */
|
||||
#define OSSL_FUNC_KEYMGMT_GET_KEY_PARAMS 27
|
||||
#define OSSL_FUNC_KEYMGMT_GETTABLE_KEY_PARAMS 28
|
||||
OSSL_CORE_MAKE_FUNC(int, OP_keymgmt_get_key_params,
|
||||
(void *key, OSSL_PARAM params[]))
|
||||
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_keymgmt_gettable_key_params, (void))
|
||||
|
||||
/* Discovery of supported operations */
|
||||
# define OSSL_FUNC_KEYMGMT_QUERY_OPERATION_NAME 40
|
||||
OSSL_CORE_MAKE_FUNC(const char *,OP_keymgmt_query_operation_name,
|
||||
(int operation_id))
|
||||
|
||||
/* Key Exchange */
|
||||
|
||||
# define OSSL_FUNC_KEYEXCH_NEWCTX 1
|
||||
@@ -484,6 +523,66 @@ OSSL_CORE_MAKE_FUNC(int, OP_signature_set_ctx_md_params,
|
||||
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_signature_settable_ctx_md_params,
|
||||
(void *ctx))
|
||||
|
||||
|
||||
/* Asymmetric Ciphers */
|
||||
|
||||
# define OSSL_FUNC_ASYM_CIPHER_NEWCTX 1
|
||||
# define OSSL_FUNC_ASYM_CIPHER_ENCRYPT_INIT 2
|
||||
# define OSSL_FUNC_ASYM_CIPHER_ENCRYPT 3
|
||||
# define OSSL_FUNC_ASYM_CIPHER_DECRYPT_INIT 4
|
||||
# define OSSL_FUNC_ASYM_CIPHER_DECRYPT 5
|
||||
# define OSSL_FUNC_ASYM_CIPHER_FREECTX 6
|
||||
# define OSSL_FUNC_ASYM_CIPHER_DUPCTX 7
|
||||
# define OSSL_FUNC_ASYM_CIPHER_GET_CTX_PARAMS 8
|
||||
# define OSSL_FUNC_ASYM_CIPHER_GETTABLE_CTX_PARAMS 9
|
||||
# define OSSL_FUNC_ASYM_CIPHER_SET_CTX_PARAMS 10
|
||||
# define OSSL_FUNC_ASYM_CIPHER_SETTABLE_CTX_PARAMS 11
|
||||
|
||||
OSSL_CORE_MAKE_FUNC(void *, OP_asym_cipher_newctx, (void *provctx))
|
||||
OSSL_CORE_MAKE_FUNC(int, OP_asym_cipher_encrypt_init, (void *ctx, void *provkey))
|
||||
OSSL_CORE_MAKE_FUNC(int, OP_asym_cipher_encrypt, (void *ctx, unsigned char *out,
|
||||
size_t *outlen,
|
||||
size_t outsize,
|
||||
const unsigned char *in,
|
||||
size_t inlen))
|
||||
OSSL_CORE_MAKE_FUNC(int, OP_asym_cipher_decrypt_init, (void *ctx, void *provkey))
|
||||
OSSL_CORE_MAKE_FUNC(int, OP_asym_cipher_decrypt, (void *ctx, unsigned char *out,
|
||||
size_t *outlen,
|
||||
size_t outsize,
|
||||
const unsigned char *in,
|
||||
size_t inlen))
|
||||
OSSL_CORE_MAKE_FUNC(void, OP_asym_cipher_freectx, (void *ctx))
|
||||
OSSL_CORE_MAKE_FUNC(void *, OP_asym_cipher_dupctx, (void *ctx))
|
||||
OSSL_CORE_MAKE_FUNC(int, OP_asym_cipher_get_ctx_params,
|
||||
(void *ctx, OSSL_PARAM params[]))
|
||||
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_asym_cipher_gettable_ctx_params,
|
||||
(void))
|
||||
OSSL_CORE_MAKE_FUNC(int, OP_asym_cipher_set_ctx_params,
|
||||
(void *ctx, const OSSL_PARAM params[]))
|
||||
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_asym_cipher_settable_ctx_params,
|
||||
(void))
|
||||
|
||||
/* Serializers */
|
||||
# define OSSL_FUNC_SERIALIZER_NEWCTX 1
|
||||
# define OSSL_FUNC_SERIALIZER_FREECTX 2
|
||||
# define OSSL_FUNC_SERIALIZER_SET_CTX_PARAMS 3
|
||||
# define OSSL_FUNC_SERIALIZER_SETTABLE_CTX_PARAMS 4
|
||||
# define OSSL_FUNC_SERIALIZER_SERIALIZE_DATA 10
|
||||
# define OSSL_FUNC_SERIALIZER_SERIALIZE_OBJECT 11
|
||||
OSSL_CORE_MAKE_FUNC(void *, OP_serializer_newctx, (void *provctx))
|
||||
OSSL_CORE_MAKE_FUNC(void, OP_serializer_freectx, (void *ctx))
|
||||
OSSL_CORE_MAKE_FUNC(int, OP_serializer_set_ctx_params,
|
||||
(void *ctx, const OSSL_PARAM params[]))
|
||||
OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_serializer_settable_ctx_params,
|
||||
(void))
|
||||
|
||||
OSSL_CORE_MAKE_FUNC(int, OP_serializer_serialize_data,
|
||||
(void *ctx, const OSSL_PARAM[], BIO *out,
|
||||
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg))
|
||||
OSSL_CORE_MAKE_FUNC(int, OP_serializer_serialize_object,
|
||||
(void *ctx, void *obj, BIO *out,
|
||||
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg))
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
|
||||
@@ -27,7 +27,7 @@ int ERR_load_CRMF_strings(void);
|
||||
/*
|
||||
* CRMF function codes.
|
||||
*/
|
||||
# if !OPENSSL_API_3
|
||||
# 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
|
||||
|
||||
+41
-35
@@ -13,7 +13,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_CRYPTO_H
|
||||
# endif
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
*/
|
||||
# include <openssl/symhacks.h>
|
||||
|
||||
# if !OPENSSL_API_1_1_0
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# include <openssl/opensslv.h>
|
||||
# endif
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
# if !OPENSSL_API_1_1_0
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# define SSLeay OpenSSL_version_num
|
||||
# define SSLeay_version OpenSSL_version
|
||||
# define SSLEAY_VERSION_NUMBER OPENSSL_VERSION_NUMBER
|
||||
@@ -68,7 +68,7 @@ typedef struct {
|
||||
int dummy;
|
||||
} CRYPTO_dynlock;
|
||||
|
||||
# endif /* OPENSSL_API_1_1_0 */
|
||||
# endif /* OPENSSL_NO_DEPRECATED_1_1_0 */
|
||||
|
||||
typedef void CRYPTO_RWLOCK;
|
||||
|
||||
@@ -113,15 +113,14 @@ DEFINE_STACK_OF(void)
|
||||
# define CRYPTO_EX_INDEX_BIO 12
|
||||
# define CRYPTO_EX_INDEX_APP 13
|
||||
# define CRYPTO_EX_INDEX_UI_METHOD 14
|
||||
# define CRYPTO_EX_INDEX_DRBG 15
|
||||
# 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
|
||||
|
||||
/* No longer needed, so this is a no-op */
|
||||
#define OPENSSL_malloc_init() while(0) continue
|
||||
|
||||
int CRYPTO_mem_ctrl(int mode);
|
||||
|
||||
# define OPENSSL_malloc(num) \
|
||||
CRYPTO_malloc(num, OPENSSL_FILE, OPENSSL_LINE)
|
||||
# define OPENSSL_zalloc(num) \
|
||||
@@ -164,6 +163,17 @@ int OPENSSL_hexchar2int(unsigned char c);
|
||||
|
||||
# define OPENSSL_MALLOC_MAX_NELEMS(type) (((1U<<(sizeof(int)*8-1))-1)/sizeof(type))
|
||||
|
||||
/*
|
||||
* These functions return the values of OPENSSL_VERSION_MAJOR,
|
||||
* OPENSSL_VERSION_MINOR, OPENSSL_VERSION_PATCH, OPENSSL_VERSION_PRE_RELEASE
|
||||
* and OPENSSL_VERSION_BUILD_METADATA, respectively.
|
||||
*/
|
||||
unsigned int OPENSSL_version_major(void);
|
||||
unsigned int OPENSSL_version_minor(void);
|
||||
unsigned int OPENSSL_version_patch(void);
|
||||
const char *OPENSSL_version_pre_release(void);
|
||||
const char *OPENSSL_version_build_metadata(void);
|
||||
|
||||
unsigned long OpenSSL_version_num(void);
|
||||
const char *OpenSSL_version(int type);
|
||||
# define OPENSSL_VERSION 0
|
||||
@@ -226,7 +236,7 @@ int CRYPTO_alloc_ex_data(int class_index, void *obj, CRYPTO_EX_DATA *ad,
|
||||
int CRYPTO_set_ex_data(CRYPTO_EX_DATA *ad, int idx, void *val);
|
||||
void *CRYPTO_get_ex_data(const CRYPTO_EX_DATA *ad, int idx);
|
||||
|
||||
# if !OPENSSL_API_1_1_0
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
/*
|
||||
* This function cleans up all "ex_data" state. It mustn't be called under
|
||||
* potential race-conditions.
|
||||
@@ -273,11 +283,11 @@ typedef struct crypto_threadid_st {
|
||||
# define CRYPTO_THREADID_cpy(dest, src)
|
||||
# define CRYPTO_THREADID_hash(id) (0UL)
|
||||
|
||||
# if !OPENSSL_API_1_0_0
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_0_0
|
||||
# define CRYPTO_set_id_callback(func)
|
||||
# define CRYPTO_get_id_callback() (NULL)
|
||||
# define CRYPTO_thread_id() (0UL)
|
||||
# endif /* OPENSSL_API_1_0_0 */
|
||||
# endif /* OPENSSL_NO_DEPRECATED_1_0_0 */
|
||||
|
||||
# define CRYPTO_set_dynlock_create_callback(dyn_create_function)
|
||||
# define CRYPTO_set_dynlock_lock_callback(dyn_lock_function)
|
||||
@@ -285,13 +295,12 @@ typedef struct crypto_threadid_st {
|
||||
# define CRYPTO_get_dynlock_create_callback() (NULL)
|
||||
# define CRYPTO_get_dynlock_lock_callback() (NULL)
|
||||
# define CRYPTO_get_dynlock_destroy_callback() (NULL)
|
||||
# endif /* OPENSSL_API_1_1_0 */
|
||||
# endif /* OPENSSL_NO_DEPRECATED_1_1_0 */
|
||||
|
||||
int CRYPTO_set_mem_functions(
|
||||
void *(*m) (size_t, const char *, int),
|
||||
void *(*r) (void *, size_t, const char *, int),
|
||||
void (*f) (void *, const char *, int));
|
||||
int CRYPTO_set_mem_debug(int flag);
|
||||
void CRYPTO_get_mem_functions(
|
||||
void *(**m) (size_t, const char *, int),
|
||||
void *(**r) (void *, size_t, const char *, int),
|
||||
@@ -323,42 +332,39 @@ size_t CRYPTO_secure_used(void);
|
||||
void OPENSSL_cleanse(void *ptr, size_t len);
|
||||
|
||||
# ifndef OPENSSL_NO_CRYPTO_MDEBUG
|
||||
# if !OPENSSL_API_3
|
||||
void CRYPTO_get_alloc_counts(int *mcount, int *rcount, int *fcount);
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define OPENSSL_mem_debug_push(info) \
|
||||
CRYPTO_mem_debug_push(info, OPENSSL_FILE, OPENSSL_LINE)
|
||||
# define OPENSSL_mem_debug_pop() \
|
||||
CRYPTO_mem_debug_pop()
|
||||
# endif
|
||||
DEPRECATEDIN_3(int CRYPTO_mem_debug_push(const char *info,
|
||||
const char *file, int line))
|
||||
DEPRECATEDIN_3(int CRYPTO_mem_debug_pop(void))
|
||||
DEPRECATEDIN_3_0(int CRYPTO_set_mem_debug(int flag))
|
||||
DEPRECATEDIN_3_0(int CRYPTO_mem_ctrl(int mode))
|
||||
DEPRECATEDIN_3_0(int CRYPTO_mem_debug_push(const char *info,
|
||||
const char *file, int line))
|
||||
DEPRECATEDIN_3_0(int CRYPTO_mem_debug_pop(void))
|
||||
|
||||
void CRYPTO_get_alloc_counts(int *mcount, int *rcount, int *fcount);
|
||||
DEPRECATEDIN_3_0(void CRYPTO_mem_debug_malloc(void *addr, size_t num,
|
||||
int flag,
|
||||
const char *file, int line))
|
||||
DEPRECATEDIN_3_0(void CRYPTO_mem_debug_realloc(void *addr1, void *addr2,
|
||||
size_t num, int flag,
|
||||
const char *file, int line))
|
||||
DEPRECATEDIN_3_0(void CRYPTO_mem_debug_free(void *addr, int flag,
|
||||
const char *file, int line))
|
||||
|
||||
/*-
|
||||
* Debugging functions (enabled by CRYPTO_set_mem_debug(1))
|
||||
* The flag argument has the following significance:
|
||||
* 0: called before the actual memory allocation has taken place
|
||||
* 1: called after the actual memory allocation has taken place
|
||||
*/
|
||||
void CRYPTO_mem_debug_malloc(void *addr, size_t num, int flag,
|
||||
const char *file, int line);
|
||||
void CRYPTO_mem_debug_realloc(void *addr1, void *addr2, size_t num, int flag,
|
||||
const char *file, int line);
|
||||
void CRYPTO_mem_debug_free(void *addr, int flag,
|
||||
const char *file, int line);
|
||||
|
||||
int CRYPTO_mem_leaks_cb(int (*cb) (const char *str, size_t len, void *u),
|
||||
void *u);
|
||||
DEPRECATEDIN_3_0(int CRYPTO_mem_leaks_cb(
|
||||
int (*cb)(const char *str, size_t len, void *u), void *u))
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
int CRYPTO_mem_leaks_fp(FILE *);
|
||||
DEPRECATEDIN_3_0(int CRYPTO_mem_leaks_fp(FILE *))
|
||||
# endif
|
||||
int CRYPTO_mem_leaks(BIO *bio);
|
||||
DEPRECATEDIN_3_0(int CRYPTO_mem_leaks(BIO *bio))
|
||||
# endif
|
||||
|
||||
/* die if we have to */
|
||||
ossl_noreturn void OPENSSL_die(const char *assertion, const char *file, int line);
|
||||
# if !OPENSSL_API_1_1_0
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# define OpenSSLDie(f,l,a) OPENSSL_die((a),(f),(l))
|
||||
# endif
|
||||
# define OPENSSL_assert(e) \
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_CRYPTOERR_H
|
||||
# endif
|
||||
|
||||
@@ -29,7 +29,7 @@ int ERR_load_CRYPTO_strings(void);
|
||||
/*
|
||||
* CRYPTO function codes.
|
||||
*/
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define CRYPTO_F_CMAC_CTX_NEW 0
|
||||
# define CRYPTO_F_CRYPTO_DUP_EX_DATA 0
|
||||
# define CRYPTO_F_CRYPTO_FREE_EX_DATA 0
|
||||
@@ -83,6 +83,8 @@ int ERR_load_CRYPTO_strings(void);
|
||||
/*
|
||||
* CRYPTO reason codes.
|
||||
*/
|
||||
# define CRYPTO_R_BAD_ALGORITHM_NAME 117
|
||||
# define CRYPTO_R_CONFLICTING_NAMES 118
|
||||
# define CRYPTO_R_FIPS_MODE_NOT_SUPPORTED 101
|
||||
# define CRYPTO_R_ILLEGAL_HEX_DIGIT 102
|
||||
# define CRYPTO_R_INSUFFICIENT_DATA_SPACE 106
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_CT_H
|
||||
# endif
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_CTERR_H
|
||||
# endif
|
||||
|
||||
@@ -33,7 +33,7 @@ int ERR_load_CT_strings(void);
|
||||
/*
|
||||
* CT function codes.
|
||||
*/
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define CT_F_CTLOG_NEW 0
|
||||
# define CT_F_CTLOG_NEW_FROM_BASE64 0
|
||||
# define CT_F_CTLOG_NEW_FROM_CONF 0
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_DES_H
|
||||
# endif
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_DH_H
|
||||
# endif
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
# include <openssl/bio.h>
|
||||
# include <openssl/asn1.h>
|
||||
# include <openssl/types.h>
|
||||
# if !OPENSSL_API_1_1_0
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# include <openssl/bn.h>
|
||||
# endif
|
||||
# include <openssl/dherr.h>
|
||||
@@ -40,7 +40,7 @@ extern "C" {
|
||||
|
||||
# define DH_FLAG_CACHE_MONT_P 0x01
|
||||
|
||||
# if !OPENSSL_API_1_1_0
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
/*
|
||||
* Does nothing. Previously this switched off constant time behaviour.
|
||||
*/
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_DHERR_H
|
||||
# endif
|
||||
|
||||
@@ -33,7 +33,7 @@ int ERR_load_DH_strings(void);
|
||||
/*
|
||||
* DH function codes.
|
||||
*/
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define DH_F_COMPUTE_KEY 0
|
||||
# define DH_F_DHPARAMS_PRINT_FP 0
|
||||
# define DH_F_DH_BUF2KEY 0
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_DSA_H
|
||||
# endif
|
||||
|
||||
@@ -28,7 +28,7 @@ extern "C" {
|
||||
# include <openssl/crypto.h>
|
||||
# include <openssl/types.h>
|
||||
# include <openssl/bn.h>
|
||||
# if !OPENSSL_API_1_1_0
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# include <openssl/dh.h>
|
||||
# endif
|
||||
# include <openssl/dsaerr.h>
|
||||
@@ -40,7 +40,7 @@ extern "C" {
|
||||
# define OPENSSL_DSA_FIPS_MIN_MODULUS_BITS 1024
|
||||
|
||||
# define DSA_FLAG_CACHE_MONT_P 0x01
|
||||
# if !OPENSSL_API_1_1_0
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
/*
|
||||
* Does nothing. Previously this switched off constant time behaviour.
|
||||
*/
|
||||
@@ -105,7 +105,7 @@ int DSA_size(const DSA *);
|
||||
int DSA_bits(const DSA *d);
|
||||
int DSA_security_bits(const DSA *d);
|
||||
/* next 4 return -1 on error */
|
||||
DEPRECATEDIN_3(int DSA_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp))
|
||||
DEPRECATEDIN_3_0(int DSA_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp))
|
||||
int DSA_sign(int type, const unsigned char *dgst, int dlen,
|
||||
unsigned char *sig, unsigned int *siglen, DSA *dsa);
|
||||
int DSA_verify(int type, const unsigned char *dgst, int dgst_len,
|
||||
@@ -144,7 +144,7 @@ int DSAparams_print_fp(FILE *fp, const DSA *x);
|
||||
int DSA_print_fp(FILE *bp, const DSA *x, int off);
|
||||
# endif
|
||||
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define DSS_prime_checks 64
|
||||
/*
|
||||
* Primality test according to FIPS PUB 186-4, Appendix C.3. Since we only
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_DSAERR_H
|
||||
# endif
|
||||
|
||||
@@ -33,7 +33,7 @@ int ERR_load_DSA_strings(void);
|
||||
/*
|
||||
* DSA function codes.
|
||||
*/
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define DSA_F_DSAPARAMS_PRINT 0
|
||||
# define DSA_F_DSAPARAMS_PRINT_FP 0
|
||||
# define DSA_F_DSA_BUILTIN_PARAMGEN 0
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_DTLS1_H
|
||||
# endif
|
||||
|
||||
@@ -24,7 +24,7 @@ extern "C" {
|
||||
|
||||
# define DTLS1_VERSION 0xFEFF
|
||||
# define DTLS1_2_VERSION 0xFEFD
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define DTLS_MIN_VERSION DTLS1_VERSION
|
||||
# define DTLS_MAX_VERSION DTLS1_2_VERSION
|
||||
# endif
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_E_OS2_H
|
||||
# endif
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_EBCDIC_H
|
||||
# endif
|
||||
|
||||
|
||||
+17
-17
@@ -13,7 +13,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_EC_H
|
||||
# endif
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
# ifndef OPENSSL_NO_EC
|
||||
# include <openssl/asn1.h>
|
||||
# include <openssl/symhacks.h>
|
||||
# if !OPENSSL_API_1_1_0
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# include <openssl/bn.h>
|
||||
# endif
|
||||
# include <openssl/ecerr.h>
|
||||
@@ -131,7 +131,7 @@ void EC_GROUP_free(EC_GROUP *group);
|
||||
/** Clears and frees a EC_GROUP object
|
||||
* \param group EC_GROUP object to be cleared and freed.
|
||||
*/
|
||||
void EC_GROUP_clear_free(EC_GROUP *group);
|
||||
DEPRECATEDIN_3_0(void EC_GROUP_clear_free(EC_GROUP *group))
|
||||
|
||||
/** Copies EC_GROUP objects. Note: both EC_GROUPs must use the same EC_METHOD.
|
||||
* \param dst destination EC_GROUP object
|
||||
@@ -281,7 +281,7 @@ int EC_GROUP_get_curve(const EC_GROUP *group, BIGNUM *p, BIGNUM *a, BIGNUM *b,
|
||||
* \param ctx BN_CTX object (optional)
|
||||
* \return 1 on success and 0 if an error occurred
|
||||
*/
|
||||
DEPRECATEDIN_3(int EC_GROUP_set_curve_GFp(EC_GROUP *group, const BIGNUM *p,
|
||||
DEPRECATEDIN_3_0(int EC_GROUP_set_curve_GFp(EC_GROUP *group, const BIGNUM *p,
|
||||
const BIGNUM *a, const BIGNUM *b,
|
||||
BN_CTX *ctx))
|
||||
|
||||
@@ -294,7 +294,7 @@ DEPRECATEDIN_3(int EC_GROUP_set_curve_GFp(EC_GROUP *group, const BIGNUM *p,
|
||||
* \param ctx BN_CTX object (optional)
|
||||
* \return 1 on success and 0 if an error occurred
|
||||
*/
|
||||
DEPRECATEDIN_3(int EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *p,
|
||||
DEPRECATEDIN_3_0(int EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *p,
|
||||
BIGNUM *a, BIGNUM *b,
|
||||
BN_CTX *ctx))
|
||||
|
||||
@@ -308,7 +308,7 @@ DEPRECATEDIN_3(int EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *p,
|
||||
* \param ctx BN_CTX object (optional)
|
||||
* \return 1 on success and 0 if an error occurred
|
||||
*/
|
||||
DEPRECATEDIN_3(int EC_GROUP_set_curve_GF2m(EC_GROUP *group, const BIGNUM *p,
|
||||
DEPRECATEDIN_3_0(int EC_GROUP_set_curve_GF2m(EC_GROUP *group, const BIGNUM *p,
|
||||
const BIGNUM *a, const BIGNUM *b,
|
||||
BN_CTX *ctx))
|
||||
|
||||
@@ -321,7 +321,7 @@ DEPRECATEDIN_3(int EC_GROUP_set_curve_GF2m(EC_GROUP *group, const BIGNUM *p,
|
||||
* \param ctx BN_CTX object (optional)
|
||||
* \return 1 on success and 0 if an error occurred
|
||||
*/
|
||||
DEPRECATEDIN_3(int EC_GROUP_get_curve_GF2m(const EC_GROUP *group, BIGNUM *p,
|
||||
DEPRECATEDIN_3_0(int EC_GROUP_get_curve_GF2m(const EC_GROUP *group, BIGNUM *p,
|
||||
BIGNUM *a, BIGNUM *b,
|
||||
BN_CTX *ctx))
|
||||
# endif
|
||||
@@ -562,7 +562,7 @@ int EC_POINT_get_affine_coordinates(const EC_GROUP *group, const EC_POINT *p,
|
||||
* \param ctx BN_CTX object (optional)
|
||||
* \return 1 on success and 0 if an error occurred
|
||||
*/
|
||||
DEPRECATEDIN_3(int EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *group,
|
||||
DEPRECATEDIN_3_0(int EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *group,
|
||||
EC_POINT *p,
|
||||
const BIGNUM *x,
|
||||
const BIGNUM *y,
|
||||
@@ -577,7 +577,7 @@ DEPRECATEDIN_3(int EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *group,
|
||||
* \param ctx BN_CTX object (optional)
|
||||
* \return 1 on success and 0 if an error occurred
|
||||
*/
|
||||
DEPRECATEDIN_3(int EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *group,
|
||||
DEPRECATEDIN_3_0(int EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *group,
|
||||
const EC_POINT *p,
|
||||
BIGNUM *x,
|
||||
BIGNUM *y,
|
||||
@@ -604,7 +604,7 @@ int EC_POINT_set_compressed_coordinates(const EC_GROUP *group, EC_POINT *p,
|
||||
* \param ctx BN_CTX object (optional)
|
||||
* \return 1 on success and 0 if an error occurred
|
||||
*/
|
||||
DEPRECATEDIN_3(int EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *group,
|
||||
DEPRECATEDIN_3_0(int EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *group,
|
||||
EC_POINT *p,
|
||||
const BIGNUM *x,
|
||||
int y_bit,
|
||||
@@ -619,7 +619,7 @@ DEPRECATEDIN_3(int EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *group
|
||||
* \param ctx BN_CTX object (optional)
|
||||
* \return 1 on success and 0 if an error occurred
|
||||
*/
|
||||
DEPRECATEDIN_3(int EC_POINT_set_affine_coordinates_GF2m(const EC_GROUP *group,
|
||||
DEPRECATEDIN_3_0(int EC_POINT_set_affine_coordinates_GF2m(const EC_GROUP *group,
|
||||
EC_POINT *p,
|
||||
const BIGNUM *x,
|
||||
const BIGNUM *y,
|
||||
@@ -634,7 +634,7 @@ DEPRECATEDIN_3(int EC_POINT_set_affine_coordinates_GF2m(const EC_GROUP *group,
|
||||
* \param ctx BN_CTX object (optional)
|
||||
* \return 1 on success and 0 if an error occurred
|
||||
*/
|
||||
DEPRECATEDIN_3(int EC_POINT_get_affine_coordinates_GF2m(const EC_GROUP *group,
|
||||
DEPRECATEDIN_3_0(int EC_POINT_get_affine_coordinates_GF2m(const EC_GROUP *group,
|
||||
const EC_POINT *p,
|
||||
BIGNUM *x,
|
||||
BIGNUM *y,
|
||||
@@ -649,7 +649,7 @@ DEPRECATEDIN_3(int EC_POINT_get_affine_coordinates_GF2m(const EC_GROUP *group,
|
||||
* \param ctx BN_CTX object (optional)
|
||||
* \return 1 on success and 0 if an error occurred
|
||||
*/
|
||||
DEPRECATEDIN_3(int EC_POINT_set_compressed_coordinates_GF2m(const EC_GROUP *group,
|
||||
DEPRECATEDIN_3_0(int EC_POINT_set_compressed_coordinates_GF2m(const EC_GROUP *group,
|
||||
EC_POINT *p,
|
||||
const BIGNUM *x,
|
||||
int y_bit,
|
||||
@@ -1172,10 +1172,10 @@ EC_KEY *EC_KEY_new_method(ENGINE *engine);
|
||||
* it is actually specified in ANSI X9.63.
|
||||
* This identifier is retained for backwards compatibility
|
||||
*/
|
||||
DEPRECATEDIN_3(int ECDH_KDF_X9_62(unsigned char *out, size_t outlen,
|
||||
const unsigned char *Z, size_t Zlen,
|
||||
const unsigned char *sinfo, size_t sinfolen,
|
||||
const EVP_MD *md))
|
||||
DEPRECATEDIN_3_0(int ECDH_KDF_X9_62(unsigned char *out, size_t outlen,
|
||||
const unsigned char *Z, size_t Zlen,
|
||||
const unsigned char *sinfo, size_t sinfolen,
|
||||
const EVP_MD *md))
|
||||
|
||||
int ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key,
|
||||
const EC_KEY *ecdh,
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_ECERR_H
|
||||
# endif
|
||||
|
||||
@@ -33,7 +33,7 @@ int ERR_load_EC_strings(void);
|
||||
/*
|
||||
* EC function codes.
|
||||
*/
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define EC_F_BN_TO_FELEM 0
|
||||
# define EC_F_D2I_ECPARAMETERS 0
|
||||
# define EC_F_D2I_ECPKPARAMETERS 0
|
||||
|
||||
@@ -13,14 +13,14 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_ENGINE_H
|
||||
# endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
|
||||
# ifndef OPENSSL_NO_ENGINE
|
||||
# if !OPENSSL_API_1_1_0
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# include <openssl/bn.h>
|
||||
# include <openssl/rsa.h>
|
||||
# include <openssl/dsa.h>
|
||||
@@ -326,7 +326,7 @@ int ENGINE_remove(ENGINE *e);
|
||||
/* Retrieve an engine from the list by its unique "id" value. */
|
||||
ENGINE *ENGINE_by_id(const char *id);
|
||||
|
||||
#if !OPENSSL_API_1_1_0
|
||||
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# define ENGINE_load_openssl() \
|
||||
OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_OPENSSL, NULL)
|
||||
# define ENGINE_load_dynamic() \
|
||||
@@ -500,7 +500,7 @@ int ENGINE_set_cmd_defns(ENGINE *e, const ENGINE_CMD_DEFN *defns);
|
||||
int ENGINE_set_ex_data(ENGINE *e, int idx, void *arg);
|
||||
void *ENGINE_get_ex_data(const ENGINE *e, int idx);
|
||||
|
||||
#if !OPENSSL_API_1_1_0
|
||||
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
/*
|
||||
* This function previously cleaned up anything that needs it. Auto-deinit will
|
||||
* now take care of it so it is no longer required to call this function.
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_ENGINEERR_H
|
||||
# endif
|
||||
|
||||
@@ -33,7 +33,7 @@ int ERR_load_ENGINE_strings(void);
|
||||
/*
|
||||
* ENGINE function codes.
|
||||
*/
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define ENGINE_F_DIGEST_UPDATE 0
|
||||
# define ENGINE_F_DYNAMIC_CTRL 0
|
||||
# define ENGINE_F_DYNAMIC_GET_DATA_CTX 0
|
||||
|
||||
+23
-18
@@ -12,7 +12,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_ERR_H
|
||||
# endif
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# ifndef OPENSSL_NO_FILENAMES
|
||||
# define ERR_PUT_error(l,f,r,fn,ln) ERR_put_error(l,f,r,fn,ln)
|
||||
# else
|
||||
@@ -44,7 +44,7 @@ extern "C" {
|
||||
# define ERR_TXT_MALLOCED 0x01
|
||||
# define ERR_TXT_STRING 0x02
|
||||
|
||||
# if !OPENSSL_API_3 || defined(OSSL_FORCE_ERR_STATE)
|
||||
# if !defined(OPENSSL_NO_DEPRECATED_3_0) || defined(OSSL_FORCE_ERR_STATE)
|
||||
# define ERR_FLAG_MARK 0x01
|
||||
# define ERR_FLAG_CLEAR 0x02
|
||||
|
||||
@@ -105,16 +105,18 @@ struct err_state_st {
|
||||
/* # define ERR_LIB_JPAKE 49 */
|
||||
# define ERR_LIB_CT 50
|
||||
# define ERR_LIB_ASYNC 51
|
||||
# define ERR_LIB_SM2 52
|
||||
# define ERR_LIB_ESS 53
|
||||
# define ERR_LIB_PROP 54
|
||||
# define ERR_LIB_CRMF 55
|
||||
# define ERR_LIB_PROV 56
|
||||
# define ERR_LIB_CMP 57
|
||||
# define ERR_LIB_KDF 52
|
||||
# define ERR_LIB_SM2 53
|
||||
# define ERR_LIB_ESS 54
|
||||
# define ERR_LIB_PROP 55
|
||||
# define ERR_LIB_CRMF 56
|
||||
# define ERR_LIB_PROV 57
|
||||
# define ERR_LIB_CMP 58
|
||||
# define ERR_LIB_OSSL_SERIALIZER 59
|
||||
|
||||
# define ERR_LIB_USER 128
|
||||
|
||||
# if 1 || !OPENSSL_API_3
|
||||
# if 1 || !defined(OPENSSL_NO_DEPRECATED_3_0)
|
||||
# define ASN1err(f, r) ERR_raise_data(ERR_LIB_ASN1, (r), NULL)
|
||||
# define ASYNCerr(f, r) ERR_raise_data(ERR_LIB_ASYNC, (r), NULL)
|
||||
# define BIOerr(f, r) ERR_raise_data(ERR_LIB_BIO, (r), NULL)
|
||||
@@ -149,6 +151,7 @@ struct err_state_st {
|
||||
# define PROVerr(f, r) ERR_raise_data(ERR_LIB_PROV, (r), NULL)
|
||||
# define RANDerr(f, r) ERR_raise_data(ERR_LIB_RAND, (r), NULL)
|
||||
# define RSAerr(f, r) ERR_raise_data(ERR_LIB_RSA, (r), NULL)
|
||||
# define KDFerr(f, r) ERR_raise_data(ERR_LIB_KDF, (r), NULL)
|
||||
# define SM2err(f, r) ERR_raise_data(ERR_LIB_SM2, (r), NULL)
|
||||
# define SSLerr(f, r) ERR_raise_data(ERR_LIB_SSL, (r), NULL)
|
||||
# define SYSerr(f, r) ERR_raise_data(ERR_LIB_SYS, (r), NULL)
|
||||
@@ -167,7 +170,7 @@ struct err_state_st {
|
||||
# define ERR_GET_REASON(l) (int)( (l) & 0xFFFL)
|
||||
# define ERR_FATAL_ERROR(l) (int)( (l) & ERR_R_FATAL)
|
||||
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define SYS_F_FOPEN 0
|
||||
# define SYS_F_CONNECT 0
|
||||
# define SYS_F_GETSERVBYNAME 0
|
||||
@@ -229,6 +232,8 @@ struct err_state_st {
|
||||
# define ERR_R_INIT_FAIL (6|ERR_R_FATAL)
|
||||
# define ERR_R_PASSED_INVALID_ARGUMENT (7)
|
||||
# define ERR_R_OPERATION_FAIL (8|ERR_R_FATAL)
|
||||
# define ERR_R_INVALID_PROVIDER_FUNCTIONS (9|ERR_R_FATAL)
|
||||
# define ERR_R_INTERRUPTED_OR_CANCELLED (10)
|
||||
|
||||
/*
|
||||
* 99 is the maximum possible ERR_R_... code, higher values are reserved for
|
||||
@@ -258,7 +263,7 @@ void ERR_vset_error(int lib, int reason, const char *fmt, va_list args);
|
||||
ERR_set_debug(OPENSSL_FILE,OPENSSL_LINE,OPENSSL_FUNC), \
|
||||
ERR_set_error)
|
||||
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
/* Backward compatibility */
|
||||
# define ERR_put_error(lib, func, reason, file, line) \
|
||||
(ERR_new(), \
|
||||
@@ -282,7 +287,7 @@ unsigned long ERR_get_error_data(const char **data, int *flags);
|
||||
unsigned long ERR_get_error_all(const char **file, int *line,
|
||||
const char **func,
|
||||
const char **data, int *flags);
|
||||
DEPRECATEDIN_3(unsigned long ERR_get_error_line_data(const char **file,
|
||||
DEPRECATEDIN_3_0(unsigned long ERR_get_error_line_data(const char **file,
|
||||
int *line,
|
||||
const char **data,
|
||||
int *flags))
|
||||
@@ -293,7 +298,7 @@ unsigned long ERR_peek_error_data(const char **data, int *flags);
|
||||
unsigned long ERR_peek_error_all(const char **file, int *line,
|
||||
const char **func,
|
||||
const char **data, int *flags);
|
||||
DEPRECATEDIN_3(unsigned long ERR_peek_error_line_data(const char **file,
|
||||
DEPRECATEDIN_3_0(unsigned long ERR_peek_error_line_data(const char **file,
|
||||
int *line,
|
||||
const char **data,
|
||||
int *flags))
|
||||
@@ -304,7 +309,7 @@ unsigned long ERR_peek_last_error_data(const char **data, int *flags);
|
||||
unsigned long ERR_peek_last_error_all(const char **file, int *line,
|
||||
const char **func,
|
||||
const char **data, int *flags);
|
||||
DEPRECATEDIN_3(unsigned long ERR_peek_last_error_line_data(const char **file,
|
||||
DEPRECATEDIN_3_0(unsigned long ERR_peek_last_error_line_data(const char **file,
|
||||
int *line,
|
||||
const char **data,
|
||||
int *flags))
|
||||
@@ -314,7 +319,7 @@ void ERR_clear_error(void);
|
||||
char *ERR_error_string(unsigned long e, char *buf);
|
||||
void ERR_error_string_n(unsigned long e, char *buf, size_t len);
|
||||
const char *ERR_lib_error_string(unsigned long e);
|
||||
DEPRECATEDIN_3(const char *ERR_func_error_string(unsigned long e))
|
||||
DEPRECATEDIN_3_0(const char *ERR_func_error_string(unsigned long e))
|
||||
const char *ERR_reason_error_string(unsigned long e);
|
||||
|
||||
void ERR_print_errors_cb(int (*cb) (const char *str, size_t len, void *u),
|
||||
@@ -332,7 +337,7 @@ int ERR_load_strings_const(const ERR_STRING_DATA *str);
|
||||
int ERR_unload_strings(int lib, ERR_STRING_DATA *str);
|
||||
int ERR_load_ERR_strings(void);
|
||||
|
||||
#if !OPENSSL_API_1_1_0
|
||||
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# define ERR_load_crypto_strings() \
|
||||
OPENSSL_init_crypto(OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL)
|
||||
# define ERR_free_strings() while(0) continue
|
||||
@@ -340,7 +345,7 @@ int ERR_load_ERR_strings(void);
|
||||
|
||||
DEPRECATEDIN_1_1_0(void ERR_remove_thread_state(void *))
|
||||
DEPRECATEDIN_1_0_0(void ERR_remove_state(unsigned long pid))
|
||||
DEPRECATEDIN_3(ERR_STATE *ERR_get_state(void))
|
||||
DEPRECATEDIN_3_0(ERR_STATE *ERR_get_state(void))
|
||||
|
||||
int ERR_get_next_error_library(void);
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ int ERR_load_ESS_strings(void);
|
||||
/*
|
||||
* ESS function codes.
|
||||
*/
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define ESS_F_ESS_CERT_ID_NEW_INIT 0
|
||||
# define ESS_F_ESS_CERT_ID_V2_NEW_INIT 0
|
||||
# define ESS_F_ESS_SIGNING_CERT_ADD 0
|
||||
|
||||
+74
-22
@@ -12,7 +12,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_ENVELOPE_H
|
||||
# endif
|
||||
|
||||
@@ -526,7 +526,7 @@ void *EVP_CIPHER_CTX_get_cipher_data(const EVP_CIPHER_CTX *ctx);
|
||||
void *EVP_CIPHER_CTX_set_cipher_data(EVP_CIPHER_CTX *ctx, void *cipher_data);
|
||||
# define EVP_CIPHER_CTX_name(c) EVP_CIPHER_name(EVP_CIPHER_CTX_cipher(c))
|
||||
# define EVP_CIPHER_CTX_type(c) EVP_CIPHER_type(EVP_CIPHER_CTX_cipher(c))
|
||||
# if !OPENSSL_API_1_1_0
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# define EVP_CIPHER_CTX_flags(c) EVP_CIPHER_flags(EVP_CIPHER_CTX_cipher(c))
|
||||
# endif
|
||||
# define EVP_CIPHER_CTX_mode(c) EVP_CIPHER_mode(EVP_CIPHER_CTX_cipher(c))
|
||||
@@ -678,8 +678,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,
|
||||
EVP_SIGNATURE *signature);
|
||||
const char *mdname, const char *props,
|
||||
EVP_PKEY *pkey);
|
||||
/*__owur*/ int EVP_DigestSignInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
|
||||
const EVP_MD *type, ENGINE *e,
|
||||
EVP_PKEY *pkey);
|
||||
@@ -689,7 +689,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_SIGNATURE *signature);
|
||||
EVP_PKEY *pkey);
|
||||
__owur int EVP_DigestVerifyInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
|
||||
const EVP_MD *type, ENGINE *e,
|
||||
EVP_PKEY *pkey);
|
||||
@@ -726,7 +726,7 @@ int EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned
|
||||
char *out, int *outl);
|
||||
int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n);
|
||||
|
||||
# if !OPENSSL_API_1_1_0
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# define EVP_CIPHER_CTX_init(c) EVP_CIPHER_CTX_reset(c)
|
||||
# define EVP_CIPHER_CTX_cleanup(c) EVP_CIPHER_CTX_reset(c)
|
||||
# endif
|
||||
@@ -1006,7 +1006,7 @@ const EVP_CIPHER *EVP_sm4_ofb(void);
|
||||
const EVP_CIPHER *EVP_sm4_ctr(void);
|
||||
# endif
|
||||
|
||||
# if !OPENSSL_API_1_1_0
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# define OPENSSL_add_all_algorithms_conf() \
|
||||
OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS \
|
||||
| OPENSSL_INIT_ADD_ALL_DIGESTS \
|
||||
@@ -1376,14 +1376,16 @@ int EVP_PKEY_CTX_set_signature_md(EVP_PKEY_CTX *ctx, const EVP_MD *md);
|
||||
# define EVP_PKEY_OP_UNDEFINED 0
|
||||
# define EVP_PKEY_OP_PARAMGEN (1<<1)
|
||||
# define EVP_PKEY_OP_KEYGEN (1<<2)
|
||||
# define EVP_PKEY_OP_SIGN (1<<3)
|
||||
# define EVP_PKEY_OP_VERIFY (1<<4)
|
||||
# define EVP_PKEY_OP_VERIFYRECOVER (1<<5)
|
||||
# define EVP_PKEY_OP_SIGNCTX (1<<6)
|
||||
# define EVP_PKEY_OP_VERIFYCTX (1<<7)
|
||||
# define EVP_PKEY_OP_ENCRYPT (1<<8)
|
||||
# define EVP_PKEY_OP_DECRYPT (1<<9)
|
||||
# define EVP_PKEY_OP_DERIVE (1<<10)
|
||||
# define EVP_PKEY_OP_PARAMFROMDATA (1<<3)
|
||||
# define EVP_PKEY_OP_KEYFROMDATA (1<<4)
|
||||
# define EVP_PKEY_OP_SIGN (1<<5)
|
||||
# define EVP_PKEY_OP_VERIFY (1<<6)
|
||||
# define EVP_PKEY_OP_VERIFYRECOVER (1<<7)
|
||||
# define EVP_PKEY_OP_SIGNCTX (1<<8)
|
||||
# define EVP_PKEY_OP_VERIFYCTX (1<<9)
|
||||
# define EVP_PKEY_OP_ENCRYPT (1<<10)
|
||||
# define EVP_PKEY_OP_DECRYPT (1<<11)
|
||||
# define EVP_PKEY_OP_DERIVE (1<<12)
|
||||
|
||||
# define EVP_PKEY_OP_TYPE_SIG \
|
||||
(EVP_PKEY_OP_SIGN | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYRECOVER \
|
||||
@@ -1396,7 +1398,10 @@ int EVP_PKEY_CTX_set_signature_md(EVP_PKEY_CTX *ctx, const EVP_MD *md);
|
||||
(EVP_PKEY_OP_TYPE_SIG | EVP_PKEY_OP_TYPE_CRYPT | EVP_PKEY_OP_DERIVE)
|
||||
|
||||
# define EVP_PKEY_OP_TYPE_GEN \
|
||||
(EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
|
||||
(EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
|
||||
|
||||
# define EVP_PKEY_OP_TYPE_FROMDATA \
|
||||
(EVP_PKEY_OP_PARAMFROMDATA | EVP_PKEY_OP_KEYFROMDATA)
|
||||
|
||||
# define EVP_PKEY_CTX_set_mac_key(ctx, key, len) \
|
||||
EVP_PKEY_CTX_ctrl(ctx, -1, EVP_PKEY_OP_KEYGEN, \
|
||||
@@ -1462,8 +1467,11 @@ void EVP_KEYMGMT_names_do_all(const EVP_KEYMGMT *keymgmt,
|
||||
|
||||
EVP_PKEY_CTX *EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e);
|
||||
EVP_PKEY_CTX *EVP_PKEY_CTX_new_id(int id, ENGINE *e);
|
||||
EVP_PKEY_CTX *EVP_PKEY_CTX_new_provided(const char *name,
|
||||
const char *propquery);
|
||||
EVP_PKEY_CTX *EVP_PKEY_CTX_new_from_name(OPENSSL_CTX *libctx,
|
||||
const char *name,
|
||||
const char *propquery);
|
||||
EVP_PKEY_CTX *EVP_PKEY_CTX_new_from_pkey(OPENSSL_CTX *libctx,
|
||||
EVP_PKEY *pkey);
|
||||
EVP_PKEY_CTX *EVP_PKEY_CTX_dup(const EVP_PKEY_CTX *ctx);
|
||||
void EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx);
|
||||
|
||||
@@ -1526,17 +1534,29 @@ void EVP_SIGNATURE_names_do_all(const EVP_SIGNATURE *signature,
|
||||
void (*fn)(const char *name, void *data),
|
||||
void *data);
|
||||
|
||||
int EVP_PKEY_sign_init_ex(EVP_PKEY_CTX *ctx, EVP_SIGNATURE *signature);
|
||||
void EVP_ASYM_CIPHER_free(EVP_ASYM_CIPHER *cipher);
|
||||
int EVP_ASYM_CIPHER_up_ref(EVP_ASYM_CIPHER *cipher);
|
||||
OSSL_PROVIDER *EVP_ASYM_CIPHER_provider(const EVP_ASYM_CIPHER *cipher);
|
||||
EVP_ASYM_CIPHER *EVP_ASYM_CIPHER_fetch(OPENSSL_CTX *ctx, const char *algorithm,
|
||||
const char *properties);
|
||||
int EVP_ASYM_CIPHER_is_a(const EVP_ASYM_CIPHER *cipher, const char *name);
|
||||
int EVP_ASYM_CIPHER_number(const EVP_ASYM_CIPHER *cipher);
|
||||
void EVP_ASYM_CIPHER_do_all_provided(OPENSSL_CTX *libctx,
|
||||
void (*fn)(EVP_ASYM_CIPHER *cipher,
|
||||
void *arg),
|
||||
void *arg);
|
||||
void EVP_ASYM_CIPHER_names_do_all(const EVP_ASYM_CIPHER *cipher,
|
||||
void (*fn)(const char *name, void *data),
|
||||
void *data);
|
||||
|
||||
int EVP_PKEY_sign_init(EVP_PKEY_CTX *ctx);
|
||||
int EVP_PKEY_sign(EVP_PKEY_CTX *ctx,
|
||||
unsigned char *sig, size_t *siglen,
|
||||
const unsigned char *tbs, size_t tbslen);
|
||||
int EVP_PKEY_verify_init_ex(EVP_PKEY_CTX *ctx, EVP_SIGNATURE *signature);
|
||||
int EVP_PKEY_verify_init(EVP_PKEY_CTX *ctx);
|
||||
int EVP_PKEY_verify(EVP_PKEY_CTX *ctx,
|
||||
const unsigned char *sig, size_t siglen,
|
||||
const unsigned char *tbs, size_t tbslen);
|
||||
int EVP_PKEY_verify_recover_init_ex(EVP_PKEY_CTX *ctx, EVP_SIGNATURE *signature);
|
||||
int EVP_PKEY_verify_recover_init(EVP_PKEY_CTX *ctx);
|
||||
int EVP_PKEY_verify_recover(EVP_PKEY_CTX *ctx,
|
||||
unsigned char *rout, size_t *routlen,
|
||||
@@ -1550,13 +1570,17 @@ int EVP_PKEY_decrypt(EVP_PKEY_CTX *ctx,
|
||||
unsigned char *out, size_t *outlen,
|
||||
const unsigned char *in, size_t inlen);
|
||||
|
||||
int EVP_PKEY_derive_init_ex(EVP_PKEY_CTX *ctx, EVP_KEYEXCH *exchange);
|
||||
int EVP_PKEY_derive_init(EVP_PKEY_CTX *ctx);
|
||||
int EVP_PKEY_derive_set_peer(EVP_PKEY_CTX *ctx, EVP_PKEY *peer);
|
||||
int EVP_PKEY_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen);
|
||||
|
||||
typedef int EVP_PKEY_gen_cb(EVP_PKEY_CTX *ctx);
|
||||
|
||||
int EVP_PKEY_param_fromdata_init(EVP_PKEY_CTX *ctx);
|
||||
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);
|
||||
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);
|
||||
@@ -1662,6 +1686,20 @@ void EVP_PKEY_meth_set_ctrl(EVP_PKEY_METHOD *pmeth,
|
||||
const char *type,
|
||||
const char *value));
|
||||
|
||||
void EVP_PKEY_meth_set_digestsign(EVP_PKEY_METHOD *pmeth,
|
||||
int (*digestsign) (EVP_MD_CTX *ctx,
|
||||
unsigned char *sig,
|
||||
size_t *siglen,
|
||||
const unsigned char *tbs,
|
||||
size_t tbslen));
|
||||
|
||||
void EVP_PKEY_meth_set_digestverify(EVP_PKEY_METHOD *pmeth,
|
||||
int (*digestverify) (EVP_MD_CTX *ctx,
|
||||
const unsigned char *sig,
|
||||
size_t siglen,
|
||||
const unsigned char *tbs,
|
||||
size_t tbslen));
|
||||
|
||||
void EVP_PKEY_meth_set_check(EVP_PKEY_METHOD *pmeth,
|
||||
int (*check) (EVP_PKEY *pkey));
|
||||
|
||||
@@ -1767,6 +1805,20 @@ void EVP_PKEY_meth_get_ctrl(const EVP_PKEY_METHOD *pmeth,
|
||||
const char *type,
|
||||
const char *value));
|
||||
|
||||
void EVP_PKEY_meth_get_digestsign(EVP_PKEY_METHOD *pmeth,
|
||||
int (**digestsign) (EVP_MD_CTX *ctx,
|
||||
unsigned char *sig,
|
||||
size_t *siglen,
|
||||
const unsigned char *tbs,
|
||||
size_t tbslen));
|
||||
|
||||
void EVP_PKEY_meth_get_digestverify(EVP_PKEY_METHOD *pmeth,
|
||||
int (**digestverify) (EVP_MD_CTX *ctx,
|
||||
const unsigned char *sig,
|
||||
size_t siglen,
|
||||
const unsigned char *tbs,
|
||||
size_t tbslen));
|
||||
|
||||
void EVP_PKEY_meth_get_check(const EVP_PKEY_METHOD *pmeth,
|
||||
int (**pcheck) (EVP_PKEY *pkey));
|
||||
|
||||
|
||||
+74
-22
@@ -12,7 +12,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_ENVELOPE_H
|
||||
# endif
|
||||
|
||||
@@ -526,7 +526,7 @@ void *EVP_CIPHER_CTX_get_cipher_data(const EVP_CIPHER_CTX *ctx);
|
||||
void *EVP_CIPHER_CTX_set_cipher_data(EVP_CIPHER_CTX *ctx, void *cipher_data);
|
||||
# define EVP_CIPHER_CTX_name(c) EVP_CIPHER_name(EVP_CIPHER_CTX_cipher(c))
|
||||
# define EVP_CIPHER_CTX_type(c) EVP_CIPHER_type(EVP_CIPHER_CTX_cipher(c))
|
||||
# if !OPENSSL_API_1_1_0
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# define EVP_CIPHER_CTX_flags(c) EVP_CIPHER_flags(EVP_CIPHER_CTX_cipher(c))
|
||||
# endif
|
||||
# define EVP_CIPHER_CTX_mode(c) EVP_CIPHER_mode(EVP_CIPHER_CTX_cipher(c))
|
||||
@@ -678,8 +678,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,
|
||||
EVP_SIGNATURE *signature);
|
||||
const char *mdname, const char *props,
|
||||
EVP_PKEY *pkey);
|
||||
/*__owur*/ int EVP_DigestSignInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
|
||||
const EVP_MD *type, ENGINE *e,
|
||||
EVP_PKEY *pkey);
|
||||
@@ -689,7 +689,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_SIGNATURE *signature);
|
||||
EVP_PKEY *pkey);
|
||||
__owur int EVP_DigestVerifyInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
|
||||
const EVP_MD *type, ENGINE *e,
|
||||
EVP_PKEY *pkey);
|
||||
@@ -726,7 +726,7 @@ int EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned
|
||||
char *out, int *outl);
|
||||
int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n);
|
||||
|
||||
# if !OPENSSL_API_1_1_0
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# define EVP_CIPHER_CTX_init(c) EVP_CIPHER_CTX_reset(c)
|
||||
# define EVP_CIPHER_CTX_cleanup(c) EVP_CIPHER_CTX_reset(c)
|
||||
# endif
|
||||
@@ -1005,7 +1005,7 @@ const EVP_CIPHER *EVP_sm4_ofb(void);
|
||||
const EVP_CIPHER *EVP_sm4_ctr(void);
|
||||
# endif
|
||||
|
||||
# if !OPENSSL_API_1_1_0
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# define OPENSSL_add_all_algorithms_conf() \
|
||||
OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS \
|
||||
| OPENSSL_INIT_ADD_ALL_DIGESTS \
|
||||
@@ -1375,14 +1375,16 @@ int EVP_PKEY_CTX_set_signature_md(EVP_PKEY_CTX *ctx, const EVP_MD *md);
|
||||
# define EVP_PKEY_OP_UNDEFINED 0
|
||||
# define EVP_PKEY_OP_PARAMGEN (1<<1)
|
||||
# define EVP_PKEY_OP_KEYGEN (1<<2)
|
||||
# define EVP_PKEY_OP_SIGN (1<<3)
|
||||
# define EVP_PKEY_OP_VERIFY (1<<4)
|
||||
# define EVP_PKEY_OP_VERIFYRECOVER (1<<5)
|
||||
# define EVP_PKEY_OP_SIGNCTX (1<<6)
|
||||
# define EVP_PKEY_OP_VERIFYCTX (1<<7)
|
||||
# define EVP_PKEY_OP_ENCRYPT (1<<8)
|
||||
# define EVP_PKEY_OP_DECRYPT (1<<9)
|
||||
# define EVP_PKEY_OP_DERIVE (1<<10)
|
||||
# define EVP_PKEY_OP_PARAMFROMDATA (1<<3)
|
||||
# define EVP_PKEY_OP_KEYFROMDATA (1<<4)
|
||||
# define EVP_PKEY_OP_SIGN (1<<5)
|
||||
# define EVP_PKEY_OP_VERIFY (1<<6)
|
||||
# define EVP_PKEY_OP_VERIFYRECOVER (1<<7)
|
||||
# define EVP_PKEY_OP_SIGNCTX (1<<8)
|
||||
# define EVP_PKEY_OP_VERIFYCTX (1<<9)
|
||||
# define EVP_PKEY_OP_ENCRYPT (1<<10)
|
||||
# define EVP_PKEY_OP_DECRYPT (1<<11)
|
||||
# define EVP_PKEY_OP_DERIVE (1<<12)
|
||||
|
||||
# define EVP_PKEY_OP_TYPE_SIG \
|
||||
(EVP_PKEY_OP_SIGN | EVP_PKEY_OP_VERIFY | EVP_PKEY_OP_VERIFYRECOVER \
|
||||
@@ -1395,7 +1397,10 @@ int EVP_PKEY_CTX_set_signature_md(EVP_PKEY_CTX *ctx, const EVP_MD *md);
|
||||
(EVP_PKEY_OP_TYPE_SIG | EVP_PKEY_OP_TYPE_CRYPT | EVP_PKEY_OP_DERIVE)
|
||||
|
||||
# define EVP_PKEY_OP_TYPE_GEN \
|
||||
(EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
|
||||
(EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN)
|
||||
|
||||
# define EVP_PKEY_OP_TYPE_FROMDATA \
|
||||
(EVP_PKEY_OP_PARAMFROMDATA | EVP_PKEY_OP_KEYFROMDATA)
|
||||
|
||||
# define EVP_PKEY_CTX_set_mac_key(ctx, key, len) \
|
||||
EVP_PKEY_CTX_ctrl(ctx, -1, EVP_PKEY_OP_KEYGEN, \
|
||||
@@ -1461,8 +1466,11 @@ void EVP_KEYMGMT_names_do_all(const EVP_KEYMGMT *keymgmt,
|
||||
|
||||
EVP_PKEY_CTX *EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e);
|
||||
EVP_PKEY_CTX *EVP_PKEY_CTX_new_id(int id, ENGINE *e);
|
||||
EVP_PKEY_CTX *EVP_PKEY_CTX_new_provided(const char *name,
|
||||
const char *propquery);
|
||||
EVP_PKEY_CTX *EVP_PKEY_CTX_new_from_name(OPENSSL_CTX *libctx,
|
||||
const char *name,
|
||||
const char *propquery);
|
||||
EVP_PKEY_CTX *EVP_PKEY_CTX_new_from_pkey(OPENSSL_CTX *libctx,
|
||||
EVP_PKEY *pkey);
|
||||
EVP_PKEY_CTX *EVP_PKEY_CTX_dup(const EVP_PKEY_CTX *ctx);
|
||||
void EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx);
|
||||
|
||||
@@ -1525,17 +1533,29 @@ void EVP_SIGNATURE_names_do_all(const EVP_SIGNATURE *signature,
|
||||
void (*fn)(const char *name, void *data),
|
||||
void *data);
|
||||
|
||||
int EVP_PKEY_sign_init_ex(EVP_PKEY_CTX *ctx, EVP_SIGNATURE *signature);
|
||||
void EVP_ASYM_CIPHER_free(EVP_ASYM_CIPHER *cipher);
|
||||
int EVP_ASYM_CIPHER_up_ref(EVP_ASYM_CIPHER *cipher);
|
||||
OSSL_PROVIDER *EVP_ASYM_CIPHER_provider(const EVP_ASYM_CIPHER *cipher);
|
||||
EVP_ASYM_CIPHER *EVP_ASYM_CIPHER_fetch(OPENSSL_CTX *ctx, const char *algorithm,
|
||||
const char *properties);
|
||||
int EVP_ASYM_CIPHER_is_a(const EVP_ASYM_CIPHER *cipher, const char *name);
|
||||
int EVP_ASYM_CIPHER_number(const EVP_ASYM_CIPHER *cipher);
|
||||
void EVP_ASYM_CIPHER_do_all_provided(OPENSSL_CTX *libctx,
|
||||
void (*fn)(EVP_ASYM_CIPHER *cipher,
|
||||
void *arg),
|
||||
void *arg);
|
||||
void EVP_ASYM_CIPHER_names_do_all(const EVP_ASYM_CIPHER *cipher,
|
||||
void (*fn)(const char *name, void *data),
|
||||
void *data);
|
||||
|
||||
int EVP_PKEY_sign_init(EVP_PKEY_CTX *ctx);
|
||||
int EVP_PKEY_sign(EVP_PKEY_CTX *ctx,
|
||||
unsigned char *sig, size_t *siglen,
|
||||
const unsigned char *tbs, size_t tbslen);
|
||||
int EVP_PKEY_verify_init_ex(EVP_PKEY_CTX *ctx, EVP_SIGNATURE *signature);
|
||||
int EVP_PKEY_verify_init(EVP_PKEY_CTX *ctx);
|
||||
int EVP_PKEY_verify(EVP_PKEY_CTX *ctx,
|
||||
const unsigned char *sig, size_t siglen,
|
||||
const unsigned char *tbs, size_t tbslen);
|
||||
int EVP_PKEY_verify_recover_init_ex(EVP_PKEY_CTX *ctx, EVP_SIGNATURE *signature);
|
||||
int EVP_PKEY_verify_recover_init(EVP_PKEY_CTX *ctx);
|
||||
int EVP_PKEY_verify_recover(EVP_PKEY_CTX *ctx,
|
||||
unsigned char *rout, size_t *routlen,
|
||||
@@ -1549,13 +1569,17 @@ int EVP_PKEY_decrypt(EVP_PKEY_CTX *ctx,
|
||||
unsigned char *out, size_t *outlen,
|
||||
const unsigned char *in, size_t inlen);
|
||||
|
||||
int EVP_PKEY_derive_init_ex(EVP_PKEY_CTX *ctx, EVP_KEYEXCH *exchange);
|
||||
int EVP_PKEY_derive_init(EVP_PKEY_CTX *ctx);
|
||||
int EVP_PKEY_derive_set_peer(EVP_PKEY_CTX *ctx, EVP_PKEY *peer);
|
||||
int EVP_PKEY_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen);
|
||||
|
||||
typedef int EVP_PKEY_gen_cb(EVP_PKEY_CTX *ctx);
|
||||
|
||||
int EVP_PKEY_param_fromdata_init(EVP_PKEY_CTX *ctx);
|
||||
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);
|
||||
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);
|
||||
@@ -1661,6 +1685,20 @@ void EVP_PKEY_meth_set_ctrl(EVP_PKEY_METHOD *pmeth,
|
||||
const char *type,
|
||||
const char *value));
|
||||
|
||||
void EVP_PKEY_meth_set_digestsign(EVP_PKEY_METHOD *pmeth,
|
||||
int (*digestsign) (EVP_MD_CTX *ctx,
|
||||
unsigned char *sig,
|
||||
size_t *siglen,
|
||||
const unsigned char *tbs,
|
||||
size_t tbslen));
|
||||
|
||||
void EVP_PKEY_meth_set_digestverify(EVP_PKEY_METHOD *pmeth,
|
||||
int (*digestverify) (EVP_MD_CTX *ctx,
|
||||
const unsigned char *sig,
|
||||
size_t siglen,
|
||||
const unsigned char *tbs,
|
||||
size_t tbslen));
|
||||
|
||||
void EVP_PKEY_meth_set_check(EVP_PKEY_METHOD *pmeth,
|
||||
int (*check) (EVP_PKEY *pkey));
|
||||
|
||||
@@ -1766,6 +1804,20 @@ void EVP_PKEY_meth_get_ctrl(const EVP_PKEY_METHOD *pmeth,
|
||||
const char *type,
|
||||
const char *value));
|
||||
|
||||
void EVP_PKEY_meth_get_digestsign(EVP_PKEY_METHOD *pmeth,
|
||||
int (**digestsign) (EVP_MD_CTX *ctx,
|
||||
unsigned char *sig,
|
||||
size_t *siglen,
|
||||
const unsigned char *tbs,
|
||||
size_t tbslen));
|
||||
|
||||
void EVP_PKEY_meth_get_digestverify(EVP_PKEY_METHOD *pmeth,
|
||||
int (**digestverify) (EVP_MD_CTX *ctx,
|
||||
const unsigned char *sig,
|
||||
size_t siglen,
|
||||
const unsigned char *tbs,
|
||||
size_t tbslen));
|
||||
|
||||
void EVP_PKEY_meth_get_check(const EVP_PKEY_METHOD *pmeth,
|
||||
int (**pcheck) (EVP_PKEY *pkey));
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_EVPERR_H
|
||||
# endif
|
||||
|
||||
@@ -29,7 +29,7 @@ int ERR_load_EVP_strings(void);
|
||||
/*
|
||||
* EVP function codes.
|
||||
*/
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define EVP_F_AESNI_INIT_KEY 0
|
||||
# define EVP_F_AESNI_XTS_INIT_KEY 0
|
||||
# define EVP_F_AES_GCM_CTRL 0
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_HMAC_H
|
||||
# endif
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
|
||||
# include <openssl/evp.h>
|
||||
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HMAC_MAX_MD_CBLOCK 128 /* Deprecated */
|
||||
# endif
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_IDEA_H
|
||||
# endif
|
||||
|
||||
@@ -51,7 +51,7 @@ void IDEA_ofb64_encrypt(const unsigned char *in, unsigned char *out,
|
||||
int *num);
|
||||
void IDEA_encrypt(unsigned long *in, IDEA_KEY_SCHEDULE *ks);
|
||||
|
||||
# if !OPENSSL_API_1_1_0
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# define idea_options IDEA_options
|
||||
# define idea_ecb_encrypt IDEA_ecb_encrypt
|
||||
# define idea_set_encrypt_key IDEA_set_encrypt_key
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_KDF_H
|
||||
# endif
|
||||
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
/*
|
||||
* Generated by util/mkerr.pl DO NOT EDIT
|
||||
* Copyright 1995-2019 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 OPENSSL_KDFERR_H
|
||||
# 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>
|
||||
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C"
|
||||
# endif
|
||||
DEPRECATEDIN_3_0(int ERR_load_KDF_strings(void))
|
||||
|
||||
/*
|
||||
* KDF function codes.
|
||||
*/
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define KDF_F_HKDF_EXTRACT 0
|
||||
# define KDF_F_KDF_HKDF_DERIVE 0
|
||||
# define KDF_F_KDF_HKDF_NEW 0
|
||||
# define KDF_F_KDF_HKDF_SIZE 0
|
||||
# define KDF_F_KDF_MD2CTRL 0
|
||||
# define KDF_F_KDF_PBKDF2_CTRL 0
|
||||
# define KDF_F_KDF_PBKDF2_CTRL_STR 0
|
||||
# define KDF_F_KDF_PBKDF2_DERIVE 0
|
||||
# define KDF_F_KDF_PBKDF2_NEW 0
|
||||
# define KDF_F_KDF_SCRYPT_CTRL_STR 0
|
||||
# define KDF_F_KDF_SCRYPT_CTRL_UINT32 0
|
||||
# define KDF_F_KDF_SCRYPT_CTRL_UINT64 0
|
||||
# define KDF_F_KDF_SCRYPT_DERIVE 0
|
||||
# define KDF_F_KDF_SCRYPT_NEW 0
|
||||
# define KDF_F_KDF_SSHKDF_CTRL 0
|
||||
# define KDF_F_KDF_SSHKDF_CTRL_STR 0
|
||||
# define KDF_F_KDF_SSHKDF_DERIVE 0
|
||||
# define KDF_F_KDF_SSHKDF_NEW 0
|
||||
# define KDF_F_KDF_TLS1_PRF_CTRL_STR 0
|
||||
# define KDF_F_KDF_TLS1_PRF_DERIVE 0
|
||||
# define KDF_F_KDF_TLS1_PRF_NEW 0
|
||||
# define KDF_F_PBKDF2_DERIVE 0
|
||||
# define KDF_F_PBKDF2_SET_MEMBUF 0
|
||||
# define KDF_F_PKEY_HKDF_CTRL_STR 0
|
||||
# define KDF_F_PKEY_HKDF_DERIVE 0
|
||||
# define KDF_F_PKEY_HKDF_INIT 0
|
||||
# define KDF_F_PKEY_SCRYPT_CTRL_STR 0
|
||||
# define KDF_F_PKEY_SCRYPT_CTRL_UINT64 0
|
||||
# define KDF_F_PKEY_SCRYPT_DERIVE 0
|
||||
# define KDF_F_PKEY_SCRYPT_INIT 0
|
||||
# define KDF_F_PKEY_SCRYPT_SET_MEMBUF 0
|
||||
# define KDF_F_PKEY_TLS1_PRF_CTRL_STR 0
|
||||
# define KDF_F_PKEY_TLS1_PRF_DERIVE 0
|
||||
# define KDF_F_PKEY_TLS1_PRF_INIT 0
|
||||
# define KDF_F_SCRYPT_SET_MEMBUF 0
|
||||
# define KDF_F_SSKDF_CTRL_STR 0
|
||||
# define KDF_F_SSKDF_DERIVE 0
|
||||
# define KDF_F_SSKDF_MAC2CTRL 0
|
||||
# define KDF_F_SSKDF_NEW 0
|
||||
# define KDF_F_SSKDF_SIZE 0
|
||||
# define KDF_F_TLS1_PRF_ALG 0
|
||||
# define KDF_F_X942KDF_CTRL 0
|
||||
# define KDF_F_X942KDF_DERIVE 0
|
||||
# define KDF_F_X942KDF_HASH_KDM 0
|
||||
# define KDF_F_X942KDF_NEW 0
|
||||
# define KDF_F_X942KDF_SIZE 0
|
||||
# define KDF_F_X963KDF_DERIVE 0
|
||||
# endif
|
||||
|
||||
/*
|
||||
* KDF reason codes.
|
||||
*/
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define KDF_R_BAD_ENCODING 122
|
||||
# define KDF_R_BAD_LENGTH 123
|
||||
# define KDF_R_BOTH_MODE_AND_MODE_INT 127
|
||||
# define KDF_R_INAVLID_UKM_LEN 124
|
||||
# define KDF_R_INVALID_DIGEST 100
|
||||
# define KDF_R_INVALID_ITERATION_COUNT 119
|
||||
# define KDF_R_INVALID_KEY_LEN 120
|
||||
# define KDF_R_INVALID_MAC_TYPE 116
|
||||
# define KDF_R_INVALID_MODE 128
|
||||
# define KDF_R_INVALID_MODE_INT 129
|
||||
# define KDF_R_INVALID_SALT_LEN 121
|
||||
# define KDF_R_MISSING_CEK_ALG 125
|
||||
# define KDF_R_MISSING_ITERATION_COUNT 109
|
||||
# define KDF_R_MISSING_KEY 104
|
||||
# define KDF_R_MISSING_MESSAGE_DIGEST 105
|
||||
# define KDF_R_MISSING_PARAMETER 101
|
||||
# define KDF_R_MISSING_PASS 110
|
||||
# define KDF_R_MISSING_SALT 111
|
||||
# define KDF_R_MISSING_SECRET 107
|
||||
# define KDF_R_MISSING_SEED 106
|
||||
# define KDF_R_MISSING_SESSION_ID 113
|
||||
# define KDF_R_MISSING_TYPE 114
|
||||
# define KDF_R_MISSING_XCGHASH 115
|
||||
# define KDF_R_NOT_SUPPORTED 118
|
||||
# define KDF_R_UNKNOWN_PARAMETER_TYPE 103
|
||||
# define KDF_R_UNSUPPORTED_CEK_ALG 126
|
||||
# define KDF_R_UNSUPPORTED_MAC_TYPE 117
|
||||
# define KDF_R_VALUE_ERROR 108
|
||||
# define KDF_R_VALUE_MISSING 102
|
||||
# define KDF_R_WRONG_OUTPUT_BUFFER_SIZE 112
|
||||
# endif
|
||||
|
||||
#endif
|
||||
@@ -16,7 +16,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_LHASH_H
|
||||
# endif
|
||||
|
||||
@@ -98,7 +98,7 @@ void OPENSSL_LH_stats_bio(const OPENSSL_LHASH *lh, BIO *out);
|
||||
void OPENSSL_LH_node_stats_bio(const OPENSSL_LHASH *lh, BIO *out);
|
||||
void OPENSSL_LH_node_usage_stats_bio(const OPENSSL_LHASH *lh, BIO *out);
|
||||
|
||||
# if !OPENSSL_API_1_1_0
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# define _LHASH OPENSSL_LHASH
|
||||
# define LHASH_NODE OPENSSL_LH_NODE
|
||||
# define lh_error OPENSSL_LH_error
|
||||
|
||||
+168
-78
@@ -8,10 +8,15 @@
|
||||
*/
|
||||
|
||||
#include <openssl/opensslconf.h>
|
||||
#include <openssl/opensslv.h>
|
||||
|
||||
#ifndef OPENSSL_MACROS_H
|
||||
# define OPENSSL_MACROS_H
|
||||
|
||||
/* Helper macros for CPP string composition */
|
||||
# define OPENSSL_MSTR_HELPER(x) #x
|
||||
# define OPENSSL_MSTR(x) OPENSSL_MSTR_HELPER(x)
|
||||
|
||||
/*
|
||||
* Sometimes OPENSSSL_NO_xxx ends up with an empty file and some compilers
|
||||
* don't like that. This will hopefully silence them.
|
||||
@@ -19,107 +24,192 @@
|
||||
# define NON_EMPTY_TRANSLATION_UNIT static void *dummy = &dummy;
|
||||
|
||||
/*
|
||||
* Applications should use -DOPENSSL_API_COMPAT=<version> to suppress the
|
||||
* declarations of functions deprecated in or before <version>. If this is
|
||||
* undefined, the value of the macro OPENSSL_API_MIN above is the default.
|
||||
*
|
||||
* For any version number up until version 1.1.x, <version> is expected to be
|
||||
* the calculated version number 0xMNNFFPPSL. For version numbers 3.0.0 and
|
||||
* on, <version> is expected to be only the major version number (i.e. 3 for
|
||||
* version 3.0.0).
|
||||
* Generic deprecation macro
|
||||
*
|
||||
* If OPENSSL_SUPPRESS_DEPRECATED is defined, then DECLARE_DEPRECATED
|
||||
* becomes a no-op
|
||||
*/
|
||||
# ifndef DECLARE_DEPRECATED
|
||||
# define DECLARE_DEPRECATED(f) f;
|
||||
# ifdef __GNUC__
|
||||
# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0)
|
||||
# undef DECLARE_DEPRECATED
|
||||
# define DECLARE_DEPRECATED(f) f __attribute__ ((deprecated));
|
||||
# endif
|
||||
# elif defined(__SUNPRO_C)
|
||||
# if (__SUNPRO_C >= 0x5130)
|
||||
# undef DECLARE_DEPRECATED
|
||||
# define DECLARE_DEPRECATED(f) f __attribute__ ((deprecated));
|
||||
# ifndef OPENSSL_SUPPRESS_DEPRECATED
|
||||
# ifdef __GNUC__
|
||||
# if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0)
|
||||
# undef DECLARE_DEPRECATED
|
||||
# define DECLARE_DEPRECATED(f) f __attribute__ ((deprecated));
|
||||
# endif
|
||||
# elif defined(__SUNPRO_C)
|
||||
# if (__SUNPRO_C >= 0x5130)
|
||||
# undef DECLARE_DEPRECATED
|
||||
# define DECLARE_DEPRECATED(f) f __attribute__ ((deprecated));
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/*
|
||||
* We convert the OPENSSL_API_COMPAT value to an API level. The API level
|
||||
* is the major version number for 3.0.0 and on. For earlier versions, it
|
||||
* uses this scheme, which is close enough for our purposes:
|
||||
* Applications should use -DOPENSSL_API_COMPAT=<version> to suppress the
|
||||
* declarations of functions deprecated in or before <version>. If this is
|
||||
* undefined, the value of the macro OPENSSL_CONFIGURED_API (defined in
|
||||
* <openssl/opensslconf.h>) is the default.
|
||||
*
|
||||
* 0.x.y 0 (0.9.8 was the last release in this series)
|
||||
* 1.0.x 1 (1.0.2 was the last release in this series)
|
||||
* 1.1.x 2 (1.1.1 was the last release in this series)
|
||||
* For any version number up until version 1.1.x, <version> is expected to be
|
||||
* the calculated version number 0xMNNFFPPSL.
|
||||
* For version numbers 3.0 and on, <version> is expected to be a computation
|
||||
* of the major and minor numbers in decimal using this formula:
|
||||
*
|
||||
* MAJOR * 10000 + MINOR * 100
|
||||
*
|
||||
* So version 3.0 becomes 30000, version 3.2 becomes 30200, etc.
|
||||
*/
|
||||
|
||||
/* In case someone defined both */
|
||||
# if defined(OPENSSL_API_COMPAT) && defined(OPENSSL_API_LEVEL)
|
||||
# error "Disallowed to define both OPENSSL_API_COMPAT and OPENSSL_API_LEVEL"
|
||||
/*
|
||||
* We use the OPENSSL_API_COMPAT value to define API level macros. These
|
||||
* macros are used to enable or disable features at that API version boundary.
|
||||
*/
|
||||
|
||||
# ifdef OPENSSL_API_LEVEL
|
||||
# error "OPENSSL_API_LEVEL must not be defined by application"
|
||||
# endif
|
||||
|
||||
# ifndef OPENSSL_API_COMPAT
|
||||
# define OPENSSL_API_LEVEL OPENSSL_MIN_API
|
||||
# else
|
||||
# if (OPENSSL_API_COMPAT < 0x1000L) /* Major version numbers up to 16777215 */
|
||||
# define OPENSSL_API_LEVEL OPENSSL_API_COMPAT
|
||||
# elif (OPENSSL_API_COMPAT & 0xF0000000L) == 0x00000000L
|
||||
# define OPENSSL_API_LEVEL 0
|
||||
# elif (OPENSSL_API_COMPAT & 0xFFF00000L) == 0x10000000L
|
||||
# define OPENSSL_API_LEVEL 1
|
||||
# elif (OPENSSL_API_COMPAT & 0xFFF00000L) == 0x10100000L
|
||||
# define OPENSSL_API_LEVEL 2
|
||||
/*
|
||||
* We figure out what API level was intended by simple numeric comparison.
|
||||
* The lowest old style number we recognise is 0x00908000L, so we take some
|
||||
* safety margin and assume that anything below 0x00900000L is a new style
|
||||
* number. This allows new versions up to and including v943.71.83.
|
||||
*/
|
||||
# ifdef OPENSSL_API_COMPAT
|
||||
# if OPENSSL_API_COMPAT < 0x900000L
|
||||
# define OPENSSL_API_LEVEL (OPENSSL_API_COMPAT)
|
||||
# else
|
||||
/* Major number 3 to 15 */
|
||||
# define OPENSSL_API_LEVEL ((OPENSSL_API_COMPAT >> 28) & 0xF)
|
||||
# define OPENSSL_API_LEVEL \
|
||||
(((OPENSSL_API_COMPAT >> 28) & 0xF) * 10000 \
|
||||
+ ((OPENSSL_API_COMPAT >> 20) & 0xFF) * 100 \
|
||||
+ ((OPENSSL_API_COMPAT >> 12) & 0xFF))
|
||||
# endif
|
||||
# endif
|
||||
|
||||
/*
|
||||
* Define API level check macros up to what makes sense. Since we
|
||||
* do future deprecations, we define one API level beyond the current
|
||||
* major version number.
|
||||
* If OPENSSL_API_COMPAT wasn't given, we use default numbers to set
|
||||
* the API compatibility level.
|
||||
*/
|
||||
# ifndef OPENSSL_API_LEVEL
|
||||
# if OPENSSL_CONFIGURED_API > 0
|
||||
# define OPENSSL_API_LEVEL (OPENSSL_CONFIGURED_API)
|
||||
# else
|
||||
# define OPENSSL_API_LEVEL \
|
||||
(OPENSSL_VERSION_MAJOR * 10000 + OPENSSL_VERSION_MINOR * 100)
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# if OPENSSL_API_LEVEL > OPENSSL_CONFIGURED_API
|
||||
# error "The requested API level higher than the configured API compatibility level"
|
||||
# endif
|
||||
|
||||
/*
|
||||
* Check of sane values.
|
||||
*/
|
||||
/* Can't go higher than the current version. */
|
||||
# if OPENSSL_API_LEVEL > (OPENSSL_VERSION_MAJOR * 10000 + OPENSSL_VERSION_MINOR * 100)
|
||||
# error "OPENSSL_API_COMPAT expresses an impossible API compatibility level"
|
||||
# endif
|
||||
/* OpenSSL will have no version 2.y.z */
|
||||
# if OPENSSL_API_LEVEL < 30000 && OPENSSL_API_LEVEL >= 20000
|
||||
# error "OPENSSL_API_COMPAT expresses an impossible API compatibility level"
|
||||
# endif
|
||||
/* Below 0.9.8 is unacceptably low */
|
||||
# if OPENSSL_API_LEVEL < 908
|
||||
# error "OPENSSL_API_COMPAT expresses an impossible API compatibility level"
|
||||
# endif
|
||||
|
||||
/*
|
||||
* Define macros for deprecation purposes. We always define the macros
|
||||
* DEPERECATEDIN_{major}_{minor}() for all OpenSSL versions we care for,
|
||||
* and OPENSSL_NO_DEPRECATED_{major}_{minor} to be used to check if
|
||||
* removal of deprecated functions applies on that particular version.
|
||||
*/
|
||||
|
||||
# if OPENSSL_API_LEVEL < 4
|
||||
# define DEPRECATEDIN_4(f) DECLARE_DEPRECATED(f)
|
||||
# define OPENSSL_API_4 0
|
||||
# undef OPENSSL_NO_DEPRECATED_3_0
|
||||
# undef OPENSSL_NO_DEPRECATED_1_1_1
|
||||
# undef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# undef OPENSSL_NO_DEPRECATED_1_0_2
|
||||
# undef OPENSSL_NO_DEPRECATED_1_0_1
|
||||
# undef OPENSSL_NO_DEPRECATED_1_0_0
|
||||
# undef OPENSSL_NO_DEPRECATED_0_9_8
|
||||
|
||||
# if OPENSSL_API_LEVEL >= 30000
|
||||
# ifndef OPENSSL_NO_DEPRECATED
|
||||
# define DEPRECATEDIN_3_0(f) DECLARE_DEPRECATED(f)
|
||||
# else
|
||||
# define DEPRECATEDIN_3_0(f)
|
||||
# define OPENSSL_NO_DEPRECATED_3_0
|
||||
# endif
|
||||
# else
|
||||
# define DEPRECATEDIN_4(f)
|
||||
# define OPENSSL_API_4 1
|
||||
# define DEPRECATEDIN_3_0(f) f;
|
||||
# endif
|
||||
# if OPENSSL_API_LEVEL >= 10101
|
||||
# ifndef OPENSSL_NO_DEPRECATED
|
||||
# define DEPRECATEDIN_1_1_1(f) DECLARE_DEPRECATED(f)
|
||||
# else
|
||||
# define DEPRECATEDIN_1_1_1(f)
|
||||
# define OPENSSL_NO_DEPRECATED_1_1_1
|
||||
# endif
|
||||
# else
|
||||
# define DEPRECATEDIN_1_1_1(f) f;
|
||||
# endif
|
||||
# if OPENSSL_API_LEVEL >= 10100
|
||||
# ifndef OPENSSL_NO_DEPRECATED
|
||||
# define DEPRECATEDIN_1_1_0(f) DECLARE_DEPRECATED(f)
|
||||
# else
|
||||
# define DEPRECATEDIN_1_1_0(f)
|
||||
# define OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# endif
|
||||
# else
|
||||
# define DEPRECATEDIN_1_1_0(f) f;
|
||||
# endif
|
||||
# if OPENSSL_API_LEVEL >= 10002
|
||||
# ifndef OPENSSL_NO_DEPRECATED
|
||||
# define DEPRECATEDIN_1_0_2(f) DECLARE_DEPRECATED(f)
|
||||
# else
|
||||
# define DEPRECATEDIN_1_0_2(f)
|
||||
# define OPENSSL_NO_DEPRECATED_1_0_2
|
||||
# endif
|
||||
# else
|
||||
# define DEPRECATEDIN_1_0_2(f) f;
|
||||
# endif
|
||||
# if OPENSSL_API_LEVEL >= 10001
|
||||
# ifndef OPENSSL_NO_DEPRECATED
|
||||
# define DEPRECATEDIN_1_0_1(f) DECLARE_DEPRECATED(f)
|
||||
# else
|
||||
# define DEPRECATEDIN_1_0_1(f)
|
||||
# define OPENSSL_NO_DEPRECATED_1_0_1
|
||||
# endif
|
||||
# else
|
||||
# define DEPRECATEDIN_1_0_1(f) f;
|
||||
# endif
|
||||
# if OPENSSL_API_LEVEL >= 10000
|
||||
# ifndef OPENSSL_NO_DEPRECATED
|
||||
# define DEPRECATEDIN_1_0_0(f) DECLARE_DEPRECATED(f)
|
||||
# else
|
||||
# define DEPRECATEDIN_1_0_0(f)
|
||||
# define OPENSSL_NO_DEPRECATED_1_0_0
|
||||
# endif
|
||||
# else
|
||||
# define DEPRECATEDIN_1_0_0(f) f;
|
||||
# endif
|
||||
# if OPENSSL_API_LEVEL >= 908
|
||||
# ifndef OPENSSL_NO_DEPRECATED
|
||||
# define DEPRECATEDIN_0_9_8(f) DECLARE_DEPRECATED(f)
|
||||
# else
|
||||
# define DEPRECATEDIN_0_9_8(f)
|
||||
# define OPENSSL_NO_DEPRECATED_0_9_8
|
||||
# endif
|
||||
# else
|
||||
# define DEPRECATEDIN_0_9_8(f) f;
|
||||
# endif
|
||||
|
||||
# if OPENSSL_API_LEVEL < 3
|
||||
# define DEPRECATEDIN_3(f) DECLARE_DEPRECATED(f)
|
||||
# define OPENSSL_API_3 0
|
||||
# else
|
||||
# define DEPRECATEDIN_3(f)
|
||||
# define OPENSSL_API_3 1
|
||||
# endif
|
||||
|
||||
# if OPENSSL_API_LEVEL < 2
|
||||
# define DEPRECATEDIN_1_1_0(f) DECLARE_DEPRECATED(f)
|
||||
# define OPENSSL_API_1_1_0 0
|
||||
# else
|
||||
# define DEPRECATEDIN_1_1_0(f)
|
||||
# define OPENSSL_API_1_1_0 1
|
||||
# endif
|
||||
|
||||
# if OPENSSL_API_LEVEL < 1
|
||||
# define DEPRECATEDIN_1_0_0(f) DECLARE_DEPRECATED(f)
|
||||
# define OPENSSL_API_1_0_0 0
|
||||
# else
|
||||
# define DEPRECATEDIN_1_0_0(f)
|
||||
# define OPENSSL_API_1_0_0 1
|
||||
# endif
|
||||
|
||||
# if OPENSSL_API_LEVEL < 0
|
||||
# define DEPRECATEDIN_0_9_8(f) DECLARE_DEPRECATED(f)
|
||||
# define OPENSSL_API_0_9_8 0
|
||||
# else
|
||||
# define DEPRECATEDIN_0_9_8(f)
|
||||
# define OPENSSL_API_0_9_8 1
|
||||
# endif
|
||||
/*
|
||||
* Make our own variants of __FILE__ and __LINE__, depending on configuration
|
||||
*/
|
||||
|
||||
# ifndef OPENSSL_FILE
|
||||
# ifdef OPENSSL_NO_FILENAMES
|
||||
|
||||
+19
-14
@@ -12,22 +12,25 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_MD2_H
|
||||
# endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
|
||||
# ifndef OPENSSL_NO_MD2
|
||||
# include <stddef.h>
|
||||
# ifdef __cplusplus
|
||||
# include <stddef.h>
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# define MD2_DIGEST_LENGTH 16
|
||||
|
||||
# if !defined(OPENSSL_NO_DEPRECATED_3_0)
|
||||
|
||||
typedef unsigned char MD2_INT;
|
||||
|
||||
# define MD2_DIGEST_LENGTH 16
|
||||
# define MD2_BLOCK 16
|
||||
# define MD2_BLOCK 16
|
||||
|
||||
typedef struct MD2state_st {
|
||||
unsigned int num;
|
||||
@@ -35,16 +38,18 @@ typedef struct MD2state_st {
|
||||
MD2_INT cksm[MD2_BLOCK];
|
||||
MD2_INT state[MD2_BLOCK];
|
||||
} MD2_CTX;
|
||||
# endif
|
||||
|
||||
const char *MD2_options(void);
|
||||
int MD2_Init(MD2_CTX *c);
|
||||
int MD2_Update(MD2_CTX *c, const unsigned char *data, size_t len);
|
||||
int MD2_Final(unsigned char *md, MD2_CTX *c);
|
||||
unsigned char *MD2(const unsigned char *d, size_t n, unsigned char *md);
|
||||
DEPRECATEDIN_3_0(const char *MD2_options(void))
|
||||
DEPRECATEDIN_3_0(int MD2_Init(MD2_CTX *c))
|
||||
DEPRECATEDIN_3_0(int MD2_Update(MD2_CTX *c, const unsigned char *data,
|
||||
size_t len))
|
||||
DEPRECATEDIN_3_0(int MD2_Final(unsigned char *md, MD2_CTX *c))
|
||||
DEPRECATEDIN_3_0(unsigned char *MD2(const unsigned char *d, size_t n,
|
||||
unsigned char *md))
|
||||
|
||||
# ifdef __cplusplus
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#endif
|
||||
+21
-16
@@ -12,29 +12,32 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_MD4_H
|
||||
# endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
|
||||
# ifndef OPENSSL_NO_MD4
|
||||
# include <openssl/e_os2.h>
|
||||
# include <stddef.h>
|
||||
# ifdef __cplusplus
|
||||
# include <openssl/e_os2.h>
|
||||
# include <stddef.h>
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# define MD4_DIGEST_LENGTH 16
|
||||
|
||||
# if !defined(OPENSSL_NO_DEPRECATED_3_0)
|
||||
|
||||
/*-
|
||||
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
* ! MD4_LONG has to be at least 32 bits wide. !
|
||||
* !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
|
||||
*/
|
||||
# define MD4_LONG unsigned int
|
||||
# define MD4_LONG unsigned int
|
||||
|
||||
# define MD4_CBLOCK 64
|
||||
# define MD4_LBLOCK (MD4_CBLOCK/4)
|
||||
# define MD4_DIGEST_LENGTH 16
|
||||
# define MD4_CBLOCK 64
|
||||
# define MD4_LBLOCK (MD4_CBLOCK/4)
|
||||
|
||||
typedef struct MD4state_st {
|
||||
MD4_LONG A, B, C, D;
|
||||
@@ -42,16 +45,18 @@ typedef struct MD4state_st {
|
||||
MD4_LONG data[MD4_LBLOCK];
|
||||
unsigned int num;
|
||||
} MD4_CTX;
|
||||
# endif
|
||||
|
||||
int MD4_Init(MD4_CTX *c);
|
||||
int MD4_Update(MD4_CTX *c, const void *data, size_t len);
|
||||
int MD4_Final(unsigned char *md, MD4_CTX *c);
|
||||
unsigned char *MD4(const unsigned char *d, size_t n, unsigned char *md);
|
||||
void MD4_Transform(MD4_CTX *c, const unsigned char *b);
|
||||
DEPRECATEDIN_3_0(int MD4_Init(MD4_CTX *c))
|
||||
DEPRECATEDIN_3_0(int MD4_Update(MD4_CTX *c, const void *data, size_t len))
|
||||
DEPRECATEDIN_3_0(int MD4_Final(unsigned char *md, MD4_CTX *c))
|
||||
DEPRECATEDIN_3_0(unsigned char *MD4(const unsigned char *d, size_t n,
|
||||
unsigned char *md))
|
||||
DEPRECATEDIN_3_0(void MD4_Transform(MD4_CTX *c, const unsigned char *b))
|
||||
|
||||
# ifdef __cplusplus
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#endif
|
||||
@@ -12,7 +12,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_MD5_H
|
||||
# endif
|
||||
|
||||
|
||||
+20
-14
@@ -12,21 +12,24 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_MDC2_H
|
||||
# endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
|
||||
#ifndef OPENSSL_NO_MDC2
|
||||
# include <stdlib.h>
|
||||
# include <openssl/des.h>
|
||||
# ifdef __cplusplus
|
||||
# ifndef OPENSSL_NO_MDC2
|
||||
# include <stdlib.h>
|
||||
# include <openssl/des.h>
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# define MDC2_BLOCK 8
|
||||
# define MDC2_DIGEST_LENGTH 16
|
||||
# define MDC2_DIGEST_LENGTH 16
|
||||
|
||||
# if !defined(OPENSSL_NO_DEPRECATED_3_0)
|
||||
|
||||
# define MDC2_BLOCK 8
|
||||
|
||||
typedef struct mdc2_ctx_st {
|
||||
unsigned int num;
|
||||
@@ -34,15 +37,18 @@ typedef struct mdc2_ctx_st {
|
||||
DES_cblock h, hh;
|
||||
unsigned int pad_type; /* either 1 or 2, default 1 */
|
||||
} MDC2_CTX;
|
||||
# endif
|
||||
|
||||
int MDC2_Init(MDC2_CTX *c);
|
||||
int MDC2_Update(MDC2_CTX *c, const unsigned char *data, size_t len);
|
||||
int MDC2_Final(unsigned char *md, MDC2_CTX *c);
|
||||
unsigned char *MDC2(const unsigned char *d, size_t n, unsigned char *md);
|
||||
DEPRECATEDIN_3_0(int MDC2_Init(MDC2_CTX *c))
|
||||
DEPRECATEDIN_3_0(int MDC2_Update(MDC2_CTX *c, const unsigned char *data,
|
||||
size_t len))
|
||||
DEPRECATEDIN_3_0(int MDC2_Final(unsigned char *md, MDC2_CTX *c))
|
||||
DEPRECATEDIN_3_0(unsigned char *MDC2(const unsigned char *d, size_t n,
|
||||
unsigned char *md))
|
||||
|
||||
# ifdef __cplusplus
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#endif
|
||||
@@ -12,7 +12,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_MODES_H
|
||||
# endif
|
||||
|
||||
@@ -29,6 +29,10 @@ typedef void (*cbc128_f) (const unsigned char *in, unsigned char *out,
|
||||
size_t len, const void *key,
|
||||
unsigned char ivec[16], int enc);
|
||||
|
||||
typedef void (*ecb128_f) (const unsigned char *in, unsigned char *out,
|
||||
size_t len, const void *key,
|
||||
int enc);
|
||||
|
||||
typedef void (*ctr128_f) (const unsigned char *in, unsigned char *out,
|
||||
size_t blocks, const void *key,
|
||||
const unsigned char ivec[16]);
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* WARNING: do not edit!
|
||||
* Generated by crypto/objects/objects.pl
|
||||
*
|
||||
* Copyright 2000-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 2000-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
|
||||
@@ -1866,6 +1866,11 @@
|
||||
#define NID_SRVName 1210
|
||||
#define OBJ_SRVName OBJ_id_on,7L
|
||||
|
||||
#define SN_NAIRealm "id-on-NAIRealm"
|
||||
#define LN_NAIRealm "NAIRealm"
|
||||
#define NID_NAIRealm 1211
|
||||
#define OBJ_NAIRealm OBJ_id_on,8L
|
||||
|
||||
#define SN_id_on_SmtpUTF8Mailbox "id-on-SmtpUTF8Mailbox"
|
||||
#define LN_id_on_SmtpUTF8Mailbox "Smtp UTF8 Mailbox"
|
||||
#define NID_id_on_SmtpUTF8Mailbox 1208
|
||||
@@ -4854,7 +4859,7 @@
|
||||
|
||||
#define SN_chacha20_poly1305_draft "ChaCha20-Poly1305-D"
|
||||
#define LN_chacha20_poly1305_draft "chacha20-poly1305-draft"
|
||||
#define NID_chacha20_poly1305_draft 1211
|
||||
#define NID_chacha20_poly1305_draft 1212
|
||||
|
||||
#define SN_chacha20 "ChaCha20"
|
||||
#define LN_chacha20 "chacha20"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
* WARNING: do not edit!
|
||||
* Generated by crypto/objects/objects.pl
|
||||
*
|
||||
* Copyright 2000-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
* Copyright 2000-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
|
||||
@@ -1866,6 +1866,11 @@
|
||||
#define NID_SRVName 1210
|
||||
#define OBJ_SRVName OBJ_id_on,7L
|
||||
|
||||
#define SN_NAIRealm "id-on-NAIRealm"
|
||||
#define LN_NAIRealm "NAIRealm"
|
||||
#define NID_NAIRealm 1211
|
||||
#define OBJ_NAIRealm OBJ_id_on,8L
|
||||
|
||||
#define SN_id_on_SmtpUTF8Mailbox "id-on-SmtpUTF8Mailbox"
|
||||
#define LN_id_on_SmtpUTF8Mailbox "Smtp UTF8 Mailbox"
|
||||
#define NID_id_on_SmtpUTF8Mailbox 1208
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_OBJECTS_H
|
||||
# endif
|
||||
|
||||
@@ -163,7 +163,7 @@ const void *OBJ_bsearch_ex_(const void *key, const void *base, int num,
|
||||
int OBJ_new_nid(int num);
|
||||
int OBJ_add_object(const ASN1_OBJECT *obj);
|
||||
int OBJ_create(const char *oid, const char *sn, const char *ln);
|
||||
#if !OPENSSL_API_1_1_0
|
||||
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# define OBJ_cleanup() while(0) continue
|
||||
#endif
|
||||
int OBJ_create_objects(BIO *in);
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_OBJERR_H
|
||||
# endif
|
||||
|
||||
@@ -29,7 +29,7 @@ int ERR_load_OBJ_strings(void);
|
||||
/*
|
||||
* OBJ function codes.
|
||||
*/
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define OBJ_F_OBJ_ADD_OBJECT 0
|
||||
# define OBJ_F_OBJ_ADD_SIGID 0
|
||||
# define OBJ_F_OBJ_CREATE 0
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_OCSP_H
|
||||
# endif
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_OCSPERR_H
|
||||
# endif
|
||||
|
||||
@@ -33,7 +33,7 @@ int ERR_load_OCSP_strings(void);
|
||||
/*
|
||||
* OCSP function codes.
|
||||
*/
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define OCSP_F_D2I_OCSP_NONCE 0
|
||||
# define OCSP_F_OCSP_BASIC_ADD1_STATUS 0
|
||||
# define OCSP_F_OCSP_BASIC_SIGN 0
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
/*
|
||||
* {- join("\n * ", @autowarntext) -}
|
||||
*
|
||||
* Copyright 1999-2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the Apache License 2.0 (the "License"). You may not use
|
||||
@@ -11,11 +13,6 @@
|
||||
# define OPENSSL_OPENSSLV_H
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# define HEADER_OPENSSLV_H
|
||||
# endif
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
@@ -29,46 +26,29 @@ extern "C" {
|
||||
*
|
||||
* These macros express version number MAJOR.MINOR.PATCH exactly
|
||||
*/
|
||||
# define OPENSSL_VERSION_MAJOR 3
|
||||
# define OPENSSL_VERSION_MINOR 0
|
||||
# define OPENSSL_VERSION_PATCH 0
|
||||
# define OPENSSL_VERSION_MAJOR {- $config{major} -}
|
||||
# define OPENSSL_VERSION_MINOR {- $config{minor} -}
|
||||
# define OPENSSL_VERSION_PATCH {- $config{patch} -}
|
||||
|
||||
/*
|
||||
* Additional version information, defined only when used.
|
||||
* Additional version information
|
||||
*
|
||||
* These are also part of the new version scheme, but aren't part
|
||||
* of the version number itself.
|
||||
*/
|
||||
|
||||
/* Could be: #define OPENSSL_VERSION_PRE_RELEASE "-alpha.1" */
|
||||
# define OPENSSL_VERSION_PRE_RELEASE "-dev"
|
||||
# define OPENSSL_VERSION_PRE_RELEASE "{- $config{prerelease} -}"
|
||||
/* Could be: #define OPENSSL_VERSION_BUILD_METADATA "+fips" */
|
||||
/* Could be: #define OPENSSL_VERSION_BUILD_METADATA "+vendor.1" */
|
||||
# undef OPENSSL_VERSION_BUILD_METADATA
|
||||
# define OPENSSL_VERSION_BUILD_METADATA "{- $config{build_metadata} -}"
|
||||
|
||||
/*
|
||||
* Note: OPENSSL_VERSION_BUILD_METADATA will never be defined by
|
||||
* the OpenSSL Project, it's entirely reserved for others vendors
|
||||
* Note: The OpenSSL Project will never define OPENSSL_VERSION_BUILD_METADATA
|
||||
* to be anything but the empty string. Its use is entirely reserved for
|
||||
* others
|
||||
*/
|
||||
|
||||
/*
|
||||
* Absolute string versions of OPENSSL_VERSION_PRE_RELEASE and
|
||||
* OPENSSL_VERSION_BUILD_METADATA. As opposed to those, which
|
||||
* may be undefined, these are guaranteed to have strings as
|
||||
* values.
|
||||
*/
|
||||
|
||||
# ifdef OPENSSL_VERSION_PRE_RELEASE
|
||||
# define OPENSSL_VERSION_PRE_RELEASE_STR OPENSSL_VERSION_PRE_RELEASE
|
||||
# else
|
||||
# define OPENSSL_VERSION_PRE_RELEASE_STR ""
|
||||
# endif
|
||||
# ifdef OPENSSL_VERSION_BUILD_METADATA
|
||||
# define OPENSSL_VERSION_BUILD_METADATA_STR OPENSSL_VERSION_BUILD_METADATA
|
||||
# else
|
||||
# define OPENSSL_VERSION_BUILD_METADATA_STR ""
|
||||
# endif
|
||||
|
||||
/*
|
||||
* Shared library version
|
||||
*
|
||||
@@ -76,31 +56,16 @@ extern "C" {
|
||||
* be related to the API version expressed with the macros above.
|
||||
* This is defined in free form.
|
||||
*/
|
||||
# define OPENSSL_SHLIB_VERSION 3
|
||||
# define OPENSSL_SHLIB_VERSION {- $config{shlib_version} -}
|
||||
|
||||
/*
|
||||
* SECTION 2: USEFUL MACROS AND FUNCTIONS
|
||||
* SECTION 2: USEFUL MACROS
|
||||
*/
|
||||
|
||||
/* For checking general API compatibility when preprocessing */
|
||||
# define OPENSSL_VERSION_PREREQ(maj,min) \
|
||||
((OPENSSL_VERSION_MAJOR << 16) + OPENSSL_VERSION_MINOR >= ((maj) << 16) + (min))
|
||||
|
||||
/* Helper macros for CPP string composition */
|
||||
# define OPENSSL_MSTR_HELPER(x) #x
|
||||
# define OPENSSL_MSTR(x) OPENSSL_MSTR_HELPER(x)
|
||||
|
||||
/*
|
||||
* These return the values of OPENSSL_VERSION_MAJOR, OPENSSL_VERSION_MINOR,
|
||||
* OPENSSL_VERSION_PATCH, OPENSSL_VERSION_PRE_RELEASE and
|
||||
* OPENSSL_VERSION_BUILD_METADATA, respectively.
|
||||
*/
|
||||
unsigned int OPENSSL_version_major(void);
|
||||
unsigned int OPENSSL_version_minor(void);
|
||||
unsigned int OPENSSL_version_patch(void);
|
||||
const char *OPENSSL_version_pre_release(void);
|
||||
const char *OPENSSL_version_build_metadata(void);
|
||||
|
||||
/*
|
||||
* Macros to get the version in easily digested string form, both the short
|
||||
* "MAJOR.MINOR.PATCH" variant (where MAJOR, MINOR and PATCH are replaced
|
||||
@@ -108,25 +73,22 @@ const char *OPENSSL_version_build_metadata(void);
|
||||
* longer variant with OPENSSL_VERSION_PRE_RELEASE_STR and
|
||||
* OPENSSL_VERSION_BUILD_METADATA_STR appended.
|
||||
*/
|
||||
# define OPENSSL_VERSION_STR \
|
||||
OPENSSL_MSTR(OPENSSL_VERSION_MAJOR) "." \
|
||||
OPENSSL_MSTR(OPENSSL_VERSION_MINOR) "." \
|
||||
OPENSSL_MSTR(OPENSSL_VERSION_PATCH)
|
||||
# define OPENSSL_FULL_VERSION_STR \
|
||||
OPENSSL_VERSION_STR \
|
||||
OPENSSL_VERSION_PRE_RELEASE_STR \
|
||||
OPENSSL_VERSION_BUILD_METADATA_STR
|
||||
# define OPENSSL_VERSION_STR "{- $config{version} -}"
|
||||
# define OPENSSL_FULL_VERSION_STR "{- $config{full_version} -}"
|
||||
|
||||
/*
|
||||
* SECTION 3: ADDITIONAL METADATA
|
||||
*
|
||||
* These strings are defined separately to allow them to be parsable.
|
||||
*/
|
||||
# define OPENSSL_RELEASE_DATE "xx XXX xxxx"
|
||||
# define OPENSSL_VERSION_TEXT \
|
||||
"OpenSSL " OPENSSL_FULL_VERSION_STR " " OPENSSL_RELEASE_DATE
|
||||
# define OPENSSL_RELEASE_DATE "{- $config{release_date} -}"
|
||||
|
||||
/*
|
||||
* SECTION 4: BACKWARD COMPATIBILITY
|
||||
*/
|
||||
|
||||
# define OPENSSL_VERSION_TEXT "OpenSSL {- "$config{full_version} $config{release_date}" -}"
|
||||
|
||||
/* Synthesize OPENSSL_VERSION_NUMBER with the layout 0xMNN00PPSL */
|
||||
# ifdef OPENSSL_VERSION_PRE_RELEASE
|
||||
# define _OPENSSL_VERSION_PRE_RELEASE 0x0
|
||||
@@ -142,4 +104,10 @@ const char *OPENSSL_version_build_metadata(void);
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_OPENSSLV_H
|
||||
# endif
|
||||
|
||||
#endif /* OPENSSL_OPENSSLV_H */
|
||||
+140
-113
@@ -12,7 +12,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_PEM_H
|
||||
# endif
|
||||
|
||||
@@ -66,98 +66,110 @@ extern "C" {
|
||||
* IMPLEMENT_PEM_rw_cb(...)
|
||||
*/
|
||||
|
||||
# define PEM_write_fnsig(name, type, OUTTYPE, writename) \
|
||||
int PEM_##writename##_##name(OUTTYPE *out, const type *x)
|
||||
# define PEM_write_cb_fnsig(name, type, OUTTYPE, writename) \
|
||||
int PEM_##writename##_##name(OUTTYPE *out, const type *x, \
|
||||
const EVP_CIPHER *enc, \
|
||||
const unsigned char *kstr, int klen, \
|
||||
pem_password_cb *cb, void *u)
|
||||
|
||||
# ifdef OPENSSL_NO_STDIO
|
||||
|
||||
# define IMPLEMENT_PEM_read_fp(name, type, str, asn1) /**/
|
||||
# define IMPLEMENT_PEM_write_fp(name, type, str, asn1) /**/
|
||||
# define IMPLEMENT_PEM_write_fp_const(name, type, str, asn1) /**/
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define IMPLEMENT_PEM_write_fp_const(name, type, str, asn1) /**/
|
||||
# endif
|
||||
# define IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1) /**/
|
||||
# define IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1) /**/
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1) /**/
|
||||
# endif
|
||||
# else
|
||||
|
||||
# define IMPLEMENT_PEM_read_fp(name, type, str, asn1) \
|
||||
type *PEM_read_##name(FILE *fp, type **x, pem_password_cb *cb, void *u)\
|
||||
{ \
|
||||
return PEM_ASN1_read((d2i_of_void *)d2i_##asn1, str,fp,(void **)x,cb,u); \
|
||||
}
|
||||
# define IMPLEMENT_PEM_read_fp(name, type, str, asn1) \
|
||||
type *PEM_read_##name(FILE *fp, type **x, pem_password_cb *cb, void *u) \
|
||||
{ \
|
||||
return PEM_ASN1_read((d2i_of_void *)d2i_##asn1, str, fp, \
|
||||
(void **)x, cb, u); \
|
||||
}
|
||||
|
||||
# define IMPLEMENT_PEM_write_fp(name, type, str, asn1) \
|
||||
int PEM_write_##name(FILE *fp, type *x) \
|
||||
{ \
|
||||
return PEM_ASN1_write((i2d_of_void *)i2d_##asn1,str,fp,x,NULL,NULL,0,NULL,NULL); \
|
||||
}
|
||||
# define IMPLEMENT_PEM_write_fp(name, type, str, asn1) \
|
||||
PEM_write_fnsig(name, type, FILE, write) \
|
||||
{ \
|
||||
return PEM_ASN1_write((i2d_of_void *)i2d_##asn1, str, out, \
|
||||
x, NULL, NULL, 0, NULL, NULL); \
|
||||
}
|
||||
|
||||
# define IMPLEMENT_PEM_write_fp_const(name, type, str, asn1) \
|
||||
int PEM_write_##name(FILE *fp, const type *x) \
|
||||
{ \
|
||||
return PEM_ASN1_write((i2d_of_void *)i2d_##asn1,str,fp,(void *)x,NULL,NULL,0,NULL,NULL); \
|
||||
}
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define IMPLEMENT_PEM_write_fp_const(name, type, str, asn1) \
|
||||
IMPLEMENT_PEM_write_fp(name, type, str, asn1)
|
||||
# endif
|
||||
|
||||
# define IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1) \
|
||||
int PEM_write_##name(FILE *fp, type *x, const EVP_CIPHER *enc, \
|
||||
unsigned char *kstr, int klen, pem_password_cb *cb, \
|
||||
void *u) \
|
||||
{ \
|
||||
return PEM_ASN1_write((i2d_of_void *)i2d_##asn1,str,fp,x,enc,kstr,klen,cb,u); \
|
||||
}
|
||||
|
||||
# define IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1) \
|
||||
int PEM_write_##name(FILE *fp, type *x, const EVP_CIPHER *enc, \
|
||||
unsigned char *kstr, int klen, pem_password_cb *cb, \
|
||||
void *u) \
|
||||
{ \
|
||||
return PEM_ASN1_write((i2d_of_void *)i2d_##asn1,str,fp,x,enc,kstr,klen,cb,u); \
|
||||
}
|
||||
# define IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1) \
|
||||
PEM_write_cb_fnsig(name, type, FILE, write) \
|
||||
{ \
|
||||
return PEM_ASN1_write((i2d_of_void *)i2d_##asn1, str, out, \
|
||||
x, enc, kstr, klen, cb, u); \
|
||||
}
|
||||
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1) \
|
||||
IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1)
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# define IMPLEMENT_PEM_read_bio(name, type, str, asn1) \
|
||||
type *PEM_read_bio_##name(BIO *bp, type **x, pem_password_cb *cb, void *u)\
|
||||
{ \
|
||||
return PEM_ASN1_read_bio((d2i_of_void *)d2i_##asn1, str,bp,(void **)x,cb,u); \
|
||||
}
|
||||
# define IMPLEMENT_PEM_read_bio(name, type, str, asn1) \
|
||||
type *PEM_read_bio_##name(BIO *bp, type **x, \
|
||||
pem_password_cb *cb, void *u) \
|
||||
{ \
|
||||
return PEM_ASN1_read_bio((d2i_of_void *)d2i_##asn1, str, bp, \
|
||||
(void **)x, cb, u); \
|
||||
}
|
||||
|
||||
# define IMPLEMENT_PEM_write_bio(name, type, str, asn1) \
|
||||
int PEM_write_bio_##name(BIO *bp, type *x) \
|
||||
{ \
|
||||
return PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1,str,bp,x,NULL,NULL,0,NULL,NULL); \
|
||||
}
|
||||
# define IMPLEMENT_PEM_write_bio(name, type, str, asn1) \
|
||||
PEM_write_fnsig(name, type, BIO, write_bio) \
|
||||
{ \
|
||||
return PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1, str, out, \
|
||||
x, NULL,NULL,0,NULL,NULL); \
|
||||
}
|
||||
|
||||
# define IMPLEMENT_PEM_write_bio_const(name, type, str, asn1) \
|
||||
int PEM_write_bio_##name(BIO *bp, const type *x) \
|
||||
{ \
|
||||
return PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1,str,bp,(void *)x,NULL,NULL,0,NULL,NULL); \
|
||||
}
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define IMPLEMENT_PEM_write_bio_const(name, type, str, asn1) \
|
||||
IMPLEMENT_PEM_write_bio(name, type, str, asn1)
|
||||
# endif
|
||||
|
||||
# define IMPLEMENT_PEM_write_cb_bio(name, type, str, asn1) \
|
||||
int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \
|
||||
unsigned char *kstr, int klen, pem_password_cb *cb, void *u) \
|
||||
{ \
|
||||
return PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1,str,bp,x,enc,kstr,klen,cb,u); \
|
||||
}
|
||||
# define IMPLEMENT_PEM_write_cb_bio(name, type, str, asn1) \
|
||||
PEM_write_cb_fnsig(name, type, BIO, write_bio) \
|
||||
{ \
|
||||
return PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1, str, out, \
|
||||
x, enc, kstr, klen, cb, u); \
|
||||
}
|
||||
|
||||
# define IMPLEMENT_PEM_write_cb_bio_const(name, type, str, asn1) \
|
||||
int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \
|
||||
unsigned char *kstr, int klen, pem_password_cb *cb, void *u) \
|
||||
{ \
|
||||
return PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1,str,bp,(void *)x,enc,kstr,klen,cb,u); \
|
||||
}
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define IMPLEMENT_PEM_write_cb_bio_const(name, type, str, asn1) \
|
||||
IMPLEMENT_PEM_write_cb_bio(name, type, str, asn1)
|
||||
# endif
|
||||
|
||||
# define IMPLEMENT_PEM_write(name, type, str, asn1) \
|
||||
IMPLEMENT_PEM_write_bio(name, type, str, asn1) \
|
||||
IMPLEMENT_PEM_write_fp(name, type, str, asn1)
|
||||
|
||||
# define IMPLEMENT_PEM_write_const(name, type, str, asn1) \
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define IMPLEMENT_PEM_write_const(name, type, str, asn1) \
|
||||
IMPLEMENT_PEM_write_bio_const(name, type, str, asn1) \
|
||||
IMPLEMENT_PEM_write_fp_const(name, type, str, asn1)
|
||||
# endif
|
||||
|
||||
# define IMPLEMENT_PEM_write_cb(name, type, str, asn1) \
|
||||
IMPLEMENT_PEM_write_cb_bio(name, type, str, asn1) \
|
||||
IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1)
|
||||
|
||||
# define IMPLEMENT_PEM_write_cb_const(name, type, str, asn1) \
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define IMPLEMENT_PEM_write_cb_const(name, type, str, asn1) \
|
||||
IMPLEMENT_PEM_write_cb_bio_const(name, type, str, asn1) \
|
||||
IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1)
|
||||
# endif
|
||||
|
||||
# define IMPLEMENT_PEM_read(name, type, str, asn1) \
|
||||
IMPLEMENT_PEM_read_bio(name, type, str, asn1) \
|
||||
@@ -167,9 +179,11 @@ int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \
|
||||
IMPLEMENT_PEM_read(name, type, str, asn1) \
|
||||
IMPLEMENT_PEM_write(name, type, str, asn1)
|
||||
|
||||
# define IMPLEMENT_PEM_rw_const(name, type, str, asn1) \
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define IMPLEMENT_PEM_rw_const(name, type, str, asn1) \
|
||||
IMPLEMENT_PEM_read(name, type, str, asn1) \
|
||||
IMPLEMENT_PEM_write_const(name, type, str, asn1)
|
||||
# endif
|
||||
|
||||
# define IMPLEMENT_PEM_rw_cb(name, type, str, asn1) \
|
||||
IMPLEMENT_PEM_read(name, type, str, asn1) \
|
||||
@@ -181,44 +195,51 @@ int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \
|
||||
|
||||
# define DECLARE_PEM_read_fp(name, type) /**/
|
||||
# define DECLARE_PEM_write_fp(name, type) /**/
|
||||
# define DECLARE_PEM_write_fp_const(name, type) /**/
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define DECLARE_PEM_write_fp_const(name, type) /**/
|
||||
# endif
|
||||
# define DECLARE_PEM_write_cb_fp(name, type) /**/
|
||||
# else
|
||||
|
||||
# define DECLARE_PEM_read_fp(name, type) \
|
||||
type *PEM_read_##name(FILE *fp, type **x, pem_password_cb *cb, void *u);
|
||||
# define DECLARE_PEM_read_fp(name, type) \
|
||||
type *PEM_read_##name(FILE *fp, type **x, pem_password_cb *cb, void *u);
|
||||
|
||||
# define DECLARE_PEM_write_fp(name, type) \
|
||||
int PEM_write_##name(FILE *fp, type *x);
|
||||
# define DECLARE_PEM_write_fp(name, type) \
|
||||
PEM_write_fnsig(name, type, FILE, write);
|
||||
|
||||
# define DECLARE_PEM_write_fp_const(name, type) \
|
||||
int PEM_write_##name(FILE *fp, const type *x);
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define DECLARE_PEM_write_fp_const(name, type) \
|
||||
PEM_write_fnsig(name, type, FILE, write);
|
||||
# endif
|
||||
|
||||
# define DECLARE_PEM_write_cb_fp(name, type) \
|
||||
int PEM_write_##name(FILE *fp, type *x, const EVP_CIPHER *enc, \
|
||||
unsigned char *kstr, int klen, pem_password_cb *cb, void *u);
|
||||
# define DECLARE_PEM_write_cb_fp(name, type) \
|
||||
PEM_write_cb_fnsig(name, type, FILE, write);
|
||||
|
||||
# endif
|
||||
|
||||
# define DECLARE_PEM_read_bio(name, type) \
|
||||
type *PEM_read_bio_##name(BIO *bp, type **x, pem_password_cb *cb, void *u);
|
||||
# define DECLARE_PEM_read_bio(name, type) \
|
||||
type *PEM_read_bio_##name(BIO *bp, type **x, \
|
||||
pem_password_cb *cb, void *u);
|
||||
|
||||
# define DECLARE_PEM_write_bio(name, type) \
|
||||
int PEM_write_bio_##name(BIO *bp, type *x);
|
||||
# define DECLARE_PEM_write_bio(name, type) \
|
||||
PEM_write_fnsig(name, type, BIO, write_bio);
|
||||
|
||||
# define DECLARE_PEM_write_bio_const(name, type) \
|
||||
int PEM_write_bio_##name(BIO *bp, const type *x);
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define DECLARE_PEM_write_bio_const(name, type) \
|
||||
PEM_write_fnsig(name, type, BIO, write_bio);
|
||||
# endif
|
||||
|
||||
# define DECLARE_PEM_write_cb_bio(name, type) \
|
||||
int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \
|
||||
unsigned char *kstr, int klen, pem_password_cb *cb, void *u);
|
||||
# define DECLARE_PEM_write_cb_bio(name, type) \
|
||||
PEM_write_cb_fnsig(name, type, BIO, write_bio);
|
||||
|
||||
# define DECLARE_PEM_write(name, type) \
|
||||
DECLARE_PEM_write_bio(name, type) \
|
||||
DECLARE_PEM_write_fp(name, type)
|
||||
# define DECLARE_PEM_write_const(name, type) \
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define DECLARE_PEM_write_const(name, type) \
|
||||
DECLARE_PEM_write_bio_const(name, type) \
|
||||
DECLARE_PEM_write_fp_const(name, type)
|
||||
# endif
|
||||
# define DECLARE_PEM_write_cb(name, type) \
|
||||
DECLARE_PEM_write_cb_bio(name, type) \
|
||||
DECLARE_PEM_write_cb_fp(name, type)
|
||||
@@ -228,13 +249,14 @@ int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \
|
||||
# define DECLARE_PEM_rw(name, type) \
|
||||
DECLARE_PEM_read(name, type) \
|
||||
DECLARE_PEM_write(name, type)
|
||||
# define DECLARE_PEM_rw_const(name, type) \
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define DECLARE_PEM_rw_const(name, type) \
|
||||
DECLARE_PEM_read(name, type) \
|
||||
DECLARE_PEM_write_const(name, type)
|
||||
# endif
|
||||
# define DECLARE_PEM_rw_cb(name, type) \
|
||||
DECLARE_PEM_read(name, type) \
|
||||
DECLARE_PEM_write_cb(name, type)
|
||||
typedef int pem_password_cb (char *buf, int size, int rwflag, void *userdata);
|
||||
|
||||
int PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher);
|
||||
int PEM_do_header(EVP_CIPHER_INFO *cipher, unsigned char *data, long *len,
|
||||
@@ -257,14 +279,15 @@ int PEM_bytes_read_bio(unsigned char **pdata, long *plen, char **pnm,
|
||||
void *u);
|
||||
void *PEM_ASN1_read_bio(d2i_of_void *d2i, const char *name, BIO *bp, void **x,
|
||||
pem_password_cb *cb, void *u);
|
||||
int PEM_ASN1_write_bio(i2d_of_void *i2d, const char *name, BIO *bp, void *x,
|
||||
const EVP_CIPHER *enc, unsigned char *kstr, int klen,
|
||||
int PEM_ASN1_write_bio(i2d_of_void *i2d, const char *name, BIO *bp,
|
||||
const void *x, const EVP_CIPHER *enc,
|
||||
const unsigned char *kstr, int klen,
|
||||
pem_password_cb *cb, void *u);
|
||||
|
||||
STACK_OF(X509_INFO) *PEM_X509_INFO_read_bio(BIO *bp, STACK_OF(X509_INFO) *sk,
|
||||
pem_password_cb *cb, void *u);
|
||||
int PEM_X509_INFO_write_bio(BIO *bp, X509_INFO *xi, EVP_CIPHER *enc,
|
||||
unsigned char *kstr, int klen,
|
||||
int PEM_X509_INFO_write_bio(BIO *bp, const X509_INFO *xi, EVP_CIPHER *enc,
|
||||
const unsigned char *kstr, int klen,
|
||||
pem_password_cb *cd, void *u);
|
||||
|
||||
#ifndef OPENSSL_NO_STDIO
|
||||
@@ -275,21 +298,22 @@ int PEM_write(FILE *fp, const char *name, const char *hdr,
|
||||
void *PEM_ASN1_read(d2i_of_void *d2i, const char *name, FILE *fp, void **x,
|
||||
pem_password_cb *cb, void *u);
|
||||
int PEM_ASN1_write(i2d_of_void *i2d, const char *name, FILE *fp,
|
||||
void *x, const EVP_CIPHER *enc, unsigned char *kstr,
|
||||
int klen, pem_password_cb *callback, void *u);
|
||||
const void *x, const EVP_CIPHER *enc,
|
||||
const unsigned char *kstr, int klen,
|
||||
pem_password_cb *callback, void *u);
|
||||
STACK_OF(X509_INFO) *PEM_X509_INFO_read(FILE *fp, STACK_OF(X509_INFO) *sk,
|
||||
pem_password_cb *cb, void *u);
|
||||
#endif
|
||||
|
||||
int PEM_SignInit(EVP_MD_CTX *ctx, EVP_MD *type);
|
||||
int PEM_SignUpdate(EVP_MD_CTX *ctx, unsigned char *d, unsigned int cnt);
|
||||
int PEM_SignUpdate(EVP_MD_CTX *ctx, const unsigned char *d, unsigned int cnt);
|
||||
int PEM_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret,
|
||||
unsigned int *siglen, EVP_PKEY *pkey);
|
||||
|
||||
/* The default pem_password_cb that's used internally */
|
||||
int PEM_def_callback(char *buf, int num, int rwflag, void *userdata);
|
||||
void PEM_proc_type(char *buf, int type);
|
||||
void PEM_dek_info(char *buf, const char *type, int len, char *str);
|
||||
void PEM_dek_info(char *buf, const char *type, int len, const char *str);
|
||||
|
||||
# include <openssl/symhacks.h>
|
||||
|
||||
@@ -298,82 +322,85 @@ DECLARE_PEM_rw(X509_AUX, X509)
|
||||
DECLARE_PEM_rw(X509_REQ, X509_REQ)
|
||||
DECLARE_PEM_write(X509_REQ_NEW, X509_REQ)
|
||||
DECLARE_PEM_rw(X509_CRL, X509_CRL)
|
||||
DECLARE_PEM_rw(X509_PUBKEY, X509_PUBKEY)
|
||||
DECLARE_PEM_rw(PKCS7, PKCS7)
|
||||
DECLARE_PEM_rw(NETSCAPE_CERT_SEQUENCE, NETSCAPE_CERT_SEQUENCE)
|
||||
DECLARE_PEM_rw(PKCS8, X509_SIG)
|
||||
DECLARE_PEM_rw(PKCS8_PRIV_KEY_INFO, PKCS8_PRIV_KEY_INFO)
|
||||
# ifndef OPENSSL_NO_RSA
|
||||
DECLARE_PEM_rw_cb(RSAPrivateKey, RSA)
|
||||
DECLARE_PEM_rw_const(RSAPublicKey, RSA)
|
||||
DECLARE_PEM_rw(RSAPublicKey, RSA)
|
||||
DECLARE_PEM_rw(RSA_PUBKEY, RSA)
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_DSA
|
||||
DECLARE_PEM_rw_cb(DSAPrivateKey, DSA)
|
||||
DECLARE_PEM_rw(DSA_PUBKEY, DSA)
|
||||
DECLARE_PEM_rw_const(DSAparams, DSA)
|
||||
DECLARE_PEM_rw(DSAparams, DSA)
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_EC
|
||||
DECLARE_PEM_rw_const(ECPKParameters, EC_GROUP)
|
||||
DECLARE_PEM_rw(ECPKParameters, EC_GROUP)
|
||||
DECLARE_PEM_rw_cb(ECPrivateKey, EC_KEY)
|
||||
DECLARE_PEM_rw(EC_PUBKEY, EC_KEY)
|
||||
# endif
|
||||
# ifndef OPENSSL_NO_DH
|
||||
DECLARE_PEM_rw_const(DHparams, DH)
|
||||
DECLARE_PEM_write_const(DHxparams, DH)
|
||||
DECLARE_PEM_rw(DHparams, DH)
|
||||
DECLARE_PEM_write(DHxparams, DH)
|
||||
# endif
|
||||
DECLARE_PEM_rw_cb(PrivateKey, EVP_PKEY)
|
||||
DECLARE_PEM_rw(PUBKEY, EVP_PKEY)
|
||||
|
||||
int PEM_write_bio_PrivateKey_traditional(BIO *bp, EVP_PKEY *x,
|
||||
int PEM_write_bio_PrivateKey_traditional(BIO *bp, const EVP_PKEY *x,
|
||||
const EVP_CIPHER *enc,
|
||||
unsigned char *kstr, int klen,
|
||||
const unsigned char *kstr, int klen,
|
||||
pem_password_cb *cb, void *u);
|
||||
|
||||
/* Why do these take a signed char *kstr? */
|
||||
int PEM_write_bio_PKCS8PrivateKey_nid(BIO *bp, const EVP_PKEY *x, int nid,
|
||||
char *kstr, int klen,
|
||||
const char *kstr, int klen,
|
||||
pem_password_cb *cb, void *u);
|
||||
int PEM_write_bio_PKCS8PrivateKey(BIO *, const EVP_PKEY *, const EVP_CIPHER *,
|
||||
char *, int, pem_password_cb *, void *);
|
||||
const char *kstr, int klen,
|
||||
pem_password_cb *cb, void *u);
|
||||
int i2d_PKCS8PrivateKey_bio(BIO *bp, const EVP_PKEY *x, const EVP_CIPHER *enc,
|
||||
char *kstr, int klen,
|
||||
const char *kstr, int klen,
|
||||
pem_password_cb *cb, void *u);
|
||||
int i2d_PKCS8PrivateKey_nid_bio(BIO *bp, const EVP_PKEY *x, int nid,
|
||||
char *kstr, int klen,
|
||||
const char *kstr, int klen,
|
||||
pem_password_cb *cb, void *u);
|
||||
EVP_PKEY *d2i_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY **x, pem_password_cb *cb,
|
||||
void *u);
|
||||
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
int i2d_PKCS8PrivateKey_fp(FILE *fp, const EVP_PKEY *x, const EVP_CIPHER *enc,
|
||||
char *kstr, int klen,
|
||||
const char *kstr, int klen,
|
||||
pem_password_cb *cb, void *u);
|
||||
int i2d_PKCS8PrivateKey_nid_fp(FILE *fp, const EVP_PKEY *x, int nid,
|
||||
char *kstr, int klen,
|
||||
const char *kstr, int klen,
|
||||
pem_password_cb *cb, void *u);
|
||||
int PEM_write_PKCS8PrivateKey_nid(FILE *fp, const EVP_PKEY *x, int nid,
|
||||
char *kstr, int klen,
|
||||
const char *kstr, int klen,
|
||||
pem_password_cb *cb, void *u);
|
||||
|
||||
EVP_PKEY *d2i_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY **x, pem_password_cb *cb,
|
||||
void *u);
|
||||
|
||||
int PEM_write_PKCS8PrivateKey(FILE *fp, const EVP_PKEY *x, const EVP_CIPHER *enc,
|
||||
char *kstr, int klen, pem_password_cb *cd,
|
||||
void *u);
|
||||
const char *kstr, int klen,
|
||||
pem_password_cb *cd, void *u);
|
||||
# endif
|
||||
EVP_PKEY *PEM_read_bio_Parameters(BIO *bp, EVP_PKEY **x);
|
||||
int PEM_write_bio_Parameters(BIO *bp, EVP_PKEY *x);
|
||||
int PEM_write_bio_Parameters(BIO *bp, const EVP_PKEY *x);
|
||||
|
||||
# ifndef OPENSSL_NO_DSA
|
||||
EVP_PKEY *b2i_PrivateKey(const unsigned char **in, long length);
|
||||
EVP_PKEY *b2i_PublicKey(const unsigned char **in, long length);
|
||||
EVP_PKEY *b2i_PrivateKey_bio(BIO *in);
|
||||
EVP_PKEY *b2i_PublicKey_bio(BIO *in);
|
||||
int i2b_PrivateKey_bio(BIO *out, EVP_PKEY *pk);
|
||||
int i2b_PublicKey_bio(BIO *out, EVP_PKEY *pk);
|
||||
int i2b_PrivateKey_bio(BIO *out, const EVP_PKEY *pk);
|
||||
int i2b_PublicKey_bio(BIO *out, const EVP_PKEY *pk);
|
||||
# ifndef OPENSSL_NO_RC4
|
||||
EVP_PKEY *b2i_PVK_bio(BIO *in, pem_password_cb *cb, void *u);
|
||||
int i2b_PVK_bio(BIO *out, EVP_PKEY *pk, int enclevel,
|
||||
int i2b_PVK_bio(BIO *out, const EVP_PKEY *pk, int enclevel,
|
||||
pem_password_cb *cb, void *u);
|
||||
# endif
|
||||
# endif
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_PEM2_H
|
||||
# endif
|
||||
# include <openssl/pemerr.h>
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_PEMERR_H
|
||||
# endif
|
||||
|
||||
@@ -29,7 +29,7 @@ int ERR_load_PEM_strings(void);
|
||||
/*
|
||||
* PEM function codes.
|
||||
*/
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define PEM_F_B2I_DSS 0
|
||||
# define PEM_F_B2I_PVK_BIO 0
|
||||
# define PEM_F_B2I_RSA 0
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_PKCS12_H
|
||||
# endif
|
||||
|
||||
@@ -61,7 +61,7 @@ typedef struct pkcs12_bag_st PKCS12_BAGS;
|
||||
|
||||
/* Compatibility macros */
|
||||
|
||||
#if !OPENSSL_API_1_1_0
|
||||
#ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
|
||||
# define M_PKCS12_bag_type PKCS12_bag_type
|
||||
# define M_PKCS12_cert_bag_type PKCS12_cert_bag_type
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_PKCS12ERR_H
|
||||
# endif
|
||||
|
||||
@@ -29,7 +29,7 @@ int ERR_load_PKCS12_strings(void);
|
||||
/*
|
||||
* PKCS12 function codes.
|
||||
*/
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define PKCS12_F_OPENSSL_ASC2UNI 0
|
||||
# define PKCS12_F_OPENSSL_UNI2ASC 0
|
||||
# define PKCS12_F_OPENSSL_UNI2UTF8 0
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_PKCS7_H
|
||||
# endif
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_PKCS7ERR_H
|
||||
# endif
|
||||
|
||||
@@ -29,7 +29,7 @@ int ERR_load_PKCS7_strings(void);
|
||||
/*
|
||||
* PKCS7 function codes.
|
||||
*/
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define PKCS7_F_DO_PKCS7_SIGNED_ATTRIB 0
|
||||
# define PKCS7_F_PKCS7_ADD0_ATTRIB_SIGNING_TIME 0
|
||||
# define PKCS7_F_PKCS7_ADD_ATTRIB_SMIMECAP 0
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_RAND_H
|
||||
# endif
|
||||
|
||||
@@ -42,7 +42,7 @@ int RAND_set_rand_engine(ENGINE *engine);
|
||||
|
||||
RAND_METHOD *RAND_OpenSSL(void);
|
||||
|
||||
# if !OPENSSL_API_1_1_0
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# define RAND_cleanup() while(0) continue
|
||||
# endif
|
||||
int RAND_bytes(unsigned char *buf, int num);
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_DRBG_RAND_H
|
||||
# endif
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
/* Used by RAND_DRBG_set_defaults() to set the private DRBG type and flags. */
|
||||
# define RAND_DRBG_FLAG_PRIVATE 0x10
|
||||
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
/* This #define was replaced by an internal constant and should not be used. */
|
||||
# define RAND_DRBG_USED_FLAGS (RAND_DRBG_FLAG_CTR_NO_DF)
|
||||
# endif
|
||||
@@ -123,7 +123,7 @@ RAND_DRBG *RAND_DRBG_get0_private(void);
|
||||
* EXDATA
|
||||
*/
|
||||
# define RAND_DRBG_get_ex_new_index(l, p, newf, dupf, freef) \
|
||||
CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_DRBG, l, p, newf, dupf, freef)
|
||||
CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_RAND_DRBG, l, p, newf, dupf, freef)
|
||||
int RAND_DRBG_set_ex_data(RAND_DRBG *drbg, int idx, void *arg);
|
||||
void *RAND_DRBG_get_ex_data(const RAND_DRBG *drbg, int idx);
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_RANDERR_H
|
||||
# endif
|
||||
|
||||
@@ -29,7 +29,7 @@ int ERR_load_RAND_strings(void);
|
||||
/*
|
||||
* RAND function codes.
|
||||
*/
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define RAND_F_DRBG_BYTES 0
|
||||
# define RAND_F_DRBG_CTR_INIT 0
|
||||
# define RAND_F_DRBG_GET_ENTROPY 0
|
||||
@@ -57,6 +57,8 @@ int ERR_load_RAND_strings(void);
|
||||
# define RAND_F_RAND_POOL_BYTES_NEEDED 0
|
||||
# define RAND_F_RAND_POOL_GROW 0
|
||||
# define RAND_F_RAND_POOL_NEW 0
|
||||
# define RAND_F_RAND_PRIV_BYTES_EX 0
|
||||
# define RAND_F_RAND_PSEUDO_BYTES 0
|
||||
# define RAND_F_RAND_WRITE_FILE 0
|
||||
# endif
|
||||
|
||||
|
||||
+30
-23
@@ -12,46 +12,53 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_RC2_H
|
||||
# endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
|
||||
# ifndef OPENSSL_NO_RC2
|
||||
# ifdef __cplusplus
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# define RC2_BLOCK 8
|
||||
# define RC2_KEY_LENGTH 16
|
||||
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
typedef unsigned int RC2_INT;
|
||||
|
||||
# define RC2_ENCRYPT 1
|
||||
# define RC2_DECRYPT 0
|
||||
|
||||
# define RC2_BLOCK 8
|
||||
# define RC2_KEY_LENGTH 16
|
||||
# define RC2_ENCRYPT 1
|
||||
# define RC2_DECRYPT 0
|
||||
|
||||
typedef struct rc2_key_st {
|
||||
RC2_INT data[64];
|
||||
} RC2_KEY;
|
||||
# endif
|
||||
|
||||
void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, int bits);
|
||||
void RC2_ecb_encrypt(const unsigned char *in, unsigned char *out,
|
||||
RC2_KEY *key, int enc);
|
||||
void RC2_encrypt(unsigned long *data, RC2_KEY *key);
|
||||
void RC2_decrypt(unsigned long *data, RC2_KEY *key);
|
||||
void RC2_cbc_encrypt(const unsigned char *in, unsigned char *out, long length,
|
||||
RC2_KEY *ks, unsigned char *iv, int enc);
|
||||
void RC2_cfb64_encrypt(const unsigned char *in, unsigned char *out,
|
||||
long length, RC2_KEY *schedule, unsigned char *ivec,
|
||||
int *num, int enc);
|
||||
void RC2_ofb64_encrypt(const unsigned char *in, unsigned char *out,
|
||||
long length, RC2_KEY *schedule, unsigned char *ivec,
|
||||
int *num);
|
||||
DEPRECATEDIN_3_0(void RC2_set_key(RC2_KEY *key, int len,
|
||||
const unsigned char *data, int bits))
|
||||
DEPRECATEDIN_3_0(void RC2_ecb_encrypt(const unsigned char *in,
|
||||
unsigned char *out, RC2_KEY *key,
|
||||
int enc))
|
||||
DEPRECATEDIN_3_0(void RC2_encrypt(unsigned long *data, RC2_KEY *key))
|
||||
DEPRECATEDIN_3_0(void RC2_decrypt(unsigned long *data, RC2_KEY *key))
|
||||
DEPRECATEDIN_3_0(void RC2_cbc_encrypt(const unsigned char *in,
|
||||
unsigned char *out, long length,
|
||||
RC2_KEY *ks, unsigned char *iv, int enc))
|
||||
DEPRECATEDIN_3_0(void RC2_cfb64_encrypt(const unsigned char *in,
|
||||
unsigned char *out, long length,
|
||||
RC2_KEY *schedule, unsigned char *ivec,
|
||||
int *num, int enc))
|
||||
DEPRECATEDIN_3_0(void RC2_ofb64_encrypt(const unsigned char *in,
|
||||
unsigned char *out, long length,
|
||||
RC2_KEY *schedule, unsigned char *ivec,
|
||||
int *num))
|
||||
|
||||
# ifdef __cplusplus
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#endif
|
||||
+13
-10
@@ -12,31 +12,34 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_RC4_H
|
||||
# endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
|
||||
# ifndef OPENSSL_NO_RC4
|
||||
# include <stddef.h>
|
||||
#ifdef __cplusplus
|
||||
# include <stddef.h>
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
# endif
|
||||
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
typedef struct rc4_key_st {
|
||||
RC4_INT x, y;
|
||||
RC4_INT data[256];
|
||||
} RC4_KEY;
|
||||
# endif
|
||||
|
||||
const char *RC4_options(void);
|
||||
void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data);
|
||||
void RC4(RC4_KEY *key, size_t len, const unsigned char *indata,
|
||||
unsigned char *outdata);
|
||||
DEPRECATEDIN_3_0(const char *RC4_options(void))
|
||||
DEPRECATEDIN_3_0(void RC4_set_key(RC4_KEY *key, int len,
|
||||
const unsigned char *data))
|
||||
DEPRECATEDIN_3_0(void RC4(RC4_KEY *key, size_t len, const unsigned char *indata,
|
||||
unsigned char *outdata))
|
||||
|
||||
# ifdef __cplusplus
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#endif
|
||||
+35
-28
@@ -12,58 +12,65 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_RC5_H
|
||||
# endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
|
||||
# ifndef OPENSSL_NO_RC5
|
||||
# ifdef __cplusplus
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# define RC5_ENCRYPT 1
|
||||
# define RC5_DECRYPT 0
|
||||
# define RC5_32_BLOCK 8
|
||||
# define RC5_32_KEY_LENGTH 16/* This is a default, max is 255 */
|
||||
|
||||
# define RC5_32_INT unsigned int
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define RC5_ENCRYPT 1
|
||||
# define RC5_DECRYPT 0
|
||||
|
||||
# define RC5_32_BLOCK 8
|
||||
# define RC5_32_KEY_LENGTH 16/* This is a default, max is 255 */
|
||||
# define RC5_32_INT unsigned int
|
||||
|
||||
/*
|
||||
* This are the only values supported. Tweak the code if you want more The
|
||||
* most supported modes will be RC5-32/12/16 RC5-32/16/8
|
||||
*/
|
||||
# define RC5_8_ROUNDS 8
|
||||
# define RC5_12_ROUNDS 12
|
||||
# define RC5_16_ROUNDS 16
|
||||
# define RC5_8_ROUNDS 8
|
||||
# define RC5_12_ROUNDS 12
|
||||
# define RC5_16_ROUNDS 16
|
||||
|
||||
typedef struct rc5_key_st {
|
||||
/* Number of rounds */
|
||||
int rounds;
|
||||
RC5_32_INT data[2 * (RC5_16_ROUNDS + 1)];
|
||||
} RC5_32_KEY;
|
||||
# endif
|
||||
|
||||
int RC5_32_set_key(RC5_32_KEY *key, int len, const unsigned char *data,
|
||||
int rounds);
|
||||
void RC5_32_ecb_encrypt(const unsigned char *in, unsigned char *out,
|
||||
RC5_32_KEY *key, int enc);
|
||||
void RC5_32_encrypt(unsigned long *data, RC5_32_KEY *key);
|
||||
void RC5_32_decrypt(unsigned long *data, RC5_32_KEY *key);
|
||||
void RC5_32_cbc_encrypt(const unsigned char *in, unsigned char *out,
|
||||
long length, RC5_32_KEY *ks, unsigned char *iv,
|
||||
int enc);
|
||||
void RC5_32_cfb64_encrypt(const unsigned char *in, unsigned char *out,
|
||||
long length, RC5_32_KEY *schedule,
|
||||
unsigned char *ivec, int *num, int enc);
|
||||
void RC5_32_ofb64_encrypt(const unsigned char *in, unsigned char *out,
|
||||
long length, RC5_32_KEY *schedule,
|
||||
unsigned char *ivec, int *num);
|
||||
DEPRECATEDIN_3_0(int RC5_32_set_key(RC5_32_KEY *key, int len,
|
||||
const unsigned char *data, int rounds))
|
||||
DEPRECATEDIN_3_0(void RC5_32_ecb_encrypt(const unsigned char *in,
|
||||
unsigned char *out, RC5_32_KEY *key,
|
||||
int enc))
|
||||
DEPRECATEDIN_3_0(void RC5_32_encrypt(unsigned long *data, RC5_32_KEY *key))
|
||||
DEPRECATEDIN_3_0(void RC5_32_decrypt(unsigned long *data, RC5_32_KEY *key))
|
||||
DEPRECATEDIN_3_0(void RC5_32_cbc_encrypt(const unsigned char *in,
|
||||
unsigned char *out, long length,
|
||||
RC5_32_KEY *ks, unsigned char *iv,
|
||||
int enc))
|
||||
DEPRECATEDIN_3_0(void RC5_32_cfb64_encrypt(const unsigned char *in,
|
||||
unsigned char *out, long length,
|
||||
RC5_32_KEY *schedule,
|
||||
unsigned char *ivec, int *num,
|
||||
int enc))
|
||||
DEPRECATEDIN_3_0(void RC5_32_ofb64_encrypt(const unsigned char *in,
|
||||
unsigned char *out, long length,
|
||||
RC5_32_KEY *schedule,
|
||||
unsigned char *ivec, int *num))
|
||||
|
||||
# ifdef __cplusplus
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#endif
|
||||
+24
-19
@@ -12,24 +12,27 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_RIPEMD_H
|
||||
# endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
|
||||
#ifndef OPENSSL_NO_RMD160
|
||||
# include <openssl/e_os2.h>
|
||||
# include <stddef.h>
|
||||
# ifdef __cplusplus
|
||||
# ifndef OPENSSL_NO_RMD160
|
||||
# include <openssl/e_os2.h>
|
||||
# include <stddef.h>
|
||||
|
||||
# define RIPEMD160_DIGEST_LENGTH 20
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
# endif
|
||||
# if !defined(OPENSSL_NO_DEPRECATED_3_0)
|
||||
|
||||
# define RIPEMD160_LONG unsigned int
|
||||
# define RIPEMD160_LONG unsigned int
|
||||
|
||||
# define RIPEMD160_CBLOCK 64
|
||||
# define RIPEMD160_LBLOCK (RIPEMD160_CBLOCK/4)
|
||||
# define RIPEMD160_DIGEST_LENGTH 20
|
||||
# define RIPEMD160_CBLOCK 64
|
||||
# define RIPEMD160_LBLOCK (RIPEMD160_CBLOCK/4)
|
||||
|
||||
typedef struct RIPEMD160state_st {
|
||||
RIPEMD160_LONG A, B, C, D, E;
|
||||
@@ -37,17 +40,19 @@ typedef struct RIPEMD160state_st {
|
||||
RIPEMD160_LONG data[RIPEMD160_LBLOCK];
|
||||
unsigned int num;
|
||||
} RIPEMD160_CTX;
|
||||
# endif
|
||||
|
||||
int RIPEMD160_Init(RIPEMD160_CTX *c);
|
||||
int RIPEMD160_Update(RIPEMD160_CTX *c, const void *data, size_t len);
|
||||
int RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c);
|
||||
unsigned char *RIPEMD160(const unsigned char *d, size_t n, unsigned char *md);
|
||||
void RIPEMD160_Transform(RIPEMD160_CTX *c, const unsigned char *b);
|
||||
DEPRECATEDIN_3_0(int RIPEMD160_Init(RIPEMD160_CTX *c))
|
||||
DEPRECATEDIN_3_0(int RIPEMD160_Update(RIPEMD160_CTX *c, const void *data,
|
||||
size_t len))
|
||||
DEPRECATEDIN_3_0(int RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c))
|
||||
DEPRECATEDIN_3_0(unsigned char *RIPEMD160(const unsigned char *d, size_t n,
|
||||
unsigned char *md))
|
||||
DEPRECATEDIN_3_0(void RIPEMD160_Transform(RIPEMD160_CTX *c,
|
||||
const unsigned char *b))
|
||||
|
||||
# ifdef __cplusplus
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
# endif
|
||||
|
||||
|
||||
#endif
|
||||
+36
-39
@@ -12,7 +12,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_RSA_H
|
||||
# endif
|
||||
|
||||
@@ -23,10 +23,12 @@
|
||||
# include <openssl/bio.h>
|
||||
# include <openssl/crypto.h>
|
||||
# include <openssl/types.h>
|
||||
# if !OPENSSL_API_1_1_0
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# include <openssl/bn.h>
|
||||
# endif
|
||||
# include <openssl/rsaerr.h>
|
||||
# include <openssl/safestack.h>
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
@@ -79,13 +81,13 @@ extern "C" {
|
||||
* but other engines might not need it
|
||||
*/
|
||||
# define RSA_FLAG_NO_BLINDING 0x0080
|
||||
# if !OPENSSL_API_1_1_0
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
/*
|
||||
* Does nothing. Previously this switched off constant time behaviour.
|
||||
*/
|
||||
# define RSA_FLAG_NO_CONSTTIME 0x0000
|
||||
# endif
|
||||
# if !OPENSSL_API_0_9_8
|
||||
# ifndef OPENSSL_NO_DEPRECATED_0_9_8
|
||||
/* deprecated name for the flag*/
|
||||
/*
|
||||
* new with 0.9.7h; the built-in RSA
|
||||
@@ -98,11 +100,8 @@ extern "C" {
|
||||
# define RSA_FLAG_NO_EXP_CONSTTIME RSA_FLAG_NO_CONSTTIME
|
||||
# endif
|
||||
|
||||
# define EVP_PKEY_CTX_set_rsa_padding(ctx, pad) \
|
||||
RSA_pkey_ctx_ctrl(ctx, -1, EVP_PKEY_CTRL_RSA_PADDING, pad, NULL)
|
||||
|
||||
# define EVP_PKEY_CTX_get_rsa_padding(ctx, ppad) \
|
||||
RSA_pkey_ctx_ctrl(ctx, -1, EVP_PKEY_CTRL_GET_RSA_PADDING, 0, ppad)
|
||||
int EVP_PKEY_CTX_set_rsa_padding(EVP_PKEY_CTX *ctx, int pad_mode);
|
||||
int EVP_PKEY_CTX_get_rsa_padding(EVP_PKEY_CTX *ctx, int *pad_mode);
|
||||
|
||||
# define EVP_PKEY_CTX_set_rsa_pss_saltlen(ctx, len) \
|
||||
RSA_pkey_ctx_ctrl(ctx, (EVP_PKEY_OP_SIGN|EVP_PKEY_OP_VERIFY), \
|
||||
@@ -136,39 +135,34 @@ extern "C" {
|
||||
RSA_pkey_ctx_ctrl(ctx, EVP_PKEY_OP_KEYGEN, \
|
||||
EVP_PKEY_CTRL_RSA_KEYGEN_PRIMES, primes, NULL)
|
||||
|
||||
# define EVP_PKEY_CTX_set_rsa_mgf1_md(ctx, md) \
|
||||
RSA_pkey_ctx_ctrl(ctx, EVP_PKEY_OP_TYPE_SIG | EVP_PKEY_OP_TYPE_CRYPT, \
|
||||
EVP_PKEY_CTRL_RSA_MGF1_MD, 0, (void *)(md))
|
||||
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);
|
||||
int EVP_PKEY_CTX_get_rsa_mgf1_md(EVP_PKEY_CTX *ctx, const EVP_MD **md);
|
||||
int EVP_PKEY_CTX_get_rsa_mgf1_md_name(EVP_PKEY_CTX *ctx, char *name,
|
||||
size_t namelen);
|
||||
|
||||
|
||||
# define EVP_PKEY_CTX_set_rsa_pss_keygen_mgf1_md(ctx, md) \
|
||||
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA_PSS, EVP_PKEY_OP_KEYGEN, \
|
||||
EVP_PKEY_CTRL_RSA_MGF1_MD, 0, (void *)(md))
|
||||
|
||||
# define EVP_PKEY_CTX_set_rsa_oaep_md(ctx, md) \
|
||||
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_TYPE_CRYPT, \
|
||||
EVP_PKEY_CTRL_RSA_OAEP_MD, 0, (void *)(md))
|
||||
|
||||
# define EVP_PKEY_CTX_get_rsa_mgf1_md(ctx, pmd) \
|
||||
RSA_pkey_ctx_ctrl(ctx, EVP_PKEY_OP_TYPE_SIG | EVP_PKEY_OP_TYPE_CRYPT, \
|
||||
EVP_PKEY_CTRL_GET_RSA_MGF1_MD, 0, (void *)(pmd))
|
||||
|
||||
# define EVP_PKEY_CTX_get_rsa_oaep_md(ctx, pmd) \
|
||||
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_TYPE_CRYPT, \
|
||||
EVP_PKEY_CTRL_GET_RSA_OAEP_MD, 0, (void *)(pmd))
|
||||
|
||||
# define EVP_PKEY_CTX_set0_rsa_oaep_label(ctx, l, llen) \
|
||||
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_TYPE_CRYPT, \
|
||||
EVP_PKEY_CTRL_RSA_OAEP_LABEL, llen, (void *)(l))
|
||||
|
||||
# define EVP_PKEY_CTX_get0_rsa_oaep_label(ctx, l) \
|
||||
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_TYPE_CRYPT, \
|
||||
EVP_PKEY_CTRL_GET_RSA_OAEP_LABEL, 0, (void *)(l))
|
||||
int EVP_PKEY_CTX_set_rsa_oaep_md(EVP_PKEY_CTX *ctx, const EVP_MD *md);
|
||||
int EVP_PKEY_CTX_set_rsa_oaep_md_name(EVP_PKEY_CTX *ctx, const char *mdname,
|
||||
const char *mdprops);
|
||||
int EVP_PKEY_CTX_get_rsa_oaep_md(EVP_PKEY_CTX *ctx, const EVP_MD **md);
|
||||
int EVP_PKEY_CTX_get_rsa_oaep_md_name(EVP_PKEY_CTX *ctx, char *name,
|
||||
size_t namelen);
|
||||
int EVP_PKEY_CTX_set0_rsa_oaep_label(EVP_PKEY_CTX *ctx, void *label,
|
||||
int llen);
|
||||
int EVP_PKEY_CTX_get0_rsa_oaep_label(EVP_PKEY_CTX *ctx, unsigned char **label);
|
||||
|
||||
# define EVP_PKEY_CTX_set_rsa_pss_keygen_md(ctx, md) \
|
||||
EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA_PSS, \
|
||||
EVP_PKEY_OP_KEYGEN, EVP_PKEY_CTRL_MD, \
|
||||
0, (void *)(md))
|
||||
|
||||
|
||||
# define EVP_PKEY_CTRL_RSA_PADDING (EVP_PKEY_ALG_CTRL + 1)
|
||||
# define EVP_PKEY_CTRL_RSA_PSS_SALTLEN (EVP_PKEY_ALG_CTRL + 2)
|
||||
|
||||
@@ -188,13 +182,15 @@ extern "C" {
|
||||
|
||||
# define EVP_PKEY_CTRL_RSA_KEYGEN_PRIMES (EVP_PKEY_ALG_CTRL + 13)
|
||||
|
||||
# define RSA_PKCS1_PADDING 1
|
||||
# define RSA_SSLV23_PADDING 2
|
||||
# define RSA_NO_PADDING 3
|
||||
# define RSA_PKCS1_OAEP_PADDING 4
|
||||
# define RSA_X931_PADDING 5
|
||||
# define RSA_PKCS1_PADDING 1
|
||||
# define RSA_SSLV23_PADDING 2
|
||||
# define RSA_NO_PADDING 3
|
||||
# define RSA_PKCS1_OAEP_PADDING 4
|
||||
# define RSA_X931_PADDING 5
|
||||
|
||||
/* EVP_PKEY_ only */
|
||||
# define RSA_PKCS1_PSS_PADDING 6
|
||||
# define RSA_PKCS1_PSS_PADDING 6
|
||||
# define RSA_PKCS1_WITH_TLS_PADDING 7
|
||||
|
||||
# define RSA_PKCS1_PADDING_SIZE 11
|
||||
|
||||
@@ -230,6 +226,7 @@ const BIGNUM *RSA_get0_q(const RSA *d);
|
||||
const BIGNUM *RSA_get0_dmp1(const RSA *r);
|
||||
const BIGNUM *RSA_get0_dmq1(const RSA *r);
|
||||
const BIGNUM *RSA_get0_iqmp(const RSA *r);
|
||||
const RSA_PSS_PARAMS *RSA_get0_pss_params(const RSA *r);
|
||||
void RSA_clear_flags(RSA *r, int flags);
|
||||
int RSA_test_flags(const RSA *r, int flags);
|
||||
void RSA_set_flags(RSA *r, int flags);
|
||||
@@ -285,14 +282,14 @@ int RSA_pkey_ctx_ctrl(EVP_PKEY_CTX *ctx, int optype, int cmd, int p1, void *p2);
|
||||
DECLARE_ASN1_ENCODE_FUNCTIONS_name(RSA, RSAPublicKey)
|
||||
DECLARE_ASN1_ENCODE_FUNCTIONS_name(RSA, RSAPrivateKey)
|
||||
|
||||
typedef struct rsa_pss_params_st {
|
||||
struct rsa_pss_params_st {
|
||||
X509_ALGOR *hashAlgorithm;
|
||||
X509_ALGOR *maskGenAlgorithm;
|
||||
ASN1_INTEGER *saltLength;
|
||||
ASN1_INTEGER *trailerField;
|
||||
/* Decoded hash algorithm from maskGenAlgorithm */
|
||||
X509_ALGOR *maskHash;
|
||||
} RSA_PSS_PARAMS;
|
||||
};
|
||||
|
||||
DECLARE_ASN1_FUNCTIONS(RSA_PSS_PARAMS)
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_RSAERR_H
|
||||
# endif
|
||||
|
||||
@@ -29,7 +29,7 @@ int ERR_load_RSA_strings(void);
|
||||
/*
|
||||
* RSA function codes.
|
||||
*/
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define RSA_F_CHECK_PADDING_MD 0
|
||||
# define RSA_F_ENCODE_PKCS1 0
|
||||
# define RSA_F_INT_RSA_VERIFY 0
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_SAFESTACK_H
|
||||
# endif
|
||||
|
||||
|
||||
+57
-49
@@ -37,66 +37,74 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_SEED_H
|
||||
# endif
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
|
||||
# ifndef OPENSSL_NO_SEED
|
||||
# include <openssl/e_os2.h>
|
||||
# include <openssl/crypto.h>
|
||||
# include <openssl/e_os2.h>
|
||||
# include <openssl/crypto.h>
|
||||
# include <sys/types.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
# endif
|
||||
|
||||
# define SEED_BLOCK_SIZE 16
|
||||
# define SEED_KEY_LENGTH 16
|
||||
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
/* look whether we need 'long' to get 32 bits */
|
||||
# ifdef AES_LONG
|
||||
# ifndef SEED_LONG
|
||||
# define SEED_LONG 1
|
||||
# ifdef AES_LONG
|
||||
# ifndef SEED_LONG
|
||||
# define SEED_LONG 1
|
||||
# endif
|
||||
# endif
|
||||
|
||||
|
||||
typedef struct seed_key_st {
|
||||
# ifdef SEED_LONG
|
||||
unsigned long data[32];
|
||||
# else
|
||||
unsigned int data[32];
|
||||
# endif
|
||||
} SEED_KEY_SCHEDULE;
|
||||
# endif /* OPENSSL_NO_DEPRECATED_3_0 */
|
||||
|
||||
DEPRECATEDIN_3_0(void SEED_set_key(const unsigned char rawkey[SEED_KEY_LENGTH],
|
||||
SEED_KEY_SCHEDULE *ks))
|
||||
|
||||
DEPRECATEDIN_3_0(void SEED_encrypt(const unsigned char s[SEED_BLOCK_SIZE],
|
||||
unsigned char d[SEED_BLOCK_SIZE],
|
||||
const SEED_KEY_SCHEDULE *ks))
|
||||
DEPRECATEDIN_3_0(void SEED_decrypt(const unsigned char s[SEED_BLOCK_SIZE],
|
||||
unsigned char d[SEED_BLOCK_SIZE],
|
||||
const SEED_KEY_SCHEDULE *ks))
|
||||
|
||||
DEPRECATEDIN_3_0(void SEED_ecb_encrypt(const unsigned char *in,
|
||||
unsigned char *out,
|
||||
const SEED_KEY_SCHEDULE *ks, int enc))
|
||||
DEPRECATEDIN_3_0(void SEED_cbc_encrypt(const unsigned char *in,
|
||||
unsigned char *out, size_t len,
|
||||
const SEED_KEY_SCHEDULE *ks,
|
||||
unsigned char ivec[SEED_BLOCK_SIZE],
|
||||
int enc))
|
||||
DEPRECATEDIN_3_0(void SEED_cfb128_encrypt(const unsigned char *in,
|
||||
unsigned char *out, size_t len,
|
||||
const SEED_KEY_SCHEDULE *ks,
|
||||
unsigned char ivec[SEED_BLOCK_SIZE],
|
||||
int *num, int enc))
|
||||
DEPRECATEDIN_3_0(void SEED_ofb128_encrypt(const unsigned char *in,
|
||||
unsigned char *out, size_t len,
|
||||
const SEED_KEY_SCHEDULE *ks,
|
||||
unsigned char ivec[SEED_BLOCK_SIZE],
|
||||
int *num))
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
|
||||
# include <sys/types.h>
|
||||
|
||||
# define SEED_BLOCK_SIZE 16
|
||||
# define SEED_KEY_LENGTH 16
|
||||
|
||||
typedef struct seed_key_st {
|
||||
# ifdef SEED_LONG
|
||||
unsigned long data[32];
|
||||
# else
|
||||
unsigned int data[32];
|
||||
# endif
|
||||
} SEED_KEY_SCHEDULE;
|
||||
|
||||
void SEED_set_key(const unsigned char rawkey[SEED_KEY_LENGTH],
|
||||
SEED_KEY_SCHEDULE *ks);
|
||||
|
||||
void SEED_encrypt(const unsigned char s[SEED_BLOCK_SIZE],
|
||||
unsigned char d[SEED_BLOCK_SIZE],
|
||||
const SEED_KEY_SCHEDULE *ks);
|
||||
void SEED_decrypt(const unsigned char s[SEED_BLOCK_SIZE],
|
||||
unsigned char d[SEED_BLOCK_SIZE],
|
||||
const SEED_KEY_SCHEDULE *ks);
|
||||
|
||||
void SEED_ecb_encrypt(const unsigned char *in, unsigned char *out,
|
||||
const SEED_KEY_SCHEDULE *ks, int enc);
|
||||
void SEED_cbc_encrypt(const unsigned char *in, unsigned char *out, size_t len,
|
||||
const SEED_KEY_SCHEDULE *ks,
|
||||
unsigned char ivec[SEED_BLOCK_SIZE], int enc);
|
||||
void SEED_cfb128_encrypt(const unsigned char *in, unsigned char *out,
|
||||
size_t len, const SEED_KEY_SCHEDULE *ks,
|
||||
unsigned char ivec[SEED_BLOCK_SIZE], int *num,
|
||||
int enc);
|
||||
void SEED_ofb128_encrypt(const unsigned char *in, unsigned char *out,
|
||||
size_t len, const SEED_KEY_SCHEDULE *ks,
|
||||
unsigned char ivec[SEED_BLOCK_SIZE], int *num);
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
# endif
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,68 @@
|
||||
/*
|
||||
* Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
|
||||
*
|
||||
* Licensed under the OpenSSL license (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 OPENSSL_SELF_TEST_H
|
||||
# define OPENSSL_SELF_TEST_H
|
||||
|
||||
# include <openssl/core.h> /* OSSL_CALLBACK */
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
|
||||
/* The test event phases */
|
||||
# define OSSL_SELF_TEST_PHASE_NONE "None"
|
||||
# define OSSL_SELF_TEST_PHASE_START "Start"
|
||||
# define OSSL_SELF_TEST_PHASE_CORRUPT "Corrupt"
|
||||
# define OSSL_SELF_TEST_PHASE_PASS "Pass"
|
||||
# define OSSL_SELF_TEST_PHASE_FAIL "Fail"
|
||||
|
||||
/* Test event categories */
|
||||
# define OSSL_SELF_TEST_TYPE_NONE "None"
|
||||
# define OSSL_SELF_TEST_TYPE_MODULE_INTEGRITY "Module_Integrity"
|
||||
# define OSSL_SELF_TEST_TYPE_INSTALL_INTEGRITY "Install_Integrity"
|
||||
# define OSSL_SELF_TEST_TYPE_PCT "Pairwise_Consistency_Test"
|
||||
# define OSSL_SELF_TEST_TYPE_KAT_CIPHER "KAT_Cipher"
|
||||
# define OSSL_SELF_TEST_TYPE_KAT_DIGEST "KAT_Digest"
|
||||
# define OSSL_SELF_TEST_TYPE_KAT_SIGNATURE "KAT_Signature"
|
||||
# define OSSL_SELF_TEST_TYPE_KAT_KDF "KAT_KDF"
|
||||
# define OSSL_SELF_TEST_TYPE_KAT_KA "KAT_KA"
|
||||
# define OSSL_SELF_TEST_TYPE_DRBG "DRBG"
|
||||
|
||||
/* Test event sub categories */
|
||||
# define OSSL_SELF_TEST_DESC_NONE "None"
|
||||
# define OSSL_SELF_TEST_DESC_INTEGRITY_HMAC "HMAC"
|
||||
# define OSSL_SELF_TEST_DESC_PCT_RSA_PKCS1 "RSA"
|
||||
# define OSSL_SELF_TEST_DESC_PCT_ECDSA "ECDSA"
|
||||
# define OSSL_SELF_TEST_DESC_PCT_DSA "DSA"
|
||||
# define OSSL_SELF_TEST_DESC_CIPHER_AES_GCM "AES_GCM"
|
||||
# define OSSL_SELF_TEST_DESC_CIPHER_TDES "TDES"
|
||||
# define OSSL_SELF_TEST_DESC_MD_SHA1 "SHA1"
|
||||
# define OSSL_SELF_TEST_DESC_MD_SHA2 "SHA2"
|
||||
# define OSSL_SELF_TEST_DESC_MD_SHA3 "SHA3"
|
||||
# define OSSL_SELF_TEST_DESC_SIGN_DSA "DSA"
|
||||
# define OSSL_SELF_TEST_DESC_SIGN_RSA "RSA"
|
||||
# define OSSL_SELF_TEST_DESC_SIGN_ECDSA "ECDSA"
|
||||
# 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_ECDH "ECDH"
|
||||
# define OSSL_SELF_TEST_DESC_KA_ECDSA "ECDSA"
|
||||
# define OSSL_SELF_TEST_DESC_KDF_HKDF "HKDF"
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
|
||||
void OSSL_SELF_TEST_set_callback(OPENSSL_CTX *libctx, OSSL_CALLBACK *cb,
|
||||
void *cbarg);
|
||||
void OSSL_SELF_TEST_get_callback(OPENSSL_CTX *libctx, OSSL_CALLBACK **cb,
|
||||
void **cbarg);
|
||||
|
||||
#endif /* OPENSSL_SELF_TEST_H */
|
||||
@@ -0,0 +1,100 @@
|
||||
/*
|
||||
* Copyright 2019 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 OPENSSL_SERIALIZER_H
|
||||
# define OPENSSL_SERIALIZER_H
|
||||
# pragma once
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
|
||||
# ifndef OPENSSL_NO_STDIO
|
||||
# include <stdio.h>
|
||||
# endif
|
||||
# include <stdarg.h>
|
||||
# include <stddef.h>
|
||||
# include <openssl/serializererr.h>
|
||||
# include <openssl/types.h>
|
||||
# include <openssl/core.h>
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C" {
|
||||
# endif
|
||||
|
||||
OSSL_SERIALIZER *OSSL_SERIALIZER_fetch(OPENSSL_CTX *libctx,
|
||||
const char *name,
|
||||
const char *properties);
|
||||
int OSSL_SERIALIZER_up_ref(OSSL_SERIALIZER *ser);
|
||||
void OSSL_SERIALIZER_free(OSSL_SERIALIZER *ser);
|
||||
|
||||
const OSSL_PROVIDER *OSSL_SERIALIZER_provider(const OSSL_SERIALIZER *ser);
|
||||
const char *OSSL_SERIALIZER_properties(const OSSL_SERIALIZER *ser);
|
||||
int OSSL_SERIALIZER_number(const OSSL_SERIALIZER *ser);
|
||||
int OSSL_SERIALIZER_is_a(const OSSL_SERIALIZER *ser,
|
||||
const char *name);
|
||||
|
||||
void OSSL_SERIALIZER_do_all_provided(OPENSSL_CTX *libctx,
|
||||
void (*fn)(OSSL_SERIALIZER *ser,
|
||||
void *arg),
|
||||
void *arg);
|
||||
void OSSL_SERIALIZER_names_do_all(const OSSL_SERIALIZER *ser,
|
||||
void (*fn)(const char *name, void *data),
|
||||
void *data);
|
||||
|
||||
const OSSL_PARAM *OSSL_SERIALIZER_settable_ctx_params(OSSL_SERIALIZER *ser);
|
||||
OSSL_SERIALIZER_CTX *OSSL_SERIALIZER_CTX_new(OSSL_SERIALIZER *ser);
|
||||
const OSSL_SERIALIZER *
|
||||
OSSL_SERIALIZER_CTX_get_serializer(OSSL_SERIALIZER_CTX *ctx);
|
||||
int OSSL_SERIALIZER_CTX_set_params(OSSL_SERIALIZER_CTX *ctx,
|
||||
const OSSL_PARAM params[]);
|
||||
void OSSL_SERIALIZER_CTX_free(OSSL_SERIALIZER_CTX *ctx);
|
||||
|
||||
/* Utilities that help set specific parameters */
|
||||
int OSSL_SERIALIZER_CTX_set_cipher(OSSL_SERIALIZER_CTX *ctx,
|
||||
const char *cipher_name,
|
||||
const char *propquery);
|
||||
int OSSL_SERIALIZER_CTX_set_passphrase(OSSL_SERIALIZER_CTX *ctx,
|
||||
const unsigned char *kstr,
|
||||
size_t klen);
|
||||
int OSSL_SERIALIZER_CTX_set_passphrase_cb(OSSL_SERIALIZER_CTX *ctx, int enc,
|
||||
pem_password_cb *cb, void *cbarg);
|
||||
int OSSL_SERIALIZER_CTX_set_passphrase_ui(OSSL_SERIALIZER_CTX *ctx,
|
||||
const UI_METHOD *ui_method,
|
||||
void *ui_data);
|
||||
|
||||
/* Utilities to output the object to serialize */
|
||||
int OSSL_SERIALIZER_to_bio(OSSL_SERIALIZER_CTX *ctx, BIO *out);
|
||||
#ifndef OPENSSL_NO_STDIO
|
||||
int OSSL_SERIALIZER_to_fp(OSSL_SERIALIZER_CTX *ctx, FILE *fp);
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Create the OSSL_SERIALIZER_CTX with an associated type. This will perform
|
||||
* an implicit OSSL_SERIALIZER_fetch(), suitable for the object of that type.
|
||||
* This is more useful than calling OSSL_SERIALIZER_CTX_new().
|
||||
*/
|
||||
OSSL_SERIALIZER_CTX *OSSL_SERIALIZER_CTX_new_by_EVP_PKEY(const EVP_PKEY *pkey,
|
||||
const char *propquery);
|
||||
|
||||
/*
|
||||
* These macros define the last argument to pass to
|
||||
* OSSL_SERIALIZER_CTX_new_by_TYPE().
|
||||
*/
|
||||
# define OSSL_SERIALIZER_PUBKEY_TO_PEM_PQ "format=pem,type=public"
|
||||
# define OSSL_SERIALIZER_PrivateKey_TO_PEM_PQ "format=pem,type=private"
|
||||
# define OSSL_SERIALIZER_Parameters_TO_PEM_PQ "format=pem,type=domainparams"
|
||||
|
||||
/* Corresponding macros for text output */
|
||||
# define OSSL_SERIALIZER_PUBKEY_TO_TEXT_PQ "format=text,type=public"
|
||||
# define OSSL_SERIALIZER_PrivateKey_TO_TEXT_PQ "format=text,type=private"
|
||||
# define OSSL_SERIALIZER_Parameters_TO_TEXT_PQ "format=text,type=domainparams"
|
||||
|
||||
# ifdef __cplusplus
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
@@ -0,0 +1,34 @@
|
||||
/*
|
||||
* Generated by util/mkerr.pl DO NOT EDIT
|
||||
* Copyright 1995-2019 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 OPENSSL_OSSL_SERIALIZERERR_H
|
||||
# define OPENSSL_OSSL_SERIALIZERERR_H
|
||||
|
||||
# include <openssl/opensslconf.h>
|
||||
# include <openssl/symhacks.h>
|
||||
|
||||
|
||||
# ifdef __cplusplus
|
||||
extern "C"
|
||||
# endif
|
||||
int ERR_load_OSSL_SERIALIZER_strings(void);
|
||||
|
||||
/*
|
||||
* OSSL_SERIALIZER function codes.
|
||||
*/
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# endif
|
||||
|
||||
/*
|
||||
* OSSL_SERIALIZER reason codes.
|
||||
*/
|
||||
# define OSSL_SERIALIZER_R_INCORRECT_PROPERTY_QUERY 100
|
||||
|
||||
#endif
|
||||
@@ -12,7 +12,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_SHA_H
|
||||
# endif
|
||||
|
||||
@@ -89,13 +89,10 @@ void SHA256_Transform(SHA256_CTX *c, const unsigned char *data);
|
||||
# define SHA512_CBLOCK (SHA_LBLOCK*8)
|
||||
# if (defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW32__)
|
||||
# define SHA_LONG64 unsigned __int64
|
||||
# define U64(C) C##UI64
|
||||
# elif defined(__arch64__)
|
||||
# define SHA_LONG64 unsigned long
|
||||
# define U64(C) C##UL
|
||||
# else
|
||||
# define SHA_LONG64 unsigned long long
|
||||
# define U64(C) C##ULL
|
||||
# endif
|
||||
|
||||
typedef struct SHA512state_st {
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_SRP_H
|
||||
# endif
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_D1_SRTP_H
|
||||
# endif
|
||||
|
||||
|
||||
+20
-12
@@ -14,7 +14,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_SSL_H
|
||||
# endif
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
# include <openssl/opensslconf.h>
|
||||
# include <openssl/comp.h>
|
||||
# include <openssl/bio.h>
|
||||
# if !OPENSSL_API_1_1_0
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# include <openssl/x509.h>
|
||||
# include <openssl/crypto.h>
|
||||
# include <openssl/buffer.h>
|
||||
@@ -179,7 +179,7 @@ extern "C" {
|
||||
* DEPRECATED IN 3.0.0, in favor of OSSL_default_cipher_list()
|
||||
* Update both macro and function simultaneously
|
||||
*/
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define SSL_DEFAULT_CIPHER_LIST "ALL:!COMPLEMENTOFDEFAULT:!eNULL"
|
||||
/*
|
||||
* This is the default set of TLSv1.3 ciphersuites
|
||||
@@ -599,6 +599,7 @@ typedef int (*SSL_async_callback_fn)(SSL *s, void *arg);
|
||||
# define SSL_CONF_TYPE_FILE 0x2
|
||||
# define SSL_CONF_TYPE_DIR 0x3
|
||||
# define SSL_CONF_TYPE_NONE 0x4
|
||||
# define SSL_CONF_TYPE_STORE 0x5
|
||||
|
||||
/* Maximum length of the application-controlled segment of a a TLSv1.3 cookie */
|
||||
# define SSL_COOKIE_LENGTH 4096
|
||||
@@ -1125,7 +1126,7 @@ size_t SSL_get_peer_finished(const SSL *s, void *buf, size_t count);
|
||||
# define SSL_VERIFY_CLIENT_ONCE 0x04
|
||||
# define SSL_VERIFY_POST_HANDSHAKE 0x08
|
||||
|
||||
# if !OPENSSL_API_1_1_0
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# define OpenSSL_add_ssl_algorithms() SSL_library_init()
|
||||
# define SSLeay_add_ssl_algorithms() SSL_library_init()
|
||||
# endif
|
||||
@@ -1345,7 +1346,7 @@ DECLARE_PEM_rw(SSL_SESSION, SSL_SESSION)
|
||||
SSL_ctrl(s,SSL_CTRL_SET_DH_AUTO,onoff,NULL)
|
||||
# define SSL_set_tmp_dh(ssl,dh) \
|
||||
SSL_ctrl(ssl,SSL_CTRL_SET_TMP_DH,0,(char *)(dh))
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define SSL_CTX_set_tmp_ecdh(ctx,ecdh) \
|
||||
SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_ECDH,0,(char *)(ecdh))
|
||||
# define SSL_set_tmp_ecdh(ssl,ecdh) \
|
||||
@@ -1500,7 +1501,7 @@ DECLARE_PEM_rw(SSL_SESSION, SSL_SESSION)
|
||||
# define SSL_get_shared_curve SSL_get_shared_group
|
||||
|
||||
|
||||
# if !OPENSSL_API_1_1_0
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
/* Provide some compatibility macros for removed functionality. */
|
||||
# define SSL_CTX_need_tmp_RSA(ctx) 0
|
||||
# define SSL_CTX_set_tmp_rsa(ctx,rsa) 1
|
||||
@@ -1628,8 +1629,10 @@ __owur int SSL_add_file_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs,
|
||||
const char *file);
|
||||
int SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs,
|
||||
const char *dir);
|
||||
int SSL_add_store_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs,
|
||||
const char *uri);
|
||||
|
||||
# if !OPENSSL_API_1_1_0
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# define SSL_load_error_strings() \
|
||||
OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS \
|
||||
| OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL)
|
||||
@@ -1986,7 +1989,7 @@ void SSL_set_accept_state(SSL *s);
|
||||
|
||||
__owur long SSL_get_default_timeout(const SSL *s);
|
||||
|
||||
# if !OPENSSL_API_1_1_0
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# define SSL_library_init() OPENSSL_init_ssl(0, NULL)
|
||||
# endif
|
||||
|
||||
@@ -2015,8 +2018,13 @@ __owur int SSL_client_version(const SSL *s);
|
||||
__owur int SSL_CTX_set_default_verify_paths(SSL_CTX *ctx);
|
||||
__owur int SSL_CTX_set_default_verify_dir(SSL_CTX *ctx);
|
||||
__owur int SSL_CTX_set_default_verify_file(SSL_CTX *ctx);
|
||||
__owur int SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile,
|
||||
const char *CApath);
|
||||
__owur int SSL_CTX_set_default_verify_store(SSL_CTX *ctx);
|
||||
__owur int SSL_CTX_load_verify_file(SSL_CTX *ctx, const char *CAfile);
|
||||
__owur int SSL_CTX_load_verify_dir(SSL_CTX *ctx, const char *CApath);
|
||||
__owur int SSL_CTX_load_verify_store(SSL_CTX *ctx, const char *CAstore);
|
||||
DEPRECATEDIN_3_0(__owur int SSL_CTX_load_verify_locations(SSL_CTX *ctx,
|
||||
const char *CAfile,
|
||||
const char *CApath))
|
||||
# define SSL_get0_session SSL_get_session/* just peek at pointer */
|
||||
__owur SSL_SESSION *SSL_get_session(const SSL *ssl);
|
||||
__owur SSL_SESSION *SSL_get1_session(SSL *ssl); /* obtain a reference count */
|
||||
@@ -2115,7 +2123,7 @@ __owur int SSL_COMP_get_id(const SSL_COMP *comp);
|
||||
STACK_OF(SSL_COMP) *SSL_COMP_get_compression_methods(void);
|
||||
__owur STACK_OF(SSL_COMP) *SSL_COMP_set0_compression_methods(STACK_OF(SSL_COMP)
|
||||
*meths);
|
||||
# if !OPENSSL_API_1_1_0
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# define SSL_COMP_free_compression_methods() while(0) continue
|
||||
# endif
|
||||
__owur int SSL_COMP_add_compression_method(int id, COMP_METHOD *cm);
|
||||
@@ -2167,7 +2175,7 @@ size_t SSL_get_num_tickets(const SSL *s);
|
||||
int SSL_CTX_set_num_tickets(SSL_CTX *ctx, size_t num_tickets);
|
||||
size_t SSL_CTX_get_num_tickets(const SSL_CTX *ctx);
|
||||
|
||||
# if !OPENSSL_API_1_1_0
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# define SSL_cache_hit(s) SSL_session_reused(s)
|
||||
# endif
|
||||
|
||||
|
||||
+20
-12
@@ -14,7 +14,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_SSL_H
|
||||
# endif
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
# include <openssl/opensslconf.h>
|
||||
# include <openssl/comp.h>
|
||||
# include <openssl/bio.h>
|
||||
# if !OPENSSL_API_1_1_0
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# include <openssl/x509.h>
|
||||
# include <openssl/crypto.h>
|
||||
# include <openssl/buffer.h>
|
||||
@@ -178,7 +178,7 @@ extern "C" {
|
||||
* DEPRECATED IN 3.0.0, in favor of OSSL_default_cipher_list()
|
||||
* Update both macro and function simultaneously
|
||||
*/
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define SSL_DEFAULT_CIPHER_LIST "ALL:!COMPLEMENTOFDEFAULT:!eNULL"
|
||||
/*
|
||||
* This is the default set of TLSv1.3 ciphersuites
|
||||
@@ -598,6 +598,7 @@ typedef int (*SSL_async_callback_fn)(SSL *s, void *arg);
|
||||
# define SSL_CONF_TYPE_FILE 0x2
|
||||
# define SSL_CONF_TYPE_DIR 0x3
|
||||
# define SSL_CONF_TYPE_NONE 0x4
|
||||
# define SSL_CONF_TYPE_STORE 0x5
|
||||
|
||||
/* Maximum length of the application-controlled segment of a a TLSv1.3 cookie */
|
||||
# define SSL_COOKIE_LENGTH 4096
|
||||
@@ -1124,7 +1125,7 @@ size_t SSL_get_peer_finished(const SSL *s, void *buf, size_t count);
|
||||
# define SSL_VERIFY_CLIENT_ONCE 0x04
|
||||
# define SSL_VERIFY_POST_HANDSHAKE 0x08
|
||||
|
||||
# if !OPENSSL_API_1_1_0
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# define OpenSSL_add_ssl_algorithms() SSL_library_init()
|
||||
# define SSLeay_add_ssl_algorithms() SSL_library_init()
|
||||
# endif
|
||||
@@ -1344,7 +1345,7 @@ DECLARE_PEM_rw(SSL_SESSION, SSL_SESSION)
|
||||
SSL_ctrl(s,SSL_CTRL_SET_DH_AUTO,onoff,NULL)
|
||||
# define SSL_set_tmp_dh(ssl,dh) \
|
||||
SSL_ctrl(ssl,SSL_CTRL_SET_TMP_DH,0,(char *)(dh))
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define SSL_CTX_set_tmp_ecdh(ctx,ecdh) \
|
||||
SSL_CTX_ctrl(ctx,SSL_CTRL_SET_TMP_ECDH,0,(char *)(ecdh))
|
||||
# define SSL_set_tmp_ecdh(ssl,ecdh) \
|
||||
@@ -1499,7 +1500,7 @@ DECLARE_PEM_rw(SSL_SESSION, SSL_SESSION)
|
||||
# define SSL_get_shared_curve SSL_get_shared_group
|
||||
|
||||
|
||||
# if !OPENSSL_API_1_1_0
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
/* Provide some compatibility macros for removed functionality. */
|
||||
# define SSL_CTX_need_tmp_RSA(ctx) 0
|
||||
# define SSL_CTX_set_tmp_rsa(ctx,rsa) 1
|
||||
@@ -1626,8 +1627,10 @@ __owur int SSL_add_file_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs,
|
||||
const char *file);
|
||||
int SSL_add_dir_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs,
|
||||
const char *dir);
|
||||
int SSL_add_store_cert_subjects_to_stack(STACK_OF(X509_NAME) *stackCAs,
|
||||
const char *uri);
|
||||
|
||||
# if !OPENSSL_API_1_1_0
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# define SSL_load_error_strings() \
|
||||
OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS \
|
||||
| OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL)
|
||||
@@ -1984,7 +1987,7 @@ void SSL_set_accept_state(SSL *s);
|
||||
|
||||
__owur long SSL_get_default_timeout(const SSL *s);
|
||||
|
||||
# if !OPENSSL_API_1_1_0
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# define SSL_library_init() OPENSSL_init_ssl(0, NULL)
|
||||
# endif
|
||||
|
||||
@@ -2013,8 +2016,13 @@ __owur int SSL_client_version(const SSL *s);
|
||||
__owur int SSL_CTX_set_default_verify_paths(SSL_CTX *ctx);
|
||||
__owur int SSL_CTX_set_default_verify_dir(SSL_CTX *ctx);
|
||||
__owur int SSL_CTX_set_default_verify_file(SSL_CTX *ctx);
|
||||
__owur int SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile,
|
||||
const char *CApath);
|
||||
__owur int SSL_CTX_set_default_verify_store(SSL_CTX *ctx);
|
||||
__owur int SSL_CTX_load_verify_file(SSL_CTX *ctx, const char *CAfile);
|
||||
__owur int SSL_CTX_load_verify_dir(SSL_CTX *ctx, const char *CApath);
|
||||
__owur int SSL_CTX_load_verify_store(SSL_CTX *ctx, const char *CAstore);
|
||||
DEPRECATEDIN_3_0(__owur int SSL_CTX_load_verify_locations(SSL_CTX *ctx,
|
||||
const char *CAfile,
|
||||
const char *CApath))
|
||||
# define SSL_get0_session SSL_get_session/* just peek at pointer */
|
||||
__owur SSL_SESSION *SSL_get_session(const SSL *ssl);
|
||||
__owur SSL_SESSION *SSL_get1_session(SSL *ssl); /* obtain a reference count */
|
||||
@@ -2113,7 +2121,7 @@ __owur int SSL_COMP_get_id(const SSL_COMP *comp);
|
||||
STACK_OF(SSL_COMP) *SSL_COMP_get_compression_methods(void);
|
||||
__owur STACK_OF(SSL_COMP) *SSL_COMP_set0_compression_methods(STACK_OF(SSL_COMP)
|
||||
*meths);
|
||||
# if !OPENSSL_API_1_1_0
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# define SSL_COMP_free_compression_methods() while(0) continue
|
||||
# endif
|
||||
__owur int SSL_COMP_add_compression_method(int id, COMP_METHOD *cm);
|
||||
@@ -2165,7 +2173,7 @@ size_t SSL_get_num_tickets(const SSL *s);
|
||||
int SSL_CTX_set_num_tickets(SSL_CTX *ctx, size_t num_tickets);
|
||||
size_t SSL_CTX_get_num_tickets(const SSL_CTX *ctx);
|
||||
|
||||
# if !OPENSSL_API_1_1_0
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# define SSL_cache_hit(s) SSL_session_reused(s)
|
||||
# endif
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_SSL2_H
|
||||
# endif
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_SSL3_H
|
||||
# endif
|
||||
|
||||
|
||||
@@ -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
|
||||
@@ -23,7 +23,7 @@ int ERR_load_SSL_strings(void);
|
||||
/*
|
||||
* SSL function codes.
|
||||
*/
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define SSL_F_ADD_CLIENT_KEY_SHARE_EXT 0
|
||||
# define SSL_F_ADD_KEY_SHARE 0
|
||||
# define SSL_F_BYTES_TO_CIPHER_LIST 0
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
# pragma once
|
||||
|
||||
# include <openssl/macros.h>
|
||||
# if !OPENSSL_API_3
|
||||
# ifndef OPENSSL_NO_DEPRECATED_3_0
|
||||
# define HEADER_STACK_H
|
||||
# endif
|
||||
|
||||
@@ -56,7 +56,7 @@ OPENSSL_STACK *OPENSSL_sk_dup(const OPENSSL_STACK *st);
|
||||
void OPENSSL_sk_sort(OPENSSL_STACK *st);
|
||||
int OPENSSL_sk_is_sorted(const OPENSSL_STACK *st);
|
||||
|
||||
# if !OPENSSL_API_1_1_0
|
||||
# ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
||||
# define _STACK OPENSSL_STACK
|
||||
# define sk_num OPENSSL_sk_num
|
||||
# define sk_value OPENSSL_sk_value
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user