Changeset 94082 in vbox for trunk/src/libs/openssl-3.0.1/include/openssl
- Timestamp:
- Mar 3, 2022 7:17:34 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 150325
- Location:
- trunk/src/libs/openssl-3.0.1
- Files:
-
- 22 deleted
- 86 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/openssl-3.0.1
- Property svn:mergeinfo
-
old new 12 12 /vendor/openssl/1.1.1c:131722-131725 13 13 /vendor/openssl/1.1.1k:145841-145843 14 /vendor/openssl/3.0.1:150323-150324 15 /vendor/openssl/current:147554-150322
-
- Property svn:mergeinfo
-
trunk/src/libs/openssl-3.0.1/include/openssl/__DECC_INCLUDE_EPILOGUE.H
r91772 r94082 2 2 * Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at -
trunk/src/libs/openssl-3.0.1/include/openssl/__DECC_INCLUDE_PROLOGUE.H
r91772 r94082 2 2 * Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at -
trunk/src/libs/openssl-3.0.1/include/openssl/aes.h
r91772 r94082 1 1 /* 2 * Copyright 2002-20 16The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 2002-2020 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_AES_H 11 # define HEADER_AES_H 10 #ifndef OPENSSL_AES_H 11 # define OPENSSL_AES_H 12 # pragma once 13 14 # include <openssl/macros.h> 15 # ifndef OPENSSL_NO_DEPRECATED_3_0 16 # define HEADER_AES_H 17 # endif 12 18 13 19 # include <openssl/opensslconf.h> … … 18 24 # endif 19 25 20 # define AES_ENCRYPT 1 21 # define AES_DECRYPT 0 26 # define AES_BLOCK_SIZE 16 22 27 23 /* 24 * Because array size can't be a const in C, the following two are macros. 25 * Both sizes are in bytes. 26 */ 27 # define AES_MAXNR 14 28 # define AES_BLOCK_SIZE 16 28 # ifndef OPENSSL_NO_DEPRECATED_3_0 29 30 # define AES_ENCRYPT 1 31 # define AES_DECRYPT 0 32 33 # define AES_MAXNR 14 34 29 35 30 36 /* This should be a hidden type, but EVP requires that the size be known */ 31 37 struct aes_key_st { 32 # ifdef AES_LONG38 # ifdef AES_LONG 33 39 unsigned long rd_key[4 * (AES_MAXNR + 1)]; 34 # else40 # else 35 41 unsigned int rd_key[4 * (AES_MAXNR + 1)]; 36 # endif42 # endif 37 43 int rounds; 38 44 }; 39 45 typedef struct aes_key_st AES_KEY; 40 46 41 const char *AES_options(void); 42 47 # endif 48 # ifndef OPENSSL_NO_DEPRECATED_3_0 49 OSSL_DEPRECATEDIN_3_0 const char *AES_options(void); 50 OSSL_DEPRECATEDIN_3_0 43 51 int AES_set_encrypt_key(const unsigned char *userKey, const int bits, 44 52 AES_KEY *key); 53 OSSL_DEPRECATEDIN_3_0 45 54 int AES_set_decrypt_key(const unsigned char *userKey, const int bits, 46 55 AES_KEY *key); 47 56 OSSL_DEPRECATEDIN_3_0 48 57 void AES_encrypt(const unsigned char *in, unsigned char *out, 49 58 const AES_KEY *key); 59 OSSL_DEPRECATEDIN_3_0 50 60 void AES_decrypt(const unsigned char *in, unsigned char *out, 51 61 const AES_KEY *key); 52 62 OSSL_DEPRECATEDIN_3_0 53 63 void AES_ecb_encrypt(const unsigned char *in, unsigned char *out, 54 64 const AES_KEY *key, const int enc); 65 OSSL_DEPRECATEDIN_3_0 55 66 void AES_cbc_encrypt(const unsigned char *in, unsigned char *out, 56 67 size_t length, const AES_KEY *key, 57 68 unsigned char *ivec, const int enc); 69 OSSL_DEPRECATEDIN_3_0 58 70 void AES_cfb128_encrypt(const unsigned char *in, unsigned char *out, 59 71 size_t length, const AES_KEY *key, 60 72 unsigned char *ivec, int *num, const int enc); 73 OSSL_DEPRECATEDIN_3_0 61 74 void AES_cfb1_encrypt(const unsigned char *in, unsigned char *out, 62 75 size_t length, const AES_KEY *key, 63 76 unsigned char *ivec, int *num, const int enc); 77 OSSL_DEPRECATEDIN_3_0 64 78 void AES_cfb8_encrypt(const unsigned char *in, unsigned char *out, 65 79 size_t length, const AES_KEY *key, 66 80 unsigned char *ivec, int *num, const int enc); 81 OSSL_DEPRECATEDIN_3_0 67 82 void AES_ofb128_encrypt(const unsigned char *in, unsigned char *out, 68 83 size_t length, const AES_KEY *key, 69 84 unsigned char *ivec, int *num); 85 70 86 /* NB: the IV is _two_ blocks long */ 87 OSSL_DEPRECATEDIN_3_0 71 88 void AES_ige_encrypt(const unsigned char *in, unsigned char *out, 72 89 size_t length, const AES_KEY *key, 73 90 unsigned char *ivec, const int enc); 74 91 /* NB: the IV is _four_ blocks long */ 92 OSSL_DEPRECATEDIN_3_0 75 93 void AES_bi_ige_encrypt(const unsigned char *in, unsigned char *out, 76 size_t length, const AES_KEY *key, 77 const AES_KEY *key2, const unsigned char *ivec, 78 const int enc); 79 94 size_t length, const AES_KEY *key, const AES_KEY *key2, 95 const unsigned char *ivec, const int enc); 96 OSSL_DEPRECATEDIN_3_0 80 97 int AES_wrap_key(AES_KEY *key, const unsigned char *iv, 81 unsigned char *out, 82 const unsigned char *in, unsigned int inlen); 98 unsigned char *out, const unsigned char *in, 99 unsigned int inlen); 100 OSSL_DEPRECATEDIN_3_0 83 101 int AES_unwrap_key(AES_KEY *key, const unsigned char *iv, 84 unsigned char *out, 85 const unsigned char *in, unsigned int inlen); 102 unsigned char *out, const unsigned char *in, 103 unsigned int inlen); 104 # endif 86 105 87 106 -
trunk/src/libs/openssl-3.0.1/include/openssl/asn1_mac.h
r91772 r94082 2 2 * Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at -
trunk/src/libs/openssl-3.0.1/include/openssl/asn1err.h
r91772 r94082 1 1 /* 2 2 * Generated by util/mkerr.pl DO NOT EDIT 3 * Copyright 1995-202 0The OpenSSL Project Authors. All Rights Reserved.3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 4 * 5 * Licensed under the OpenSSL license(the "License"). You may not use5 * Licensed under the Apache License 2.0 (the "License"). You may not use 6 6 * this file except in compliance with the License. You can obtain a copy 7 7 * in the file LICENSE in the source distribution or at … … 9 9 */ 10 10 11 #ifndef HEADER_ASN1ERR_H 12 # define HEADER_ASN1ERR_H 11 #ifndef OPENSSL_ASN1ERR_H 12 # define OPENSSL_ASN1ERR_H 13 # pragma once 13 14 15 # include <openssl/opensslconf.h> 14 16 # include <openssl/symhacks.h> 17 # include <openssl/cryptoerr_legacy.h> 15 18 16 # ifdef __cplusplus17 extern "C"18 # endif19 int ERR_load_ASN1_strings(void);20 19 21 /*22 * ASN1 function codes.23 */24 # define ASN1_F_A2D_ASN1_OBJECT 10025 # define ASN1_F_A2I_ASN1_INTEGER 10226 # define ASN1_F_A2I_ASN1_STRING 10327 # define ASN1_F_APPEND_EXP 17628 # define ASN1_F_ASN1_BIO_INIT 11329 # define ASN1_F_ASN1_BIT_STRING_SET_BIT 18330 # define ASN1_F_ASN1_CB 17731 # define ASN1_F_ASN1_CHECK_TLEN 10432 # define ASN1_F_ASN1_COLLECT 10633 # define ASN1_F_ASN1_D2I_EX_PRIMITIVE 10834 # define ASN1_F_ASN1_D2I_FP 10935 # define ASN1_F_ASN1_D2I_READ_BIO 10736 # define ASN1_F_ASN1_DIGEST 18437 # define ASN1_F_ASN1_DO_ADB 11038 # define ASN1_F_ASN1_DO_LOCK 23339 # define ASN1_F_ASN1_DUP 11140 # define ASN1_F_ASN1_ENC_SAVE 11541 # define ASN1_F_ASN1_EX_C2I 20442 # define ASN1_F_ASN1_FIND_END 19043 # define ASN1_F_ASN1_GENERALIZEDTIME_ADJ 21644 # define ASN1_F_ASN1_GENERATE_V3 17845 # define ASN1_F_ASN1_GET_INT64 22446 # define ASN1_F_ASN1_GET_OBJECT 11447 # define ASN1_F_ASN1_GET_UINT64 22548 # define ASN1_F_ASN1_I2D_BIO 11649 # define ASN1_F_ASN1_I2D_FP 11750 # define ASN1_F_ASN1_ITEM_D2I_FP 20651 # define ASN1_F_ASN1_ITEM_DUP 19152 # define ASN1_F_ASN1_ITEM_EMBED_D2I 12053 # define ASN1_F_ASN1_ITEM_EMBED_NEW 12154 # define ASN1_F_ASN1_ITEM_EX_I2D 14455 # define ASN1_F_ASN1_ITEM_FLAGS_I2D 11856 # define ASN1_F_ASN1_ITEM_I2D_BIO 19257 # define ASN1_F_ASN1_ITEM_I2D_FP 19358 # define ASN1_F_ASN1_ITEM_PACK 19859 # define ASN1_F_ASN1_ITEM_SIGN 19560 # define ASN1_F_ASN1_ITEM_SIGN_CTX 22061 # define ASN1_F_ASN1_ITEM_UNPACK 19962 # define ASN1_F_ASN1_ITEM_VERIFY 19763 # define ASN1_F_ASN1_MBSTRING_NCOPY 12264 # define ASN1_F_ASN1_OBJECT_NEW 12365 # define ASN1_F_ASN1_OUTPUT_DATA 21466 # define ASN1_F_ASN1_PCTX_NEW 20567 # define ASN1_F_ASN1_PRIMITIVE_NEW 11968 # define ASN1_F_ASN1_SCTX_NEW 22169 # define ASN1_F_ASN1_SIGN 12870 # define ASN1_F_ASN1_STR2TYPE 17971 # define ASN1_F_ASN1_STRING_GET_INT64 22772 # define ASN1_F_ASN1_STRING_GET_UINT64 23073 # define ASN1_F_ASN1_STRING_SET 18674 # define ASN1_F_ASN1_STRING_TABLE_ADD 12975 # define ASN1_F_ASN1_STRING_TO_BN 22876 # define ASN1_F_ASN1_STRING_TYPE_NEW 13077 # define ASN1_F_ASN1_TEMPLATE_EX_D2I 13278 # define ASN1_F_ASN1_TEMPLATE_NEW 13379 # define ASN1_F_ASN1_TEMPLATE_NOEXP_D2I 13180 # define ASN1_F_ASN1_TIME_ADJ 21781 # define ASN1_F_ASN1_TYPE_GET_INT_OCTETSTRING 13482 # define ASN1_F_ASN1_TYPE_GET_OCTETSTRING 13583 # define ASN1_F_ASN1_UTCTIME_ADJ 21884 # define ASN1_F_ASN1_VERIFY 13785 # define ASN1_F_B64_READ_ASN1 20986 # define ASN1_F_B64_WRITE_ASN1 21087 # define ASN1_F_BIO_NEW_NDEF 20888 # define ASN1_F_BITSTR_CB 18089 # define ASN1_F_BN_TO_ASN1_STRING 22990 # define ASN1_F_C2I_ASN1_BIT_STRING 18991 # define ASN1_F_C2I_ASN1_INTEGER 19492 # define ASN1_F_C2I_ASN1_OBJECT 19693 # define ASN1_F_C2I_IBUF 22694 # define ASN1_F_C2I_UINT64_INT 10195 # define ASN1_F_COLLECT_DATA 14096 # define ASN1_F_D2I_ASN1_OBJECT 14797 # define ASN1_F_D2I_ASN1_UINTEGER 15098 # define ASN1_F_D2I_AUTOPRIVATEKEY 20799 # define ASN1_F_D2I_PRIVATEKEY 154100 # define ASN1_F_D2I_PUBLICKEY 155101 # define ASN1_F_DO_BUF 142102 # define ASN1_F_DO_CREATE 124103 # define ASN1_F_DO_DUMP 125104 # define ASN1_F_DO_TCREATE 222105 # define ASN1_F_I2A_ASN1_OBJECT 126106 # define ASN1_F_I2D_ASN1_BIO_STREAM 211107 # define ASN1_F_I2D_ASN1_OBJECT 143108 # define ASN1_F_I2D_DSA_PUBKEY 161109 # define ASN1_F_I2D_EC_PUBKEY 181110 # define ASN1_F_I2D_PRIVATEKEY 163111 # define ASN1_F_I2D_PUBLICKEY 164112 # define ASN1_F_I2D_RSA_PUBKEY 165113 # define ASN1_F_LONG_C2I 166114 # define ASN1_F_NDEF_PREFIX 127115 # define ASN1_F_NDEF_SUFFIX 136116 # define ASN1_F_OID_MODULE_INIT 174117 # define ASN1_F_PARSE_TAGGING 182118 # define ASN1_F_PKCS5_PBE2_SET_IV 167119 # define ASN1_F_PKCS5_PBE2_SET_SCRYPT 231120 # define ASN1_F_PKCS5_PBE_SET 202121 # define ASN1_F_PKCS5_PBE_SET0_ALGOR 215122 # define ASN1_F_PKCS5_PBKDF2_SET 219123 # define ASN1_F_PKCS5_SCRYPT_SET 232124 # define ASN1_F_SMIME_READ_ASN1 212125 # define ASN1_F_SMIME_TEXT 213126 # define ASN1_F_STABLE_GET 138127 # define ASN1_F_STBL_MODULE_INIT 223128 # define ASN1_F_UINT32_C2I 105129 # define ASN1_F_UINT32_NEW 139130 # define ASN1_F_UINT64_C2I 112131 # define ASN1_F_UINT64_NEW 141132 # define ASN1_F_X509_CRL_ADD0_REVOKED 169133 # define ASN1_F_X509_INFO_NEW 170134 # define ASN1_F_X509_NAME_ENCODE 203135 # define ASN1_F_X509_NAME_EX_D2I 158136 # define ASN1_F_X509_NAME_EX_NEW 171137 # define ASN1_F_X509_PKEY_NEW 173138 20 139 21 /* … … 200 82 # define ASN1_R_INVALID_UTF8STRING 134 201 83 # define ASN1_R_INVALID_VALUE 219 84 # define ASN1_R_LENGTH_TOO_LONG 231 202 85 # define ASN1_R_LIST_ERROR 188 203 86 # define ASN1_R_MIME_NO_CONTENT_TYPE 206 … … 240 123 # define ASN1_R_UNEXPECTED_EOC 159 241 124 # define ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH 215 125 # define ASN1_R_UNKNOWN_DIGEST 229 242 126 # define ASN1_R_UNKNOWN_FORMAT 160 243 127 # define ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM 161 -
trunk/src/libs/openssl-3.0.1/include/openssl/async.h
r91772 r94082 2 2 * Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 10 10 #include <stdlib.h> 11 11 12 #ifndef HEADER_ASYNC_H 13 # define HEADER_ASYNC_H 12 #ifndef OPENSSL_ASYNC_H 13 # define OPENSSL_ASYNC_H 14 # pragma once 15 16 # include <openssl/macros.h> 17 # ifndef OPENSSL_NO_DEPRECATED_3_0 18 # define HEADER_ASYNC_H 19 # endif 14 20 15 21 #if defined(_WIN32) … … 32 38 typedef struct async_job_st ASYNC_JOB; 33 39 typedef struct async_wait_ctx_st ASYNC_WAIT_CTX; 40 typedef int (*ASYNC_callback_fn)(void *arg); 34 41 35 42 #define ASYNC_ERR 0 … … 37 44 #define ASYNC_PAUSE 2 38 45 #define ASYNC_FINISH 3 46 47 #define ASYNC_STATUS_UNSUPPORTED 0 48 #define ASYNC_STATUS_ERR 1 49 #define ASYNC_STATUS_OK 2 50 #define ASYNC_STATUS_EAGAIN 3 39 51 40 52 int ASYNC_init_thread(size_t max_size, size_t init_size); … … 53 65 int ASYNC_WAIT_CTX_get_all_fds(ASYNC_WAIT_CTX *ctx, OSSL_ASYNC_FD *fd, 54 66 size_t *numfds); 67 int ASYNC_WAIT_CTX_get_callback(ASYNC_WAIT_CTX *ctx, 68 ASYNC_callback_fn *callback, 69 void **callback_arg); 70 int ASYNC_WAIT_CTX_set_callback(ASYNC_WAIT_CTX *ctx, 71 ASYNC_callback_fn callback, 72 void *callback_arg); 73 int ASYNC_WAIT_CTX_set_status(ASYNC_WAIT_CTX *ctx, int status); 74 int ASYNC_WAIT_CTX_get_status(ASYNC_WAIT_CTX *ctx); 55 75 int ASYNC_WAIT_CTX_get_changed_fds(ASYNC_WAIT_CTX *ctx, OSSL_ASYNC_FD *addfd, 56 76 size_t *numaddfds, OSSL_ASYNC_FD *delfd, -
trunk/src/libs/openssl-3.0.1/include/openssl/asyncerr.h
r91772 r94082 1 1 /* 2 2 * Generated by util/mkerr.pl DO NOT EDIT 3 * Copyright 1995-20 19The OpenSSL Project Authors. All Rights Reserved.3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 4 * 5 * Licensed under the OpenSSL license(the "License"). You may not use5 * Licensed under the Apache License 2.0 (the "License"). You may not use 6 6 * this file except in compliance with the License. You can obtain a copy 7 7 * in the file LICENSE in the source distribution or at … … 9 9 */ 10 10 11 #ifndef HEADER_ASYNCERR_H 12 # define HEADER_ASYNCERR_H 11 #ifndef OPENSSL_ASYNCERR_H 12 # define OPENSSL_ASYNCERR_H 13 # pragma once 13 14 14 # i fndef HEADER_SYMHACKS_H15 # 16 # endif15 # include <openssl/opensslconf.h> 16 # include <openssl/symhacks.h> 17 # include <openssl/cryptoerr_legacy.h> 17 18 18 # ifdef __cplusplus19 extern "C"20 # endif21 int ERR_load_ASYNC_strings(void);22 19 23 /*24 * ASYNC function codes.25 */26 # define ASYNC_F_ASYNC_CTX_NEW 10027 # define ASYNC_F_ASYNC_INIT_THREAD 10128 # define ASYNC_F_ASYNC_JOB_NEW 10229 # define ASYNC_F_ASYNC_PAUSE_JOB 10330 # define ASYNC_F_ASYNC_START_FUNC 10431 # define ASYNC_F_ASYNC_START_JOB 10532 # define ASYNC_F_ASYNC_WAIT_CTX_SET_WAIT_FD 10633 20 34 21 /* -
trunk/src/libs/openssl-3.0.1/include/openssl/bioerr.h
r91772 r94082 1 1 /* 2 2 * Generated by util/mkerr.pl DO NOT EDIT 3 * Copyright 1995-20 19The OpenSSL Project Authors. All Rights Reserved.3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 4 * 5 * Licensed under the OpenSSL license(the "License"). You may not use5 * Licensed under the Apache License 2.0 (the "License"). You may not use 6 6 * this file except in compliance with the License. You can obtain a copy 7 7 * in the file LICENSE in the source distribution or at … … 9 9 */ 10 10 11 #ifndef HEADER_BIOERR_H 12 # define HEADER_BIOERR_H 11 #ifndef OPENSSL_BIOERR_H 12 # define OPENSSL_BIOERR_H 13 # pragma once 13 14 14 # i fndef HEADER_SYMHACKS_H15 # 16 # endif15 # include <openssl/opensslconf.h> 16 # include <openssl/symhacks.h> 17 # include <openssl/cryptoerr_legacy.h> 17 18 18 # ifdef __cplusplus19 extern "C"20 # endif21 int ERR_load_BIO_strings(void);22 19 23 /*24 * BIO function codes.25 */26 # define BIO_F_ACPT_STATE 10027 # define BIO_F_ADDRINFO_WRAP 14828 # define BIO_F_ADDR_STRINGS 13429 # define BIO_F_BIO_ACCEPT 10130 # define BIO_F_BIO_ACCEPT_EX 13731 # define BIO_F_BIO_ACCEPT_NEW 15232 # define BIO_F_BIO_ADDR_NEW 14433 # define BIO_F_BIO_BIND 14734 # define BIO_F_BIO_CALLBACK_CTRL 13135 # define BIO_F_BIO_CONNECT 13836 # define BIO_F_BIO_CONNECT_NEW 15337 # define BIO_F_BIO_CTRL 10338 # define BIO_F_BIO_GETS 10439 # define BIO_F_BIO_GET_HOST_IP 10640 # define BIO_F_BIO_GET_NEW_INDEX 10241 # define BIO_F_BIO_GET_PORT 10742 # define BIO_F_BIO_LISTEN 13943 # define BIO_F_BIO_LOOKUP 13544 # define BIO_F_BIO_LOOKUP_EX 14345 # define BIO_F_BIO_MAKE_PAIR 12146 # define BIO_F_BIO_METH_NEW 14647 # define BIO_F_BIO_NEW 10848 # define BIO_F_BIO_NEW_DGRAM_SCTP 14549 # define BIO_F_BIO_NEW_FILE 10950 # define BIO_F_BIO_NEW_MEM_BUF 12651 # define BIO_F_BIO_NREAD 12352 # define BIO_F_BIO_NREAD0 12453 # define BIO_F_BIO_NWRITE 12554 # define BIO_F_BIO_NWRITE0 12255 # define BIO_F_BIO_PARSE_HOSTSERV 13656 # define BIO_F_BIO_PUTS 11057 # define BIO_F_BIO_READ 11158 # define BIO_F_BIO_READ_EX 10559 # define BIO_F_BIO_READ_INTERN 12060 # define BIO_F_BIO_SOCKET 14061 # define BIO_F_BIO_SOCKET_NBIO 14262 # define BIO_F_BIO_SOCK_INFO 14163 # define BIO_F_BIO_SOCK_INIT 11264 # define BIO_F_BIO_WRITE 11365 # define BIO_F_BIO_WRITE_EX 11966 # define BIO_F_BIO_WRITE_INTERN 12867 # define BIO_F_BUFFER_CTRL 11468 # define BIO_F_CONN_CTRL 12769 # define BIO_F_CONN_STATE 11570 # define BIO_F_DGRAM_SCTP_NEW 14971 # define BIO_F_DGRAM_SCTP_READ 13272 # define BIO_F_DGRAM_SCTP_WRITE 13373 # define BIO_F_DOAPR_OUTCH 15074 # define BIO_F_FILE_CTRL 11675 # define BIO_F_FILE_READ 13076 # define BIO_F_LINEBUFFER_CTRL 12977 # define BIO_F_LINEBUFFER_NEW 15178 # define BIO_F_MEM_WRITE 11779 # define BIO_F_NBIOF_NEW 15480 # define BIO_F_SLG_WRITE 15581 # define BIO_F_SSL_NEW 11882 20 83 21 /* … … 90 28 # define BIO_R_BROKEN_PIPE 124 91 29 # define BIO_R_CONNECT_ERROR 103 30 # define BIO_R_CONNECT_TIMEOUT 147 92 31 # define BIO_R_GETHOSTBYNAME_ADDR_IS_NOT_AF_INET 107 93 32 # define BIO_R_GETSOCKNAME_ERROR 132 … … 106 45 # define BIO_R_NO_PORT_DEFINED 113 107 46 # define BIO_R_NO_SUCH_FILE 128 108 # define BIO_R_NULL_PARAMETER 115 47 # define BIO_R_NULL_PARAMETER 115 /* unused */ 48 # define BIO_R_TRANSFER_ERROR 104 49 # define BIO_R_TRANSFER_TIMEOUT 105 109 50 # define BIO_R_UNABLE_TO_BIND_SOCKET 117 110 51 # define BIO_R_UNABLE_TO_CREATE_SOCKET 118 -
trunk/src/libs/openssl-3.0.1/include/openssl/blowfish.h
r91772 r94082 1 1 /* 2 * Copyright 1995-20 16The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_BLOWFISH_H 11 # define HEADER_BLOWFISH_H 10 #ifndef OPENSSL_BLOWFISH_H 11 # define OPENSSL_BLOWFISH_H 12 # pragma once 13 14 # include <openssl/macros.h> 15 # ifndef OPENSSL_NO_DEPRECATED_3_0 16 # define HEADER_BLOWFISH_H 17 # endif 12 18 13 19 # include <openssl/opensslconf.h> … … 19 25 # endif 20 26 21 # define BF_ENCRYPT 1 22 # define BF_DECRYPT 0 27 # define BF_BLOCK 8 28 29 # ifndef OPENSSL_NO_DEPRECATED_3_0 30 31 # define BF_ENCRYPT 1 32 # define BF_DECRYPT 0 23 33 24 34 /*- … … 27 37 * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 28 38 */ 29 # define BF_LONG unsigned int39 # define BF_LONG unsigned int 30 40 31 # define BF_ROUNDS 16 32 # define BF_BLOCK 8 41 # define BF_ROUNDS 16 33 42 34 43 typedef struct bf_key_st { … … 37 46 } BF_KEY; 38 47 39 void BF_set_key(BF_KEY *key, int len, const unsigned char *data); 40 41 void BF_encrypt(BF_LONG *data, const BF_KEY *key); 42 void BF_decrypt(BF_LONG *data, const BF_KEY *key); 43 44 void BF_ecb_encrypt(const unsigned char *in, unsigned char *out, 45 const BF_KEY *key, int enc); 46 void BF_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, 47 const BF_KEY *schedule, unsigned char *ivec, int enc); 48 void BF_cfb64_encrypt(const unsigned char *in, unsigned char *out, 49 long length, const BF_KEY *schedule, 50 unsigned char *ivec, int *num, int enc); 51 void BF_ofb64_encrypt(const unsigned char *in, unsigned char *out, 52 long length, const BF_KEY *schedule, 53 unsigned char *ivec, int *num); 54 const char *BF_options(void); 48 # endif /* OPENSSL_NO_DEPRECATED_3_0 */ 49 # ifndef OPENSSL_NO_DEPRECATED_3_0 50 OSSL_DEPRECATEDIN_3_0 void BF_set_key(BF_KEY *key, int len, 51 const unsigned char *data); 52 OSSL_DEPRECATEDIN_3_0 void BF_encrypt(BF_LONG *data, const BF_KEY *key); 53 OSSL_DEPRECATEDIN_3_0 void BF_decrypt(BF_LONG *data, const BF_KEY *key); 54 OSSL_DEPRECATEDIN_3_0 void BF_ecb_encrypt(const unsigned char *in, 55 unsigned char *out, const BF_KEY *key, 56 int enc); 57 OSSL_DEPRECATEDIN_3_0 void BF_cbc_encrypt(const unsigned char *in, 58 unsigned char *out, long length, 59 const BF_KEY *schedule, 60 unsigned char *ivec, int enc); 61 OSSL_DEPRECATEDIN_3_0 void BF_cfb64_encrypt(const unsigned char *in, 62 unsigned char *out, 63 long length, const BF_KEY *schedule, 64 unsigned char *ivec, int *num, 65 int enc); 66 OSSL_DEPRECATEDIN_3_0 void BF_ofb64_encrypt(const unsigned char *in, 67 unsigned char *out, 68 long length, const BF_KEY *schedule, 69 unsigned char *ivec, int *num); 70 OSSL_DEPRECATEDIN_3_0 const char *BF_options(void); 71 # endif 55 72 56 73 # ifdef __cplusplus -
trunk/src/libs/openssl-3.0.1/include/openssl/bn.h
r91772 r94082 1 1 /* 2 * Copyright 1995-202 0The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 3 3 * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved 4 4 * 5 * Licensed under the OpenSSL license(the "License"). You may not use5 * Licensed under the Apache License 2.0 (the "License"). You may not use 6 6 * this file except in compliance with the License. You can obtain a copy 7 7 * in the file LICENSE in the source distribution or at … … 9 9 */ 10 10 11 #ifndef HEADER_BN_H 12 # define HEADER_BN_H 11 #ifndef OPENSSL_BN_H 12 # define OPENSSL_BN_H 13 # pragma once 14 15 # include <openssl/macros.h> 16 # ifndef OPENSSL_NO_DEPRECATED_3_0 17 # define HEADER_BN_H 18 # endif 13 19 14 20 # include <openssl/e_os2.h> … … 17 23 # endif 18 24 # include <openssl/opensslconf.h> 19 # include <openssl/ ossl_typ.h>25 # include <openssl/types.h> 20 26 # include <openssl/crypto.h> 21 27 # include <openssl/bnerr.h> … … 62 68 # define BN_FLG_SECURE 0x08 63 69 64 # if OPENSSL_API_COMPAT < 0x00908000L70 # ifndef OPENSSL_NO_DEPRECATED_0_9_8 65 71 /* deprecated name for the flag */ 66 72 # define BN_FLG_EXP_CONSTTIME BN_FLG_CONSTTIME … … 104 110 void *BN_GENCB_get_arg(BN_GENCB *cb); 105 111 106 # define BN_prime_checks 0 /* default: select number of iterations based 107 * on the size of the number */ 112 # ifndef OPENSSL_NO_DEPRECATED_3_0 113 # define BN_prime_checks 0 /* default: select number of iterations based 114 * on the size of the number */ 108 115 109 116 /* … … 170 177 */ 171 178 172 # define BN_prime_checks_for_size(b) ((b) >= 3747 ? 3 : \ 173 (b) >= 1345 ? 4 : \ 174 (b) >= 476 ? 5 : \ 175 (b) >= 400 ? 6 : \ 176 (b) >= 347 ? 7 : \ 177 (b) >= 308 ? 8 : \ 178 (b) >= 55 ? 27 : \ 179 /* b >= 6 */ 34) 179 # define BN_prime_checks_for_size(b) ((b) >= 3747 ? 3 : \ 180 (b) >= 1345 ? 4 : \ 181 (b) >= 476 ? 5 : \ 182 (b) >= 400 ? 6 : \ 183 (b) >= 347 ? 7 : \ 184 (b) >= 308 ? 8 : \ 185 (b) >= 55 ? 27 : \ 186 /* b >= 6 */ 34) 187 # endif 180 188 181 189 # define BN_num_bytes(a) ((BN_num_bits(a)+7)/8) … … 191 199 void BN_zero_ex(BIGNUM *a); 192 200 193 # if OPENSSL_API_ COMPAT >= 0x00908000L201 # if OPENSSL_API_LEVEL > 908 194 202 # define BN_zero(a) BN_zero_ex(a) 195 203 # else … … 199 207 const BIGNUM *BN_value_one(void); 200 208 char *BN_options(void); 209 BN_CTX *BN_CTX_new_ex(OSSL_LIB_CTX *ctx); 201 210 BN_CTX *BN_CTX_new(void); 211 BN_CTX *BN_CTX_secure_new_ex(OSSL_LIB_CTX *ctx); 202 212 BN_CTX *BN_CTX_secure_new(void); 203 213 void BN_CTX_free(BN_CTX *c); … … 205 215 BIGNUM *BN_CTX_get(BN_CTX *ctx); 206 216 void BN_CTX_end(BN_CTX *ctx); 217 int BN_rand_ex(BIGNUM *rnd, int bits, int top, int bottom, 218 unsigned int strength, BN_CTX *ctx); 207 219 int BN_rand(BIGNUM *rnd, int bits, int top, int bottom); 220 int BN_priv_rand_ex(BIGNUM *rnd, int bits, int top, int bottom, 221 unsigned int strength, BN_CTX *ctx); 208 222 int BN_priv_rand(BIGNUM *rnd, int bits, int top, int bottom); 223 int BN_rand_range_ex(BIGNUM *r, const BIGNUM *range, unsigned int strength, 224 BN_CTX *ctx); 209 225 int BN_rand_range(BIGNUM *rnd, const BIGNUM *range); 226 int BN_priv_rand_range_ex(BIGNUM *r, const BIGNUM *range, 227 unsigned int strength, BN_CTX *ctx); 210 228 int BN_priv_rand_range(BIGNUM *rnd, const BIGNUM *range); 229 # ifndef OPENSSL_NO_DEPRECATED_3_0 230 OSSL_DEPRECATEDIN_3_0 211 231 int BN_pseudo_rand(BIGNUM *rnd, int bits, int top, int bottom); 232 OSSL_DEPRECATEDIN_3_0 212 233 int BN_pseudo_rand_range(BIGNUM *rnd, const BIGNUM *range); 234 # endif 213 235 int BN_num_bits(const BIGNUM *a); 214 236 int BN_num_bits_word(BN_ULONG l); … … 224 246 BIGNUM *BN_lebin2bn(const unsigned char *s, int len, BIGNUM *ret); 225 247 int BN_bn2lebinpad(const BIGNUM *a, unsigned char *to, int tolen); 248 BIGNUM *BN_native2bn(const unsigned char *s, int len, BIGNUM *ret); 249 int BN_bn2nativepad(const BIGNUM *a, unsigned char *to, int tolen); 226 250 BIGNUM *BN_mpi2bn(const unsigned char *s, int len, BIGNUM *ret); 227 251 int BN_bn2mpi(const BIGNUM *a, unsigned char *to); … … 293 317 int BN_mod_exp_simple(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, 294 318 const BIGNUM *m, BN_CTX *ctx); 319 int BN_mod_exp_mont_consttime_x2(BIGNUM *rr1, const BIGNUM *a1, const BIGNUM *p1, 320 const BIGNUM *m1, BN_MONT_CTX *in_mont1, 321 BIGNUM *rr2, const BIGNUM *a2, const BIGNUM *p2, 322 const BIGNUM *m2, BN_MONT_CTX *in_mont2, 323 BN_CTX *ctx); 295 324 296 325 int BN_mask_bits(BIGNUM *a, int n); … … 324 353 325 354 /* Deprecated versions */ 326 DEPRECATEDIN_0_9_8(BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe, 327 const BIGNUM *add, 328 const BIGNUM *rem, 329 void (*callback) (int, int, 330 void *), 331 void *cb_arg)) 332 DEPRECATEDIN_0_9_8(int 333 BN_is_prime(const BIGNUM *p, int nchecks, 334 void (*callback) (int, int, void *), 335 BN_CTX *ctx, void *cb_arg)) 336 DEPRECATEDIN_0_9_8(int 337 BN_is_prime_fasttest(const BIGNUM *p, int nchecks, 338 void (*callback) (int, int, void *), 339 BN_CTX *ctx, void *cb_arg, 340 int do_trial_division)) 341 355 # ifndef OPENSSL_NO_DEPRECATED_0_9_8 356 OSSL_DEPRECATEDIN_0_9_8 357 BIGNUM *BN_generate_prime(BIGNUM *ret, int bits, int safe, 358 const BIGNUM *add, const BIGNUM *rem, 359 void (*callback) (int, int, void *), 360 void *cb_arg); 361 OSSL_DEPRECATEDIN_0_9_8 362 int BN_is_prime(const BIGNUM *p, int nchecks, 363 void (*callback) (int, int, void *), 364 BN_CTX *ctx, void *cb_arg); 365 OSSL_DEPRECATEDIN_0_9_8 366 int BN_is_prime_fasttest(const BIGNUM *p, int nchecks, 367 void (*callback) (int, int, void *), 368 BN_CTX *ctx, void *cb_arg, 369 int do_trial_division); 370 # endif 371 # ifndef OPENSSL_NO_DEPRECATED_3_0 372 OSSL_DEPRECATEDIN_3_0 373 int BN_is_prime_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx, BN_GENCB *cb); 374 OSSL_DEPRECATEDIN_3_0 375 int BN_is_prime_fasttest_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx, 376 int do_trial_division, BN_GENCB *cb); 377 # endif 342 378 /* Newer versions */ 379 int BN_generate_prime_ex2(BIGNUM *ret, int bits, int safe, 380 const BIGNUM *add, const BIGNUM *rem, BN_GENCB *cb, 381 BN_CTX *ctx); 343 382 int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe, const BIGNUM *add, 344 383 const BIGNUM *rem, BN_GENCB *cb); 345 int BN_ is_prime_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx, BN_GENCB *cb);346 int BN_is_prime_fasttest_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx, 347 int do_trial_division, BN_GENCB *cb); 348 384 int BN_check_prime(const BIGNUM *p, BN_CTX *ctx, BN_GENCB *cb); 385 386 # ifndef OPENSSL_NO_DEPRECATED_3_0 387 OSSL_DEPRECATEDIN_3_0 349 388 int BN_X931_generate_Xpq(BIGNUM *Xp, BIGNUM *Xq, int nbits, BN_CTX *ctx); 350 389 390 OSSL_DEPRECATEDIN_3_0 351 391 int BN_X931_derive_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2, 352 392 const BIGNUM *Xp, const BIGNUM *Xp1, 353 393 const BIGNUM *Xp2, const BIGNUM *e, BN_CTX *ctx, 354 394 BN_GENCB *cb); 395 OSSL_DEPRECATEDIN_3_0 355 396 int BN_X931_generate_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2, BIGNUM *Xp1, 356 397 BIGNUM *Xp2, const BIGNUM *Xp, const BIGNUM *e, 357 398 BN_CTX *ctx, BN_GENCB *cb); 399 # endif 358 400 359 401 BN_MONT_CTX *BN_MONT_CTX_new(void); … … 399 441 BN_MONT_CTX *m_ctx), 400 442 BN_MONT_CTX *m_ctx); 401 402 DEPRECATEDIN_0_9_8(void BN_set_params(int mul, int high, int low, int mont)) 403 DEPRECATEDIN_0_9_8(int BN_get_params(int which)) /* 0, mul, 1 high, 2 low, 3 404 * mont */ 443 # ifndef OPENSSL_NO_DEPRECATED_0_9_8 444 OSSL_DEPRECATEDIN_0_9_8 445 void BN_set_params(int mul, int high, int low, int mont); 446 OSSL_DEPRECATEDIN_0_9_8 447 int BN_get_params(int which); /* 0, mul, 1 high, 2 low, 3 mont */ 448 # endif 405 449 406 450 BN_RECP_CTX *BN_RECP_CTX_new(void); … … 520 564 BIGNUM *BN_get_rfc3526_prime_8192(BIGNUM *bn); 521 565 522 # if OPENSSL_API_COMPAT < 0x10100000L523 # define get_rfc2409_prime_768 BN_get_rfc2409_prime_768524 # define get_rfc2409_prime_1024 BN_get_rfc2409_prime_1024525 # define get_rfc3526_prime_1536 BN_get_rfc3526_prime_1536526 # define get_rfc3526_prime_2048 BN_get_rfc3526_prime_2048527 # define get_rfc3526_prime_3072 BN_get_rfc3526_prime_3072528 # define get_rfc3526_prime_4096 BN_get_rfc3526_prime_4096529 # define get_rfc3526_prime_6144 BN_get_rfc3526_prime_6144530 # define get_rfc3526_prime_8192 BN_get_rfc3526_prime_8192531 # endif566 # ifndef OPENSSL_NO_DEPRECATED_1_1_0 567 # define get_rfc2409_prime_768 BN_get_rfc2409_prime_768 568 # define get_rfc2409_prime_1024 BN_get_rfc2409_prime_1024 569 # define get_rfc3526_prime_1536 BN_get_rfc3526_prime_1536 570 # define get_rfc3526_prime_2048 BN_get_rfc3526_prime_2048 571 # define get_rfc3526_prime_3072 BN_get_rfc3526_prime_3072 572 # define get_rfc3526_prime_4096 BN_get_rfc3526_prime_4096 573 # define get_rfc3526_prime_6144 BN_get_rfc3526_prime_6144 574 # define get_rfc3526_prime_8192 BN_get_rfc3526_prime_8192 575 # endif 532 576 533 577 int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom); -
trunk/src/libs/openssl-3.0.1/include/openssl/bnerr.h
r91772 r94082 1 1 /* 2 2 * Generated by util/mkerr.pl DO NOT EDIT 3 * Copyright 1995-20 19The OpenSSL Project Authors. All Rights Reserved.3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 4 * 5 * Licensed under the OpenSSL license(the "License"). You may not use5 * Licensed under the Apache License 2.0 (the "License"). You may not use 6 6 * this file except in compliance with the License. You can obtain a copy 7 7 * in the file LICENSE in the source distribution or at … … 9 9 */ 10 10 11 #ifndef HEADER_BNERR_H 12 # define HEADER_BNERR_H 11 #ifndef OPENSSL_BNERR_H 12 # define OPENSSL_BNERR_H 13 # pragma once 13 14 14 # i fndef HEADER_SYMHACKS_H15 # 16 # endif15 # include <openssl/opensslconf.h> 16 # include <openssl/symhacks.h> 17 # include <openssl/cryptoerr_legacy.h> 17 18 18 # ifdef __cplusplus19 extern "C"20 # endif21 int ERR_load_BN_strings(void);22 19 23 /*24 * BN function codes.25 */26 # define BN_F_BNRAND 12727 # define BN_F_BNRAND_RANGE 13828 # define BN_F_BN_BLINDING_CONVERT_EX 10029 # define BN_F_BN_BLINDING_CREATE_PARAM 12830 # define BN_F_BN_BLINDING_INVERT_EX 10131 # define BN_F_BN_BLINDING_NEW 10232 # define BN_F_BN_BLINDING_UPDATE 10333 # define BN_F_BN_BN2DEC 10434 # define BN_F_BN_BN2HEX 10535 # define BN_F_BN_COMPUTE_WNAF 14236 # define BN_F_BN_CTX_GET 11637 # define BN_F_BN_CTX_NEW 10638 # define BN_F_BN_CTX_START 12939 # define BN_F_BN_DIV 10740 # define BN_F_BN_DIV_RECP 13041 # define BN_F_BN_EXP 12342 # define BN_F_BN_EXPAND_INTERNAL 12043 # define BN_F_BN_GENCB_NEW 14344 # define BN_F_BN_GENERATE_DSA_NONCE 14045 # define BN_F_BN_GENERATE_PRIME_EX 14146 # define BN_F_BN_GF2M_MOD 13147 # define BN_F_BN_GF2M_MOD_EXP 13248 # define BN_F_BN_GF2M_MOD_MUL 13349 # define BN_F_BN_GF2M_MOD_SOLVE_QUAD 13450 # define BN_F_BN_GF2M_MOD_SOLVE_QUAD_ARR 13551 # define BN_F_BN_GF2M_MOD_SQR 13652 # define BN_F_BN_GF2M_MOD_SQRT 13753 # define BN_F_BN_LSHIFT 14554 # define BN_F_BN_MOD_EXP2_MONT 11855 # define BN_F_BN_MOD_EXP_MONT 10956 # define BN_F_BN_MOD_EXP_MONT_CONSTTIME 12457 # define BN_F_BN_MOD_EXP_MONT_WORD 11758 # define BN_F_BN_MOD_EXP_RECP 12559 # define BN_F_BN_MOD_EXP_SIMPLE 12660 # define BN_F_BN_MOD_INVERSE 11061 # define BN_F_BN_MOD_INVERSE_NO_BRANCH 13962 # define BN_F_BN_MOD_LSHIFT_QUICK 11963 # define BN_F_BN_MOD_SQRT 12164 # define BN_F_BN_MONT_CTX_NEW 14965 # define BN_F_BN_MPI2BN 11266 # define BN_F_BN_NEW 11367 # define BN_F_BN_POOL_GET 14768 # define BN_F_BN_RAND 11469 # define BN_F_BN_RAND_RANGE 12270 # define BN_F_BN_RECP_CTX_NEW 15071 # define BN_F_BN_RSHIFT 14672 # define BN_F_BN_SET_WORDS 14473 # define BN_F_BN_STACK_PUSH 14874 # define BN_F_BN_USUB 11575 20 76 21 /* … … 93 38 # define BN_R_NO_INVERSE 108 94 39 # define BN_R_NO_SOLUTION 116 40 # define BN_R_NO_SUITABLE_DIGEST 120 95 41 # define BN_R_PRIVATE_KEY_TOO_LARGE 117 96 42 # define BN_R_P_IS_NOT_PRIME 112 -
trunk/src/libs/openssl-3.0.1/include/openssl/buffer.h
r91772 r94082 2 2 * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_BUFFER_H 11 # define HEADER_BUFFER_H 10 #ifndef OPENSSL_BUFFER_H 11 # define OPENSSL_BUFFER_H 12 # pragma once 12 13 13 # include <openssl/ossl_typ.h> 14 # ifndef HEADER_CRYPTO_H 14 # include <openssl/macros.h> 15 # ifndef OPENSSL_NO_DEPRECATED_3_0 16 # define HEADER_BUFFER_H 17 # endif 18 19 # include <openssl/types.h> 20 # ifndef OPENSSL_CRYPTO_H 15 21 # include <openssl/crypto.h> 16 22 # endif … … 25 31 # include <sys/types.h> 26 32 27 /* 28 * These names are outdated as of OpenSSL 1.1; a future release 29 * will move them to be deprecated. 30 */ 31 # define BUF_strdup(s) OPENSSL_strdup(s) 32 # define BUF_strndup(s, size) OPENSSL_strndup(s, size) 33 # define BUF_memdup(data, size) OPENSSL_memdup(data, size) 34 # define BUF_strlcpy(dst, src, size) OPENSSL_strlcpy(dst, src, size) 35 # define BUF_strlcat(dst, src, size) OPENSSL_strlcat(dst, src, size) 36 # define BUF_strnlen(str, maxlen) OPENSSL_strnlen(str, maxlen) 33 # ifndef OPENSSL_NO_DEPRECATED_3_0 34 # define BUF_strdup(s) OPENSSL_strdup(s) 35 # define BUF_strndup(s, size) OPENSSL_strndup(s, size) 36 # define BUF_memdup(data, size) OPENSSL_memdup(data, size) 37 # define BUF_strlcpy(dst, src, size) OPENSSL_strlcpy(dst, src, size) 38 # define BUF_strlcat(dst, src, size) OPENSSL_strlcat(dst, src, size) 39 # define BUF_strnlen(str, maxlen) OPENSSL_strnlen(str, maxlen) 40 # endif 37 41 38 42 struct buf_mem_st { -
trunk/src/libs/openssl-3.0.1/include/openssl/buffererr.h
r91772 r94082 1 1 /* 2 2 * Generated by util/mkerr.pl DO NOT EDIT 3 * Copyright 1995-20 19The OpenSSL Project Authors. All Rights Reserved.3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 4 * 5 * Licensed under the OpenSSL license(the "License"). You may not use5 * Licensed under the Apache License 2.0 (the "License"). You may not use 6 6 * this file except in compliance with the License. You can obtain a copy 7 7 * in the file LICENSE in the source distribution or at … … 9 9 */ 10 10 11 #ifndef HEADER_BUFERR_H 12 # define HEADER_BUFERR_H 11 #ifndef OPENSSL_BUFFERERR_H 12 # define OPENSSL_BUFFERERR_H 13 # pragma once 13 14 14 # i fndef HEADER_SYMHACKS_H15 # 16 # endif15 # include <openssl/opensslconf.h> 16 # include <openssl/symhacks.h> 17 # include <openssl/cryptoerr_legacy.h> 17 18 18 # ifdef __cplusplus19 extern "C"20 # endif21 int ERR_load_BUF_strings(void);22 19 23 /*24 * BUF function codes.25 */26 # define BUF_F_BUF_MEM_GROW 10027 # define BUF_F_BUF_MEM_GROW_CLEAN 10528 # define BUF_F_BUF_MEM_NEW 10129 20 30 21 /* -
trunk/src/libs/openssl-3.0.1/include/openssl/camellia.h
r91772 r94082 1 1 /* 2 * Copyright 2006-20 16The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 2006-2020 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_CAMELLIA_H 11 # define HEADER_CAMELLIA_H 10 #ifndef OPENSSL_CAMELLIA_H 11 # define OPENSSL_CAMELLIA_H 12 # pragma once 13 14 # include <openssl/macros.h> 15 # ifndef OPENSSL_NO_DEPRECATED_3_0 16 # define HEADER_CAMELLIA_H 17 # endif 12 18 13 19 # include <openssl/opensslconf.h> … … 19 25 #endif 20 26 21 # define CAMELLIA_ENCRYPT 1 22 # define CAMELLIA_DECRYPT 0 27 # define CAMELLIA_BLOCK_SIZE 16 28 29 # ifndef OPENSSL_NO_DEPRECATED_3_0 30 31 # define CAMELLIA_ENCRYPT 1 32 # define CAMELLIA_DECRYPT 0 23 33 24 34 /* … … 29 39 /* This should be a hidden type, but EVP requires that the size be known */ 30 40 31 # define CAMELLIA_BLOCK_SIZE 16 32 # define CAMELLIA_TABLE_BYTE_LEN 272 33 # define CAMELLIA_TABLE_WORD_LEN (CAMELLIA_TABLE_BYTE_LEN / 4) 41 # define CAMELLIA_TABLE_BYTE_LEN 272 42 # define CAMELLIA_TABLE_WORD_LEN (CAMELLIA_TABLE_BYTE_LEN / 4) 34 43 35 44 typedef unsigned int KEY_TABLE_TYPE[CAMELLIA_TABLE_WORD_LEN]; /* to match … … 45 54 typedef struct camellia_key_st CAMELLIA_KEY; 46 55 47 int Camellia_set_key(const unsigned char *userKey, const int bits, 48 CAMELLIA_KEY *key); 49 50 void Camellia_encrypt(const unsigned char *in, unsigned char *out, 51 const CAMELLIA_KEY *key); 52 void Camellia_decrypt(const unsigned char *in, unsigned char *out, 53 const CAMELLIA_KEY *key); 54 55 void Camellia_ecb_encrypt(const unsigned char *in, unsigned char *out, 56 const CAMELLIA_KEY *key, const int enc); 57 void Camellia_cbc_encrypt(const unsigned char *in, unsigned char *out, 58 size_t length, const CAMELLIA_KEY *key, 59 unsigned char *ivec, const int enc); 60 void Camellia_cfb128_encrypt(const unsigned char *in, unsigned char *out, 61 size_t length, const CAMELLIA_KEY *key, 62 unsigned char *ivec, int *num, const int enc); 63 void Camellia_cfb1_encrypt(const unsigned char *in, unsigned char *out, 64 size_t length, const CAMELLIA_KEY *key, 65 unsigned char *ivec, int *num, const int enc); 66 void Camellia_cfb8_encrypt(const unsigned char *in, unsigned char *out, 67 size_t length, const CAMELLIA_KEY *key, 68 unsigned char *ivec, int *num, const int enc); 69 void Camellia_ofb128_encrypt(const unsigned char *in, unsigned char *out, 70 size_t length, const CAMELLIA_KEY *key, 71 unsigned char *ivec, int *num); 56 # endif /* OPENSSL_NO_DEPRECATED_3_0 */ 57 # ifndef OPENSSL_NO_DEPRECATED_3_0 58 OSSL_DEPRECATEDIN_3_0 int Camellia_set_key(const unsigned char *userKey, 59 const int bits, 60 CAMELLIA_KEY *key); 61 OSSL_DEPRECATEDIN_3_0 void Camellia_encrypt(const unsigned char *in, 62 unsigned char *out, 63 const CAMELLIA_KEY *key); 64 OSSL_DEPRECATEDIN_3_0 void Camellia_decrypt(const unsigned char *in, 65 unsigned char *out, 66 const CAMELLIA_KEY *key); 67 OSSL_DEPRECATEDIN_3_0 void Camellia_ecb_encrypt(const unsigned char *in, 68 unsigned char *out, 69 const CAMELLIA_KEY *key, 70 const int enc); 71 OSSL_DEPRECATEDIN_3_0 void Camellia_cbc_encrypt(const unsigned char *in, 72 unsigned char *out, 73 size_t length, 74 const CAMELLIA_KEY *key, 75 unsigned char *ivec, 76 const int enc); 77 OSSL_DEPRECATEDIN_3_0 void Camellia_cfb128_encrypt(const unsigned char *in, 78 unsigned char *out, 79 size_t length, 80 const CAMELLIA_KEY *key, 81 unsigned char *ivec, 82 int *num, 83 const int enc); 84 OSSL_DEPRECATEDIN_3_0 void Camellia_cfb1_encrypt(const unsigned char *in, 85 unsigned char *out, 86 size_t length, 87 const CAMELLIA_KEY *key, 88 unsigned char *ivec, 89 int *num, 90 const int enc); 91 OSSL_DEPRECATEDIN_3_0 void Camellia_cfb8_encrypt(const unsigned char *in, 92 unsigned char *out, 93 size_t length, 94 const CAMELLIA_KEY *key, 95 unsigned char *ivec, 96 int *num, 97 const int enc); 98 OSSL_DEPRECATEDIN_3_0 void Camellia_ofb128_encrypt(const unsigned char *in, 99 unsigned char *out, 100 size_t length, 101 const CAMELLIA_KEY *key, 102 unsigned char *ivec, 103 int *num); 104 OSSL_DEPRECATEDIN_3_0 72 105 void Camellia_ctr128_encrypt(const unsigned char *in, unsigned char *out, 73 106 size_t length, const CAMELLIA_KEY *key, … … 75 108 unsigned char ecount_buf[CAMELLIA_BLOCK_SIZE], 76 109 unsigned int *num); 110 # endif 77 111 78 112 # ifdef __cplusplus -
trunk/src/libs/openssl-3.0.1/include/openssl/cast.h
r91772 r94082 1 1 /* 2 * Copyright 1995-20 16The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_CAST_H 11 # define HEADER_CAST_H 10 #ifndef OPENSSL_CAST_H 11 # define OPENSSL_CAST_H 12 # pragma once 13 14 # include <openssl/macros.h> 15 # ifndef OPENSSL_NO_DEPRECATED_3_0 16 # define HEADER_CAST_H 17 # endif 12 18 13 19 # include <openssl/opensslconf.h> … … 18 24 # endif 19 25 20 # define CAST_ENCRYPT 121 # define CAST_DECRYPT 022 23 # define CAST_LONG unsigned int24 25 26 # define CAST_BLOCK 8 26 27 # define CAST_KEY_LENGTH 16 28 29 # ifndef OPENSSL_NO_DEPRECATED_3_0 30 31 # define CAST_ENCRYPT 1 32 # define CAST_DECRYPT 0 33 34 # define CAST_LONG unsigned int 27 35 28 36 typedef struct cast_key_st { … … 31 39 } CAST_KEY; 32 40 41 # endif /* OPENSSL_NO_DEPRECATED_3_0 */ 42 # ifndef OPENSSL_NO_DEPRECATED_3_0 43 OSSL_DEPRECATEDIN_3_0 33 44 void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data); 45 OSSL_DEPRECATEDIN_3_0 34 46 void CAST_ecb_encrypt(const unsigned char *in, unsigned char *out, 35 47 const CAST_KEY *key, int enc); 48 OSSL_DEPRECATEDIN_3_0 36 49 void CAST_encrypt(CAST_LONG *data, const CAST_KEY *key); 50 OSSL_DEPRECATEDIN_3_0 37 51 void CAST_decrypt(CAST_LONG *data, const CAST_KEY *key); 52 OSSL_DEPRECATEDIN_3_0 38 53 void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out, 39 54 long length, const CAST_KEY *ks, unsigned char *iv, 40 55 int enc); 56 OSSL_DEPRECATEDIN_3_0 41 57 void CAST_cfb64_encrypt(const unsigned char *in, unsigned char *out, 42 58 long length, const CAST_KEY *schedule, 43 59 unsigned char *ivec, int *num, int enc); 60 OSSL_DEPRECATEDIN_3_0 44 61 void CAST_ofb64_encrypt(const unsigned char *in, unsigned char *out, 45 62 long length, const CAST_KEY *schedule, 46 63 unsigned char *ivec, int *num); 64 # endif 47 65 48 66 # ifdef __cplusplus -
trunk/src/libs/openssl-3.0.1/include/openssl/cmac.h
r91772 r94082 1 1 /* 2 * Copyright 2010-20 16The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 2010-2020 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_CMAC_H 11 # define HEADER_CMAC_H 10 #ifndef OPENSSL_CMAC_H 11 # define OPENSSL_CMAC_H 12 # pragma once 13 14 # include <openssl/macros.h> 15 # ifndef OPENSSL_NO_DEPRECATED_3_0 16 # define HEADER_CMAC_H 17 # endif 12 18 13 19 # ifndef OPENSSL_NO_CMAC 14 20 15 # ifdef __cplusplus21 # ifdef __cplusplus 16 22 extern "C" { 17 # endif23 # endif 18 24 19 # include <openssl/evp.h>25 # include <openssl/evp.h> 20 26 27 # ifndef OPENSSL_NO_DEPRECATED_3_0 21 28 /* Opaque */ 22 29 typedef struct CMAC_CTX_st CMAC_CTX; 30 # endif 31 # ifndef OPENSSL_NO_DEPRECATED_3_0 32 OSSL_DEPRECATEDIN_3_0 CMAC_CTX *CMAC_CTX_new(void); 33 OSSL_DEPRECATEDIN_3_0 void CMAC_CTX_cleanup(CMAC_CTX *ctx); 34 OSSL_DEPRECATEDIN_3_0 void CMAC_CTX_free(CMAC_CTX *ctx); 35 OSSL_DEPRECATEDIN_3_0 EVP_CIPHER_CTX *CMAC_CTX_get0_cipher_ctx(CMAC_CTX *ctx); 36 OSSL_DEPRECATEDIN_3_0 int CMAC_CTX_copy(CMAC_CTX *out, const CMAC_CTX *in); 37 OSSL_DEPRECATEDIN_3_0 int CMAC_Init(CMAC_CTX *ctx, 38 const void *key, size_t keylen, 39 const EVP_CIPHER *cipher, ENGINE *impl); 40 OSSL_DEPRECATEDIN_3_0 int CMAC_Update(CMAC_CTX *ctx, 41 const void *data, size_t dlen); 42 OSSL_DEPRECATEDIN_3_0 int CMAC_Final(CMAC_CTX *ctx, 43 unsigned char *out, size_t *poutlen); 44 OSSL_DEPRECATEDIN_3_0 int CMAC_resume(CMAC_CTX *ctx); 45 # endif 23 46 24 CMAC_CTX *CMAC_CTX_new(void); 25 void CMAC_CTX_cleanup(CMAC_CTX *ctx); 26 void CMAC_CTX_free(CMAC_CTX *ctx); 27 EVP_CIPHER_CTX *CMAC_CTX_get0_cipher_ctx(CMAC_CTX *ctx); 28 int CMAC_CTX_copy(CMAC_CTX *out, const CMAC_CTX *in); 29 30 int CMAC_Init(CMAC_CTX *ctx, const void *key, size_t keylen, 31 const EVP_CIPHER *cipher, ENGINE *impl); 32 int CMAC_Update(CMAC_CTX *ctx, const void *data, size_t dlen); 33 int CMAC_Final(CMAC_CTX *ctx, unsigned char *out, size_t *poutlen); 34 int CMAC_resume(CMAC_CTX *ctx); 35 36 #ifdef __cplusplus 47 # ifdef __cplusplus 37 48 } 38 # endif49 # endif 39 50 40 51 # endif -
trunk/src/libs/openssl-3.0.1/include/openssl/cmserr.h
r91772 r94082 1 1 /* 2 2 * Generated by util/mkerr.pl DO NOT EDIT 3 * Copyright 1995-20 19The OpenSSL Project Authors. All Rights Reserved.3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 4 * 5 * Licensed under the OpenSSL license(the "License"). You may not use5 * Licensed under the Apache License 2.0 (the "License"). You may not use 6 6 * this file except in compliance with the License. You can obtain a copy 7 7 * in the file LICENSE in the source distribution or at … … 9 9 */ 10 10 11 #ifndef HEADER_CMSERR_H 12 # define HEADER_CMSERR_H 13 14 # ifndef HEADER_SYMHACKS_H 15 # include <openssl/symhacks.h> 16 # endif 11 #ifndef OPENSSL_CMSERR_H 12 # define OPENSSL_CMSERR_H 13 # pragma once 17 14 18 15 # include <openssl/opensslconf.h> 16 # include <openssl/symhacks.h> 17 # include <openssl/cryptoerr_legacy.h> 18 19 19 20 20 # ifndef OPENSSL_NO_CMS 21 21 22 # ifdef __cplusplus23 extern "C"24 # endif25 int ERR_load_CMS_strings(void);26 27 /*28 * CMS function codes.29 */30 # define CMS_F_CHECK_CONTENT 9931 # define CMS_F_CMS_ADD0_CERT 16432 # define CMS_F_CMS_ADD0_RECIPIENT_KEY 10033 # define CMS_F_CMS_ADD0_RECIPIENT_PASSWORD 16534 # define CMS_F_CMS_ADD1_RECEIPTREQUEST 15835 # define CMS_F_CMS_ADD1_RECIPIENT_CERT 10136 # define CMS_F_CMS_ADD1_SIGNER 10237 # define CMS_F_CMS_ADD1_SIGNINGTIME 10338 # define CMS_F_CMS_COMPRESS 10439 # define CMS_F_CMS_COMPRESSEDDATA_CREATE 10540 # define CMS_F_CMS_COMPRESSEDDATA_INIT_BIO 10641 # define CMS_F_CMS_COPY_CONTENT 10742 # define CMS_F_CMS_COPY_MESSAGEDIGEST 10843 # define CMS_F_CMS_DATA 10944 # define CMS_F_CMS_DATAFINAL 11045 # define CMS_F_CMS_DATAINIT 11146 # define CMS_F_CMS_DECRYPT 11247 # define CMS_F_CMS_DECRYPT_SET1_KEY 11348 # define CMS_F_CMS_DECRYPT_SET1_PASSWORD 16649 # define CMS_F_CMS_DECRYPT_SET1_PKEY 11450 # define CMS_F_CMS_DIGESTALGORITHM_FIND_CTX 11551 # define CMS_F_CMS_DIGESTALGORITHM_INIT_BIO 11652 # define CMS_F_CMS_DIGESTEDDATA_DO_FINAL 11753 # define CMS_F_CMS_DIGEST_VERIFY 11854 # define CMS_F_CMS_ENCODE_RECEIPT 16155 # define CMS_F_CMS_ENCRYPT 11956 # define CMS_F_CMS_ENCRYPTEDCONTENT_INIT 17957 # define CMS_F_CMS_ENCRYPTEDCONTENT_INIT_BIO 12058 # define CMS_F_CMS_ENCRYPTEDDATA_DECRYPT 12159 # define CMS_F_CMS_ENCRYPTEDDATA_ENCRYPT 12260 # define CMS_F_CMS_ENCRYPTEDDATA_SET1_KEY 12361 # define CMS_F_CMS_ENVELOPEDDATA_CREATE 12462 # define CMS_F_CMS_ENVELOPEDDATA_INIT_BIO 12563 # define CMS_F_CMS_ENVELOPED_DATA_INIT 12664 # define CMS_F_CMS_ENV_ASN1_CTRL 17165 # define CMS_F_CMS_FINAL 12766 # define CMS_F_CMS_GET0_CERTIFICATE_CHOICES 12867 # define CMS_F_CMS_GET0_CONTENT 12968 # define CMS_F_CMS_GET0_ECONTENT_TYPE 13069 # define CMS_F_CMS_GET0_ENVELOPED 13170 # define CMS_F_CMS_GET0_REVOCATION_CHOICES 13271 # define CMS_F_CMS_GET0_SIGNED 13372 # define CMS_F_CMS_MSGSIGDIGEST_ADD1 16273 # define CMS_F_CMS_RECEIPTREQUEST_CREATE0 15974 # define CMS_F_CMS_RECEIPT_VERIFY 16075 # define CMS_F_CMS_RECIPIENTINFO_DECRYPT 13476 # define CMS_F_CMS_RECIPIENTINFO_ENCRYPT 16977 # define CMS_F_CMS_RECIPIENTINFO_KARI_ENCRYPT 17878 # define CMS_F_CMS_RECIPIENTINFO_KARI_GET0_ALG 17579 # define CMS_F_CMS_RECIPIENTINFO_KARI_GET0_ORIG_ID 17380 # define CMS_F_CMS_RECIPIENTINFO_KARI_GET0_REKS 17281 # define CMS_F_CMS_RECIPIENTINFO_KARI_ORIG_ID_CMP 17482 # define CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT 13583 # define CMS_F_CMS_RECIPIENTINFO_KEKRI_ENCRYPT 13684 # define CMS_F_CMS_RECIPIENTINFO_KEKRI_GET0_ID 13785 # define CMS_F_CMS_RECIPIENTINFO_KEKRI_ID_CMP 13886 # define CMS_F_CMS_RECIPIENTINFO_KTRI_CERT_CMP 13987 # define CMS_F_CMS_RECIPIENTINFO_KTRI_DECRYPT 14088 # define CMS_F_CMS_RECIPIENTINFO_KTRI_ENCRYPT 14189 # define CMS_F_CMS_RECIPIENTINFO_KTRI_GET0_ALGS 14290 # define CMS_F_CMS_RECIPIENTINFO_KTRI_GET0_SIGNER_ID 14391 # define CMS_F_CMS_RECIPIENTINFO_PWRI_CRYPT 16792 # define CMS_F_CMS_RECIPIENTINFO_SET0_KEY 14493 # define CMS_F_CMS_RECIPIENTINFO_SET0_PASSWORD 16894 # define CMS_F_CMS_RECIPIENTINFO_SET0_PKEY 14595 # define CMS_F_CMS_SD_ASN1_CTRL 17096 # define CMS_F_CMS_SET1_IAS 17697 # define CMS_F_CMS_SET1_KEYID 17798 # define CMS_F_CMS_SET1_SIGNERIDENTIFIER 14699 # define CMS_F_CMS_SET_DETACHED 147100 # define CMS_F_CMS_SIGN 148101 # define CMS_F_CMS_SIGNED_DATA_INIT 149102 # define CMS_F_CMS_SIGNERINFO_CONTENT_SIGN 150103 # define CMS_F_CMS_SIGNERINFO_SIGN 151104 # define CMS_F_CMS_SIGNERINFO_VERIFY 152105 # define CMS_F_CMS_SIGNERINFO_VERIFY_CERT 153106 # define CMS_F_CMS_SIGNERINFO_VERIFY_CONTENT 154107 # define CMS_F_CMS_SIGN_RECEIPT 163108 # define CMS_F_CMS_SI_CHECK_ATTRIBUTES 183109 # define CMS_F_CMS_STREAM 155110 # define CMS_F_CMS_UNCOMPRESS 156111 # define CMS_F_CMS_VERIFY 157112 # define CMS_F_KEK_UNWRAP_KEY 180113 22 114 23 /* … … 120 29 # define CMS_R_CERTIFICATE_HAS_NO_KEYID 160 121 30 # define CMS_R_CERTIFICATE_VERIFY_ERROR 100 31 # define CMS_R_CIPHER_AEAD_SET_TAG_ERROR 184 32 # define CMS_R_CIPHER_GET_TAG 185 122 33 # define CMS_R_CIPHER_INITIALISATION_ERROR 101 123 34 # define CMS_R_CIPHER_PARAMETER_INITIALISATION_ERROR 102 … … 133 44 # define CMS_R_CTRL_ERROR 110 134 45 # define CMS_R_CTRL_FAILURE 111 46 # define CMS_R_DECODE_ERROR 187 135 47 # define CMS_R_DECRYPT_ERROR 112 136 48 # define CMS_R_ERROR_GETTING_PUBLIC_KEY 113 … … 138 50 # define CMS_R_ERROR_SETTING_KEY 115 139 51 # define CMS_R_ERROR_SETTING_RECIPIENTINFO 116 52 # define CMS_R_ESS_SIGNING_CERTID_MISMATCH_ERROR 183 140 53 # define CMS_R_INVALID_ENCRYPTED_KEY_LENGTH 117 141 54 # define CMS_R_INVALID_KEY_ENCRYPTION_PARAMETER 176 142 55 # define CMS_R_INVALID_KEY_LENGTH 118 56 # define CMS_R_INVALID_LABEL 190 57 # define CMS_R_INVALID_OAEP_PARAMETERS 191 58 # define CMS_R_KDF_PARAMETER_ERROR 186 143 59 # define CMS_R_MD_BIO_INIT_ERROR 119 144 60 # define CMS_R_MESSAGEDIGEST_ATTRIBUTE_WRONG_LENGTH 120 … … 171 87 # define CMS_R_NO_RECEIPT_REQUEST 168 172 88 # define CMS_R_NO_SIGNERS 135 89 # define CMS_R_PEER_KEY_ERROR 188 173 90 # define CMS_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE 136 174 91 # define CMS_R_RECEIPT_DECODE_ERROR 169 175 92 # define CMS_R_RECIPIENT_ERROR 137 93 # define CMS_R_SHARED_INFO_ERROR 189 176 94 # define CMS_R_SIGNER_CERTIFICATE_NOT_FOUND 138 177 95 # define CMS_R_SIGNFINAL_ERROR 139 … … 189 107 # define CMS_R_UNSUPPORTED_COMPRESSION_ALGORITHM 151 190 108 # define CMS_R_UNSUPPORTED_CONTENT_TYPE 152 109 # define CMS_R_UNSUPPORTED_ENCRYPTION_TYPE 192 191 110 # define CMS_R_UNSUPPORTED_KEK_ALGORITHM 153 192 111 # define CMS_R_UNSUPPORTED_KEY_ENCRYPTION_ALGORITHM 179 112 # define CMS_R_UNSUPPORTED_LABEL_SOURCE 193 193 113 # define CMS_R_UNSUPPORTED_RECIPIENTINFO_TYPE 155 194 114 # define CMS_R_UNSUPPORTED_RECIPIENT_TYPE 154 -
trunk/src/libs/openssl-3.0.1/include/openssl/comp.h
r91772 r94082 2 2 * Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_COMP_H 11 # define HEADER_COMP_H 10 #ifndef OPENSSL_COMP_H 11 # define OPENSSL_COMP_H 12 # pragma once 13 14 # include <openssl/macros.h> 15 # ifndef OPENSSL_NO_DEPRECATED_3_0 16 # define HEADER_COMP_H 17 # endif 12 18 13 19 # include <openssl/opensslconf.h> … … 36 42 COMP_METHOD *COMP_zlib(void); 37 43 38 #if OPENSSL_API_COMPAT < 0x10100000L39 # define COMP_zlib_cleanup() while(0) continue44 #ifndef OPENSSL_NO_DEPRECATED_1_1_0 45 # define COMP_zlib_cleanup() while(0) continue 40 46 #endif 41 47 42 # ifdef HEADER_BIO_H48 # ifdef OPENSSL_BIO_H 43 49 # ifdef ZLIB 44 50 const BIO_METHOD *BIO_f_zlib(void); -
trunk/src/libs/openssl-3.0.1/include/openssl/comperr.h
r91772 r94082 1 1 /* 2 2 * Generated by util/mkerr.pl DO NOT EDIT 3 * Copyright 1995-20 19The OpenSSL Project Authors. All Rights Reserved.3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 4 * 5 * Licensed under the OpenSSL license(the "License"). You may not use5 * Licensed under the Apache License 2.0 (the "License"). You may not use 6 6 * this file except in compliance with the License. You can obtain a copy 7 7 * in the file LICENSE in the source distribution or at … … 9 9 */ 10 10 11 #ifndef HEADER_COMPERR_H 12 # define HEADER_COMPERR_H 13 14 # ifndef HEADER_SYMHACKS_H 15 # include <openssl/symhacks.h> 16 # endif 11 #ifndef OPENSSL_COMPERR_H 12 # define OPENSSL_COMPERR_H 13 # pragma once 17 14 18 15 # include <openssl/opensslconf.h> 16 # include <openssl/symhacks.h> 17 # include <openssl/cryptoerr_legacy.h> 18 19 19 20 20 # ifndef OPENSSL_NO_COMP 21 21 22 # ifdef __cplusplus23 extern "C"24 # endif25 int ERR_load_COMP_strings(void);26 27 /*28 * COMP function codes.29 */30 # define COMP_F_BIO_ZLIB_FLUSH 9931 # define COMP_F_BIO_ZLIB_NEW 10032 # define COMP_F_BIO_ZLIB_READ 10133 # define COMP_F_BIO_ZLIB_WRITE 10234 # define COMP_F_COMP_CTX_NEW 10335 22 36 23 /* -
trunk/src/libs/openssl-3.0.1/include/openssl/conf_api.h
r91772 r94082 2 2 * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_CONF_API_H 11 # define HEADER_CONF_API_H 10 #ifndef OPENSSL_CONF_API_H 11 # define OPENSSL_CONF_API_H 12 # pragma once 13 14 # include <openssl/macros.h> 15 # ifndef OPENSSL_NO_DEPRECATED_3_0 16 # define HEADER_CONF_API_H 17 # endif 12 18 13 19 # include <openssl/lhash.h> -
trunk/src/libs/openssl-3.0.1/include/openssl/conferr.h
r91772 r94082 1 1 /* 2 2 * Generated by util/mkerr.pl DO NOT EDIT 3 * Copyright 1995-20 19The OpenSSL Project Authors. All Rights Reserved.3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 4 * 5 * Licensed under the OpenSSL license(the "License"). You may not use5 * Licensed under the Apache License 2.0 (the "License"). You may not use 6 6 * this file except in compliance with the License. You can obtain a copy 7 7 * in the file LICENSE in the source distribution or at … … 9 9 */ 10 10 11 #ifndef HEADER_CONFERR_H 12 # define HEADER_CONFERR_H 11 #ifndef OPENSSL_CONFERR_H 12 # define OPENSSL_CONFERR_H 13 # pragma once 13 14 14 # i fndef HEADER_SYMHACKS_H15 # 16 # endif15 # include <openssl/opensslconf.h> 16 # include <openssl/symhacks.h> 17 # include <openssl/cryptoerr_legacy.h> 17 18 18 # ifdef __cplusplus19 extern "C"20 # endif21 int ERR_load_CONF_strings(void);22 19 23 /*24 * CONF function codes.25 */26 # define CONF_F_CONF_DUMP_FP 10427 # define CONF_F_CONF_LOAD 10028 # define CONF_F_CONF_LOAD_FP 10329 # define CONF_F_CONF_PARSE_LIST 11930 # define CONF_F_DEF_LOAD 12031 # define CONF_F_DEF_LOAD_BIO 12132 # define CONF_F_GET_NEXT_FILE 10733 # define CONF_F_MODULE_ADD 12234 # define CONF_F_MODULE_INIT 11535 # define CONF_F_MODULE_LOAD_DSO 11736 # define CONF_F_MODULE_RUN 11837 # define CONF_F_NCONF_DUMP_BIO 10538 # define CONF_F_NCONF_DUMP_FP 10639 # define CONF_F_NCONF_GET_NUMBER_E 11240 # define CONF_F_NCONF_GET_SECTION 10841 # define CONF_F_NCONF_GET_STRING 10942 # define CONF_F_NCONF_LOAD 11343 # define CONF_F_NCONF_LOAD_BIO 11044 # define CONF_F_NCONF_LOAD_FP 11445 # define CONF_F_NCONF_NEW 11146 # define CONF_F_PROCESS_INCLUDE 11647 # define CONF_F_SSL_MODULE_INIT 12348 # define CONF_F_STR_COPY 10149 20 50 21 /* … … 52 23 */ 53 24 # define CONF_R_ERROR_LOADING_DSO 110 25 # define CONF_R_INVALID_PRAGMA 122 54 26 # define CONF_R_LIST_CANNOT_BE_NULL 115 27 # define CONF_R_MANDATORY_BRACES_IN_VARIABLE_EXPANSION 123 55 28 # define CONF_R_MISSING_CLOSE_SQUARE_BRACKET 100 56 29 # define CONF_R_MISSING_EQUAL_SIGN 101 … … 64 37 # define CONF_R_NO_VALUE 108 65 38 # define CONF_R_NUMBER_TOO_LARGE 121 39 # define CONF_R_OPENSSL_CONF_REFERENCES_MISSING_SECTION 124 66 40 # define CONF_R_RECURSIVE_DIRECTORY_INCLUDE 111 41 # define CONF_R_RELATIVE_PATH 125 67 42 # define CONF_R_SSL_COMMAND_SECTION_EMPTY 117 68 43 # define CONF_R_SSL_COMMAND_SECTION_NOT_FOUND 118 -
trunk/src/libs/openssl-3.0.1/include/openssl/cryptoerr.h
r91772 r94082 1 1 /* 2 2 * Generated by util/mkerr.pl DO NOT EDIT 3 * Copyright 1995-20 19The OpenSSL Project Authors. All Rights Reserved.3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 4 * 5 * Licensed under the OpenSSL license(the "License"). You may not use5 * Licensed under the Apache License 2.0 (the "License"). You may not use 6 6 * this file except in compliance with the License. You can obtain a copy 7 7 * in the file LICENSE in the source distribution or at … … 9 9 */ 10 10 11 #ifndef HEADER_CRYPTOERR_H 12 # define HEADER_CRYPTOERR_H 11 #ifndef OPENSSL_CRYPTOERR_H 12 # define OPENSSL_CRYPTOERR_H 13 # pragma once 13 14 14 # i fndef HEADER_SYMHACKS_H15 # 16 # endif15 # include <openssl/opensslconf.h> 16 # include <openssl/symhacks.h> 17 # include <openssl/cryptoerr_legacy.h> 17 18 18 # ifdef __cplusplus19 extern "C"20 # endif21 int ERR_load_CRYPTO_strings(void);22 19 23 /*24 * CRYPTO function codes.25 */26 # define CRYPTO_F_CMAC_CTX_NEW 12027 # define CRYPTO_F_CRYPTO_DUP_EX_DATA 11028 # define CRYPTO_F_CRYPTO_FREE_EX_DATA 11129 # define CRYPTO_F_CRYPTO_GET_EX_NEW_INDEX 10030 # define CRYPTO_F_CRYPTO_MEMDUP 11531 # define CRYPTO_F_CRYPTO_NEW_EX_DATA 11232 # define CRYPTO_F_CRYPTO_OCB128_COPY_CTX 12133 # define CRYPTO_F_CRYPTO_OCB128_INIT 12234 # define CRYPTO_F_CRYPTO_SET_EX_DATA 10235 # define CRYPTO_F_FIPS_MODE_SET 10936 # define CRYPTO_F_GET_AND_LOCK 11337 # define CRYPTO_F_OPENSSL_ATEXIT 11438 # define CRYPTO_F_OPENSSL_BUF2HEXSTR 11739 # define CRYPTO_F_OPENSSL_FOPEN 11940 # define CRYPTO_F_OPENSSL_HEXSTR2BUF 11841 # define CRYPTO_F_OPENSSL_INIT_CRYPTO 11642 # define CRYPTO_F_OPENSSL_LH_NEW 12643 # define CRYPTO_F_OPENSSL_SK_DEEP_COPY 12744 # define CRYPTO_F_OPENSSL_SK_DUP 12845 # define CRYPTO_F_PKEY_HMAC_INIT 12346 # define CRYPTO_F_PKEY_POLY1305_INIT 12447 # define CRYPTO_F_PKEY_SIPHASH_INIT 12548 # define CRYPTO_F_SK_RESERVE 12949 20 50 21 /* 51 22 * CRYPTO reason codes. 52 23 */ 53 # define CRYPTO_R_FIPS_MODE_NOT_SUPPORTED 101 24 # define CRYPTO_R_BAD_ALGORITHM_NAME 117 25 # define CRYPTO_R_CONFLICTING_NAMES 118 26 # define CRYPTO_R_HEX_STRING_TOO_SHORT 121 54 27 # define CRYPTO_R_ILLEGAL_HEX_DIGIT 102 28 # define CRYPTO_R_INSUFFICIENT_DATA_SPACE 106 29 # define CRYPTO_R_INSUFFICIENT_PARAM_SIZE 107 30 # define CRYPTO_R_INSUFFICIENT_SECURE_DATA_SPACE 108 31 # define CRYPTO_R_INVALID_NEGATIVE_VALUE 122 32 # define CRYPTO_R_INVALID_NULL_ARGUMENT 109 33 # define CRYPTO_R_INVALID_OSSL_PARAM_TYPE 110 55 34 # define CRYPTO_R_ODD_NUMBER_OF_DIGITS 103 35 # define CRYPTO_R_PROVIDER_ALREADY_EXISTS 104 36 # define CRYPTO_R_PROVIDER_SECTION_ERROR 105 37 # define CRYPTO_R_RANDOM_SECTION_ERROR 119 38 # define CRYPTO_R_SECURE_MALLOC_FAILURE 111 39 # define CRYPTO_R_STRING_TOO_LONG 112 40 # define CRYPTO_R_TOO_MANY_BYTES 113 41 # define CRYPTO_R_TOO_MANY_RECORDS 114 42 # define CRYPTO_R_TOO_SMALL_BUFFER 116 43 # define CRYPTO_R_UNKNOWN_NAME_IN_RANDOM_SECTION 120 44 # define CRYPTO_R_ZERO_LENGTH_NUMBER 115 56 45 57 46 #endif -
trunk/src/libs/openssl-3.0.1/include/openssl/cterr.h
r91772 r94082 1 1 /* 2 2 * Generated by util/mkerr.pl DO NOT EDIT 3 * Copyright 1995-20 19The OpenSSL Project Authors. All Rights Reserved.3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 4 * 5 * Licensed under the OpenSSL license(the "License"). You may not use5 * Licensed under the Apache License 2.0 (the "License"). You may not use 6 6 * this file except in compliance with the License. You can obtain a copy 7 7 * in the file LICENSE in the source distribution or at … … 9 9 */ 10 10 11 #ifndef HEADER_CTERR_H 12 # define HEADER_CTERR_H 13 14 # ifndef HEADER_SYMHACKS_H 15 # include <openssl/symhacks.h> 16 # endif 11 #ifndef OPENSSL_CTERR_H 12 # define OPENSSL_CTERR_H 13 # pragma once 17 14 18 15 # include <openssl/opensslconf.h> 16 # include <openssl/symhacks.h> 17 # include <openssl/cryptoerr_legacy.h> 18 19 19 20 20 # ifndef OPENSSL_NO_CT 21 21 22 # ifdef __cplusplus23 extern "C"24 # endif25 int ERR_load_CT_strings(void);26 27 /*28 * CT function codes.29 */30 # define CT_F_CTLOG_NEW 11731 # define CT_F_CTLOG_NEW_FROM_BASE64 11832 # define CT_F_CTLOG_NEW_FROM_CONF 11933 # define CT_F_CTLOG_STORE_LOAD_CTX_NEW 12234 # define CT_F_CTLOG_STORE_LOAD_FILE 12335 # define CT_F_CTLOG_STORE_LOAD_LOG 13036 # define CT_F_CTLOG_STORE_NEW 13137 # define CT_F_CT_BASE64_DECODE 12438 # define CT_F_CT_POLICY_EVAL_CTX_NEW 13339 # define CT_F_CT_V1_LOG_ID_FROM_PKEY 12540 # define CT_F_I2O_SCT 10741 # define CT_F_I2O_SCT_LIST 10842 # define CT_F_I2O_SCT_SIGNATURE 10943 # define CT_F_O2I_SCT 11044 # define CT_F_O2I_SCT_LIST 11145 # define CT_F_O2I_SCT_SIGNATURE 11246 # define CT_F_SCT_CTX_NEW 12647 # define CT_F_SCT_CTX_VERIFY 12848 # define CT_F_SCT_NEW 10049 # define CT_F_SCT_NEW_FROM_BASE64 12750 # define CT_F_SCT_SET0_LOG_ID 10151 # define CT_F_SCT_SET1_EXTENSIONS 11452 # define CT_F_SCT_SET1_LOG_ID 11553 # define CT_F_SCT_SET1_SIGNATURE 11654 # define CT_F_SCT_SET_LOG_ENTRY_TYPE 10255 # define CT_F_SCT_SET_SIGNATURE_NID 10356 # define CT_F_SCT_SET_VERSION 10457 22 58 23 /* -
trunk/src/libs/openssl-3.0.1/include/openssl/des.h
r91772 r94082 1 1 /* 2 * Copyright 1995-20 16The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_DES_H 11 # define HEADER_DES_H 10 #ifndef OPENSSL_DES_H 11 # define OPENSSL_DES_H 12 # pragma once 13 14 # include <openssl/macros.h> 15 # ifndef OPENSSL_NO_DEPRECATED_3_0 16 # define HEADER_DES_H 17 # endif 12 18 13 19 # include <openssl/opensslconf.h> 14 20 15 21 # ifndef OPENSSL_NO_DES 16 # ifdef __cplusplus22 # ifdef __cplusplus 17 23 extern "C" { 18 # endif 19 # include <openssl/e_os2.h> 20 24 # endif 25 # include <openssl/e_os2.h> 26 27 # ifndef OPENSSL_NO_DEPRECATED_3_0 21 28 typedef unsigned int DES_LONG; 22 29 23 # ifdef OPENSSL_BUILD_SHLIBCRYPTO24 # undef OPENSSL_EXTERN25 # define OPENSSL_EXTERN OPENSSL_EXPORT26 # endif30 # ifdef OPENSSL_BUILD_SHLIBCRYPTO 31 # undef OPENSSL_EXTERN 32 # define OPENSSL_EXTERN OPENSSL_EXPORT 33 # endif 27 34 28 35 typedef unsigned char DES_cblock[8]; … … 43 50 } DES_key_schedule; 44 51 45 # define DES_KEY_SZ (sizeof(DES_cblock))46 # define DES_SCHEDULE_SZ (sizeof(DES_key_schedule))47 48 # define DES_ENCRYPT 149 # define DES_DECRYPT 050 51 # define DES_CBC_MODE 052 # define DES_PCBC_MODE 153 54 # define DES_ecb2_encrypt(i,o,k1,k2,e) \52 # define DES_KEY_SZ (sizeof(DES_cblock)) 53 # define DES_SCHEDULE_SZ (sizeof(DES_key_schedule)) 54 55 # define DES_ENCRYPT 1 56 # define DES_DECRYPT 0 57 58 # define DES_CBC_MODE 0 59 # define DES_PCBC_MODE 1 60 61 # define DES_ecb2_encrypt(i,o,k1,k2,e) \ 55 62 DES_ecb3_encrypt((i),(o),(k1),(k2),(k1),(e)) 56 63 57 # define DES_ede2_cbc_encrypt(i,o,l,k1,k2,iv,e) \64 # define DES_ede2_cbc_encrypt(i,o,l,k1,k2,iv,e) \ 58 65 DES_ede3_cbc_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(e)) 59 66 60 # define DES_ede2_cfb64_encrypt(i,o,l,k1,k2,iv,n,e) \67 # define DES_ede2_cfb64_encrypt(i,o,l,k1,k2,iv,n,e) \ 61 68 DES_ede3_cfb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n),(e)) 62 69 63 # define DES_ede2_ofb64_encrypt(i,o,l,k1,k2,iv,n) \70 # define DES_ede2_ofb64_encrypt(i,o,l,k1,k2,iv,n) \ 64 71 DES_ede3_ofb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n)) 65 72 66 OPENSSL_DECLARE_GLOBAL(int, DES_check_key); /* defaults to false */ 67 # define DES_check_key OPENSSL_GLOBAL_REF(DES_check_key) 68 69 const char *DES_options(void); 73 # define DES_fixup_key_parity DES_set_odd_parity 74 # endif 75 # ifndef OPENSSL_NO_DEPRECATED_3_0 76 OSSL_DEPRECATEDIN_3_0 const char *DES_options(void); 77 OSSL_DEPRECATEDIN_3_0 70 78 void DES_ecb3_encrypt(const_DES_cblock *input, DES_cblock *output, 71 79 DES_key_schedule *ks1, DES_key_schedule *ks2, 72 80 DES_key_schedule *ks3, int enc); 81 OSSL_DEPRECATEDIN_3_0 73 82 DES_LONG DES_cbc_cksum(const unsigned char *input, DES_cblock *output, 74 83 long length, DES_key_schedule *schedule, 75 84 const_DES_cblock *ivec); 85 # endif 76 86 /* DES_cbc_encrypt does not update the IV! Use DES_ncbc_encrypt instead. */ 87 # ifndef OPENSSL_NO_DEPRECATED_3_0 88 OSSL_DEPRECATEDIN_3_0 77 89 void DES_cbc_encrypt(const unsigned char *input, unsigned char *output, 78 long length, DES_key_schedule *schedule, 79 DES_cblock *ivec, int enc); 90 long length, DES_key_schedule *schedule, DES_cblock *ivec, 91 int enc); 92 OSSL_DEPRECATEDIN_3_0 80 93 void DES_ncbc_encrypt(const unsigned char *input, unsigned char *output, 81 long length, DES_key_schedule *schedule, 82 DES_cblock *ivec, int enc); 94 long length, DES_key_schedule *schedule, DES_cblock *ivec, 95 int enc); 96 OSSL_DEPRECATEDIN_3_0 83 97 void DES_xcbc_encrypt(const unsigned char *input, unsigned char *output, 84 long length, DES_key_schedule *schedule, 85 DES_cblock *ivec, const_DES_cblock *inw,86 const_DES_cblock *outw, int enc); 98 long length, DES_key_schedule *schedule, DES_cblock *ivec, 99 const_DES_cblock *inw, const_DES_cblock *outw, int enc); 100 OSSL_DEPRECATEDIN_3_0 87 101 void DES_cfb_encrypt(const unsigned char *in, unsigned char *out, int numbits, 88 long length, DES_key_schedule *schedule, 89 DES_cblock *ivec, int enc); 102 long length, DES_key_schedule *schedule, DES_cblock *ivec, 103 int enc); 104 OSSL_DEPRECATEDIN_3_0 90 105 void DES_ecb_encrypt(const_DES_cblock *input, DES_cblock *output, 91 106 DES_key_schedule *ks, int enc); 107 # endif 92 108 93 109 /* … … 101 117 * encryption, zero if decryption. 102 118 */ 119 # ifndef OPENSSL_NO_DEPRECATED_3_0 120 OSSL_DEPRECATEDIN_3_0 103 121 void DES_encrypt1(DES_LONG *data, DES_key_schedule *ks, int enc); 122 # endif 104 123 105 124 /* … … 111 130 * DES_encrypt1() DES_encrypt1() except faster :-). 112 131 */ 132 # ifndef OPENSSL_NO_DEPRECATED_3_0 133 OSSL_DEPRECATEDIN_3_0 113 134 void DES_encrypt2(DES_LONG *data, DES_key_schedule *ks, int enc); 114 115 void DES_encrypt3(DES_LONG *data, DES_key_schedule *ks1, 116 DES_key_schedule *ks2, DES_key_schedule *ks3); 117 void DES_decrypt3(DES_LONG *data, DES_key_schedule *ks1, 118 DES_key_schedule *ks2, DES_key_schedule *ks3); 135 OSSL_DEPRECATEDIN_3_0 136 void DES_encrypt3(DES_LONG *data, DES_key_schedule *ks1, DES_key_schedule *ks2, 137 DES_key_schedule *ks3); 138 OSSL_DEPRECATEDIN_3_0 139 void DES_decrypt3(DES_LONG *data, DES_key_schedule *ks1, DES_key_schedule *ks2, 140 DES_key_schedule *ks3); 141 OSSL_DEPRECATEDIN_3_0 119 142 void DES_ede3_cbc_encrypt(const unsigned char *input, unsigned char *output, 120 long length, 121 DES_key_schedule *ks1, DES_key_schedule *ks2, 122 DES_key_schedule *ks3, DES_cblock *ivec, int enc); 143 long length, DES_key_schedule *ks1, 144 DES_key_schedule *ks2, DES_key_schedule *ks3, 145 DES_cblock *ivec, int enc); 146 OSSL_DEPRECATEDIN_3_0 123 147 void DES_ede3_cfb64_encrypt(const unsigned char *in, unsigned char *out, 124 148 long length, DES_key_schedule *ks1, 125 149 DES_key_schedule *ks2, DES_key_schedule *ks3, 126 150 DES_cblock *ivec, int *num, int enc); 151 OSSL_DEPRECATEDIN_3_0 127 152 void DES_ede3_cfb_encrypt(const unsigned char *in, unsigned char *out, 128 153 int numbits, long length, DES_key_schedule *ks1, 129 154 DES_key_schedule *ks2, DES_key_schedule *ks3, 130 155 DES_cblock *ivec, int enc); 156 OSSL_DEPRECATEDIN_3_0 131 157 void DES_ede3_ofb64_encrypt(const unsigned char *in, unsigned char *out, 132 158 long length, DES_key_schedule *ks1, 133 159 DES_key_schedule *ks2, DES_key_schedule *ks3, 134 160 DES_cblock *ivec, int *num); 161 OSSL_DEPRECATEDIN_3_0 135 162 char *DES_fcrypt(const char *buf, const char *salt, char *ret); 163 OSSL_DEPRECATEDIN_3_0 136 164 char *DES_crypt(const char *buf, const char *salt); 165 OSSL_DEPRECATEDIN_3_0 137 166 void DES_ofb_encrypt(const unsigned char *in, unsigned char *out, int numbits, 138 long length, DES_key_schedule *schedule, 139 DES_cblock *ivec); 167 long length, DES_key_schedule *schedule, DES_cblock *ivec); 168 OSSL_DEPRECATEDIN_3_0 140 169 void DES_pcbc_encrypt(const unsigned char *input, unsigned char *output, 141 170 long length, DES_key_schedule *schedule, 142 171 DES_cblock *ivec, int enc); 172 OSSL_DEPRECATEDIN_3_0 143 173 DES_LONG DES_quad_cksum(const unsigned char *input, DES_cblock output[], 144 174 long length, int out_count, DES_cblock *seed); 145 int DES_random_key(DES_cblock *ret); 146 void DES_set_odd_parity(DES_cblock *key); 147 int DES_check_key_parity(const_DES_cblock *key); 148 int DES_is_weak_key(const_DES_cblock *key); 175 OSSL_DEPRECATEDIN_3_0 int DES_random_key(DES_cblock *ret); 176 OSSL_DEPRECATEDIN_3_0 void DES_set_odd_parity(DES_cblock *key); 177 OSSL_DEPRECATEDIN_3_0 int DES_check_key_parity(const_DES_cblock *key); 178 OSSL_DEPRECATEDIN_3_0 int DES_is_weak_key(const_DES_cblock *key); 179 # endif 149 180 /* 150 181 * DES_set_key (= set_key = DES_key_sched = key_sched) calls 151 * DES_set_key_checked if global variable DES_check_key is set, 152 * DES_set_key_unchecked otherwise. 153 */ 182 * DES_set_key_checked 183 */ 184 # ifndef OPENSSL_NO_DEPRECATED_3_0 185 OSSL_DEPRECATEDIN_3_0 154 186 int DES_set_key(const_DES_cblock *key, DES_key_schedule *schedule); 187 OSSL_DEPRECATEDIN_3_0 155 188 int DES_key_sched(const_DES_cblock *key, DES_key_schedule *schedule); 189 OSSL_DEPRECATEDIN_3_0 156 190 int DES_set_key_checked(const_DES_cblock *key, DES_key_schedule *schedule); 191 OSSL_DEPRECATEDIN_3_0 157 192 void DES_set_key_unchecked(const_DES_cblock *key, DES_key_schedule *schedule); 158 void DES_string_to_key(const char *str, DES_cblock *key); 193 OSSL_DEPRECATEDIN_3_0 void DES_string_to_key(const char *str, DES_cblock *key); 194 OSSL_DEPRECATEDIN_3_0 159 195 void DES_string_to_2keys(const char *str, DES_cblock *key1, DES_cblock *key2); 196 OSSL_DEPRECATEDIN_3_0 160 197 void DES_cfb64_encrypt(const unsigned char *in, unsigned char *out, 161 198 long length, DES_key_schedule *schedule, 162 199 DES_cblock *ivec, int *num, int enc); 200 OSSL_DEPRECATEDIN_3_0 163 201 void DES_ofb64_encrypt(const unsigned char *in, unsigned char *out, 164 202 long length, DES_key_schedule *schedule, 165 203 DES_cblock *ivec, int *num); 166 167 # define DES_fixup_key_parity DES_set_odd_parity 168 169 # ifdef __cplusplus 204 # endif 205 206 # ifdef __cplusplus 170 207 } 208 # endif 171 209 # endif 172 # endif173 210 174 211 #endif -
trunk/src/libs/openssl-3.0.1/include/openssl/dh.h
r91772 r94082 1 1 /* 2 * Copyright 1995-20 18The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_DH_H 11 # define HEADER_DH_H 10 #ifndef OPENSSL_DH_H 11 # define OPENSSL_DH_H 12 # pragma once 13 14 # include <openssl/macros.h> 15 # ifndef OPENSSL_NO_DEPRECATED_3_0 16 # define HEADER_DH_H 17 # endif 12 18 13 19 # include <openssl/opensslconf.h> 14 15 # ifndef OPENSSL_NO_DH 16 # include <openssl/e_os2.h> 17 # include <openssl/bio.h> 18 # include <openssl/asn1.h> 19 # include <openssl/ossl_typ.h> 20 # if OPENSSL_API_COMPAT < 0x10100000L 21 # include <openssl/bn.h> 22 # endif 23 # include <openssl/dherr.h> 20 # include <openssl/types.h> 24 21 25 22 # ifdef __cplusplus … … 27 24 # endif 28 25 29 # ifndef OPENSSL_DH_MAX_MODULUS_BITS 30 # define OPENSSL_DH_MAX_MODULUS_BITS 10000 31 # endif 32 33 # define OPENSSL_DH_FIPS_MIN_MODULUS_BITS 1024 34 35 # define DH_FLAG_CACHE_MONT_P 0x01 36 37 # if OPENSSL_API_COMPAT < 0x10100000L 38 /* 39 * Does nothing. Previously this switched off constant time behaviour. 40 */ 41 # define DH_FLAG_NO_EXP_CONSTTIME 0x00 42 # endif 43 44 /* 45 * If this flag is set the DH method is FIPS compliant and can be used in 46 * FIPS mode. This is set in the validated module method. If an application 47 * sets this flag in its own methods it is its responsibility to ensure the 48 * result is compliant. 49 */ 50 51 # define DH_FLAG_FIPS_METHOD 0x0400 52 53 /* 54 * If this flag is set the operations normally disabled in FIPS mode are 55 * permitted it is then the applications responsibility to ensure that the 56 * usage is compliant. 57 */ 58 59 # define DH_FLAG_NON_FIPS_ALLOW 0x0400 60 61 /* Already defined in ossl_typ.h */ 62 /* typedef struct dh_st DH; */ 63 /* typedef struct dh_method DH_METHOD; */ 64 65 DECLARE_ASN1_ITEM(DHparams) 66 67 # define DH_GENERATOR_2 2 68 /* #define DH_GENERATOR_3 3 */ 69 # define DH_GENERATOR_5 5 70 71 /* DH_check error codes */ 72 # define DH_CHECK_P_NOT_PRIME 0x01 73 # define DH_CHECK_P_NOT_SAFE_PRIME 0x02 74 # define DH_UNABLE_TO_CHECK_GENERATOR 0x04 75 # define DH_NOT_SUITABLE_GENERATOR 0x08 76 # define DH_CHECK_Q_NOT_PRIME 0x10 77 # define DH_CHECK_INVALID_Q_VALUE 0x20 78 # define DH_CHECK_INVALID_J_VALUE 0x40 79 80 /* DH_check_pub_key error codes */ 81 # define DH_CHECK_PUBKEY_TOO_SMALL 0x01 82 # define DH_CHECK_PUBKEY_TOO_LARGE 0x02 83 # define DH_CHECK_PUBKEY_INVALID 0x04 84 85 /* 86 * primes p where (p-1)/2 is prime too are called "safe"; we define this for 87 * backward compatibility: 88 */ 89 # define DH_CHECK_P_NOT_STRONG_PRIME DH_CHECK_P_NOT_SAFE_PRIME 90 91 # define d2i_DHparams_fp(fp,x) \ 92 (DH *)ASN1_d2i_fp((char *(*)())DH_new, \ 93 (char *(*)())d2i_DHparams, \ 94 (fp), \ 95 (unsigned char **)(x)) 96 # define i2d_DHparams_fp(fp,x) \ 97 ASN1_i2d_fp(i2d_DHparams,(fp), (unsigned char *)(x)) 98 # define d2i_DHparams_bio(bp,x) \ 99 ASN1_d2i_bio_of(DH, DH_new, d2i_DHparams, bp, x) 100 # define i2d_DHparams_bio(bp,x) \ 101 ASN1_i2d_bio_of_const(DH,i2d_DHparams,bp,x) 102 103 # define d2i_DHxparams_fp(fp,x) \ 104 (DH *)ASN1_d2i_fp((char *(*)())DH_new, \ 105 (char *(*)())d2i_DHxparams, \ 106 (fp), \ 107 (unsigned char **)(x)) 108 # define i2d_DHxparams_fp(fp,x) \ 109 ASN1_i2d_fp(i2d_DHxparams,(fp), (unsigned char *)(x)) 110 # define d2i_DHxparams_bio(bp,x) \ 111 ASN1_d2i_bio_of(DH, DH_new, d2i_DHxparams, bp, x) 112 # define i2d_DHxparams_bio(bp,x) \ 113 ASN1_i2d_bio_of_const(DH, i2d_DHxparams, bp, x) 114 115 DH *DHparams_dup(DH *); 116 117 const DH_METHOD *DH_OpenSSL(void); 118 119 void DH_set_default_method(const DH_METHOD *meth); 120 const DH_METHOD *DH_get_default_method(void); 121 int DH_set_method(DH *dh, const DH_METHOD *meth); 122 DH *DH_new_method(ENGINE *engine); 123 124 DH *DH_new(void); 125 void DH_free(DH *dh); 126 int DH_up_ref(DH *dh); 127 int DH_bits(const DH *dh); 128 int DH_size(const DH *dh); 129 int DH_security_bits(const DH *dh); 130 #define DH_get_ex_new_index(l, p, newf, dupf, freef) \ 131 CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_DH, l, p, newf, dupf, freef) 132 int DH_set_ex_data(DH *d, int idx, void *arg); 133 void *DH_get_ex_data(DH *d, int idx); 134 135 /* Deprecated version */ 136 DEPRECATEDIN_0_9_8(DH *DH_generate_parameters(int prime_len, int generator, 137 void (*callback) (int, int, 138 void *), 139 void *cb_arg)) 140 141 /* New version */ 142 int DH_generate_parameters_ex(DH *dh, int prime_len, int generator, 143 BN_GENCB *cb); 144 145 int DH_check_params_ex(const DH *dh); 146 int DH_check_ex(const DH *dh); 147 int DH_check_pub_key_ex(const DH *dh, const BIGNUM *pub_key); 148 int DH_check_params(const DH *dh, int *ret); 149 int DH_check(const DH *dh, int *codes); 150 int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *codes); 151 int DH_generate_key(DH *dh); 152 int DH_compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh); 153 int DH_compute_key_padded(unsigned char *key, const BIGNUM *pub_key, DH *dh); 154 DH *d2i_DHparams(DH **a, const unsigned char **pp, long length); 155 int i2d_DHparams(const DH *a, unsigned char **pp); 156 DH *d2i_DHxparams(DH **a, const unsigned char **pp, long length); 157 int i2d_DHxparams(const DH *a, unsigned char **pp); 158 # ifndef OPENSSL_NO_STDIO 159 int DHparams_print_fp(FILE *fp, const DH *x); 160 # endif 161 int DHparams_print(BIO *bp, const DH *x); 162 163 /* RFC 5114 parameters */ 164 DH *DH_get_1024_160(void); 165 DH *DH_get_2048_224(void); 166 DH *DH_get_2048_256(void); 167 168 /* Named parameters, currently RFC7919 */ 169 DH *DH_new_by_nid(int nid); 170 int DH_get_nid(const DH *dh); 171 172 # ifndef OPENSSL_NO_CMS 173 /* RFC2631 KDF */ 174 int DH_KDF_X9_42(unsigned char *out, size_t outlen, 175 const unsigned char *Z, size_t Zlen, 176 ASN1_OBJECT *key_oid, 177 const unsigned char *ukm, size_t ukmlen, const EVP_MD *md); 178 # endif 179 180 void DH_get0_pqg(const DH *dh, 181 const BIGNUM **p, const BIGNUM **q, const BIGNUM **g); 182 int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g); 183 void DH_get0_key(const DH *dh, 184 const BIGNUM **pub_key, const BIGNUM **priv_key); 185 int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key); 186 const BIGNUM *DH_get0_p(const DH *dh); 187 const BIGNUM *DH_get0_q(const DH *dh); 188 const BIGNUM *DH_get0_g(const DH *dh); 189 const BIGNUM *DH_get0_priv_key(const DH *dh); 190 const BIGNUM *DH_get0_pub_key(const DH *dh); 191 void DH_clear_flags(DH *dh, int flags); 192 int DH_test_flags(const DH *dh, int flags); 193 void DH_set_flags(DH *dh, int flags); 194 ENGINE *DH_get0_engine(DH *d); 195 long DH_get_length(const DH *dh); 196 int DH_set_length(DH *dh, long length); 197 198 DH_METHOD *DH_meth_new(const char *name, int flags); 199 void DH_meth_free(DH_METHOD *dhm); 200 DH_METHOD *DH_meth_dup(const DH_METHOD *dhm); 201 const char *DH_meth_get0_name(const DH_METHOD *dhm); 202 int DH_meth_set1_name(DH_METHOD *dhm, const char *name); 203 int DH_meth_get_flags(const DH_METHOD *dhm); 204 int DH_meth_set_flags(DH_METHOD *dhm, int flags); 205 void *DH_meth_get0_app_data(const DH_METHOD *dhm); 206 int DH_meth_set0_app_data(DH_METHOD *dhm, void *app_data); 207 int (*DH_meth_get_generate_key(const DH_METHOD *dhm)) (DH *); 208 int DH_meth_set_generate_key(DH_METHOD *dhm, int (*generate_key) (DH *)); 209 int (*DH_meth_get_compute_key(const DH_METHOD *dhm)) 210 (unsigned char *key, const BIGNUM *pub_key, DH *dh); 211 int DH_meth_set_compute_key(DH_METHOD *dhm, 212 int (*compute_key) (unsigned char *key, const BIGNUM *pub_key, DH *dh)); 213 int (*DH_meth_get_bn_mod_exp(const DH_METHOD *dhm)) 214 (const DH *, BIGNUM *, const BIGNUM *, const BIGNUM *, const BIGNUM *, 215 BN_CTX *, BN_MONT_CTX *); 216 int DH_meth_set_bn_mod_exp(DH_METHOD *dhm, 217 int (*bn_mod_exp) (const DH *, BIGNUM *, const BIGNUM *, const BIGNUM *, 218 const BIGNUM *, BN_CTX *, BN_MONT_CTX *)); 219 int (*DH_meth_get_init(const DH_METHOD *dhm))(DH *); 220 int DH_meth_set_init(DH_METHOD *dhm, int (*init)(DH *)); 221 int (*DH_meth_get_finish(const DH_METHOD *dhm)) (DH *); 222 int DH_meth_set_finish(DH_METHOD *dhm, int (*finish) (DH *)); 223 int (*DH_meth_get_generate_params(const DH_METHOD *dhm)) 224 (DH *, int, int, BN_GENCB *); 225 int DH_meth_set_generate_params(DH_METHOD *dhm, 226 int (*generate_params) (DH *, int, int, BN_GENCB *)); 227 228 229 # define EVP_PKEY_CTX_set_dh_paramgen_prime_len(ctx, len) \ 230 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \ 231 EVP_PKEY_CTRL_DH_PARAMGEN_PRIME_LEN, len, NULL) 232 233 # define EVP_PKEY_CTX_set_dh_paramgen_subprime_len(ctx, len) \ 234 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \ 235 EVP_PKEY_CTRL_DH_PARAMGEN_SUBPRIME_LEN, len, NULL) 236 237 # define EVP_PKEY_CTX_set_dh_paramgen_type(ctx, typ) \ 238 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \ 239 EVP_PKEY_CTRL_DH_PARAMGEN_TYPE, typ, NULL) 240 241 # define EVP_PKEY_CTX_set_dh_paramgen_generator(ctx, gen) \ 242 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_PARAMGEN, \ 243 EVP_PKEY_CTRL_DH_PARAMGEN_GENERATOR, gen, NULL) 244 245 # define EVP_PKEY_CTX_set_dh_rfc5114(ctx, gen) \ 246 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, EVP_PKEY_OP_PARAMGEN, \ 247 EVP_PKEY_CTRL_DH_RFC5114, gen, NULL) 248 249 # define EVP_PKEY_CTX_set_dhx_rfc5114(ctx, gen) \ 250 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, EVP_PKEY_OP_PARAMGEN, \ 251 EVP_PKEY_CTRL_DH_RFC5114, gen, NULL) 252 253 # define EVP_PKEY_CTX_set_dh_nid(ctx, nid) \ 254 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, \ 255 EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN, \ 256 EVP_PKEY_CTRL_DH_NID, nid, NULL) 257 258 # define EVP_PKEY_CTX_set_dh_pad(ctx, pad) \ 259 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DH, EVP_PKEY_OP_DERIVE, \ 260 EVP_PKEY_CTRL_DH_PAD, pad, NULL) 261 262 # define EVP_PKEY_CTX_set_dh_kdf_type(ctx, kdf) \ 263 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \ 264 EVP_PKEY_OP_DERIVE, \ 265 EVP_PKEY_CTRL_DH_KDF_TYPE, kdf, NULL) 266 267 # define EVP_PKEY_CTX_get_dh_kdf_type(ctx) \ 268 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \ 269 EVP_PKEY_OP_DERIVE, \ 270 EVP_PKEY_CTRL_DH_KDF_TYPE, -2, NULL) 271 272 # define EVP_PKEY_CTX_set0_dh_kdf_oid(ctx, oid) \ 273 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \ 274 EVP_PKEY_OP_DERIVE, \ 275 EVP_PKEY_CTRL_DH_KDF_OID, 0, (void *)(oid)) 276 277 # define EVP_PKEY_CTX_get0_dh_kdf_oid(ctx, poid) \ 278 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \ 279 EVP_PKEY_OP_DERIVE, \ 280 EVP_PKEY_CTRL_GET_DH_KDF_OID, 0, (void *)(poid)) 281 282 # define EVP_PKEY_CTX_set_dh_kdf_md(ctx, md) \ 283 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \ 284 EVP_PKEY_OP_DERIVE, \ 285 EVP_PKEY_CTRL_DH_KDF_MD, 0, (void *)(md)) 286 287 # define EVP_PKEY_CTX_get_dh_kdf_md(ctx, pmd) \ 288 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \ 289 EVP_PKEY_OP_DERIVE, \ 290 EVP_PKEY_CTRL_GET_DH_KDF_MD, 0, (void *)(pmd)) 291 292 # define EVP_PKEY_CTX_set_dh_kdf_outlen(ctx, len) \ 293 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \ 294 EVP_PKEY_OP_DERIVE, \ 295 EVP_PKEY_CTRL_DH_KDF_OUTLEN, len, NULL) 296 297 # define EVP_PKEY_CTX_get_dh_kdf_outlen(ctx, plen) \ 298 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \ 299 EVP_PKEY_OP_DERIVE, \ 300 EVP_PKEY_CTRL_GET_DH_KDF_OUTLEN, 0, (void *)(plen)) 301 302 # define EVP_PKEY_CTX_set0_dh_kdf_ukm(ctx, p, plen) \ 303 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \ 304 EVP_PKEY_OP_DERIVE, \ 305 EVP_PKEY_CTRL_DH_KDF_UKM, plen, (void *)(p)) 306 307 # define EVP_PKEY_CTX_get0_dh_kdf_ukm(ctx, p) \ 308 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DHX, \ 309 EVP_PKEY_OP_DERIVE, \ 310 EVP_PKEY_CTRL_GET_DH_KDF_UKM, 0, (void *)(p)) 26 #include <stdlib.h> 27 28 /* DH parameter generation types used by EVP_PKEY_CTX_set_dh_paramgen_type() */ 29 # define DH_PARAMGEN_TYPE_GENERATOR 0 /* Use a safe prime generator */ 30 # define DH_PARAMGEN_TYPE_FIPS_186_2 1 /* Use FIPS186-2 standard */ 31 # define DH_PARAMGEN_TYPE_FIPS_186_4 2 /* Use FIPS186-4 standard */ 32 # define DH_PARAMGEN_TYPE_GROUP 3 /* Use a named safe prime group */ 33 34 int EVP_PKEY_CTX_set_dh_paramgen_type(EVP_PKEY_CTX *ctx, int typ); 35 int EVP_PKEY_CTX_set_dh_paramgen_gindex(EVP_PKEY_CTX *ctx, int gindex); 36 int EVP_PKEY_CTX_set_dh_paramgen_seed(EVP_PKEY_CTX *ctx, 37 const unsigned char *seed, 38 size_t seedlen); 39 int EVP_PKEY_CTX_set_dh_paramgen_prime_len(EVP_PKEY_CTX *ctx, int pbits); 40 int EVP_PKEY_CTX_set_dh_paramgen_subprime_len(EVP_PKEY_CTX *ctx, int qlen); 41 int EVP_PKEY_CTX_set_dh_paramgen_generator(EVP_PKEY_CTX *ctx, int gen); 42 int EVP_PKEY_CTX_set_dh_nid(EVP_PKEY_CTX *ctx, int nid); 43 int EVP_PKEY_CTX_set_dh_rfc5114(EVP_PKEY_CTX *ctx, int gen); 44 int EVP_PKEY_CTX_set_dhx_rfc5114(EVP_PKEY_CTX *ctx, int gen); 45 int EVP_PKEY_CTX_set_dh_pad(EVP_PKEY_CTX *ctx, int pad); 46 47 int EVP_PKEY_CTX_set_dh_kdf_type(EVP_PKEY_CTX *ctx, int kdf); 48 int EVP_PKEY_CTX_get_dh_kdf_type(EVP_PKEY_CTX *ctx); 49 int EVP_PKEY_CTX_set0_dh_kdf_oid(EVP_PKEY_CTX *ctx, ASN1_OBJECT *oid); 50 int EVP_PKEY_CTX_get0_dh_kdf_oid(EVP_PKEY_CTX *ctx, ASN1_OBJECT **oid); 51 int EVP_PKEY_CTX_set_dh_kdf_md(EVP_PKEY_CTX *ctx, const EVP_MD *md); 52 int EVP_PKEY_CTX_get_dh_kdf_md(EVP_PKEY_CTX *ctx, const EVP_MD **md); 53 int EVP_PKEY_CTX_set_dh_kdf_outlen(EVP_PKEY_CTX *ctx, int len); 54 int EVP_PKEY_CTX_get_dh_kdf_outlen(EVP_PKEY_CTX *ctx, int *len); 55 int EVP_PKEY_CTX_set0_dh_kdf_ukm(EVP_PKEY_CTX *ctx, unsigned char *ukm, int len); 56 # ifndef OPENSSL_NO_DEPRECATED_3_0 57 OSSL_DEPRECATEDIN_3_0 58 int EVP_PKEY_CTX_get0_dh_kdf_ukm(EVP_PKEY_CTX *ctx, unsigned char **ukm); 59 #endif 311 60 312 61 # define EVP_PKEY_CTRL_DH_PARAMGEN_PRIME_LEN (EVP_PKEY_ALG_CTRL + 1) … … 329 78 /* KDF types */ 330 79 # define EVP_PKEY_DH_KDF_NONE 1 331 # ifndef OPENSSL_NO_CMS332 80 # define EVP_PKEY_DH_KDF_X9_42 2 81 82 # ifndef OPENSSL_NO_DH 83 # include <openssl/e_os2.h> 84 # include <openssl/bio.h> 85 # include <openssl/asn1.h> 86 # ifndef OPENSSL_NO_DEPRECATED_1_1_0 87 # include <openssl/bn.h> 88 # endif 89 # include <openssl/dherr.h> 90 91 # ifndef OPENSSL_DH_MAX_MODULUS_BITS 92 # define OPENSSL_DH_MAX_MODULUS_BITS 10000 93 # endif 94 95 # define OPENSSL_DH_FIPS_MIN_MODULUS_BITS 1024 96 97 # define DH_FLAG_CACHE_MONT_P 0x01 98 99 # define DH_FLAG_TYPE_MASK 0xF000 100 # define DH_FLAG_TYPE_DH 0x0000 101 # define DH_FLAG_TYPE_DHX 0x1000 102 103 # ifndef OPENSSL_NO_DEPRECATED_1_1_0 104 /* 105 * Does nothing. Previously this switched off constant time behaviour. 106 */ 107 # define DH_FLAG_NO_EXP_CONSTTIME 0x00 108 # endif 109 110 # ifndef OPENSSL_NO_DEPRECATED_3_0 111 /* 112 * If this flag is set the DH method is FIPS compliant and can be used in 113 * FIPS mode. This is set in the validated module method. If an application 114 * sets this flag in its own methods it is its responsibility to ensure the 115 * result is compliant. 116 */ 117 118 # define DH_FLAG_FIPS_METHOD 0x0400 119 120 /* 121 * If this flag is set the operations normally disabled in FIPS mode are 122 * permitted it is then the applications responsibility to ensure that the 123 * usage is compliant. 124 */ 125 126 # define DH_FLAG_NON_FIPS_ALLOW 0x0400 127 # endif 128 129 /* Already defined in ossl_typ.h */ 130 /* typedef struct dh_st DH; */ 131 /* typedef struct dh_method DH_METHOD; */ 132 133 DECLARE_ASN1_ITEM(DHparams) 134 135 # ifndef OPENSSL_NO_DEPRECATED_3_0 136 # define DH_GENERATOR_2 2 137 # define DH_GENERATOR_3 3 138 # define DH_GENERATOR_5 5 139 140 /* DH_check error codes */ 141 /* 142 * NB: These values must align with the equivalently named macros in 143 * internal/ffc.h. 144 */ 145 # define DH_CHECK_P_NOT_PRIME 0x01 146 # define DH_CHECK_P_NOT_SAFE_PRIME 0x02 147 # define DH_UNABLE_TO_CHECK_GENERATOR 0x04 148 # define DH_NOT_SUITABLE_GENERATOR 0x08 149 # define DH_CHECK_Q_NOT_PRIME 0x10 150 # define DH_CHECK_INVALID_Q_VALUE 0x20 151 # define DH_CHECK_INVALID_J_VALUE 0x40 152 # define DH_MODULUS_TOO_SMALL 0x80 153 # define DH_MODULUS_TOO_LARGE 0x100 154 155 /* DH_check_pub_key error codes */ 156 # define DH_CHECK_PUBKEY_TOO_SMALL 0x01 157 # define DH_CHECK_PUBKEY_TOO_LARGE 0x02 158 # define DH_CHECK_PUBKEY_INVALID 0x04 159 160 /* 161 * primes p where (p-1)/2 is prime too are called "safe"; we define this for 162 * backward compatibility: 163 */ 164 # define DH_CHECK_P_NOT_STRONG_PRIME DH_CHECK_P_NOT_SAFE_PRIME 165 166 # define d2i_DHparams_fp(fp, x) \ 167 (DH *)ASN1_d2i_fp((char *(*)())DH_new, \ 168 (char *(*)())d2i_DHparams, \ 169 (fp), \ 170 (unsigned char **)(x)) 171 # define i2d_DHparams_fp(fp, x) \ 172 ASN1_i2d_fp(i2d_DHparams,(fp), (unsigned char *)(x)) 173 # define d2i_DHparams_bio(bp, x) \ 174 ASN1_d2i_bio_of(DH, DH_new, d2i_DHparams, bp, x) 175 # define i2d_DHparams_bio(bp, x) \ 176 ASN1_i2d_bio_of(DH, i2d_DHparams, bp, x) 177 178 # define d2i_DHxparams_fp(fp,x) \ 179 (DH *)ASN1_d2i_fp((char *(*)())DH_new, \ 180 (char *(*)())d2i_DHxparams, \ 181 (fp), \ 182 (unsigned char **)(x)) 183 # define i2d_DHxparams_fp(fp, x) \ 184 ASN1_i2d_fp(i2d_DHxparams,(fp), (unsigned char *)(x)) 185 # define d2i_DHxparams_bio(bp, x) \ 186 ASN1_d2i_bio_of(DH, DH_new, d2i_DHxparams, bp, x) 187 # define i2d_DHxparams_bio(bp, x) \ 188 ASN1_i2d_bio_of(DH, i2d_DHxparams, bp, x) 189 190 DECLARE_ASN1_DUP_FUNCTION_name_attr(OSSL_DEPRECATEDIN_3_0, DH, DHparams) 191 192 OSSL_DEPRECATEDIN_3_0 const DH_METHOD *DH_OpenSSL(void); 193 194 OSSL_DEPRECATEDIN_3_0 void DH_set_default_method(const DH_METHOD *meth); 195 OSSL_DEPRECATEDIN_3_0 const DH_METHOD *DH_get_default_method(void); 196 OSSL_DEPRECATEDIN_3_0 int DH_set_method(DH *dh, const DH_METHOD *meth); 197 OSSL_DEPRECATEDIN_3_0 DH *DH_new_method(ENGINE *engine); 198 199 OSSL_DEPRECATEDIN_3_0 DH *DH_new(void); 200 OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh); 201 OSSL_DEPRECATEDIN_3_0 int DH_up_ref(DH *dh); 202 OSSL_DEPRECATEDIN_3_0 int DH_bits(const DH *dh); 203 OSSL_DEPRECATEDIN_3_0 int DH_size(const DH *dh); 204 OSSL_DEPRECATEDIN_3_0 int DH_security_bits(const DH *dh); 205 206 # define DH_get_ex_new_index(l, p, newf, dupf, freef) \ 207 CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_DH, l, p, newf, dupf, freef) 208 209 OSSL_DEPRECATEDIN_3_0 int DH_set_ex_data(DH *d, int idx, void *arg); 210 OSSL_DEPRECATEDIN_3_0 void *DH_get_ex_data(const DH *d, int idx); 211 212 OSSL_DEPRECATEDIN_3_0 int DH_generate_parameters_ex(DH *dh, int prime_len, 213 int generator, 214 BN_GENCB *cb); 215 216 OSSL_DEPRECATEDIN_3_0 int DH_check_params_ex(const DH *dh); 217 OSSL_DEPRECATEDIN_3_0 int DH_check_ex(const DH *dh); 218 OSSL_DEPRECATEDIN_3_0 int DH_check_pub_key_ex(const DH *dh, const BIGNUM *pub_key); 219 OSSL_DEPRECATEDIN_3_0 int DH_check_params(const DH *dh, int *ret); 220 OSSL_DEPRECATEDIN_3_0 int DH_check(const DH *dh, int *codes); 221 OSSL_DEPRECATEDIN_3_0 int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, 222 int *codes); 223 OSSL_DEPRECATEDIN_3_0 int DH_generate_key(DH *dh); 224 OSSL_DEPRECATEDIN_3_0 int DH_compute_key(unsigned char *key, 225 const BIGNUM *pub_key, DH *dh); 226 OSSL_DEPRECATEDIN_3_0 int DH_compute_key_padded(unsigned char *key, 227 const BIGNUM *pub_key, DH *dh); 228 229 DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(OSSL_DEPRECATEDIN_3_0, DH, DHparams) 230 DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(OSSL_DEPRECATEDIN_3_0, DH, DHxparams) 231 232 # ifndef OPENSSL_NO_STDIO 233 OSSL_DEPRECATEDIN_3_0 int DHparams_print_fp(FILE *fp, const DH *x); 234 # endif 235 OSSL_DEPRECATEDIN_3_0 int DHparams_print(BIO *bp, const DH *x); 236 237 /* RFC 5114 parameters */ 238 OSSL_DEPRECATEDIN_3_0 DH *DH_get_1024_160(void); 239 OSSL_DEPRECATEDIN_3_0 DH *DH_get_2048_224(void); 240 OSSL_DEPRECATEDIN_3_0 DH *DH_get_2048_256(void); 241 242 /* Named parameters, currently RFC7919 and RFC3526 */ 243 OSSL_DEPRECATEDIN_3_0 DH *DH_new_by_nid(int nid); 244 OSSL_DEPRECATEDIN_3_0 int DH_get_nid(const DH *dh); 245 246 /* RFC2631 KDF */ 247 OSSL_DEPRECATEDIN_3_0 int DH_KDF_X9_42(unsigned char *out, size_t outlen, 248 const unsigned char *Z, size_t Zlen, 249 ASN1_OBJECT *key_oid, 250 const unsigned char *ukm, 251 size_t ukmlen, const EVP_MD *md); 252 253 OSSL_DEPRECATEDIN_3_0 void DH_get0_pqg(const DH *dh, const BIGNUM **p, 254 const BIGNUM **q, const BIGNUM **g); 255 OSSL_DEPRECATEDIN_3_0 int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g); 256 OSSL_DEPRECATEDIN_3_0 void DH_get0_key(const DH *dh, const BIGNUM **pub_key, 257 const BIGNUM **priv_key); 258 OSSL_DEPRECATEDIN_3_0 int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key); 259 OSSL_DEPRECATEDIN_3_0 const BIGNUM *DH_get0_p(const DH *dh); 260 OSSL_DEPRECATEDIN_3_0 const BIGNUM *DH_get0_q(const DH *dh); 261 OSSL_DEPRECATEDIN_3_0 const BIGNUM *DH_get0_g(const DH *dh); 262 OSSL_DEPRECATEDIN_3_0 const BIGNUM *DH_get0_priv_key(const DH *dh); 263 OSSL_DEPRECATEDIN_3_0 const BIGNUM *DH_get0_pub_key(const DH *dh); 264 OSSL_DEPRECATEDIN_3_0 void DH_clear_flags(DH *dh, int flags); 265 OSSL_DEPRECATEDIN_3_0 int DH_test_flags(const DH *dh, int flags); 266 OSSL_DEPRECATEDIN_3_0 void DH_set_flags(DH *dh, int flags); 267 OSSL_DEPRECATEDIN_3_0 ENGINE *DH_get0_engine(DH *d); 268 OSSL_DEPRECATEDIN_3_0 long DH_get_length(const DH *dh); 269 OSSL_DEPRECATEDIN_3_0 int DH_set_length(DH *dh, long length); 270 271 OSSL_DEPRECATEDIN_3_0 DH_METHOD *DH_meth_new(const char *name, int flags); 272 OSSL_DEPRECATEDIN_3_0 void DH_meth_free(DH_METHOD *dhm); 273 OSSL_DEPRECATEDIN_3_0 DH_METHOD *DH_meth_dup(const DH_METHOD *dhm); 274 OSSL_DEPRECATEDIN_3_0 const char *DH_meth_get0_name(const DH_METHOD *dhm); 275 OSSL_DEPRECATEDIN_3_0 int DH_meth_set1_name(DH_METHOD *dhm, const char *name); 276 OSSL_DEPRECATEDIN_3_0 int DH_meth_get_flags(const DH_METHOD *dhm); 277 OSSL_DEPRECATEDIN_3_0 int DH_meth_set_flags(DH_METHOD *dhm, int flags); 278 OSSL_DEPRECATEDIN_3_0 void *DH_meth_get0_app_data(const DH_METHOD *dhm); 279 OSSL_DEPRECATEDIN_3_0 int DH_meth_set0_app_data(DH_METHOD *dhm, void *app_data); 280 OSSL_DEPRECATEDIN_3_0 int (*DH_meth_get_generate_key(const DH_METHOD *dhm)) (DH *); 281 OSSL_DEPRECATEDIN_3_0 int DH_meth_set_generate_key(DH_METHOD *dhm, 282 int (*generate_key) (DH *)); 283 OSSL_DEPRECATEDIN_3_0 int (*DH_meth_get_compute_key(const DH_METHOD *dhm)) 284 (unsigned char *key, 285 const BIGNUM *pub_key, 286 DH *dh); 287 OSSL_DEPRECATEDIN_3_0 int DH_meth_set_compute_key(DH_METHOD *dhm, 288 int (*compute_key) 289 (unsigned char *key, 290 const BIGNUM *pub_key, 291 DH *dh)); 292 OSSL_DEPRECATEDIN_3_0 int (*DH_meth_get_bn_mod_exp(const DH_METHOD *dhm)) 293 (const DH *, BIGNUM *, 294 const BIGNUM *, 295 const BIGNUM *, 296 const BIGNUM *, BN_CTX *, 297 BN_MONT_CTX *); 298 OSSL_DEPRECATEDIN_3_0 int DH_meth_set_bn_mod_exp(DH_METHOD *dhm, 299 int (*bn_mod_exp) 300 (const DH *, BIGNUM *, 301 const BIGNUM *, const BIGNUM *, 302 const BIGNUM *, BN_CTX *, 303 BN_MONT_CTX *)); 304 OSSL_DEPRECATEDIN_3_0 int (*DH_meth_get_init(const DH_METHOD *dhm))(DH *); 305 OSSL_DEPRECATEDIN_3_0 int DH_meth_set_init(DH_METHOD *dhm, int (*init)(DH *)); 306 OSSL_DEPRECATEDIN_3_0 int (*DH_meth_get_finish(const DH_METHOD *dhm)) (DH *); 307 OSSL_DEPRECATEDIN_3_0 int DH_meth_set_finish(DH_METHOD *dhm, int (*finish) (DH *)); 308 OSSL_DEPRECATEDIN_3_0 int (*DH_meth_get_generate_params(const DH_METHOD *dhm)) 309 (DH *, int, int, 310 BN_GENCB *); 311 OSSL_DEPRECATEDIN_3_0 int DH_meth_set_generate_params(DH_METHOD *dhm, 312 int (*generate_params) 313 (DH *, int, int, 314 BN_GENCB *)); 315 # endif /* OPENSSL_NO_DEPRECATED_3_0 */ 316 317 # ifndef OPENSSL_NO_DEPRECATED_0_9_8 318 OSSL_DEPRECATEDIN_0_9_8 DH *DH_generate_parameters(int prime_len, int generator, 319 void (*callback) (int, int, 320 void *), 321 void *cb_arg); 322 # endif 323 333 324 # endif 334 335 336 # ifdef __cplusplus 325 # ifdef __cplusplus 337 326 } 338 # endif339 327 # endif 340 328 #endif -
trunk/src/libs/openssl-3.0.1/include/openssl/dherr.h
r91772 r94082 1 1 /* 2 2 * Generated by util/mkerr.pl DO NOT EDIT 3 * Copyright 1995-20 19The OpenSSL Project Authors. All Rights Reserved.3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 4 * 5 * Licensed under the OpenSSL license(the "License"). You may not use5 * Licensed under the Apache License 2.0 (the "License"). You may not use 6 6 * this file except in compliance with the License. You can obtain a copy 7 7 * in the file LICENSE in the source distribution or at … … 9 9 */ 10 10 11 #ifndef HEADER_DHERR_H 12 # define HEADER_DHERR_H 13 14 # ifndef HEADER_SYMHACKS_H 15 # include <openssl/symhacks.h> 16 # endif 11 #ifndef OPENSSL_DHERR_H 12 # define OPENSSL_DHERR_H 13 # pragma once 17 14 18 15 # include <openssl/opensslconf.h> 16 # include <openssl/symhacks.h> 17 # include <openssl/cryptoerr_legacy.h> 18 19 19 20 20 # ifndef OPENSSL_NO_DH 21 21 22 # ifdef __cplusplus23 extern "C"24 # endif25 int ERR_load_DH_strings(void);26 27 /*28 * DH function codes.29 */30 # define DH_F_COMPUTE_KEY 10231 # define DH_F_DHPARAMS_PRINT_FP 10132 # define DH_F_DH_BUILTIN_GENPARAMS 10633 # define DH_F_DH_CHECK_EX 12134 # define DH_F_DH_CHECK_PARAMS_EX 12235 # define DH_F_DH_CHECK_PUB_KEY_EX 12336 # define DH_F_DH_CMS_DECRYPT 11437 # define DH_F_DH_CMS_SET_PEERKEY 11538 # define DH_F_DH_CMS_SET_SHARED_INFO 11639 # define DH_F_DH_METH_DUP 11740 # define DH_F_DH_METH_NEW 11841 # define DH_F_DH_METH_SET1_NAME 11942 # define DH_F_DH_NEW_BY_NID 10443 # define DH_F_DH_NEW_METHOD 10544 # define DH_F_DH_PARAM_DECODE 10745 # define DH_F_DH_PKEY_PUBLIC_CHECK 12446 # define DH_F_DH_PRIV_DECODE 11047 # define DH_F_DH_PRIV_ENCODE 11148 # define DH_F_DH_PUB_DECODE 10849 # define DH_F_DH_PUB_ENCODE 10950 # define DH_F_DO_DH_PRINT 10051 # define DH_F_GENERATE_KEY 10352 # define DH_F_PKEY_DH_CTRL_STR 12053 # define DH_F_PKEY_DH_DERIVE 11254 # define DH_F_PKEY_DH_INIT 12555 # define DH_F_PKEY_DH_KEYGEN 11356 22 57 23 /* 58 24 * DH reason codes. 59 25 */ 26 # define DH_R_BAD_FFC_PARAMETERS 127 60 27 # define DH_R_BAD_GENERATOR 101 61 28 # define DH_R_BN_DECODE_ERROR 109 … … 73 40 # define DH_R_INVALID_PARAMETER_NID 114 74 41 # define DH_R_INVALID_PUBKEY 102 42 # define DH_R_INVALID_SECRET 128 75 43 # define DH_R_KDF_PARAMETER_ERROR 112 76 44 # define DH_R_KEYS_NOT_SET 108 77 45 # define DH_R_MISSING_PUBKEY 125 78 46 # define DH_R_MODULUS_TOO_LARGE 103 47 # define DH_R_MODULUS_TOO_SMALL 126 79 48 # define DH_R_NOT_SUITABLE_GENERATOR 120 80 49 # define DH_R_NO_PARAMETERS_SET 107 -
trunk/src/libs/openssl-3.0.1/include/openssl/dsa.h
r91772 r94082 1 1 /* 2 * Copyright 1995-20 18The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_DSA_H 11 # define HEADER_DSA_H 10 #ifndef OPENSSL_DSA_H 11 # define OPENSSL_DSA_H 12 # pragma once 13 14 # include <openssl/macros.h> 15 # ifndef OPENSSL_NO_DEPRECATED_3_0 16 # define HEADER_DSA_H 17 # endif 12 18 13 19 # include <openssl/opensslconf.h> 14 15 # ifndef OPENSSL_NO_DSA 20 # include <openssl/types.h> 21 16 22 # ifdef __cplusplus 17 23 extern "C" { 18 24 # endif 19 # include <openssl/e_os2.h> 20 # include <openssl/bio.h> 21 # include <openssl/crypto.h> 22 # include <openssl/ossl_typ.h> 23 # include <openssl/bn.h> 24 # if OPENSSL_API_COMPAT < 0x10100000L 25 # include <openssl/dh.h> 26 # endif 27 # include <openssl/dsaerr.h> 28 29 # ifndef OPENSSL_DSA_MAX_MODULUS_BITS 30 # define OPENSSL_DSA_MAX_MODULUS_BITS 10000 31 # endif 32 33 # define OPENSSL_DSA_FIPS_MIN_MODULUS_BITS 1024 34 35 # define DSA_FLAG_CACHE_MONT_P 0x01 36 # if OPENSSL_API_COMPAT < 0x10100000L 25 26 # include <stdlib.h> 27 28 int EVP_PKEY_CTX_set_dsa_paramgen_bits(EVP_PKEY_CTX *ctx, int nbits); 29 int EVP_PKEY_CTX_set_dsa_paramgen_q_bits(EVP_PKEY_CTX *ctx, int qbits); 30 int EVP_PKEY_CTX_set_dsa_paramgen_md_props(EVP_PKEY_CTX *ctx, 31 const char *md_name, 32 const char *md_properties); 33 int EVP_PKEY_CTX_set_dsa_paramgen_gindex(EVP_PKEY_CTX *ctx, int gindex); 34 int EVP_PKEY_CTX_set_dsa_paramgen_type(EVP_PKEY_CTX *ctx, const char *name); 35 int EVP_PKEY_CTX_set_dsa_paramgen_seed(EVP_PKEY_CTX *ctx, 36 const unsigned char *seed, 37 size_t seedlen); 38 int EVP_PKEY_CTX_set_dsa_paramgen_md(EVP_PKEY_CTX *ctx, const EVP_MD *md); 39 40 # define EVP_PKEY_CTRL_DSA_PARAMGEN_BITS (EVP_PKEY_ALG_CTRL + 1) 41 # define EVP_PKEY_CTRL_DSA_PARAMGEN_Q_BITS (EVP_PKEY_ALG_CTRL + 2) 42 # define EVP_PKEY_CTRL_DSA_PARAMGEN_MD (EVP_PKEY_ALG_CTRL + 3) 43 44 # ifndef OPENSSL_NO_DSA 45 # include <openssl/e_os2.h> 46 # include <openssl/asn1.h> 47 # include <openssl/bio.h> 48 # include <openssl/crypto.h> 49 # include <openssl/bn.h> 50 # ifndef OPENSSL_NO_DEPRECATED_1_1_0 51 # include <openssl/dh.h> 52 # endif 53 # include <openssl/dsaerr.h> 54 55 # ifndef OPENSSL_DSA_MAX_MODULUS_BITS 56 # define OPENSSL_DSA_MAX_MODULUS_BITS 10000 57 # endif 58 59 # define OPENSSL_DSA_FIPS_MIN_MODULUS_BITS 1024 60 61 typedef struct DSA_SIG_st DSA_SIG; 62 DSA_SIG *DSA_SIG_new(void); 63 void DSA_SIG_free(DSA_SIG *a); 64 DECLARE_ASN1_ENCODE_FUNCTIONS_only(DSA_SIG, DSA_SIG) 65 void DSA_SIG_get0(const DSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps); 66 int DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s); 67 68 69 # ifndef OPENSSL_NO_DEPRECATED_1_1_0 37 70 /* 38 71 * Does nothing. Previously this switched off constant time behaviour. 39 72 */ 40 # define DSA_FLAG_NO_EXP_CONSTTIME 0x00 41 # endif 73 # define DSA_FLAG_NO_EXP_CONSTTIME 0x00 74 # endif 75 76 # ifndef OPENSSL_NO_DEPRECATED_3_0 77 # define DSA_FLAG_CACHE_MONT_P 0x01 42 78 43 79 /* … … 48 84 */ 49 85 50 # define DSA_FLAG_FIPS_METHOD 0x040086 # define DSA_FLAG_FIPS_METHOD 0x0400 51 87 52 88 /* … … 56 92 */ 57 93 58 # define DSA_FLAG_NON_FIPS_ALLOW 0x040059 # define DSA_FLAG_FIPS_CHECKED 0x080094 # define DSA_FLAG_NON_FIPS_ALLOW 0x0400 95 # define DSA_FLAG_FIPS_CHECKED 0x0800 60 96 61 97 /* Already defined in ossl_typ.h */ … … 63 99 /* typedef struct dsa_method DSA_METHOD; */ 64 100 65 typedef struct DSA_SIG_st DSA_SIG; 66 67 # define d2i_DSAparams_fp(fp,x) (DSA *)ASN1_d2i_fp((char *(*)())DSA_new, \ 68 (char *(*)())d2i_DSAparams,(fp),(unsigned char **)(x)) 69 # define i2d_DSAparams_fp(fp,x) ASN1_i2d_fp(i2d_DSAparams,(fp), \ 70 (unsigned char *)(x)) 71 # define d2i_DSAparams_bio(bp,x) ASN1_d2i_bio_of(DSA,DSA_new,d2i_DSAparams,bp,x) 72 # define i2d_DSAparams_bio(bp,x) ASN1_i2d_bio_of_const(DSA,i2d_DSAparams,bp,x) 73 74 DSA *DSAparams_dup(DSA *x); 75 DSA_SIG *DSA_SIG_new(void); 76 void DSA_SIG_free(DSA_SIG *a); 77 int i2d_DSA_SIG(const DSA_SIG *a, unsigned char **pp); 78 DSA_SIG *d2i_DSA_SIG(DSA_SIG **v, const unsigned char **pp, long length); 79 void DSA_SIG_get0(const DSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps); 80 int DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s); 81 82 DSA_SIG *DSA_do_sign(const unsigned char *dgst, int dlen, DSA *dsa); 83 int DSA_do_verify(const unsigned char *dgst, int dgst_len, 84 DSA_SIG *sig, DSA *dsa); 85 86 const DSA_METHOD *DSA_OpenSSL(void); 87 88 void DSA_set_default_method(const DSA_METHOD *); 89 const DSA_METHOD *DSA_get_default_method(void); 90 int DSA_set_method(DSA *dsa, const DSA_METHOD *); 91 const DSA_METHOD *DSA_get_method(DSA *d); 92 93 DSA *DSA_new(void); 94 DSA *DSA_new_method(ENGINE *engine); 95 void DSA_free(DSA *r); 101 # define d2i_DSAparams_fp(fp, x) \ 102 (DSA *)ASN1_d2i_fp((char *(*)())DSA_new, \ 103 (char *(*)())d2i_DSAparams, (fp), \ 104 (unsigned char **)(x)) 105 # define i2d_DSAparams_fp(fp, x) \ 106 ASN1_i2d_fp(i2d_DSAparams, (fp), (unsigned char *)(x)) 107 # define d2i_DSAparams_bio(bp, x) \ 108 ASN1_d2i_bio_of(DSA, DSA_new, d2i_DSAparams, bp, x) 109 # define i2d_DSAparams_bio(bp, x) \ 110 ASN1_i2d_bio_of(DSA, i2d_DSAparams, bp, x) 111 112 DECLARE_ASN1_DUP_FUNCTION_name_attr(OSSL_DEPRECATEDIN_3_0, DSA, DSAparams) 113 OSSL_DEPRECATEDIN_3_0 DSA_SIG *DSA_do_sign(const unsigned char *dgst, int dlen, 114 DSA *dsa); 115 OSSL_DEPRECATEDIN_3_0 int DSA_do_verify(const unsigned char *dgst, int dgst_len, 116 DSA_SIG *sig, DSA *dsa); 117 118 OSSL_DEPRECATEDIN_3_0 const DSA_METHOD *DSA_OpenSSL(void); 119 120 OSSL_DEPRECATEDIN_3_0 void DSA_set_default_method(const DSA_METHOD *); 121 OSSL_DEPRECATEDIN_3_0 const DSA_METHOD *DSA_get_default_method(void); 122 OSSL_DEPRECATEDIN_3_0 int DSA_set_method(DSA *dsa, const DSA_METHOD *); 123 OSSL_DEPRECATEDIN_3_0 const DSA_METHOD *DSA_get_method(DSA *d); 124 125 OSSL_DEPRECATEDIN_3_0 DSA *DSA_new(void); 126 OSSL_DEPRECATEDIN_3_0 DSA *DSA_new_method(ENGINE *engine); 127 OSSL_DEPRECATEDIN_3_0 void DSA_free(DSA *r); 96 128 /* "up" the DSA object's reference count */ 97 int DSA_up_ref(DSA *r);98 int DSA_size(const DSA *);99 int DSA_bits(const DSA *d);100 int DSA_security_bits(const DSA *d);129 OSSL_DEPRECATEDIN_3_0 int DSA_up_ref(DSA *r); 130 OSSL_DEPRECATEDIN_3_0 int DSA_size(const DSA *); 131 OSSL_DEPRECATEDIN_3_0 int DSA_bits(const DSA *d); 132 OSSL_DEPRECATEDIN_3_0 int DSA_security_bits(const DSA *d); 101 133 /* next 4 return -1 on error */ 102 DEPRECATEDIN_1_2_0(int DSA_sign_setup(DSA *dsa, BN_CTX *ctx_in, BIGNUM **kinvp, BIGNUM **rp)) 103 int DSA_sign(int type, const unsigned char *dgst, int dlen, 104 unsigned char *sig, unsigned int *siglen, DSA *dsa); 105 int DSA_verify(int type, const unsigned char *dgst, int dgst_len, 106 const unsigned char *sigbuf, int siglen, DSA *dsa); 107 #define DSA_get_ex_new_index(l, p, newf, dupf, freef) \ 108 CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_DSA, l, p, newf, dupf, freef) 109 int DSA_set_ex_data(DSA *d, int idx, void *arg); 110 void *DSA_get_ex_data(DSA *d, int idx); 111 112 DSA *d2i_DSAPublicKey(DSA **a, const unsigned char **pp, long length); 113 DSA *d2i_DSAPrivateKey(DSA **a, const unsigned char **pp, long length); 114 DSA *d2i_DSAparams(DSA **a, const unsigned char **pp, long length); 115 134 OSSL_DEPRECATEDIN_3_0 int DSA_sign_setup(DSA *dsa, BN_CTX *ctx_in, 135 BIGNUM **kinvp, BIGNUM **rp); 136 OSSL_DEPRECATEDIN_3_0 int DSA_sign(int type, const unsigned char *dgst, 137 int dlen, unsigned char *sig, 138 unsigned int *siglen, DSA *dsa); 139 OSSL_DEPRECATEDIN_3_0 int DSA_verify(int type, const unsigned char *dgst, 140 int dgst_len, const unsigned char *sigbuf, 141 int siglen, DSA *dsa); 142 143 # define DSA_get_ex_new_index(l, p, newf, dupf, freef) \ 144 CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_DSA, l, p, newf, dupf, freef) 145 OSSL_DEPRECATEDIN_3_0 int DSA_set_ex_data(DSA *d, int idx, void *arg); 146 OSSL_DEPRECATEDIN_3_0 void *DSA_get_ex_data(const DSA *d, int idx); 147 148 DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(OSSL_DEPRECATEDIN_3_0, 149 DSA, DSAPublicKey) 150 DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(OSSL_DEPRECATEDIN_3_0, 151 DSA, DSAPrivateKey) 152 DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(OSSL_DEPRECATEDIN_3_0, 153 DSA, DSAparams) 154 # endif 155 156 # ifndef OPENSSL_NO_DEPRECATED_0_9_8 116 157 /* Deprecated version */ 117 DEPRECATEDIN_0_9_8(DSA *DSA_generate_parameters(int bits, 118 unsigned char *seed, 119 int seed_len, 120 int *counter_ret, 121 unsigned long *h_ret, void 122 (*callback) (int, int, 123 void *), 124 void *cb_arg)) 125 158 OSSL_DEPRECATEDIN_0_9_8 159 DSA *DSA_generate_parameters(int bits, unsigned char *seed, int seed_len, 160 int *counter_ret, unsigned long *h_ret, 161 void (*callback) (int, int, void *), 162 void *cb_arg); 163 # endif 164 165 # ifndef OPENSSL_NO_DEPRECATED_3_0 126 166 /* New version */ 127 int DSA_generate_parameters_ex(DSA *dsa, int bits, 128 const unsigned char *seed, int seed_len, 129 int *counter_ret, unsigned long *h_ret, 130 BN_GENCB *cb); 131 132 int DSA_generate_key(DSA *a); 133 int i2d_DSAPublicKey(const DSA *a, unsigned char **pp); 134 int i2d_DSAPrivateKey(const DSA *a, unsigned char **pp); 135 int i2d_DSAparams(const DSA *a, unsigned char **pp); 136 137 int DSAparams_print(BIO *bp, const DSA *x); 138 int DSA_print(BIO *bp, const DSA *x, int off); 139 # ifndef OPENSSL_NO_STDIO 140 int DSAparams_print_fp(FILE *fp, const DSA *x); 141 int DSA_print_fp(FILE *bp, const DSA *x, int off); 142 # endif 143 144 # define DSS_prime_checks 64 167 OSSL_DEPRECATEDIN_3_0 int DSA_generate_parameters_ex(DSA *dsa, int bits, 168 const unsigned char *seed, 169 int seed_len, 170 int *counter_ret, 171 unsigned long *h_ret, 172 BN_GENCB *cb); 173 174 OSSL_DEPRECATEDIN_3_0 int DSA_generate_key(DSA *a); 175 176 OSSL_DEPRECATEDIN_3_0 int DSAparams_print(BIO *bp, const DSA *x); 177 OSSL_DEPRECATEDIN_3_0 int DSA_print(BIO *bp, const DSA *x, int off); 178 # ifndef OPENSSL_NO_STDIO 179 OSSL_DEPRECATEDIN_3_0 int DSAparams_print_fp(FILE *fp, const DSA *x); 180 OSSL_DEPRECATEDIN_3_0 int DSA_print_fp(FILE *bp, const DSA *x, int off); 181 # endif 182 183 # define DSS_prime_checks 64 145 184 /* 146 185 * Primality test according to FIPS PUB 186-4, Appendix C.3. Since we only … … 149 188 * DSA key. 150 189 */ 151 # define DSA_is_prime(n, callback, cb_arg) \152 BN_is_prime(n, DSS_prime_checks, callback, NULL, cb_arg)153 154 # ifndef OPENSSL_NO_DH190 # define DSA_is_prime(n, callback, cb_arg) \ 191 BN_is_prime(n, DSS_prime_checks, callback, NULL, cb_arg) 192 193 # ifndef OPENSSL_NO_DH 155 194 /* 156 195 * Convert DSA structure (key or just parameters) into DH structure (be 157 196 * careful to avoid small subgroup attacks when using this!) 158 197 */ 159 DH *DSA_dup_DH(const DSA *r); 160 # endif 161 162 # define EVP_PKEY_CTX_set_dsa_paramgen_bits(ctx, nbits) \ 163 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DSA, EVP_PKEY_OP_PARAMGEN, \ 164 EVP_PKEY_CTRL_DSA_PARAMGEN_BITS, nbits, NULL) 165 # define EVP_PKEY_CTX_set_dsa_paramgen_q_bits(ctx, qbits) \ 166 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DSA, EVP_PKEY_OP_PARAMGEN, \ 167 EVP_PKEY_CTRL_DSA_PARAMGEN_Q_BITS, qbits, NULL) 168 # define EVP_PKEY_CTX_set_dsa_paramgen_md(ctx, md) \ 169 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_DSA, EVP_PKEY_OP_PARAMGEN, \ 170 EVP_PKEY_CTRL_DSA_PARAMGEN_MD, 0, (void *)(md)) 171 172 # define EVP_PKEY_CTRL_DSA_PARAMGEN_BITS (EVP_PKEY_ALG_CTRL + 1) 173 # define EVP_PKEY_CTRL_DSA_PARAMGEN_Q_BITS (EVP_PKEY_ALG_CTRL + 2) 174 # define EVP_PKEY_CTRL_DSA_PARAMGEN_MD (EVP_PKEY_ALG_CTRL + 3) 175 176 void DSA_get0_pqg(const DSA *d, 177 const BIGNUM **p, const BIGNUM **q, const BIGNUM **g); 178 int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g); 179 void DSA_get0_key(const DSA *d, 180 const BIGNUM **pub_key, const BIGNUM **priv_key); 181 int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key); 182 const BIGNUM *DSA_get0_p(const DSA *d); 183 const BIGNUM *DSA_get0_q(const DSA *d); 184 const BIGNUM *DSA_get0_g(const DSA *d); 185 const BIGNUM *DSA_get0_pub_key(const DSA *d); 186 const BIGNUM *DSA_get0_priv_key(const DSA *d); 187 void DSA_clear_flags(DSA *d, int flags); 188 int DSA_test_flags(const DSA *d, int flags); 189 void DSA_set_flags(DSA *d, int flags); 190 ENGINE *DSA_get0_engine(DSA *d); 191 192 DSA_METHOD *DSA_meth_new(const char *name, int flags); 193 void DSA_meth_free(DSA_METHOD *dsam); 194 DSA_METHOD *DSA_meth_dup(const DSA_METHOD *dsam); 195 const char *DSA_meth_get0_name(const DSA_METHOD *dsam); 196 int DSA_meth_set1_name(DSA_METHOD *dsam, const char *name); 197 int DSA_meth_get_flags(const DSA_METHOD *dsam); 198 int DSA_meth_set_flags(DSA_METHOD *dsam, int flags); 199 void *DSA_meth_get0_app_data(const DSA_METHOD *dsam); 200 int DSA_meth_set0_app_data(DSA_METHOD *dsam, void *app_data); 201 DSA_SIG *(*DSA_meth_get_sign(const DSA_METHOD *dsam)) 198 OSSL_DEPRECATEDIN_3_0 DH *DSA_dup_DH(const DSA *r); 199 # endif 200 201 OSSL_DEPRECATEDIN_3_0 void DSA_get0_pqg(const DSA *d, const BIGNUM **p, 202 const BIGNUM **q, const BIGNUM **g); 203 OSSL_DEPRECATEDIN_3_0 int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g); 204 OSSL_DEPRECATEDIN_3_0 void DSA_get0_key(const DSA *d, const BIGNUM **pub_key, 205 const BIGNUM **priv_key); 206 OSSL_DEPRECATEDIN_3_0 int DSA_set0_key(DSA *d, BIGNUM *pub_key, 207 BIGNUM *priv_key); 208 OSSL_DEPRECATEDIN_3_0 const BIGNUM *DSA_get0_p(const DSA *d); 209 OSSL_DEPRECATEDIN_3_0 const BIGNUM *DSA_get0_q(const DSA *d); 210 OSSL_DEPRECATEDIN_3_0 const BIGNUM *DSA_get0_g(const DSA *d); 211 OSSL_DEPRECATEDIN_3_0 const BIGNUM *DSA_get0_pub_key(const DSA *d); 212 OSSL_DEPRECATEDIN_3_0 const BIGNUM *DSA_get0_priv_key(const DSA *d); 213 OSSL_DEPRECATEDIN_3_0 void DSA_clear_flags(DSA *d, int flags); 214 OSSL_DEPRECATEDIN_3_0 int DSA_test_flags(const DSA *d, int flags); 215 OSSL_DEPRECATEDIN_3_0 void DSA_set_flags(DSA *d, int flags); 216 OSSL_DEPRECATEDIN_3_0 ENGINE *DSA_get0_engine(DSA *d); 217 218 OSSL_DEPRECATEDIN_3_0 DSA_METHOD *DSA_meth_new(const char *name, int flags); 219 OSSL_DEPRECATEDIN_3_0 void DSA_meth_free(DSA_METHOD *dsam); 220 OSSL_DEPRECATEDIN_3_0 DSA_METHOD *DSA_meth_dup(const DSA_METHOD *dsam); 221 OSSL_DEPRECATEDIN_3_0 const char *DSA_meth_get0_name(const DSA_METHOD *dsam); 222 OSSL_DEPRECATEDIN_3_0 int DSA_meth_set1_name(DSA_METHOD *dsam, 223 const char *name); 224 OSSL_DEPRECATEDIN_3_0 int DSA_meth_get_flags(const DSA_METHOD *dsam); 225 OSSL_DEPRECATEDIN_3_0 int DSA_meth_set_flags(DSA_METHOD *dsam, int flags); 226 OSSL_DEPRECATEDIN_3_0 void *DSA_meth_get0_app_data(const DSA_METHOD *dsam); 227 OSSL_DEPRECATEDIN_3_0 int DSA_meth_set0_app_data(DSA_METHOD *dsam, 228 void *app_data); 229 OSSL_DEPRECATEDIN_3_0 DSA_SIG *(*DSA_meth_get_sign(const DSA_METHOD *dsam)) 202 230 (const unsigned char *, int, DSA *); 203 int DSA_meth_set_sign(DSA_METHOD *dsam,231 OSSL_DEPRECATEDIN_3_0 int DSA_meth_set_sign(DSA_METHOD *dsam, 204 232 DSA_SIG *(*sign) (const unsigned char *, int, DSA *)); 205 int (*DSA_meth_get_sign_setup(const DSA_METHOD *dsam))233 OSSL_DEPRECATEDIN_3_0 int (*DSA_meth_get_sign_setup(const DSA_METHOD *dsam)) 206 234 (DSA *, BN_CTX *, BIGNUM **, BIGNUM **); 207 int DSA_meth_set_sign_setup(DSA_METHOD *dsam,235 OSSL_DEPRECATEDIN_3_0 int DSA_meth_set_sign_setup(DSA_METHOD *dsam, 208 236 int (*sign_setup) (DSA *, BN_CTX *, BIGNUM **, BIGNUM **)); 209 int (*DSA_meth_get_verify(const DSA_METHOD *dsam))237 OSSL_DEPRECATEDIN_3_0 int (*DSA_meth_get_verify(const DSA_METHOD *dsam)) 210 238 (const unsigned char *, int, DSA_SIG *, DSA *); 211 int DSA_meth_set_verify(DSA_METHOD *dsam,239 OSSL_DEPRECATEDIN_3_0 int DSA_meth_set_verify(DSA_METHOD *dsam, 212 240 int (*verify) (const unsigned char *, int, DSA_SIG *, DSA *)); 213 int (*DSA_meth_get_mod_exp(const DSA_METHOD *dsam))241 OSSL_DEPRECATEDIN_3_0 int (*DSA_meth_get_mod_exp(const DSA_METHOD *dsam)) 214 242 (DSA *, BIGNUM *, const BIGNUM *, const BIGNUM *, const BIGNUM *, 215 243 const BIGNUM *, const BIGNUM *, BN_CTX *, BN_MONT_CTX *); 216 int DSA_meth_set_mod_exp(DSA_METHOD *dsam,244 OSSL_DEPRECATEDIN_3_0 int DSA_meth_set_mod_exp(DSA_METHOD *dsam, 217 245 int (*mod_exp) (DSA *, BIGNUM *, const BIGNUM *, const BIGNUM *, 218 246 const BIGNUM *, const BIGNUM *, const BIGNUM *, BN_CTX *, 219 247 BN_MONT_CTX *)); 220 int (*DSA_meth_get_bn_mod_exp(const DSA_METHOD *dsam))248 OSSL_DEPRECATEDIN_3_0 int (*DSA_meth_get_bn_mod_exp(const DSA_METHOD *dsam)) 221 249 (DSA *, BIGNUM *, const BIGNUM *, const BIGNUM *, const BIGNUM *, 222 250 BN_CTX *, BN_MONT_CTX *); 223 int DSA_meth_set_bn_mod_exp(DSA_METHOD *dsam,251 OSSL_DEPRECATEDIN_3_0 int DSA_meth_set_bn_mod_exp(DSA_METHOD *dsam, 224 252 int (*bn_mod_exp) (DSA *, BIGNUM *, const BIGNUM *, const BIGNUM *, 225 253 const BIGNUM *, BN_CTX *, BN_MONT_CTX *)); 226 int (*DSA_meth_get_init(const DSA_METHOD *dsam))(DSA *); 227 int DSA_meth_set_init(DSA_METHOD *dsam, int (*init)(DSA *)); 228 int (*DSA_meth_get_finish(const DSA_METHOD *dsam)) (DSA *); 229 int DSA_meth_set_finish(DSA_METHOD *dsam, int (*finish) (DSA *)); 230 int (*DSA_meth_get_paramgen(const DSA_METHOD *dsam)) 254 OSSL_DEPRECATEDIN_3_0 int (*DSA_meth_get_init(const DSA_METHOD *dsam))(DSA *); 255 OSSL_DEPRECATEDIN_3_0 int DSA_meth_set_init(DSA_METHOD *dsam, 256 int (*init)(DSA *)); 257 OSSL_DEPRECATEDIN_3_0 int (*DSA_meth_get_finish(const DSA_METHOD *dsam))(DSA *); 258 OSSL_DEPRECATEDIN_3_0 int DSA_meth_set_finish(DSA_METHOD *dsam, 259 int (*finish)(DSA *)); 260 OSSL_DEPRECATEDIN_3_0 int (*DSA_meth_get_paramgen(const DSA_METHOD *dsam)) 231 261 (DSA *, int, const unsigned char *, int, int *, unsigned long *, 232 262 BN_GENCB *); 233 int DSA_meth_set_paramgen(DSA_METHOD *dsam,263 OSSL_DEPRECATEDIN_3_0 int DSA_meth_set_paramgen(DSA_METHOD *dsam, 234 264 int (*paramgen) (DSA *, int, const unsigned char *, int, int *, 235 265 unsigned long *, BN_GENCB *)); 236 int (*DSA_meth_get_keygen(const DSA_METHOD *dsam)) (DSA *); 237 int DSA_meth_set_keygen(DSA_METHOD *dsam, int (*keygen) (DSA *)); 238 239 240 # ifdef __cplusplus 266 OSSL_DEPRECATEDIN_3_0 int (*DSA_meth_get_keygen(const DSA_METHOD *dsam))(DSA *); 267 OSSL_DEPRECATEDIN_3_0 int DSA_meth_set_keygen(DSA_METHOD *dsam, 268 int (*keygen) (DSA *)); 269 270 # endif 271 # endif 272 # ifdef __cplusplus 241 273 } 242 # endif243 274 # endif 244 275 #endif -
trunk/src/libs/openssl-3.0.1/include/openssl/dsaerr.h
r91772 r94082 1 1 /* 2 2 * Generated by util/mkerr.pl DO NOT EDIT 3 * Copyright 1995-20 19The OpenSSL Project Authors. All Rights Reserved.3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 4 * 5 * Licensed under the OpenSSL license(the "License"). You may not use5 * Licensed under the Apache License 2.0 (the "License"). You may not use 6 6 * this file except in compliance with the License. You can obtain a copy 7 7 * in the file LICENSE in the source distribution or at … … 9 9 */ 10 10 11 #ifndef HEADER_DSAERR_H 12 # define HEADER_DSAERR_H 13 14 # ifndef HEADER_SYMHACKS_H 15 # include <openssl/symhacks.h> 16 # endif 11 #ifndef OPENSSL_DSAERR_H 12 # define OPENSSL_DSAERR_H 13 # pragma once 17 14 18 15 # include <openssl/opensslconf.h> 16 # include <openssl/symhacks.h> 17 # include <openssl/cryptoerr_legacy.h> 18 19 19 20 20 # ifndef OPENSSL_NO_DSA 21 21 22 # ifdef __cplusplus23 extern "C"24 # endif25 int ERR_load_DSA_strings(void);26 27 /*28 * DSA function codes.29 */30 # define DSA_F_DSAPARAMS_PRINT 10031 # define DSA_F_DSAPARAMS_PRINT_FP 10132 # define DSA_F_DSA_BUILTIN_PARAMGEN 12533 # define DSA_F_DSA_BUILTIN_PARAMGEN2 12634 # define DSA_F_DSA_DO_SIGN 11235 # define DSA_F_DSA_DO_VERIFY 11336 # define DSA_F_DSA_METH_DUP 12737 # define DSA_F_DSA_METH_NEW 12838 # define DSA_F_DSA_METH_SET1_NAME 12939 # define DSA_F_DSA_NEW_METHOD 10340 # define DSA_F_DSA_PARAM_DECODE 11941 # define DSA_F_DSA_PRINT_FP 10542 # define DSA_F_DSA_PRIV_DECODE 11543 # define DSA_F_DSA_PRIV_ENCODE 11644 # define DSA_F_DSA_PUB_DECODE 11745 # define DSA_F_DSA_PUB_ENCODE 11846 # define DSA_F_DSA_SIGN 10647 # define DSA_F_DSA_SIGN_SETUP 10748 # define DSA_F_DSA_SIG_NEW 10249 # define DSA_F_OLD_DSA_PRIV_DECODE 12250 # define DSA_F_PKEY_DSA_CTRL 12051 # define DSA_F_PKEY_DSA_CTRL_STR 10452 # define DSA_F_PKEY_DSA_KEYGEN 12153 22 54 23 /* 55 24 * DSA reason codes. 56 25 */ 26 # define DSA_R_BAD_FFC_PARAMETERS 114 57 27 # define DSA_R_BAD_Q_VALUE 102 58 28 # define DSA_R_BN_DECODE_ERROR 108 … … 66 36 # define DSA_R_NO_PARAMETERS_SET 107 67 37 # define DSA_R_PARAMETER_ENCODING_ERROR 105 38 # define DSA_R_P_NOT_PRIME 115 68 39 # define DSA_R_Q_NOT_PRIME 113 69 40 # define DSA_R_SEED_LEN_SMALL 110 -
trunk/src/libs/openssl-3.0.1/include/openssl/dtls1.h
r91772 r94082 1 1 /* 2 * Copyright 2005-20 18The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 2005-2021 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_DTLS1_H 11 # define HEADER_DTLS1_H 10 #ifndef OPENSSL_DTLS1_H 11 # define OPENSSL_DTLS1_H 12 # pragma once 13 14 # include <openssl/macros.h> 15 # ifndef OPENSSL_NO_DEPRECATED_3_0 16 # define HEADER_DTLS1_H 17 # endif 18 19 # include <openssl/prov_ssl.h> 12 20 13 21 #ifdef __cplusplus … … 15 23 #endif 16 24 17 # define DTLS1_VERSION 0xFEFF 18 # define DTLS1_2_VERSION 0xFEFD 19 # define DTLS_MIN_VERSION DTLS1_VERSION 20 # define DTLS_MAX_VERSION DTLS1_2_VERSION 25 #include <openssl/opensslconf.h> 26 27 /* DTLS*_VERSION constants are defined in prov_ssl.h */ 28 # ifndef OPENSSL_NO_DEPRECATED_3_0 29 # define DTLS_MIN_VERSION DTLS1_VERSION 30 # define DTLS_MAX_VERSION DTLS1_2_VERSION 31 # endif 21 32 # define DTLS1_VERSION_MAJOR 0xFE 22 23 # define DTLS1_BAD_VER 0x010024 33 25 34 /* Special value for method supporting multiple versions */ … … 27 36 28 37 /* lengths of messages */ 29 /* 30 * Actually the max cookie length in DTLS is 255. But we can't change this now 31 * due to compatibility concerns. 32 */ 33 # define DTLS1_COOKIE_LENGTH 256 38 39 # define DTLS1_COOKIE_LENGTH 255 34 40 35 41 # define DTLS1_RT_HEADER_LENGTH 13 … … 44 50 # define DTLS1_AL_HEADER_LENGTH 2 45 51 46 /* Timeout multipliers */47 # define DTLS1_TMO_READ_COUNT 248 # define DTLS1_TMO_WRITE_COUNT 249 50 52 # define DTLS1_TMO_ALERT_COUNT 12 51 53 -
trunk/src/libs/openssl-3.0.1/include/openssl/e_os2.h
r91772 r94082 2 2 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_E_OS2_H 11 # define HEADER_E_OS2_H 10 #ifndef OPENSSL_E_OS2_H 11 # define OPENSSL_E_OS2_H 12 # pragma once 13 14 # include <openssl/macros.h> 15 # ifndef OPENSSL_NO_DEPRECATED_3_0 16 # define HEADER_E_OS2_H 17 # endif 12 18 13 19 # include <openssl/opensslconf.h> … … 97 103 98 104 /* ------------------------------- OpenVMS -------------------------------- */ 99 # if defined(__VMS) || defined(VMS) || defined(OPENSSL_SYS_VMS)105 # if defined(__VMS) || defined(VMS) 100 106 # if !defined(OPENSSL_SYS_VMS) 101 107 # undef OPENSSL_SYS_UNIX 102 # endif103 # define OPENSSL_SYS_VMS108 # define OPENSSL_SYS_VMS 109 # endif 104 110 # if defined(__DECC) 105 111 # define OPENSSL_SYS_VMS_DECC … … 133 139 # endif 134 140 141 /* ---------------------------- HP NonStop -------------------------------- */ 142 # ifdef __TANDEM 143 # ifdef _STRING 144 # include <strings.h> 145 # endif 146 # define OPENSSL_USE_BUILD_DATE 147 # if defined(OPENSSL_THREADS) && defined(_SPT_MODEL_) 148 # define SPT_THREAD_SIGNAL 1 149 # define SPT_THREAD_AWARE 1 150 # include <spthread.h> 151 # elif defined(OPENSSL_THREADS) && defined(_PUT_MODEL_) 152 # include <pthread.h> 153 # endif 154 # endif 155 135 156 /** 136 157 * That's it for OS-specific stuff 137 158 *****************************************************************************/ 138 139 /* Specials for I/O an exit */140 # ifdef OPENSSL_SYS_MSDOS141 # define OPENSSL_UNISTD_IO <io.h>142 # define OPENSSL_DECLARE_EXIT extern void exit(int);143 # else144 # define OPENSSL_UNISTD_IO OPENSSL_UNISTD145 # define OPENSSL_DECLARE_EXIT /* declared in unistd.h */146 # endif147 159 148 160 /*- … … 173 185 # endif 174 186 175 /*-176 * Macros to allow global variables to be reached through function calls when177 * required (if a shared library version requires it, for example.178 * The way it's done allows definitions like this:179 *180 * // in foobar.c181 * OPENSSL_IMPLEMENT_GLOBAL(int,foobar,0)182 * // in foobar.h183 * OPENSSL_DECLARE_GLOBAL(int,foobar);184 * #define foobar OPENSSL_GLOBAL_REF(foobar)185 */186 # ifdef OPENSSL_EXPORT_VAR_AS_FUNCTION187 # define OPENSSL_IMPLEMENT_GLOBAL(type,name,value) \188 type *_shadow_##name(void) \189 { static type _hide_##name=value; return &_hide_##name; }190 # define OPENSSL_DECLARE_GLOBAL(type,name) type *_shadow_##name(void)191 # define OPENSSL_GLOBAL_REF(name) (*(_shadow_##name()))192 # else193 # define OPENSSL_IMPLEMENT_GLOBAL(type,name,value) type _shadow_##name=value;194 # define OPENSSL_DECLARE_GLOBAL(type,name) OPENSSL_EXPORT type _shadow_##name195 # define OPENSSL_GLOBAL_REF(name) _shadow_##name196 # endif197 198 187 # ifdef _WIN32 199 188 # ifdef _WIN64 … … 222 211 # endif 223 212 224 # if def DEBUG_UNUSED213 # if defined(UNUSEDRESULT_DEBUG) 225 214 # define __owur __attribute__((__warn_unused_result__)) 226 215 # else … … 229 218 230 219 /* Standard integer types */ 220 # define OPENSSL_NO_INTTYPES_H 221 # define OPENSSL_NO_STDINT_H 231 222 # if defined(OPENSSL_SYS_UEFI) 232 223 typedef INT8 int8_t; … … 242 233 defined(OPENSSL_SYS_VMS) || defined (__OpenBSD__) 243 234 # include <inttypes.h> 235 # undef OPENSSL_NO_INTTYPES_H 236 /* Because the specs say that inttypes.h includes stdint.h if present */ 237 # undef OPENSSL_NO_STDINT_H 244 238 # elif defined(_MSC_VER) && _MSC_VER<1600 245 239 /* … … 261 255 # include <stdint.h> 262 256 # endif 257 # undef OPENSSL_NO_STDINT_H 258 # endif 259 # if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L && \ 260 defined(INTMAX_MAX) && defined(UINTMAX_MAX) 261 typedef intmax_t ossl_intmax_t; 262 typedef uintmax_t ossl_uintmax_t; 263 # else 264 /* Fall back to the largest we know we require and can handle */ 265 typedef int64_t ossl_intmax_t; 266 typedef uint64_t ossl_uintmax_t; 263 267 # endif 264 268 -
trunk/src/libs/openssl-3.0.1/include/openssl/ebcdic.h
r91772 r94082 2 2 * Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_EBCDIC_H 11 # define HEADER_EBCDIC_H 10 #ifndef OPENSSL_EBCDIC_H 11 # define OPENSSL_EBCDIC_H 12 # pragma once 13 14 # include <openssl/macros.h> 15 # ifndef OPENSSL_NO_DEPRECATED_3_0 16 # define HEADER_EBCDIC_H 17 # endif 12 18 13 19 # include <stdlib.h> -
trunk/src/libs/openssl-3.0.1/include/openssl/ec.h
r91772 r94082 1 1 /* 2 * Copyright 2002-202 0The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 2002-2021 The OpenSSL Project Authors. All Rights Reserved. 3 3 * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved 4 4 * 5 * Licensed under the OpenSSL license(the "License"). You may not use5 * Licensed under the Apache License 2.0 (the "License"). You may not use 6 6 * this file except in compliance with the License. You can obtain a copy 7 7 * in the file LICENSE in the source distribution or at … … 9 9 */ 10 10 11 #ifndef HEADER_EC_H 12 # define HEADER_EC_H 11 #ifndef OPENSSL_EC_H 12 # define OPENSSL_EC_H 13 # pragma once 14 15 # include <openssl/macros.h> 16 # ifndef OPENSSL_NO_DEPRECATED_3_0 17 # define HEADER_EC_H 18 # endif 13 19 14 20 # include <openssl/opensslconf.h> 15 16 # ifndef OPENSSL_NO_EC 17 # include <openssl/asn1.h> 18 # include <openssl/symhacks.h> 19 # if OPENSSL_API_COMPAT < 0x10100000L 20 # include <openssl/bn.h> 21 # endif 22 # include <openssl/ecerr.h> 21 # include <openssl/types.h> 22 23 23 # ifdef __cplusplus 24 24 extern "C" { 25 25 # endif 26 26 27 # ifndef OPENSSL_ECC_MAX_FIELD_BITS 28 # define OPENSSL_ECC_MAX_FIELD_BITS 661 27 /* Values for EVP_PKEY_CTX_set_ec_param_enc() */ 28 # define OPENSSL_EC_EXPLICIT_CURVE 0x000 29 # define OPENSSL_EC_NAMED_CURVE 0x001 30 31 int EVP_PKEY_CTX_set_ec_paramgen_curve_nid(EVP_PKEY_CTX *ctx, int nid); 32 int EVP_PKEY_CTX_set_ec_param_enc(EVP_PKEY_CTX *ctx, int param_enc); 33 int EVP_PKEY_CTX_set_ecdh_cofactor_mode(EVP_PKEY_CTX *ctx, int cofactor_mode); 34 int EVP_PKEY_CTX_get_ecdh_cofactor_mode(EVP_PKEY_CTX *ctx); 35 36 int EVP_PKEY_CTX_set_ecdh_kdf_type(EVP_PKEY_CTX *ctx, int kdf); 37 int EVP_PKEY_CTX_get_ecdh_kdf_type(EVP_PKEY_CTX *ctx); 38 39 int EVP_PKEY_CTX_set_ecdh_kdf_md(EVP_PKEY_CTX *ctx, const EVP_MD *md); 40 int EVP_PKEY_CTX_get_ecdh_kdf_md(EVP_PKEY_CTX *ctx, const EVP_MD **md); 41 42 int EVP_PKEY_CTX_set_ecdh_kdf_outlen(EVP_PKEY_CTX *ctx, int len); 43 int EVP_PKEY_CTX_get_ecdh_kdf_outlen(EVP_PKEY_CTX *ctx, int *len); 44 45 int EVP_PKEY_CTX_set0_ecdh_kdf_ukm(EVP_PKEY_CTX *ctx, unsigned char *ukm, 46 int len); 47 # ifndef OPENSSL_NO_DEPRECATED_3_0 48 OSSL_DEPRECATEDIN_3_0 49 int EVP_PKEY_CTX_get0_ecdh_kdf_ukm(EVP_PKEY_CTX *ctx, unsigned char **ukm); 29 50 # endif 51 52 # define EVP_PKEY_CTRL_EC_PARAMGEN_CURVE_NID (EVP_PKEY_ALG_CTRL + 1) 53 # define EVP_PKEY_CTRL_EC_PARAM_ENC (EVP_PKEY_ALG_CTRL + 2) 54 # define EVP_PKEY_CTRL_EC_ECDH_COFACTOR (EVP_PKEY_ALG_CTRL + 3) 55 # define EVP_PKEY_CTRL_EC_KDF_TYPE (EVP_PKEY_ALG_CTRL + 4) 56 # define EVP_PKEY_CTRL_EC_KDF_MD (EVP_PKEY_ALG_CTRL + 5) 57 # define EVP_PKEY_CTRL_GET_EC_KDF_MD (EVP_PKEY_ALG_CTRL + 6) 58 # define EVP_PKEY_CTRL_EC_KDF_OUTLEN (EVP_PKEY_ALG_CTRL + 7) 59 # define EVP_PKEY_CTRL_GET_EC_KDF_OUTLEN (EVP_PKEY_ALG_CTRL + 8) 60 # define EVP_PKEY_CTRL_EC_KDF_UKM (EVP_PKEY_ALG_CTRL + 9) 61 # define EVP_PKEY_CTRL_GET_EC_KDF_UKM (EVP_PKEY_ALG_CTRL + 10) 62 63 /* KDF types */ 64 # define EVP_PKEY_ECDH_KDF_NONE 1 65 # define EVP_PKEY_ECDH_KDF_X9_63 2 66 /* 67 * The old name for EVP_PKEY_ECDH_KDF_X9_63 68 * The ECDH KDF specification has been mistakenly attributed to ANSI X9.62, 69 * it is actually specified in ANSI X9.63. 70 * This identifier is retained for backwards compatibility 71 */ 72 # define EVP_PKEY_ECDH_KDF_X9_62 EVP_PKEY_ECDH_KDF_X9_63 30 73 31 74 /** Enum for the point conversion form as defined in X9.62 (ECDSA) … … 42 85 } point_conversion_form_t; 43 86 87 const char *OSSL_EC_curve_nid2name(int nid); 88 89 # ifndef OPENSSL_NO_EC 90 # include <openssl/asn1.h> 91 # include <openssl/symhacks.h> 92 # ifndef OPENSSL_NO_DEPRECATED_1_1_0 93 # include <openssl/bn.h> 94 # endif 95 # include <openssl/ecerr.h> 96 97 # ifndef OPENSSL_ECC_MAX_FIELD_BITS 98 # define OPENSSL_ECC_MAX_FIELD_BITS 661 99 # endif 100 101 # include <openssl/params.h> 102 # ifndef OPENSSL_NO_DEPRECATED_3_0 44 103 typedef struct ec_method_st EC_METHOD; 104 # endif 45 105 typedef struct ec_group_st EC_GROUP; 46 106 typedef struct ec_point_st EC_POINT; … … 52 112 /********************************************************************/ 53 113 114 # ifndef OPENSSL_NO_DEPRECATED_3_0 54 115 /** Returns the basic GFp ec methods which provides the basis for the 55 116 * optimized methods. 56 117 * \return EC_METHOD object 57 118 */ 58 const EC_METHOD *EC_GFp_simple_method(void);119 OSSL_DEPRECATEDIN_3_0 const EC_METHOD *EC_GFp_simple_method(void); 59 120 60 121 /** Returns GFp methods using montgomery multiplication. 61 122 * \return EC_METHOD object 62 123 */ 63 const EC_METHOD *EC_GFp_mont_method(void);124 OSSL_DEPRECATEDIN_3_0 const EC_METHOD *EC_GFp_mont_method(void); 64 125 65 126 /** Returns GFp methods using optimized methods for NIST recommended curves 66 127 * \return EC_METHOD object 67 128 */ 68 const EC_METHOD *EC_GFp_nist_method(void);69 70 # ifndef OPENSSL_NO_EC_NISTP_64_GCC_128129 OSSL_DEPRECATEDIN_3_0 const EC_METHOD *EC_GFp_nist_method(void); 130 131 # ifndef OPENSSL_NO_EC_NISTP_64_GCC_128 71 132 /** Returns 64-bit optimized methods for nistp224 72 133 * \return EC_METHOD object 73 134 */ 74 const EC_METHOD *EC_GFp_nistp224_method(void);135 OSSL_DEPRECATEDIN_3_0 const EC_METHOD *EC_GFp_nistp224_method(void); 75 136 76 137 /** Returns 64-bit optimized methods for nistp256 77 138 * \return EC_METHOD object 78 139 */ 79 const EC_METHOD *EC_GFp_nistp256_method(void);140 OSSL_DEPRECATEDIN_3_0 const EC_METHOD *EC_GFp_nistp256_method(void); 80 141 81 142 /** Returns 64-bit optimized methods for nistp521 82 143 * \return EC_METHOD object 83 144 */ 84 const EC_METHOD *EC_GFp_nistp521_method(void);85 # endif86 87 # ifndef OPENSSL_NO_EC2M145 OSSL_DEPRECATEDIN_3_0 const EC_METHOD *EC_GFp_nistp521_method(void); 146 # endif /* OPENSSL_NO_EC_NISTP_64_GCC_128 */ 147 148 # ifndef OPENSSL_NO_EC2M 88 149 /********************************************************************/ 89 150 /* EC_METHOD for curves over GF(2^m) */ … … 93 154 * \return EC_METHOD object 94 155 */ 95 const EC_METHOD *EC_GF2m_simple_method(void);96 97 # endif156 OSSL_DEPRECATEDIN_3_0 const EC_METHOD *EC_GF2m_simple_method(void); 157 158 # endif 98 159 99 160 /********************************************************************/ … … 101 162 /********************************************************************/ 102 163 103 /** Creates a new EC_GROUP object 104 * \param meth EC_METHOD to use 164 /** 165 * Creates a new EC_GROUP object 166 * \param meth EC_METHOD to use 105 167 * \return newly created EC_GROUP object or NULL in case of an error. 106 168 */ 107 EC_GROUP *EC_GROUP_new(const EC_METHOD *meth); 169 OSSL_DEPRECATEDIN_3_0 EC_GROUP *EC_GROUP_new(const EC_METHOD *meth); 170 171 /** Clears and frees a EC_GROUP object 172 * \param group EC_GROUP object to be cleared and freed. 173 */ 174 OSSL_DEPRECATEDIN_3_0 void EC_GROUP_clear_free(EC_GROUP *group); 175 176 /** Returns the EC_METHOD of the EC_GROUP object. 177 * \param group EC_GROUP object 178 * \return EC_METHOD used in this EC_GROUP object. 179 */ 180 OSSL_DEPRECATEDIN_3_0 const EC_METHOD *EC_GROUP_method_of(const EC_GROUP *group); 181 182 /** Returns the field type of the EC_METHOD. 183 * \param meth EC_METHOD object 184 * \return NID of the underlying field type OID. 185 */ 186 OSSL_DEPRECATEDIN_3_0 int EC_METHOD_get_field_type(const EC_METHOD *meth); 187 # endif /* OPENSSL_NO_DEPRECATED_3_0 */ 108 188 109 189 /** Frees a EC_GROUP object … … 111 191 */ 112 192 void EC_GROUP_free(EC_GROUP *group); 113 114 /** Clears and frees a EC_GROUP object115 * \param group EC_GROUP object to be cleared and freed.116 */117 void EC_GROUP_clear_free(EC_GROUP *group);118 193 119 194 /** Copies EC_GROUP objects. Note: both EC_GROUPs must use the same EC_METHOD. … … 124 199 int EC_GROUP_copy(EC_GROUP *dst, const EC_GROUP *src); 125 200 126 /** Creates a new EC_GROUP object and copies the co pies the content201 /** Creates a new EC_GROUP object and copies the content 127 202 * form src to the newly created EC_KEY object 128 203 * \param src source EC_GROUP object … … 130 205 */ 131 206 EC_GROUP *EC_GROUP_dup(const EC_GROUP *src); 132 133 /** Returns the EC_METHOD of the EC_GROUP object.134 * \param group EC_GROUP object135 * \return EC_METHOD used in this EC_GROUP object.136 */137 const EC_METHOD *EC_GROUP_method_of(const EC_GROUP *group);138 139 /** Returns the field type of the EC_METHOD.140 * \param meth EC_METHOD object141 * \return NID of the underlying field type OID.142 */143 int EC_METHOD_get_field_type(const EC_METHOD *meth);144 207 145 208 /** Sets the generator and its order/cofactor of a EC_GROUP object. … … 213 276 int EC_GROUP_get_curve_name(const EC_GROUP *group); 214 277 278 /** Gets the field of an EC_GROUP 279 * \param group EC_GROUP object 280 * \return the group field 281 */ 282 const BIGNUM *EC_GROUP_get0_field(const EC_GROUP *group); 283 284 /** Returns the field type of the EC_GROUP. 285 * \param group EC_GROUP object 286 * \return NID of the underlying field type OID. 287 */ 288 int EC_GROUP_get_field_type(const EC_GROUP *group); 289 215 290 void EC_GROUP_set_asn1_flag(EC_GROUP *group, int flag); 216 291 int EC_GROUP_get_asn1_flag(const EC_GROUP *group); … … 224 299 size_t EC_GROUP_set_seed(EC_GROUP *, const unsigned char *, size_t len); 225 300 226 /** Sets the parameters of a ec curve defined by y^2 = x^3 + a*x + b (for GFp)301 /** Sets the parameters of an ec curve defined by y^2 = x^3 + a*x + b (for GFp) 227 302 * or y^2 + x*y = x^3 + a*x^2 + b (for GF2m) 228 303 * \param group EC_GROUP object … … 250 325 BN_CTX *ctx); 251 326 327 # ifndef OPENSSL_NO_DEPRECATED_3_0 252 328 /** Sets the parameters of an ec curve. Synonym for EC_GROUP_set_curve 253 329 * \param group EC_GROUP object … … 259 335 * \return 1 on success and 0 if an error occurred 260 336 */ 261 DEPRECATEDIN_1_2_0(int EC_GROUP_set_curve_GFp(EC_GROUP *group, const BIGNUM *p, 262 const BIGNUM *a, const BIGNUM *b, 263 BN_CTX *ctx)) 337 OSSL_DEPRECATEDIN_3_0 int EC_GROUP_set_curve_GFp(EC_GROUP *group, 338 const BIGNUM *p, 339 const BIGNUM *a, 340 const BIGNUM *b, 341 BN_CTX *ctx); 264 342 265 343 /** Gets the parameters of an ec curve. Synonym for EC_GROUP_get_curve … … 272 350 * \return 1 on success and 0 if an error occurred 273 351 */ 274 DEPRECATEDIN_1_2_0(int EC_GROUP_get_curve_GFp(const EC_GROUP *group, BIGNUM *p, 275 BIGNUM *a, BIGNUM *b, 276 BN_CTX *ctx)) 277 278 # ifndef OPENSSL_NO_EC2M 352 OSSL_DEPRECATEDIN_3_0 int EC_GROUP_get_curve_GFp(const EC_GROUP *group, 353 BIGNUM *p, 354 BIGNUM *a, BIGNUM *b, 355 BN_CTX *ctx); 356 357 # ifndef OPENSSL_NO_EC2M 279 358 /** Sets the parameter of an ec curve. Synonym for EC_GROUP_set_curve 280 359 * \param group EC_GROUP object … … 286 365 * \return 1 on success and 0 if an error occurred 287 366 */ 288 DEPRECATEDIN_1_2_0(int EC_GROUP_set_curve_GF2m(EC_GROUP *group, const BIGNUM *p, 289 const BIGNUM *a, const BIGNUM *b, 290 BN_CTX *ctx)) 367 OSSL_DEPRECATEDIN_3_0 int EC_GROUP_set_curve_GF2m(EC_GROUP *group, 368 const BIGNUM *p, 369 const BIGNUM *a, 370 const BIGNUM *b, 371 BN_CTX *ctx); 291 372 292 373 /** Gets the parameters of an ec curve. Synonym for EC_GROUP_get_curve … … 299 380 * \return 1 on success and 0 if an error occurred 300 381 */ 301 DEPRECATEDIN_1_2_0(int EC_GROUP_get_curve_GF2m(const EC_GROUP *group, BIGNUM *p, 302 BIGNUM *a, BIGNUM *b, 303 BN_CTX *ctx)) 304 # endif 382 OSSL_DEPRECATEDIN_3_0 int EC_GROUP_get_curve_GF2m(const EC_GROUP *group, 383 BIGNUM *p, 384 BIGNUM *a, BIGNUM *b, 385 BN_CTX *ctx); 386 # endif /* OPENSSL_NO_EC2M */ 387 # endif /* OPENSSL_NO_DEPRECATED_3_0 */ 388 305 389 /** Returns the number of bits needed to represent a field element 306 390 * \param group EC_GROUP object … … 346 430 EC_GROUP *EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a, 347 431 const BIGNUM *b, BN_CTX *ctx); 348 # ifndef OPENSSL_NO_EC2M432 # ifndef OPENSSL_NO_EC2M 349 433 /** Creates a new EC_GROUP object with the specified parameters defined 350 434 * over GF2m (defined by the equation y^2 + x*y = x^3 + a*x^2 + b) … … 357 441 EC_GROUP *EC_GROUP_new_curve_GF2m(const BIGNUM *p, const BIGNUM *a, 358 442 const BIGNUM *b, BN_CTX *ctx); 359 # endif 360 361 /** Creates a EC_GROUP object with a curve specified by a NID 362 * \param nid NID of the OID of the curve name 443 # endif 444 445 /** 446 * Creates a EC_GROUP object with a curve specified by parameters. 447 * The parameters may be explicit or a named curve, 448 * \param params A list of parameters describing the group. 449 * \param libctx The associated library context or NULL for the default 450 * context 451 * \param propq A property query string 452 * \return newly created EC_GROUP object with specified parameters or NULL 453 * if an error occurred 454 */ 455 EC_GROUP *EC_GROUP_new_from_params(const OSSL_PARAM params[], 456 OSSL_LIB_CTX *libctx, const char *propq); 457 458 /** 459 * Creates a EC_GROUP object with a curve specified by a NID 460 * \param libctx The associated library context or NULL for the default 461 * context 462 * \param propq A property query string 463 * \param nid NID of the OID of the curve name 464 * \return newly created EC_GROUP object with specified curve or NULL 465 * if an error occurred 466 */ 467 EC_GROUP *EC_GROUP_new_by_curve_name_ex(OSSL_LIB_CTX *libctx, const char *propq, 468 int nid); 469 470 /** 471 * Creates a EC_GROUP object with a curve specified by a NID. Same as 472 * EC_GROUP_new_by_curve_name_ex but the libctx and propq are always 473 * NULL. 474 * \param nid NID of the OID of the curve name 363 475 * \return newly created EC_GROUP object with specified curve or NULL 364 476 * if an error occurred … … 417 529 const char *EC_curve_nid2nist(int nid); 418 530 int EC_curve_nist2nid(const char *name); 531 int EC_GROUP_check_named_curve(const EC_GROUP *group, int nist_only, 532 BN_CTX *ctx); 419 533 420 534 /********************************************************************/ … … 453 567 EC_POINT *EC_POINT_dup(const EC_POINT *src, const EC_GROUP *group); 454 568 569 /** Sets a point to infinity (neutral element) 570 * \param group underlying EC_GROUP object 571 * \param point EC_POINT to set to infinity 572 * \return 1 on success and 0 if an error occurred 573 */ 574 int EC_POINT_set_to_infinity(const EC_GROUP *group, EC_POINT *point); 575 576 # ifndef OPENSSL_NO_DEPRECATED_3_0 455 577 /** Returns the EC_METHOD used in EC_POINT object 456 578 * \param point EC_POINT object 457 579 * \return the EC_METHOD used 458 580 */ 459 const EC_METHOD *EC_POINT_method_of(const EC_POINT *point); 460 461 /** Sets a point to infinity (neutral element) 462 * \param group underlying EC_GROUP object 463 * \param point EC_POINT to set to infinity 464 * \return 1 on success and 0 if an error occurred 465 */ 466 int EC_POINT_set_to_infinity(const EC_GROUP *group, EC_POINT *point); 581 OSSL_DEPRECATEDIN_3_0 const EC_METHOD *EC_POINT_method_of(const EC_POINT *point); 467 582 468 583 /** Sets the jacobian projective coordinates of a EC_POINT over GFp … … 475 590 * \return 1 on success and 0 if an error occurred 476 591 */ 477 int EC_POINT_set_Jprojective_coordinates_GFp(const EC_GROUP *group, 478 EC_POINT *p, const BIGNUM *x,479 480 592 OSSL_DEPRECATEDIN_3_0 int EC_POINT_set_Jprojective_coordinates_GFp 593 (const EC_GROUP *group, EC_POINT *p, 594 const BIGNUM *x, const BIGNUM *y, const BIGNUM *z, 595 BN_CTX *ctx); 481 596 482 597 /** Gets the jacobian projective coordinates of a EC_POINT over GFp … … 489 604 * \return 1 on success and 0 if an error occurred 490 605 */ 491 int EC_POINT_get_Jprojective_coordinates_GFp(const EC_GROUP *group, 492 const EC_POINT *p, BIGNUM *x,493 BIGNUM *y, BIGNUM *z,494 BN_CTX *ctx); 606 OSSL_DEPRECATEDIN_3_0 int EC_POINT_get_Jprojective_coordinates_GFp 607 (const EC_GROUP *group, const EC_POINT *p, 608 BIGNUM *x, BIGNUM *y, BIGNUM *z, BN_CTX *ctx); 609 # endif /* OPENSSL_NO_DEPRECATED_3_0 */ 495 610 496 611 /** Sets the affine coordinates of an EC_POINT … … 517 632 BIGNUM *x, BIGNUM *y, BN_CTX *ctx); 518 633 634 # ifndef OPENSSL_NO_DEPRECATED_3_0 519 635 /** Sets the affine coordinates of an EC_POINT. A synonym of 520 636 * EC_POINT_set_affine_coordinates … … 526 642 * \return 1 on success and 0 if an error occurred 527 643 */ 528 DEPRECATEDIN_1_2_0(int EC_POINT_set_affine_coordinates_GFp(const EC_GROUP *group, 529 EC_POINT *p, 530 const BIGNUM *x, 531 const BIGNUM *y, 532 BN_CTX *ctx)) 644 OSSL_DEPRECATEDIN_3_0 int EC_POINT_set_affine_coordinates_GFp 645 (const EC_GROUP *group, EC_POINT *p, 646 const BIGNUM *x, const BIGNUM *y, BN_CTX *ctx); 533 647 534 648 /** Gets the affine coordinates of an EC_POINT. A synonym of … … 541 655 * \return 1 on success and 0 if an error occurred 542 656 */ 543 DEPRECATEDIN_1_2_0(int EC_POINT_get_affine_coordinates_GFp(const EC_GROUP *group, 544 const EC_POINT *p, 545 BIGNUM *x, 546 BIGNUM *y, 547 BN_CTX *ctx)) 657 OSSL_DEPRECATEDIN_3_0 int EC_POINT_get_affine_coordinates_GFp 658 (const EC_GROUP *group, const EC_POINT *p, 659 BIGNUM *x, BIGNUM *y, BN_CTX *ctx); 660 # endif /* OPENSSL_NO_DEPRECATED_3_0 */ 548 661 549 662 /** Sets the x9.62 compressed coordinates of a EC_POINT … … 559 672 BN_CTX *ctx); 560 673 674 # ifndef OPENSSL_NO_DEPRECATED_3_0 561 675 /** Sets the x9.62 compressed coordinates of a EC_POINT. A synonym of 562 676 * EC_POINT_set_compressed_coordinates … … 568 682 * \return 1 on success and 0 if an error occurred 569 683 */ 570 DEPRECATEDIN_1_2_0(int EC_POINT_set_compressed_coordinates_GFp(const EC_GROUP *group, 571 EC_POINT *p, 572 const BIGNUM *x, 573 int y_bit, 574 BN_CTX *ctx)) 575 # ifndef OPENSSL_NO_EC2M 684 OSSL_DEPRECATEDIN_3_0 int EC_POINT_set_compressed_coordinates_GFp 685 (const EC_GROUP *group, EC_POINT *p, 686 const BIGNUM *x, int y_bit, BN_CTX *ctx); 687 # ifndef OPENSSL_NO_EC2M 576 688 /** Sets the affine coordinates of an EC_POINT. A synonym of 577 689 * EC_POINT_set_affine_coordinates … … 583 695 * \return 1 on success and 0 if an error occurred 584 696 */ 585 DEPRECATEDIN_1_2_0(int EC_POINT_set_affine_coordinates_GF2m(const EC_GROUP *group, 586 EC_POINT *p, 587 const BIGNUM *x, 588 const BIGNUM *y, 589 BN_CTX *ctx)) 697 OSSL_DEPRECATEDIN_3_0 int EC_POINT_set_affine_coordinates_GF2m 698 (const EC_GROUP *group, EC_POINT *p, 699 const BIGNUM *x, const BIGNUM *y, BN_CTX *ctx); 590 700 591 701 /** Gets the affine coordinates of an EC_POINT. A synonym of … … 598 708 * \return 1 on success and 0 if an error occurred 599 709 */ 600 DEPRECATEDIN_1_2_0(int EC_POINT_get_affine_coordinates_GF2m(const EC_GROUP *group, 601 const EC_POINT *p, 602 BIGNUM *x, 603 BIGNUM *y, 604 BN_CTX *ctx)) 710 OSSL_DEPRECATEDIN_3_0 int EC_POINT_get_affine_coordinates_GF2m 711 (const EC_GROUP *group, const EC_POINT *p, 712 BIGNUM *x, BIGNUM *y, BN_CTX *ctx); 605 713 606 714 /** Sets the x9.62 compressed coordinates of a EC_POINT. A synonym of … … 613 721 * \return 1 on success and 0 if an error occurred 614 722 */ 615 DEPRECATEDIN_1_2_0(int EC_POINT_set_compressed_coordinates_GF2m(const EC_GROUP *group, 616 617 const BIGNUM *x,618 int y_bit, 619 BN_CTX *ctx)) 620 # endif 723 OSSL_DEPRECATEDIN_3_0 int EC_POINT_set_compressed_coordinates_GF2m 724 (const EC_GROUP *group, EC_POINT *p, 725 const BIGNUM *x, int y_bit, BN_CTX *ctx); 726 # endif 727 # endif /* OPENSSL_NO_DEPRECATED_3_0 */ 728 621 729 /** Encodes a EC_POINT object to a octet string 622 730 * \param group underlying EC_GROUP object … … 657 765 658 766 /* other interfaces to point2oct/oct2point: */ 659 BIGNUM *EC_POINT_point2bn(const EC_GROUP *, const EC_POINT *, 660 point_conversion_form_t form, BIGNUM *, BN_CTX *); 661 EC_POINT *EC_POINT_bn2point(const EC_GROUP *, const BIGNUM *, 662 EC_POINT *, BN_CTX *); 767 # ifndef OPENSSL_NO_DEPRECATED_3_0 768 OSSL_DEPRECATEDIN_3_0 BIGNUM *EC_POINT_point2bn(const EC_GROUP *, 769 const EC_POINT *, 770 point_conversion_form_t form, 771 BIGNUM *, BN_CTX *); 772 OSSL_DEPRECATEDIN_3_0 EC_POINT *EC_POINT_bn2point(const EC_GROUP *, 773 const BIGNUM *, 774 EC_POINT *, BN_CTX *); 775 # endif /* OPENSSL_NO_DEPRECATED_3_0 */ 776 663 777 char *EC_POINT_point2hex(const EC_GROUP *, const EC_POINT *, 664 778 point_conversion_form_t form, BN_CTX *); … … 725 839 BN_CTX *ctx); 726 840 727 int EC_POINT_make_affine(const EC_GROUP *group, EC_POINT *point, BN_CTX *ctx); 728 int EC_POINTs_make_affine(const EC_GROUP *group, size_t num, 729 EC_POINT *points[], BN_CTX *ctx); 841 # ifndef OPENSSL_NO_DEPRECATED_3_0 842 OSSL_DEPRECATEDIN_3_0 int EC_POINT_make_affine(const EC_GROUP *group, 843 EC_POINT *point, BN_CTX *ctx); 844 OSSL_DEPRECATEDIN_3_0 int EC_POINTs_make_affine(const EC_GROUP *group, size_t num, 845 EC_POINT *points[], BN_CTX *ctx); 730 846 731 847 /** Computes r = generator * n + sum_{i=0}^{num-1} p[i] * m[i] … … 739 855 * \return 1 on success and 0 if an error occurred 740 856 */ 741 int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, const BIGNUM *n, 742 size_t num, const EC_POINT *p[], const BIGNUM *m[], 743 BN_CTX *ctx); 857 OSSL_DEPRECATEDIN_3_0 int EC_POINTs_mul(const EC_GROUP *group, EC_POINT *r, 858 const BIGNUM *n, size_t num, 859 const EC_POINT *p[], const BIGNUM *m[], 860 BN_CTX *ctx); 861 # endif /* OPENSSL_NO_DEPRECATED_3_0 */ 744 862 745 863 /** Computes r = generator * n + q * m … … 755 873 const EC_POINT *q, const BIGNUM *m, BN_CTX *ctx); 756 874 875 # ifndef OPENSSL_NO_DEPRECATED_3_0 757 876 /** Stores multiples of generator for faster point multiplication 758 877 * \param group EC_GROUP object … … 760 879 * \return 1 on success and 0 if an error occurred 761 880 */ 762 int EC_GROUP_precompute_mult(EC_GROUP *group, BN_CTX *ctx);881 OSSL_DEPRECATEDIN_3_0 int EC_GROUP_precompute_mult(EC_GROUP *group, BN_CTX *ctx); 763 882 764 883 /** Reports whether a precomputation has been done … … 766 885 * \return 1 if a pre-computation has been done and 0 otherwise 767 886 */ 768 int EC_GROUP_have_precompute_mult(const EC_GROUP *group); 887 OSSL_DEPRECATEDIN_3_0 int EC_GROUP_have_precompute_mult(const EC_GROUP *group); 888 # endif /* OPENSSL_NO_DEPRECATED_3_0 */ 769 889 770 890 /********************************************************************/ … … 782 902 */ 783 903 int EC_GROUP_get_basis_type(const EC_GROUP *); 784 # ifndef OPENSSL_NO_EC2M904 # ifndef OPENSSL_NO_EC2M 785 905 int EC_GROUP_get_trinomial_basis(const EC_GROUP *, unsigned int *k); 786 906 int EC_GROUP_get_pentanomial_basis(const EC_GROUP *, unsigned int *k1, 787 907 unsigned int *k2, unsigned int *k3); 788 # endif 789 790 # define OPENSSL_EC_EXPLICIT_CURVE 0x000 791 # define OPENSSL_EC_NAMED_CURVE 0x001 908 # endif 792 909 793 910 EC_GROUP *d2i_ECPKParameters(EC_GROUP **, const unsigned char **in, long len); 794 911 int i2d_ECPKParameters(const EC_GROUP *, unsigned char **out); 795 912 796 # define d2i_ECPKParameters_bio(bp,x) ASN1_d2i_bio_of(EC_GROUP,NULL,d2i_ECPKParameters,bp,x) 797 # define i2d_ECPKParameters_bio(bp,x) ASN1_i2d_bio_of_const(EC_GROUP,i2d_ECPKParameters,bp,x) 798 # define d2i_ECPKParameters_fp(fp,x) (EC_GROUP *)ASN1_d2i_fp(NULL, \ 799 (char *(*)())d2i_ECPKParameters,(fp),(unsigned char **)(x)) 800 # define i2d_ECPKParameters_fp(fp,x) ASN1_i2d_fp(i2d_ECPKParameters,(fp), \ 801 (unsigned char *)(x)) 802 803 int ECPKParameters_print(BIO *bp, const EC_GROUP *x, int off); 804 # ifndef OPENSSL_NO_STDIO 805 int ECPKParameters_print_fp(FILE *fp, const EC_GROUP *x, int off); 806 # endif 913 # define d2i_ECPKParameters_bio(bp,x) \ 914 ASN1_d2i_bio_of(EC_GROUP, NULL, d2i_ECPKParameters, bp, x) 915 # define i2d_ECPKParameters_bio(bp,x) \ 916 ASN1_i2d_bio_of(EC_GROUP, i2d_ECPKParameters, bp, x) 917 # define d2i_ECPKParameters_fp(fp,x) \ 918 (EC_GROUP *)ASN1_d2i_fp(NULL, (d2i_of_void *)d2i_ECPKParameters, (fp), \ 919 (void **)(x)) 920 # define i2d_ECPKParameters_fp(fp,x) \ 921 ASN1_i2d_fp((i2d_of_void *)i2d_ECPKParameters, (fp), (void *)(x)) 922 923 # ifndef OPENSSL_NO_DEPRECATED_3_0 924 OSSL_DEPRECATEDIN_3_0 int ECPKParameters_print(BIO *bp, const EC_GROUP *x, 925 int off); 926 # ifndef OPENSSL_NO_STDIO 927 OSSL_DEPRECATEDIN_3_0 int ECPKParameters_print_fp(FILE *fp, const EC_GROUP *x, 928 int off); 929 # endif 930 # endif /* OPENSSL_NO_DEPRECATED_3_0 */ 807 931 808 932 /********************************************************************/ … … 811 935 812 936 /* some values for the encoding_flag */ 813 # define EC_PKEY_NO_PARAMETERS 0x001814 # define EC_PKEY_NO_PUBKEY 0x002937 # define EC_PKEY_NO_PARAMETERS 0x001 938 # define EC_PKEY_NO_PUBKEY 0x002 815 939 816 940 /* some values for the flags field */ 817 # define EC_FLAG_NON_FIPS_ALLOW 0x1 818 # define EC_FLAG_FIPS_CHECKED 0x2 819 # define EC_FLAG_COFACTOR_ECDH 0x1000 820 821 /** Creates a new EC_KEY object. 941 # define EC_FLAG_SM2_RANGE 0x0004 942 # define EC_FLAG_COFACTOR_ECDH 0x1000 943 # define EC_FLAG_CHECK_NAMED_GROUP 0x2000 944 # define EC_FLAG_CHECK_NAMED_GROUP_NIST 0x4000 945 # define EC_FLAG_CHECK_NAMED_GROUP_MASK \ 946 (EC_FLAG_CHECK_NAMED_GROUP | EC_FLAG_CHECK_NAMED_GROUP_NIST) 947 948 /* Deprecated flags - it was using 0x01..0x02 */ 949 # define EC_FLAG_NON_FIPS_ALLOW 0x0000 950 # define EC_FLAG_FIPS_CHECKED 0x0000 951 952 # ifndef OPENSSL_NO_DEPRECATED_3_0 953 /** 954 * Creates a new EC_KEY object. 955 * \param ctx The library context for to use for this EC_KEY. May be NULL in 956 * which case the default library context is used. 822 957 * \return EC_KEY object or NULL if an error occurred. 823 958 */ 824 EC_KEY *EC_KEY_new(void); 825 826 int EC_KEY_get_flags(const EC_KEY *key); 827 828 void EC_KEY_set_flags(EC_KEY *key, int flags); 829 830 void EC_KEY_clear_flags(EC_KEY *key, int flags); 831 832 int EC_KEY_decoded_from_explicit_params(const EC_KEY *key); 833 834 /** Creates a new EC_KEY object using a named curve as underlying 959 OSSL_DEPRECATEDIN_3_0 EC_KEY *EC_KEY_new_ex(OSSL_LIB_CTX *ctx, const char *propq); 960 961 /** 962 * Creates a new EC_KEY object. Same as calling EC_KEY_new_ex with a 963 * NULL library context 964 * \return EC_KEY object or NULL if an error occurred. 965 */ 966 OSSL_DEPRECATEDIN_3_0 EC_KEY *EC_KEY_new(void); 967 968 OSSL_DEPRECATEDIN_3_0 int EC_KEY_get_flags(const EC_KEY *key); 969 970 OSSL_DEPRECATEDIN_3_0 void EC_KEY_set_flags(EC_KEY *key, int flags); 971 972 OSSL_DEPRECATEDIN_3_0 void EC_KEY_clear_flags(EC_KEY *key, int flags); 973 974 OSSL_DEPRECATEDIN_3_0 int EC_KEY_decoded_from_explicit_params(const EC_KEY *key); 975 976 /** 977 * Creates a new EC_KEY object using a named curve as underlying 835 978 * EC_GROUP object. 979 * \param ctx The library context for to use for this EC_KEY. May be NULL in 980 * which case the default library context is used. 981 * \param propq Any property query string 982 * \param nid NID of the named curve. 983 * \return EC_KEY object or NULL if an error occurred. 984 */ 985 OSSL_DEPRECATEDIN_3_0 EC_KEY *EC_KEY_new_by_curve_name_ex(OSSL_LIB_CTX *ctx, 986 const char *propq, 987 int nid); 988 989 /** 990 * Creates a new EC_KEY object using a named curve as underlying 991 * EC_GROUP object. Same as calling EC_KEY_new_by_curve_name_ex with a NULL 992 * library context and property query string. 836 993 * \param nid NID of the named curve. 837 994 * \return EC_KEY object or NULL if an error occurred. 838 995 */ 839 EC_KEY *EC_KEY_new_by_curve_name(int nid);996 OSSL_DEPRECATEDIN_3_0 EC_KEY *EC_KEY_new_by_curve_name(int nid); 840 997 841 998 /** Frees a EC_KEY object. 842 999 * \param key EC_KEY object to be freed. 843 1000 */ 844 void EC_KEY_free(EC_KEY *key);1001 OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key); 845 1002 846 1003 /** Copies a EC_KEY object. … … 849 1006 * \return dst or NULL if an error occurred. 850 1007 */ 851 EC_KEY *EC_KEY_copy(EC_KEY *dst, const EC_KEY *src);1008 OSSL_DEPRECATEDIN_3_0 EC_KEY *EC_KEY_copy(EC_KEY *dst, const EC_KEY *src); 852 1009 853 1010 /** Creates a new EC_KEY object and copies the content from src to it. … … 855 1012 * \return newly created EC_KEY object or NULL if an error occurred. 856 1013 */ 857 EC_KEY *EC_KEY_dup(const EC_KEY *src);1014 OSSL_DEPRECATEDIN_3_0 EC_KEY *EC_KEY_dup(const EC_KEY *src); 858 1015 859 1016 /** Increases the internal reference count of a EC_KEY object. … … 861 1018 * \return 1 on success and 0 if an error occurred. 862 1019 */ 863 int EC_KEY_up_ref(EC_KEY *key);1020 OSSL_DEPRECATEDIN_3_0 int EC_KEY_up_ref(EC_KEY *key); 864 1021 865 1022 /** Returns the ENGINE object of a EC_KEY object … … 867 1024 * \return the ENGINE object (possibly NULL). 868 1025 */ 869 ENGINE *EC_KEY_get0_engine(const EC_KEY *eckey);1026 OSSL_DEPRECATEDIN_3_0 ENGINE *EC_KEY_get0_engine(const EC_KEY *eckey); 870 1027 871 1028 /** Returns the EC_GROUP object of a EC_KEY object … … 873 1030 * \return the EC_GROUP object (possibly NULL). 874 1031 */ 875 const EC_GROUP *EC_KEY_get0_group(const EC_KEY *key);1032 OSSL_DEPRECATEDIN_3_0 const EC_GROUP *EC_KEY_get0_group(const EC_KEY *key); 876 1033 877 1034 /** Sets the EC_GROUP of a EC_KEY object. … … 881 1038 * \return 1 on success and 0 if an error occurred. 882 1039 */ 883 int EC_KEY_set_group(EC_KEY *key, const EC_GROUP *group);1040 OSSL_DEPRECATEDIN_3_0 int EC_KEY_set_group(EC_KEY *key, const EC_GROUP *group); 884 1041 885 1042 /** Returns the private key of a EC_KEY object. … … 887 1044 * \return a BIGNUM with the private key (possibly NULL). 888 1045 */ 889 const BIGNUM *EC_KEY_get0_private_key(const EC_KEY *key);1046 OSSL_DEPRECATEDIN_3_0 const BIGNUM *EC_KEY_get0_private_key(const EC_KEY *key); 890 1047 891 1048 /** Sets the private key of a EC_KEY object. … … 895 1052 * \return 1 on success and 0 if an error occurred. 896 1053 */ 897 int EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *prv);1054 OSSL_DEPRECATEDIN_3_0 int EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *prv); 898 1055 899 1056 /** Returns the public key of a EC_KEY object. … … 901 1058 * \return a EC_POINT object with the public key (possibly NULL) 902 1059 */ 903 const EC_POINT *EC_KEY_get0_public_key(const EC_KEY *key);1060 OSSL_DEPRECATEDIN_3_0 const EC_POINT *EC_KEY_get0_public_key(const EC_KEY *key); 904 1061 905 1062 /** Sets the public key of a EC_KEY object. … … 909 1066 * \return 1 on success and 0 if an error occurred. 910 1067 */ 911 int EC_KEY_set_public_key(EC_KEY *key, const EC_POINT *pub); 912 913 unsigned EC_KEY_get_enc_flags(const EC_KEY *key); 914 void EC_KEY_set_enc_flags(EC_KEY *eckey, unsigned int flags); 915 point_conversion_form_t EC_KEY_get_conv_form(const EC_KEY *key); 916 void EC_KEY_set_conv_form(EC_KEY *eckey, point_conversion_form_t cform); 917 918 #define EC_KEY_get_ex_new_index(l, p, newf, dupf, freef) \ 1068 OSSL_DEPRECATEDIN_3_0 int EC_KEY_set_public_key(EC_KEY *key, const EC_POINT *pub); 1069 1070 OSSL_DEPRECATEDIN_3_0 unsigned EC_KEY_get_enc_flags(const EC_KEY *key); 1071 OSSL_DEPRECATEDIN_3_0 void EC_KEY_set_enc_flags(EC_KEY *eckey, unsigned int flags); 1072 OSSL_DEPRECATEDIN_3_0 point_conversion_form_t EC_KEY_get_conv_form(const EC_KEY *key); 1073 OSSL_DEPRECATEDIN_3_0 void EC_KEY_set_conv_form(EC_KEY *eckey, 1074 point_conversion_form_t cform); 1075 # endif /*OPENSSL_NO_DEPRECATED_3_0 */ 1076 1077 # define EC_KEY_get_ex_new_index(l, p, newf, dupf, freef) \ 919 1078 CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_EC_KEY, l, p, newf, dupf, freef) 920 int EC_KEY_set_ex_data(EC_KEY *key, int idx, void *arg); 921 void *EC_KEY_get_ex_data(const EC_KEY *key, int idx); 1079 1080 # ifndef OPENSSL_NO_DEPRECATED_3_0 1081 OSSL_DEPRECATEDIN_3_0 int EC_KEY_set_ex_data(EC_KEY *key, int idx, void *arg); 1082 OSSL_DEPRECATEDIN_3_0 void *EC_KEY_get_ex_data(const EC_KEY *key, int idx); 922 1083 923 1084 /* wrapper functions for the underlying EC_GROUP object */ 924 void EC_KEY_set_asn1_flag(EC_KEY *eckey, int asn1_flag);1085 OSSL_DEPRECATEDIN_3_0 void EC_KEY_set_asn1_flag(EC_KEY *eckey, int asn1_flag); 925 1086 926 1087 /** Creates a table of pre-computed multiples of the generator to … … 930 1091 * \return 1 on success and 0 if an error occurred. 931 1092 */ 932 int EC_KEY_precompute_mult(EC_KEY *key, BN_CTX *ctx);1093 OSSL_DEPRECATEDIN_3_0 int EC_KEY_precompute_mult(EC_KEY *key, BN_CTX *ctx); 933 1094 934 1095 /** Creates a new ec private (and optional a new public) key. … … 936 1097 * \return 1 on success and 0 if an error occurred. 937 1098 */ 938 int EC_KEY_generate_key(EC_KEY *key);1099 OSSL_DEPRECATEDIN_3_0 int EC_KEY_generate_key(EC_KEY *key); 939 1100 940 1101 /** Verifies that a private and/or public key is valid. … … 942 1103 * \return 1 on success and 0 otherwise. 943 1104 */ 944 int EC_KEY_check_key(const EC_KEY *key);1105 OSSL_DEPRECATEDIN_3_0 int EC_KEY_check_key(const EC_KEY *key); 945 1106 946 1107 /** Indicates if an EC_KEY can be used for signing. … … 948 1109 * \return 1 if can can sign and 0 otherwise. 949 1110 */ 950 int EC_KEY_can_sign(const EC_KEY *eckey);1111 OSSL_DEPRECATEDIN_3_0 int EC_KEY_can_sign(const EC_KEY *eckey); 951 1112 952 1113 /** Sets a public key from affine coordinates performing … … 957 1118 * \return 1 on success and 0 otherwise. 958 1119 */ 959 int EC_KEY_set_public_key_affine_coordinates(EC_KEY *key, BIGNUM *x, 960 BIGNUM *y); 1120 OSSL_DEPRECATEDIN_3_0 int EC_KEY_set_public_key_affine_coordinates(EC_KEY *key, 1121 BIGNUM *x, 1122 BIGNUM *y); 961 1123 962 1124 /** Encodes an EC_KEY public key to an allocated octet string … … 967 1129 * \return the length of the encoded octet string or 0 if an error occurred 968 1130 */ 969 size_t EC_KEY_key2buf(const EC_KEY *key, point_conversion_form_t form, 970 unsigned char **pbuf, BN_CTX *ctx); 1131 OSSL_DEPRECATEDIN_3_0 size_t EC_KEY_key2buf(const EC_KEY *key, 1132 point_conversion_form_t form, 1133 unsigned char **pbuf, BN_CTX *ctx); 971 1134 972 1135 /** Decodes a EC_KEY public key from a octet string … … 978 1141 */ 979 1142 980 int EC_KEY_oct2key(EC_KEY *key, const unsigned char *buf, size_t len,981 BN_CTX *ctx);1143 OSSL_DEPRECATEDIN_3_0 int EC_KEY_oct2key(EC_KEY *key, const unsigned char *buf, 1144 size_t len, BN_CTX *ctx); 982 1145 983 1146 /** Decodes an EC_KEY private key from an octet string … … 988 1151 */ 989 1152 990 int EC_KEY_oct2priv(EC_KEY *key, const unsigned char *buf, size_t len); 1153 OSSL_DEPRECATEDIN_3_0 int EC_KEY_oct2priv(EC_KEY *key, const unsigned char *buf, 1154 size_t len); 991 1155 992 1156 /** Encodes a EC_KEY private key to an octet string … … 998 1162 */ 999 1163 1000 size_t EC_KEY_priv2oct(const EC_KEY *key, unsigned char *buf, size_t len); 1164 OSSL_DEPRECATEDIN_3_0 size_t EC_KEY_priv2oct(const EC_KEY *key, 1165 unsigned char *buf, size_t len); 1001 1166 1002 1167 /** Encodes an EC_KEY private key to an allocated octet string … … 1005 1170 * \return the length of the encoded octet string or 0 if an error occurred 1006 1171 */ 1007 size_t EC_KEY_priv2buf(const EC_KEY *eckey, unsigned char **pbuf); 1172 OSSL_DEPRECATEDIN_3_0 size_t EC_KEY_priv2buf(const EC_KEY *eckey, 1173 unsigned char **pbuf); 1008 1174 1009 1175 /********************************************************************/ … … 1017 1183 * \return the decoded private key or NULL if an error occurred. 1018 1184 */ 1019 EC_KEY *d2i_ECPrivateKey(EC_KEY **key, const unsigned char **in, long len); 1185 OSSL_DEPRECATEDIN_3_0 EC_KEY *d2i_ECPrivateKey(EC_KEY **key, 1186 const unsigned char **in, 1187 long len); 1020 1188 1021 1189 /** Encodes a private key object and stores the result in a buffer. … … 1025 1193 * \return 1 on success and 0 if an error occurred. 1026 1194 */ 1027 int i2d_ECPrivateKey(EC_KEY *key, unsigned char **out); 1195 OSSL_DEPRECATEDIN_3_0 int i2d_ECPrivateKey(const EC_KEY *key, 1196 unsigned char **out); 1028 1197 1029 1198 /********************************************************************/ … … 1038 1207 * occurred. 1039 1208 */ 1040 EC_KEY *d2i_ECParameters(EC_KEY **key, const unsigned char **in, long len); 1209 OSSL_DEPRECATEDIN_3_0 EC_KEY *d2i_ECParameters(EC_KEY **key, 1210 const unsigned char **in, 1211 long len); 1041 1212 1042 1213 /** Encodes ec parameter and stores the result in a buffer. … … 1046 1217 * \return 1 on success and 0 if an error occurred. 1047 1218 */ 1048 int i2d_ECParameters(EC_KEY *key, unsigned char **out); 1219 OSSL_DEPRECATEDIN_3_0 int i2d_ECParameters(const EC_KEY *key, 1220 unsigned char **out); 1049 1221 1050 1222 /********************************************************************/ … … 1053 1225 /********************************************************************/ 1054 1226 1055 /** Decodes a ec public key from a octet string.1227 /** Decodes an ec public key from a octet string. 1056 1228 * \param key a pointer to a EC_KEY object which should be used 1057 1229 * \param in memory buffer with the encoded public key … … 1060 1232 * occurred. 1061 1233 */ 1062 EC_KEY *o2i_ECPublicKey(EC_KEY **key, const unsigned char **in, long len); 1063 1064 /** Encodes a ec public key in an octet string. 1234 OSSL_DEPRECATEDIN_3_0 EC_KEY *o2i_ECPublicKey(EC_KEY **key, 1235 const unsigned char **in, long len); 1236 1237 /** Encodes an ec public key in an octet string. 1065 1238 * \param key the EC_KEY object with the public key 1066 1239 * \param out the buffer for the result (if NULL the function returns number … … 1068 1241 * \return 1 on success and 0 if an error occurred 1069 1242 */ 1070 int i2o_ECPublicKey(const EC_KEY *key, unsigned char **out);1243 OSSL_DEPRECATEDIN_3_0 int i2o_ECPublicKey(const EC_KEY *key, unsigned char **out); 1071 1244 1072 1245 /** Prints out the ec parameters on human readable form. … … 1075 1248 * \return 1 on success and 0 if an error occurred 1076 1249 */ 1077 int ECParameters_print(BIO *bp, const EC_KEY *key);1250 OSSL_DEPRECATEDIN_3_0 int ECParameters_print(BIO *bp, const EC_KEY *key); 1078 1251 1079 1252 /** Prints out the contents of a EC_KEY object … … 1083 1256 * \return 1 on success and 0 if an error occurred 1084 1257 */ 1085 int EC_KEY_print(BIO *bp, const EC_KEY *key, int off);1086 1087 # ifndef OPENSSL_NO_STDIO1258 OSSL_DEPRECATEDIN_3_0 int EC_KEY_print(BIO *bp, const EC_KEY *key, int off); 1259 1260 # ifndef OPENSSL_NO_STDIO 1088 1261 /** Prints out the ec parameters on human readable form. 1089 1262 * \param fp file descriptor to which the information is printed … … 1091 1264 * \return 1 on success and 0 if an error occurred 1092 1265 */ 1093 int ECParameters_print_fp(FILE *fp, const EC_KEY *key);1266 OSSL_DEPRECATEDIN_3_0 int ECParameters_print_fp(FILE *fp, const EC_KEY *key); 1094 1267 1095 1268 /** Prints out the contents of a EC_KEY object … … 1099 1272 * \return 1 on success and 0 if an error occurred 1100 1273 */ 1101 int EC_KEY_print_fp(FILE *fp, const EC_KEY *key, int off); 1102 1103 # endif 1104 1105 const EC_KEY_METHOD *EC_KEY_OpenSSL(void); 1106 const EC_KEY_METHOD *EC_KEY_get_default_method(void); 1107 void EC_KEY_set_default_method(const EC_KEY_METHOD *meth); 1108 const EC_KEY_METHOD *EC_KEY_get_method(const EC_KEY *key); 1109 int EC_KEY_set_method(EC_KEY *key, const EC_KEY_METHOD *meth); 1110 EC_KEY *EC_KEY_new_method(ENGINE *engine); 1274 OSSL_DEPRECATEDIN_3_0 int EC_KEY_print_fp(FILE *fp, const EC_KEY *key, int off); 1275 # endif /* OPENSSL_NO_STDIO */ 1276 1277 OSSL_DEPRECATEDIN_3_0 const EC_KEY_METHOD *EC_KEY_OpenSSL(void); 1278 OSSL_DEPRECATEDIN_3_0 const EC_KEY_METHOD *EC_KEY_get_default_method(void); 1279 OSSL_DEPRECATEDIN_3_0 void EC_KEY_set_default_method(const EC_KEY_METHOD *meth); 1280 OSSL_DEPRECATEDIN_3_0 const EC_KEY_METHOD *EC_KEY_get_method(const EC_KEY *key); 1281 OSSL_DEPRECATEDIN_3_0 int EC_KEY_set_method(EC_KEY *key, const EC_KEY_METHOD *meth); 1282 OSSL_DEPRECATEDIN_3_0 EC_KEY *EC_KEY_new_method(ENGINE *engine); 1111 1283 1112 1284 /** The old name for ecdh_KDF_X9_63 … … 1115 1287 * This identifier is retained for backwards compatibility 1116 1288 */ 1117 int ECDH_KDF_X9_62(unsigned char *out, size_t outlen, 1118 const unsigned char *Z, size_t Zlen, 1119 const unsigned char *sinfo, size_t sinfolen, 1120 const EVP_MD *md); 1121 1122 int ECDH_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, 1123 const EC_KEY *ecdh, 1124 void *(*KDF) (const void *in, size_t inlen, 1125 void *out, size_t *outlen)); 1289 OSSL_DEPRECATEDIN_3_0 int ECDH_KDF_X9_62(unsigned char *out, size_t outlen, 1290 const unsigned char *Z, size_t Zlen, 1291 const unsigned char *sinfo, 1292 size_t sinfolen, const EVP_MD *md); 1293 1294 OSSL_DEPRECATEDIN_3_0 int ECDH_compute_key(void *out, size_t outlen, 1295 const EC_POINT *pub_key, 1296 const EC_KEY *ecdh, 1297 void *(*KDF)(const void *in, 1298 size_t inlen, void *out, 1299 size_t *outlen)); 1300 # endif /* OPENSSL_NO_DEPRECATED_3_0 */ 1126 1301 1127 1302 typedef struct ECDSA_SIG_st ECDSA_SIG; … … 1137 1312 void ECDSA_SIG_free(ECDSA_SIG *sig); 1138 1313 1139 /** DER encode content of ECDSA_SIG object(note: this function modifies *pp1314 /** i2d_ECDSA_SIG encodes content of ECDSA_SIG (note: this function modifies *pp 1140 1315 * (*pp += length of the DER encoded signature)). 1141 1316 * \param sig pointer to the ECDSA_SIG object … … 1144 1319 * on error 1145 1320 */ 1146 int i2d_ECDSA_SIG(const ECDSA_SIG *sig, unsigned char **pp); 1147 1148 /** Decodes a DER encoded ECDSA signature (note: this function changes *pp1321 DECLARE_ASN1_ENCODE_FUNCTIONS_only(ECDSA_SIG, ECDSA_SIG) 1322 1323 /** d2i_ECDSA_SIG decodes an ECDSA signature (note: this function modifies *pp 1149 1324 * (*pp += len)). 1150 1325 * \param sig pointer to ECDSA_SIG pointer (may be NULL) … … 1153 1328 * \return pointer to the decoded ECDSA_SIG structure (or NULL) 1154 1329 */ 1155 ECDSA_SIG *d2i_ECDSA_SIG(ECDSA_SIG **sig, const unsigned char **pp, long len);1156 1330 1157 1331 /** Accessor for r and s fields of ECDSA_SIG … … 1174 1348 /** Setter for r and s fields of ECDSA_SIG 1175 1349 * \param sig pointer to ECDSA_SIG structure 1176 * \param r pointer to BIGNUM for r (may be NULL)1177 * \param s pointer to BIGNUM for s (may be NULL)1350 * \param r pointer to BIGNUM for r 1351 * \param s pointer to BIGNUM for s 1178 1352 */ 1179 1353 int ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s); 1180 1354 1355 # ifndef OPENSSL_NO_DEPRECATED_3_0 1181 1356 /** Computes the ECDSA signature of the given hash value using 1182 1357 * the supplied private key and returns the created signature. … … 1186 1361 * \return pointer to a ECDSA_SIG structure or NULL if an error occurred 1187 1362 */ 1188 ECDSA_SIG *ECDSA_do_sign(const unsigned char *dgst, int dgst_len,1189 EC_KEY *eckey);1363 OSSL_DEPRECATEDIN_3_0 ECDSA_SIG *ECDSA_do_sign(const unsigned char *dgst, 1364 int dgst_len, EC_KEY *eckey); 1190 1365 1191 1366 /** Computes ECDSA signature of a given hash value using the supplied … … 1199 1374 * \return pointer to a ECDSA_SIG structure or NULL if an error occurred 1200 1375 */ 1201 ECDSA_SIG *ECDSA_do_sign_ex(const unsigned char *dgst, int dgstlen,1202 const BIGNUM *kinv, const BIGNUM *rp,1203 EC_KEY *eckey);1376 OSSL_DEPRECATEDIN_3_0 ECDSA_SIG *ECDSA_do_sign_ex(const unsigned char *dgst, 1377 int dgstlen, const BIGNUM *kinv, 1378 const BIGNUM *rp, EC_KEY *eckey); 1204 1379 1205 1380 /** Verifies that the supplied signature is a valid ECDSA … … 1212 1387 * and -1 on error 1213 1388 */ 1214 int ECDSA_do_verify(const unsigned char *dgst, int dgst_len,1215 const ECDSA_SIG *sig, EC_KEY *eckey);1389 OSSL_DEPRECATEDIN_3_0 int ECDSA_do_verify(const unsigned char *dgst, int dgst_len, 1390 const ECDSA_SIG *sig, EC_KEY *eckey); 1216 1391 1217 1392 /** Precompute parts of the signing operation … … 1222 1397 * \return 1 on success and 0 otherwise 1223 1398 */ 1224 int ECDSA_sign_setup(EC_KEY *eckey, BN_CTX *ctx, BIGNUM **kinv, BIGNUM **rp); 1399 OSSL_DEPRECATEDIN_3_0 int ECDSA_sign_setup(EC_KEY *eckey, BN_CTX *ctx, 1400 BIGNUM **kinv, BIGNUM **rp); 1225 1401 1226 1402 /** Computes ECDSA signature of a given hash value using the supplied … … 1234 1410 * \return 1 on success and 0 otherwise 1235 1411 */ 1236 int ECDSA_sign(int type, const unsigned char *dgst, int dgstlen, 1237 unsigned char *sig, unsigned int *siglen, EC_KEY *eckey); 1412 OSSL_DEPRECATEDIN_3_0 int ECDSA_sign(int type, const unsigned char *dgst, 1413 int dgstlen, unsigned char *sig, 1414 unsigned int *siglen, EC_KEY *eckey); 1238 1415 1239 1416 /** Computes ECDSA signature of a given hash value using the supplied … … 1250 1427 * \return 1 on success and 0 otherwise 1251 1428 */ 1252 int ECDSA_sign_ex(int type, const unsigned char *dgst, int dgstlen, 1253 unsigned char *sig, unsigned int *siglen, 1254 const BIGNUM *kinv, const BIGNUM *rp, EC_KEY *eckey); 1429 OSSL_DEPRECATEDIN_3_0 int ECDSA_sign_ex(int type, const unsigned char *dgst, 1430 int dgstlen, unsigned char *sig, 1431 unsigned int *siglen, const BIGNUM *kinv, 1432 const BIGNUM *rp, EC_KEY *eckey); 1255 1433 1256 1434 /** Verifies that the given signature is valid ECDSA signature … … 1265 1443 * and -1 on error 1266 1444 */ 1267 int ECDSA_verify(int type, const unsigned char *dgst, int dgstlen, 1268 const unsigned char *sig, int siglen, EC_KEY *eckey); 1445 OSSL_DEPRECATEDIN_3_0 int ECDSA_verify(int type, const unsigned char *dgst, 1446 int dgstlen, const unsigned char *sig, 1447 int siglen, EC_KEY *eckey); 1269 1448 1270 1449 /** Returns the maximum length of the DER encoded signature … … 1272 1451 * \return numbers of bytes required for the DER encoded signature 1273 1452 */ 1274 int ECDSA_size(const EC_KEY *eckey);1453 OSSL_DEPRECATEDIN_3_0 int ECDSA_size(const EC_KEY *eckey); 1275 1454 1276 1455 /********************************************************************/ … … 1278 1457 /********************************************************************/ 1279 1458 1280 EC_KEY_METHOD *EC_KEY_METHOD_new(const EC_KEY_METHOD *meth); 1281 void EC_KEY_METHOD_free(EC_KEY_METHOD *meth); 1282 void EC_KEY_METHOD_set_init(EC_KEY_METHOD *meth, 1283 int (*init)(EC_KEY *key), 1284 void (*finish)(EC_KEY *key), 1285 int (*copy)(EC_KEY *dest, const EC_KEY *src), 1286 int (*set_group)(EC_KEY *key, const EC_GROUP *grp), 1287 int (*set_private)(EC_KEY *key, 1288 const BIGNUM *priv_key), 1289 int (*set_public)(EC_KEY *key, 1290 const EC_POINT *pub_key)); 1291 1292 void EC_KEY_METHOD_set_keygen(EC_KEY_METHOD *meth, 1293 int (*keygen)(EC_KEY *key)); 1294 1295 void EC_KEY_METHOD_set_compute_key(EC_KEY_METHOD *meth, 1296 int (*ckey)(unsigned char **psec, 1297 size_t *pseclen, 1298 const EC_POINT *pub_key, 1299 const EC_KEY *ecdh)); 1300 1301 void EC_KEY_METHOD_set_sign(EC_KEY_METHOD *meth, 1302 int (*sign)(int type, const unsigned char *dgst, 1303 int dlen, unsigned char *sig, 1304 unsigned int *siglen, 1305 const BIGNUM *kinv, const BIGNUM *r, 1306 EC_KEY *eckey), 1307 int (*sign_setup)(EC_KEY *eckey, BN_CTX *ctx_in, 1308 BIGNUM **kinvp, BIGNUM **rp), 1309 ECDSA_SIG *(*sign_sig)(const unsigned char *dgst, 1310 int dgst_len, 1311 const BIGNUM *in_kinv, 1312 const BIGNUM *in_r, 1313 EC_KEY *eckey)); 1314 1315 void EC_KEY_METHOD_set_verify(EC_KEY_METHOD *meth, 1316 int (*verify)(int type, const unsigned 1317 char *dgst, int dgst_len, 1318 const unsigned char *sigbuf, 1319 int sig_len, EC_KEY *eckey), 1320 int (*verify_sig)(const unsigned char *dgst, 1459 OSSL_DEPRECATEDIN_3_0 EC_KEY_METHOD *EC_KEY_METHOD_new(const EC_KEY_METHOD *meth); 1460 OSSL_DEPRECATEDIN_3_0 void EC_KEY_METHOD_free(EC_KEY_METHOD *meth); 1461 OSSL_DEPRECATEDIN_3_0 void EC_KEY_METHOD_set_init 1462 (EC_KEY_METHOD *meth, 1463 int (*init)(EC_KEY *key), 1464 void (*finish)(EC_KEY *key), 1465 int (*copy)(EC_KEY *dest, const EC_KEY *src), 1466 int (*set_group)(EC_KEY *key, const EC_GROUP *grp), 1467 int (*set_private)(EC_KEY *key, const BIGNUM *priv_key), 1468 int (*set_public)(EC_KEY *key, const EC_POINT *pub_key)); 1469 1470 OSSL_DEPRECATEDIN_3_0 void EC_KEY_METHOD_set_keygen(EC_KEY_METHOD *meth, 1471 int (*keygen)(EC_KEY *key)); 1472 1473 OSSL_DEPRECATEDIN_3_0 void EC_KEY_METHOD_set_compute_key 1474 (EC_KEY_METHOD *meth, 1475 int (*ckey)(unsigned char **psec, size_t *pseclen, 1476 const EC_POINT *pub_key, const EC_KEY *ecdh)); 1477 1478 OSSL_DEPRECATEDIN_3_0 void EC_KEY_METHOD_set_sign 1479 (EC_KEY_METHOD *meth, 1480 int (*sign)(int type, const unsigned char *dgst, 1481 int dlen, unsigned char *sig, 1482 unsigned int *siglen, 1483 const BIGNUM *kinv, const BIGNUM *r, 1484 EC_KEY *eckey), 1485 int (*sign_setup)(EC_KEY *eckey, BN_CTX *ctx_in, 1486 BIGNUM **kinvp, BIGNUM **rp), 1487 ECDSA_SIG *(*sign_sig)(const unsigned char *dgst, 1488 int dgst_len, 1489 const BIGNUM *in_kinv, 1490 const BIGNUM *in_r, 1491 EC_KEY *eckey)); 1492 1493 OSSL_DEPRECATEDIN_3_0 void EC_KEY_METHOD_set_verify 1494 (EC_KEY_METHOD *meth, 1495 int (*verify)(int type, const unsigned 1496 char *dgst, int dgst_len, 1497 const unsigned char *sigbuf, 1498 int sig_len, EC_KEY *eckey), 1499 int (*verify_sig)(const unsigned char *dgst, 1500 int dgst_len, const ECDSA_SIG *sig, 1501 EC_KEY *eckey)); 1502 1503 OSSL_DEPRECATEDIN_3_0 void EC_KEY_METHOD_get_init 1504 (const EC_KEY_METHOD *meth, 1505 int (**pinit)(EC_KEY *key), 1506 void (**pfinish)(EC_KEY *key), 1507 int (**pcopy)(EC_KEY *dest, const EC_KEY *src), 1508 int (**pset_group)(EC_KEY *key, const EC_GROUP *grp), 1509 int (**pset_private)(EC_KEY *key, const BIGNUM *priv_key), 1510 int (**pset_public)(EC_KEY *key, const EC_POINT *pub_key)); 1511 1512 OSSL_DEPRECATEDIN_3_0 void EC_KEY_METHOD_get_keygen 1513 (const EC_KEY_METHOD *meth, int (**pkeygen)(EC_KEY *key)); 1514 1515 OSSL_DEPRECATEDIN_3_0 void EC_KEY_METHOD_get_compute_key 1516 (const EC_KEY_METHOD *meth, 1517 int (**pck)(unsigned char **psec, 1518 size_t *pseclen, 1519 const EC_POINT *pub_key, 1520 const EC_KEY *ecdh)); 1521 1522 OSSL_DEPRECATEDIN_3_0 void EC_KEY_METHOD_get_sign 1523 (const EC_KEY_METHOD *meth, 1524 int (**psign)(int type, const unsigned char *dgst, 1525 int dlen, unsigned char *sig, 1526 unsigned int *siglen, 1527 const BIGNUM *kinv, const BIGNUM *r, 1528 EC_KEY *eckey), 1529 int (**psign_setup)(EC_KEY *eckey, BN_CTX *ctx_in, 1530 BIGNUM **kinvp, BIGNUM **rp), 1531 ECDSA_SIG *(**psign_sig)(const unsigned char *dgst, 1321 1532 int dgst_len, 1322 const ECDSA_SIG *sig, 1533 const BIGNUM *in_kinv, 1534 const BIGNUM *in_r, 1323 1535 EC_KEY *eckey)); 1324 1536 1325 void EC_KEY_METHOD_get_init(const EC_KEY_METHOD *meth, 1326 int (**pinit)(EC_KEY *key), 1327 void (**pfinish)(EC_KEY *key), 1328 int (**pcopy)(EC_KEY *dest, const EC_KEY *src), 1329 int (**pset_group)(EC_KEY *key, 1330 const EC_GROUP *grp), 1331 int (**pset_private)(EC_KEY *key, 1332 const BIGNUM *priv_key), 1333 int (**pset_public)(EC_KEY *key, 1334 const EC_POINT *pub_key)); 1335 1336 void EC_KEY_METHOD_get_keygen(const EC_KEY_METHOD *meth, 1337 int (**pkeygen)(EC_KEY *key)); 1338 1339 void EC_KEY_METHOD_get_compute_key(const EC_KEY_METHOD *meth, 1340 int (**pck)(unsigned char **psec, 1341 size_t *pseclen, 1342 const EC_POINT *pub_key, 1343 const EC_KEY *ecdh)); 1344 1345 void EC_KEY_METHOD_get_sign(const EC_KEY_METHOD *meth, 1346 int (**psign)(int type, const unsigned char *dgst, 1347 int dlen, unsigned char *sig, 1348 unsigned int *siglen, 1349 const BIGNUM *kinv, const BIGNUM *r, 1350 EC_KEY *eckey), 1351 int (**psign_setup)(EC_KEY *eckey, BN_CTX *ctx_in, 1352 BIGNUM **kinvp, BIGNUM **rp), 1353 ECDSA_SIG *(**psign_sig)(const unsigned char *dgst, 1354 int dgst_len, 1355 const BIGNUM *in_kinv, 1356 const BIGNUM *in_r, 1357 EC_KEY *eckey)); 1358 1359 void EC_KEY_METHOD_get_verify(const EC_KEY_METHOD *meth, 1360 int (**pverify)(int type, const unsigned 1361 char *dgst, int dgst_len, 1362 const unsigned char *sigbuf, 1363 int sig_len, EC_KEY *eckey), 1364 int (**pverify_sig)(const unsigned char *dgst, 1365 int dgst_len, 1366 const ECDSA_SIG *sig, 1367 EC_KEY *eckey)); 1368 1369 # define ECParameters_dup(x) ASN1_dup_of(EC_KEY,i2d_ECParameters,d2i_ECParameters,x) 1370 1371 # ifndef __cplusplus 1372 # if defined(__SUNPRO_C) 1373 # if __SUNPRO_C >= 0x520 1374 # pragma error_messages (default,E_ARRAY_OF_INCOMPLETE_NONAME,E_ARRAY_OF_INCOMPLETE) 1537 OSSL_DEPRECATEDIN_3_0 void EC_KEY_METHOD_get_verify 1538 (const EC_KEY_METHOD *meth, 1539 int (**pverify)(int type, const unsigned 1540 char *dgst, int dgst_len, 1541 const unsigned char *sigbuf, 1542 int sig_len, EC_KEY *eckey), 1543 int (**pverify_sig)(const unsigned char *dgst, 1544 int dgst_len, 1545 const ECDSA_SIG *sig, 1546 EC_KEY *eckey)); 1547 # endif /* OPENSSL_NO_DEPRECATED_3_0 */ 1548 1549 # define EVP_EC_gen(curve) \ 1550 EVP_PKEY_Q_keygen(NULL, NULL, "EC", (char *)(strstr(curve, ""))) 1551 # define ECParameters_dup(x) ASN1_dup_of(EC_KEY, i2d_ECParameters, \ 1552 d2i_ECParameters, x) 1553 1554 # ifndef __cplusplus 1555 # if defined(__SUNPRO_C) 1556 # if __SUNPRO_C >= 0x520 1557 # pragma error_messages (default,E_ARRAY_OF_INCOMPLETE_NONAME,E_ARRAY_OF_INCOMPLETE) 1558 # endif 1375 1559 # endif 1376 1560 # endif 1561 1377 1562 # endif 1378 1379 # define EVP_PKEY_CTX_set_ec_paramgen_curve_nid(ctx, nid) \ 1380 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ 1381 EVP_PKEY_OP_PARAMGEN|EVP_PKEY_OP_KEYGEN, \ 1382 EVP_PKEY_CTRL_EC_PARAMGEN_CURVE_NID, nid, NULL) 1383 1384 # define EVP_PKEY_CTX_set_ec_param_enc(ctx, flag) \ 1385 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ 1386 EVP_PKEY_OP_PARAMGEN|EVP_PKEY_OP_KEYGEN, \ 1387 EVP_PKEY_CTRL_EC_PARAM_ENC, flag, NULL) 1388 1389 # define EVP_PKEY_CTX_set_ecdh_cofactor_mode(ctx, flag) \ 1390 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ 1391 EVP_PKEY_OP_DERIVE, \ 1392 EVP_PKEY_CTRL_EC_ECDH_COFACTOR, flag, NULL) 1393 1394 # define EVP_PKEY_CTX_get_ecdh_cofactor_mode(ctx) \ 1395 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ 1396 EVP_PKEY_OP_DERIVE, \ 1397 EVP_PKEY_CTRL_EC_ECDH_COFACTOR, -2, NULL) 1398 1399 # define EVP_PKEY_CTX_set_ecdh_kdf_type(ctx, kdf) \ 1400 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ 1401 EVP_PKEY_OP_DERIVE, \ 1402 EVP_PKEY_CTRL_EC_KDF_TYPE, kdf, NULL) 1403 1404 # define EVP_PKEY_CTX_get_ecdh_kdf_type(ctx) \ 1405 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ 1406 EVP_PKEY_OP_DERIVE, \ 1407 EVP_PKEY_CTRL_EC_KDF_TYPE, -2, NULL) 1408 1409 # define EVP_PKEY_CTX_set_ecdh_kdf_md(ctx, md) \ 1410 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ 1411 EVP_PKEY_OP_DERIVE, \ 1412 EVP_PKEY_CTRL_EC_KDF_MD, 0, (void *)(md)) 1413 1414 # define EVP_PKEY_CTX_get_ecdh_kdf_md(ctx, pmd) \ 1415 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ 1416 EVP_PKEY_OP_DERIVE, \ 1417 EVP_PKEY_CTRL_GET_EC_KDF_MD, 0, (void *)(pmd)) 1418 1419 # define EVP_PKEY_CTX_set_ecdh_kdf_outlen(ctx, len) \ 1420 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ 1421 EVP_PKEY_OP_DERIVE, \ 1422 EVP_PKEY_CTRL_EC_KDF_OUTLEN, len, NULL) 1423 1424 # define EVP_PKEY_CTX_get_ecdh_kdf_outlen(ctx, plen) \ 1425 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ 1426 EVP_PKEY_OP_DERIVE, \ 1427 EVP_PKEY_CTRL_GET_EC_KDF_OUTLEN, 0, \ 1428 (void *)(plen)) 1429 1430 # define EVP_PKEY_CTX_set0_ecdh_kdf_ukm(ctx, p, plen) \ 1431 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ 1432 EVP_PKEY_OP_DERIVE, \ 1433 EVP_PKEY_CTRL_EC_KDF_UKM, plen, (void *)(p)) 1434 1435 # define EVP_PKEY_CTX_get0_ecdh_kdf_ukm(ctx, p) \ 1436 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_EC, \ 1437 EVP_PKEY_OP_DERIVE, \ 1438 EVP_PKEY_CTRL_GET_EC_KDF_UKM, 0, (void *)(p)) 1439 1440 /* SM2 will skip the operation check so no need to pass operation here */ 1441 # define EVP_PKEY_CTX_set1_id(ctx, id, id_len) \ 1442 EVP_PKEY_CTX_ctrl(ctx, -1, -1, \ 1443 EVP_PKEY_CTRL_SET1_ID, (int)id_len, (void*)(id)) 1444 1445 # define EVP_PKEY_CTX_get1_id(ctx, id) \ 1446 EVP_PKEY_CTX_ctrl(ctx, -1, -1, \ 1447 EVP_PKEY_CTRL_GET1_ID, 0, (void*)(id)) 1448 1449 # define EVP_PKEY_CTX_get1_id_len(ctx, id_len) \ 1450 EVP_PKEY_CTX_ctrl(ctx, -1, -1, \ 1451 EVP_PKEY_CTRL_GET1_ID_LEN, 0, (void*)(id_len)) 1452 1453 # define EVP_PKEY_CTRL_EC_PARAMGEN_CURVE_NID (EVP_PKEY_ALG_CTRL + 1) 1454 # define EVP_PKEY_CTRL_EC_PARAM_ENC (EVP_PKEY_ALG_CTRL + 2) 1455 # define EVP_PKEY_CTRL_EC_ECDH_COFACTOR (EVP_PKEY_ALG_CTRL + 3) 1456 # define EVP_PKEY_CTRL_EC_KDF_TYPE (EVP_PKEY_ALG_CTRL + 4) 1457 # define EVP_PKEY_CTRL_EC_KDF_MD (EVP_PKEY_ALG_CTRL + 5) 1458 # define EVP_PKEY_CTRL_GET_EC_KDF_MD (EVP_PKEY_ALG_CTRL + 6) 1459 # define EVP_PKEY_CTRL_EC_KDF_OUTLEN (EVP_PKEY_ALG_CTRL + 7) 1460 # define EVP_PKEY_CTRL_GET_EC_KDF_OUTLEN (EVP_PKEY_ALG_CTRL + 8) 1461 # define EVP_PKEY_CTRL_EC_KDF_UKM (EVP_PKEY_ALG_CTRL + 9) 1462 # define EVP_PKEY_CTRL_GET_EC_KDF_UKM (EVP_PKEY_ALG_CTRL + 10) 1463 # define EVP_PKEY_CTRL_SET1_ID (EVP_PKEY_ALG_CTRL + 11) 1464 # define EVP_PKEY_CTRL_GET1_ID (EVP_PKEY_ALG_CTRL + 12) 1465 # define EVP_PKEY_CTRL_GET1_ID_LEN (EVP_PKEY_ALG_CTRL + 13) 1466 /* KDF types */ 1467 # define EVP_PKEY_ECDH_KDF_NONE 1 1468 # define EVP_PKEY_ECDH_KDF_X9_63 2 1469 /** The old name for EVP_PKEY_ECDH_KDF_X9_63 1470 * The ECDH KDF specification has been mistakingly attributed to ANSI X9.62, 1471 * it is actually specified in ANSI X9.63. 1472 * This identifier is retained for backwards compatibility 1473 */ 1474 # define EVP_PKEY_ECDH_KDF_X9_62 EVP_PKEY_ECDH_KDF_X9_63 1475 1476 1477 # ifdef __cplusplus 1563 # ifdef __cplusplus 1478 1564 } 1479 # endif1480 1565 # endif 1481 1566 #endif -
trunk/src/libs/openssl-3.0.1/include/openssl/ecdh.h
r91772 r94082 2 2 * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at -
trunk/src/libs/openssl-3.0.1/include/openssl/ecdsa.h
r91772 r94082 2 2 * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at -
trunk/src/libs/openssl-3.0.1/include/openssl/ecerr.h
r91772 r94082 1 1 /* 2 2 * Generated by util/mkerr.pl DO NOT EDIT 3 * Copyright 1995-202 0The OpenSSL Project Authors. All Rights Reserved.3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 4 * 5 * Licensed under the OpenSSL license(the "License"). You may not use5 * Licensed under the Apache License 2.0 (the "License"). You may not use 6 6 * this file except in compliance with the License. You can obtain a copy 7 7 * in the file LICENSE in the source distribution or at … … 9 9 */ 10 10 11 #ifndef HEADER_ECERR_H 12 # define HEADER_ECERR_H 13 14 # ifndef HEADER_SYMHACKS_H 15 # include <openssl/symhacks.h> 16 # endif 11 #ifndef OPENSSL_ECERR_H 12 # define OPENSSL_ECERR_H 13 # pragma once 17 14 18 15 # include <openssl/opensslconf.h> 16 # include <openssl/symhacks.h> 17 # include <openssl/cryptoerr_legacy.h> 18 19 19 20 20 # ifndef OPENSSL_NO_EC 21 21 22 # ifdef __cplusplus23 extern "C"24 # endif25 int ERR_load_EC_strings(void);26 27 /*28 * EC function codes.29 */30 # define EC_F_BN_TO_FELEM 22431 # define EC_F_D2I_ECPARAMETERS 14432 # define EC_F_D2I_ECPKPARAMETERS 14533 # define EC_F_D2I_ECPRIVATEKEY 14634 # define EC_F_DO_EC_KEY_PRINT 22135 # define EC_F_ECDH_CMS_DECRYPT 23836 # define EC_F_ECDH_CMS_SET_SHARED_INFO 23937 # define EC_F_ECDH_COMPUTE_KEY 24638 # define EC_F_ECDH_SIMPLE_COMPUTE_KEY 25739 # define EC_F_ECDSA_DO_SIGN_EX 25140 # define EC_F_ECDSA_DO_VERIFY 25241 # define EC_F_ECDSA_SIGN_EX 25442 # define EC_F_ECDSA_SIGN_SETUP 24843 # define EC_F_ECDSA_SIG_NEW 26544 # define EC_F_ECDSA_VERIFY 25345 # define EC_F_ECD_ITEM_VERIFY 27046 # define EC_F_ECKEY_PARAM2TYPE 22347 # define EC_F_ECKEY_PARAM_DECODE 21248 # define EC_F_ECKEY_PRIV_DECODE 21349 # define EC_F_ECKEY_PRIV_ENCODE 21450 # define EC_F_ECKEY_PUB_DECODE 21551 # define EC_F_ECKEY_PUB_ENCODE 21652 # define EC_F_ECKEY_TYPE2PARAM 22053 # define EC_F_ECPARAMETERS_PRINT 14754 # define EC_F_ECPARAMETERS_PRINT_FP 14855 # define EC_F_ECPKPARAMETERS_PRINT 14956 # define EC_F_ECPKPARAMETERS_PRINT_FP 15057 # define EC_F_ECP_NISTZ256_GET_AFFINE 24058 # define EC_F_ECP_NISTZ256_INV_MOD_ORD 27559 # define EC_F_ECP_NISTZ256_MULT_PRECOMPUTE 24360 # define EC_F_ECP_NISTZ256_POINTS_MUL 24161 # define EC_F_ECP_NISTZ256_PRE_COMP_NEW 24462 # define EC_F_ECP_NISTZ256_WINDOWED_MUL 24263 # define EC_F_ECX_KEY_OP 26664 # define EC_F_ECX_PRIV_ENCODE 26765 # define EC_F_ECX_PUB_ENCODE 26866 # define EC_F_EC_ASN1_GROUP2CURVE 15367 # define EC_F_EC_ASN1_GROUP2FIELDID 15468 # define EC_F_EC_GF2M_MONTGOMERY_POINT_MULTIPLY 20869 # define EC_F_EC_GF2M_SIMPLE_FIELD_INV 29670 # define EC_F_EC_GF2M_SIMPLE_GROUP_CHECK_DISCRIMINANT 15971 # define EC_F_EC_GF2M_SIMPLE_GROUP_SET_CURVE 19572 # define EC_F_EC_GF2M_SIMPLE_LADDER_POST 28573 # define EC_F_EC_GF2M_SIMPLE_LADDER_PRE 28874 # define EC_F_EC_GF2M_SIMPLE_OCT2POINT 16075 # define EC_F_EC_GF2M_SIMPLE_POINT2OCT 16176 # define EC_F_EC_GF2M_SIMPLE_POINTS_MUL 28977 # define EC_F_EC_GF2M_SIMPLE_POINT_GET_AFFINE_COORDINATES 16278 # define EC_F_EC_GF2M_SIMPLE_POINT_SET_AFFINE_COORDINATES 16379 # define EC_F_EC_GF2M_SIMPLE_SET_COMPRESSED_COORDINATES 16480 # define EC_F_EC_GFP_MONT_FIELD_DECODE 13381 # define EC_F_EC_GFP_MONT_FIELD_ENCODE 13482 # define EC_F_EC_GFP_MONT_FIELD_INV 29783 # define EC_F_EC_GFP_MONT_FIELD_MUL 13184 # define EC_F_EC_GFP_MONT_FIELD_SET_TO_ONE 20985 # define EC_F_EC_GFP_MONT_FIELD_SQR 13286 # define EC_F_EC_GFP_MONT_GROUP_SET_CURVE 18987 # define EC_F_EC_GFP_NISTP224_GROUP_SET_CURVE 22588 # define EC_F_EC_GFP_NISTP224_POINTS_MUL 22889 # define EC_F_EC_GFP_NISTP224_POINT_GET_AFFINE_COORDINATES 22690 # define EC_F_EC_GFP_NISTP256_GROUP_SET_CURVE 23091 # define EC_F_EC_GFP_NISTP256_POINTS_MUL 23192 # define EC_F_EC_GFP_NISTP256_POINT_GET_AFFINE_COORDINATES 23293 # define EC_F_EC_GFP_NISTP521_GROUP_SET_CURVE 23394 # define EC_F_EC_GFP_NISTP521_POINTS_MUL 23495 # define EC_F_EC_GFP_NISTP521_POINT_GET_AFFINE_COORDINATES 23596 # define EC_F_EC_GFP_NIST_FIELD_MUL 20097 # define EC_F_EC_GFP_NIST_FIELD_SQR 20198 # define EC_F_EC_GFP_NIST_GROUP_SET_CURVE 20299 # define EC_F_EC_GFP_SIMPLE_BLIND_COORDINATES 287100 # define EC_F_EC_GFP_SIMPLE_FIELD_INV 298101 # define EC_F_EC_GFP_SIMPLE_GROUP_CHECK_DISCRIMINANT 165102 # define EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE 166103 # define EC_F_EC_GFP_SIMPLE_MAKE_AFFINE 102104 # define EC_F_EC_GFP_SIMPLE_OCT2POINT 103105 # define EC_F_EC_GFP_SIMPLE_POINT2OCT 104106 # define EC_F_EC_GFP_SIMPLE_POINTS_MAKE_AFFINE 137107 # define EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES 167108 # define EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES 168109 # define EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES 169110 # define EC_F_EC_GROUP_CHECK 170111 # define EC_F_EC_GROUP_CHECK_DISCRIMINANT 171112 # define EC_F_EC_GROUP_COPY 106113 # define EC_F_EC_GROUP_GET_CURVE 291114 # define EC_F_EC_GROUP_GET_CURVE_GF2M 172115 # define EC_F_EC_GROUP_GET_CURVE_GFP 130116 # define EC_F_EC_GROUP_GET_DEGREE 173117 # define EC_F_EC_GROUP_GET_ECPARAMETERS 261118 # define EC_F_EC_GROUP_GET_ECPKPARAMETERS 262119 # define EC_F_EC_GROUP_GET_PENTANOMIAL_BASIS 193120 # define EC_F_EC_GROUP_GET_TRINOMIAL_BASIS 194121 # define EC_F_EC_GROUP_NEW 108122 # define EC_F_EC_GROUP_NEW_BY_CURVE_NAME 174123 # define EC_F_EC_GROUP_NEW_FROM_DATA 175124 # define EC_F_EC_GROUP_NEW_FROM_ECPARAMETERS 263125 # define EC_F_EC_GROUP_NEW_FROM_ECPKPARAMETERS 264126 # define EC_F_EC_GROUP_SET_CURVE 292127 # define EC_F_EC_GROUP_SET_CURVE_GF2M 176128 # define EC_F_EC_GROUP_SET_CURVE_GFP 109129 # define EC_F_EC_GROUP_SET_GENERATOR 111130 # define EC_F_EC_GROUP_SET_SEED 286131 # define EC_F_EC_KEY_CHECK_KEY 177132 # define EC_F_EC_KEY_COPY 178133 # define EC_F_EC_KEY_GENERATE_KEY 179134 # define EC_F_EC_KEY_NEW 182135 # define EC_F_EC_KEY_NEW_METHOD 245136 # define EC_F_EC_KEY_OCT2PRIV 255137 # define EC_F_EC_KEY_PRINT 180138 # define EC_F_EC_KEY_PRINT_FP 181139 # define EC_F_EC_KEY_PRIV2BUF 279140 # define EC_F_EC_KEY_PRIV2OCT 256141 # define EC_F_EC_KEY_SET_PUBLIC_KEY_AFFINE_COORDINATES 229142 # define EC_F_EC_KEY_SIMPLE_CHECK_KEY 258143 # define EC_F_EC_KEY_SIMPLE_OCT2PRIV 259144 # define EC_F_EC_KEY_SIMPLE_PRIV2OCT 260145 # define EC_F_EC_PKEY_CHECK 273146 # define EC_F_EC_PKEY_PARAM_CHECK 274147 # define EC_F_EC_POINTS_MAKE_AFFINE 136148 # define EC_F_EC_POINTS_MUL 290149 # define EC_F_EC_POINT_ADD 112150 # define EC_F_EC_POINT_BN2POINT 280151 # define EC_F_EC_POINT_CMP 113152 # define EC_F_EC_POINT_COPY 114153 # define EC_F_EC_POINT_DBL 115154 # define EC_F_EC_POINT_GET_AFFINE_COORDINATES 293155 # define EC_F_EC_POINT_GET_AFFINE_COORDINATES_GF2M 183156 # define EC_F_EC_POINT_GET_AFFINE_COORDINATES_GFP 116157 # define EC_F_EC_POINT_GET_JPROJECTIVE_COORDINATES_GFP 117158 # define EC_F_EC_POINT_INVERT 210159 # define EC_F_EC_POINT_IS_AT_INFINITY 118160 # define EC_F_EC_POINT_IS_ON_CURVE 119161 # define EC_F_EC_POINT_MAKE_AFFINE 120162 # define EC_F_EC_POINT_NEW 121163 # define EC_F_EC_POINT_OCT2POINT 122164 # define EC_F_EC_POINT_POINT2BUF 281165 # define EC_F_EC_POINT_POINT2OCT 123166 # define EC_F_EC_POINT_SET_AFFINE_COORDINATES 294167 # define EC_F_EC_POINT_SET_AFFINE_COORDINATES_GF2M 185168 # define EC_F_EC_POINT_SET_AFFINE_COORDINATES_GFP 124169 # define EC_F_EC_POINT_SET_COMPRESSED_COORDINATES 295170 # define EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GF2M 186171 # define EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GFP 125172 # define EC_F_EC_POINT_SET_JPROJECTIVE_COORDINATES_GFP 126173 # define EC_F_EC_POINT_SET_TO_INFINITY 127174 # define EC_F_EC_PRE_COMP_NEW 196175 # define EC_F_EC_SCALAR_MUL_LADDER 284176 # define EC_F_EC_WNAF_MUL 187177 # define EC_F_EC_WNAF_PRECOMPUTE_MULT 188178 # define EC_F_I2D_ECPARAMETERS 190179 # define EC_F_I2D_ECPKPARAMETERS 191180 # define EC_F_I2D_ECPRIVATEKEY 192181 # define EC_F_I2O_ECPUBLICKEY 151182 # define EC_F_NISTP224_PRE_COMP_NEW 227183 # define EC_F_NISTP256_PRE_COMP_NEW 236184 # define EC_F_NISTP521_PRE_COMP_NEW 237185 # define EC_F_O2I_ECPUBLICKEY 152186 # define EC_F_OLD_EC_PRIV_DECODE 222187 # define EC_F_OSSL_ECDH_COMPUTE_KEY 247188 # define EC_F_OSSL_ECDSA_SIGN_SIG 249189 # define EC_F_OSSL_ECDSA_VERIFY_SIG 250190 # define EC_F_PKEY_ECD_CTRL 271191 # define EC_F_PKEY_ECD_DIGESTSIGN 272192 # define EC_F_PKEY_ECD_DIGESTSIGN25519 276193 # define EC_F_PKEY_ECD_DIGESTSIGN448 277194 # define EC_F_PKEY_ECX_DERIVE 269195 # define EC_F_PKEY_EC_CTRL 197196 # define EC_F_PKEY_EC_CTRL_STR 198197 # define EC_F_PKEY_EC_DERIVE 217198 # define EC_F_PKEY_EC_INIT 282199 # define EC_F_PKEY_EC_KDF_DERIVE 283200 # define EC_F_PKEY_EC_KEYGEN 199201 # define EC_F_PKEY_EC_PARAMGEN 219202 # define EC_F_PKEY_EC_SIGN 218203 # define EC_F_VALIDATE_ECX_DERIVE 278204 22 205 23 /* … … 213 31 # define EC_R_COORDINATES_OUT_OF_RANGE 146 214 32 # define EC_R_CURVE_DOES_NOT_SUPPORT_ECDH 160 33 # define EC_R_CURVE_DOES_NOT_SUPPORT_ECDSA 170 215 34 # define EC_R_CURVE_DOES_NOT_SUPPORT_SIGNING 159 216 # define EC_R_D2I_ECPKPARAMETERS_FAILURE 117217 35 # define EC_R_DECODE_ERROR 142 218 36 # define EC_R_DISCRIMINANT_IS_ZERO 118 219 37 # define EC_R_EC_GROUP_NEW_BY_NAME_FAILURE 119 38 # define EC_R_FAILED_MAKING_PUBLIC_KEY 166 220 39 # define EC_R_FIELD_TOO_LARGE 143 221 40 # define EC_R_GF2M_NOT_SUPPORTED 147 … … 223 42 # define EC_R_I2D_ECPKPARAMETERS_FAILURE 121 224 43 # define EC_R_INCOMPATIBLE_OBJECTS 101 44 # define EC_R_INVALID_A 168 225 45 # define EC_R_INVALID_ARGUMENT 112 46 # define EC_R_INVALID_B 169 47 # define EC_R_INVALID_COFACTOR 171 226 48 # define EC_R_INVALID_COMPRESSED_POINT 110 227 49 # define EC_R_INVALID_COMPRESSION_BIT 109 … … 232 54 # define EC_R_INVALID_FIELD 103 233 55 # define EC_R_INVALID_FORM 104 56 # define EC_R_INVALID_GENERATOR 173 234 57 # define EC_R_INVALID_GROUP_ORDER 122 235 58 # define EC_R_INVALID_KEY 116 59 # define EC_R_INVALID_LENGTH 117 60 # define EC_R_INVALID_NAMED_GROUP_CONVERSION 174 236 61 # define EC_R_INVALID_OUTPUT_LENGTH 161 62 # define EC_R_INVALID_P 172 237 63 # define EC_R_INVALID_PEER_KEY 133 238 64 # define EC_R_INVALID_PENTANOMIAL_BASIS 132 239 65 # define EC_R_INVALID_PRIVATE_KEY 123 66 # define EC_R_INVALID_SEED 175 240 67 # define EC_R_INVALID_TRINOMIAL_BASIS 137 241 68 # define EC_R_KDF_PARAMETER_ERROR 148 … … 256 83 # define EC_R_PASSED_NULL_PARAMETER 134 257 84 # define EC_R_PEER_KEY_ERROR 149 258 # define EC_R_PKPARAMETERS2GROUP_FAILURE 127259 85 # define EC_R_POINT_ARITHMETIC_FAILURE 155 260 86 # define EC_R_POINT_AT_INFINITY 106 -
trunk/src/libs/openssl-3.0.1/include/openssl/engine.h
r91772 r94082 1 1 /* 2 * Copyright 2000-20 18The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved. 3 3 * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved 4 4 * 5 * Licensed under the OpenSSL license(the "License"). You may not use5 * Licensed under the Apache License 2.0 (the "License"). You may not use 6 6 * this file except in compliance with the License. You can obtain a copy 7 7 * in the file LICENSE in the source distribution or at … … 9 9 */ 10 10 11 #ifndef HEADER_ENGINE_H 12 # define HEADER_ENGINE_H 11 #ifndef OPENSSL_ENGINE_H 12 # define OPENSSL_ENGINE_H 13 # pragma once 14 15 # include <openssl/macros.h> 16 # ifndef OPENSSL_NO_DEPRECATED_3_0 17 # define HEADER_ENGINE_H 18 # endif 13 19 14 20 # include <openssl/opensslconf.h> 15 21 16 22 # ifndef OPENSSL_NO_ENGINE 17 # if OPENSSL_API_COMPAT < 0x10100000L18 # include <openssl/bn.h>19 # include <openssl/rsa.h>20 # include <openssl/dsa.h>21 # include <openssl/dh.h>22 # include <openssl/ec.h>23 # include <openssl/rand.h>24 # include <openssl/ui.h>25 # include <openssl/err.h>26 # endif27 # include <openssl/ossl_typ.h>28 # include <openssl/symhacks.h>29 # include <openssl/x509.h>30 # include <openssl/engineerr.h>31 # ifdef __cplusplus23 # ifndef OPENSSL_NO_DEPRECATED_1_1_0 24 # include <openssl/bn.h> 25 # include <openssl/rsa.h> 26 # include <openssl/dsa.h> 27 # include <openssl/dh.h> 28 # include <openssl/ec.h> 29 # include <openssl/rand.h> 30 # include <openssl/ui.h> 31 # include <openssl/err.h> 32 # endif 33 # include <openssl/types.h> 34 # include <openssl/symhacks.h> 35 # include <openssl/x509.h> 36 # include <openssl/engineerr.h> 37 # ifdef __cplusplus 32 38 extern "C" { 33 # endif39 # endif 34 40 35 41 /* … … 37 43 * bitwise "OR"ing. 38 44 */ 39 # define ENGINE_METHOD_RSA (unsigned int)0x000140 # define ENGINE_METHOD_DSA (unsigned int)0x000241 # define ENGINE_METHOD_DH (unsigned int)0x000442 # define ENGINE_METHOD_RAND (unsigned int)0x000843 # define ENGINE_METHOD_CIPHERS (unsigned int)0x004044 # define ENGINE_METHOD_DIGESTS (unsigned int)0x008045 # define ENGINE_METHOD_PKEY_METHS (unsigned int)0x020046 # define ENGINE_METHOD_PKEY_ASN1_METHS (unsigned int)0x040047 # define ENGINE_METHOD_EC (unsigned int)0x080045 # define ENGINE_METHOD_RSA (unsigned int)0x0001 46 # define ENGINE_METHOD_DSA (unsigned int)0x0002 47 # define ENGINE_METHOD_DH (unsigned int)0x0004 48 # define ENGINE_METHOD_RAND (unsigned int)0x0008 49 # define ENGINE_METHOD_CIPHERS (unsigned int)0x0040 50 # define ENGINE_METHOD_DIGESTS (unsigned int)0x0080 51 # define ENGINE_METHOD_PKEY_METHS (unsigned int)0x0200 52 # define ENGINE_METHOD_PKEY_ASN1_METHS (unsigned int)0x0400 53 # define ENGINE_METHOD_EC (unsigned int)0x0800 48 54 /* Obvious all-or-nothing cases. */ 49 # define ENGINE_METHOD_ALL (unsigned int)0xFFFF50 # define ENGINE_METHOD_NONE (unsigned int)0x000055 # define ENGINE_METHOD_ALL (unsigned int)0xFFFF 56 # define ENGINE_METHOD_NONE (unsigned int)0x0000 51 57 52 58 /* … … 56 62 * initialise registered ENGINEs if they are not already initialised. 57 63 */ 58 # define ENGINE_TABLE_FLAG_NOINIT (unsigned int)0x000164 # define ENGINE_TABLE_FLAG_NOINIT (unsigned int)0x0001 59 65 60 66 /* ENGINE flags that can be set by ENGINE_set_flags(). */ … … 68 74 * data. 69 75 */ 70 # define ENGINE_FLAGS_MANUAL_CMD_CTRL (int)0x000276 # define ENGINE_FLAGS_MANUAL_CMD_CTRL (int)0x0002 71 77 72 78 /* … … 80 86 * count. 81 87 */ 82 # define ENGINE_FLAGS_BY_ID_COPY (int)0x000488 # define ENGINE_FLAGS_BY_ID_COPY (int)0x0004 83 89 84 90 /* … … 88 94 */ 89 95 90 # define ENGINE_FLAGS_NO_REGISTER_ALL (int)0x000896 # define ENGINE_FLAGS_NO_REGISTER_ALL (int)0x0008 91 97 92 98 /* … … 103 109 104 110 /* accepts a 'long' input value (3rd parameter to ENGINE_ctrl) */ 105 # define ENGINE_CMD_FLAG_NUMERIC (unsigned int)0x0001111 # define ENGINE_CMD_FLAG_NUMERIC (unsigned int)0x0001 106 112 /* 107 113 * accepts string input (cast from 'void*' to 'const char *', 4th parameter 108 114 * to ENGINE_ctrl) 109 115 */ 110 # define ENGINE_CMD_FLAG_STRING (unsigned int)0x0002116 # define ENGINE_CMD_FLAG_STRING (unsigned int)0x0002 111 117 /* 112 118 * Indicates that the control command takes *no* input. Ie. the control 113 119 * command is unparameterised. 114 120 */ 115 # define ENGINE_CMD_FLAG_NO_INPUT (unsigned int)0x0004121 # define ENGINE_CMD_FLAG_NO_INPUT (unsigned int)0x0004 116 122 /* 117 123 * Indicates that the control command is internal. This control command won't … … 119 125 * function. 120 126 */ 121 # define ENGINE_CMD_FLAG_INTERNAL (unsigned int)0x0008127 # define ENGINE_CMD_FLAG_INTERNAL (unsigned int)0x0008 122 128 123 129 /* … … 138 144 * error ENGINE_R_CTRL_COMMAND_NOT_IMPLEMENTED. 139 145 */ 140 # define ENGINE_CTRL_SET_LOGSTREAM 1141 # define ENGINE_CTRL_SET_PASSWORD_CALLBACK 2142 # define ENGINE_CTRL_HUP 3/* Close and reinitialise146 # define ENGINE_CTRL_SET_LOGSTREAM 1 147 # define ENGINE_CTRL_SET_PASSWORD_CALLBACK 2 148 # define ENGINE_CTRL_HUP 3/* Close and reinitialise 143 149 * any handles/connections 144 150 * etc. */ 145 # define ENGINE_CTRL_SET_USER_INTERFACE 4/* Alternative to callback */146 # define ENGINE_CTRL_SET_CALLBACK_DATA 5/* User-specific data, used151 # define ENGINE_CTRL_SET_USER_INTERFACE 4/* Alternative to callback */ 152 # define ENGINE_CTRL_SET_CALLBACK_DATA 5/* User-specific data, used 147 153 * when calling the password 148 154 * callback and the user 149 155 * interface */ 150 # define ENGINE_CTRL_LOAD_CONFIGURATION 6/* Load a configuration,156 # define ENGINE_CTRL_LOAD_CONFIGURATION 6/* Load a configuration, 151 157 * given a string that 152 158 * represents a file name 153 159 * or so */ 154 # define ENGINE_CTRL_LOAD_SECTION 7/* Load data from a given160 # define ENGINE_CTRL_LOAD_SECTION 7/* Load data from a given 155 161 * section in the already 156 162 * loaded configuration */ … … 176 182 * engine's capabilities and doesn't want errors generated unnecessarily. 177 183 */ 178 # define ENGINE_CTRL_HAS_CTRL_FUNCTION 10184 # define ENGINE_CTRL_HAS_CTRL_FUNCTION 10 179 185 /* 180 186 * Returns a positive command number for the first command supported by the 181 187 * engine. Returns zero if no ctrl commands are supported. 182 188 */ 183 # define ENGINE_CTRL_GET_FIRST_CMD_TYPE 11189 # define ENGINE_CTRL_GET_FIRST_CMD_TYPE 11 184 190 /* 185 191 * The 'long' argument specifies a command implemented by the engine, and the 186 192 * return value is the next command supported, or zero if there are no more. 187 193 */ 188 # define ENGINE_CTRL_GET_NEXT_CMD_TYPE 12194 # define ENGINE_CTRL_GET_NEXT_CMD_TYPE 12 189 195 /* 190 196 * The 'void*' argument is a command name (cast from 'const char *'), and the 191 197 * return value is the command that corresponds to it. 192 198 */ 193 # define ENGINE_CTRL_GET_CMD_FROM_NAME 13199 # define ENGINE_CTRL_GET_CMD_FROM_NAME 13 194 200 /* 195 201 * The next two allow a command to be converted into its corresponding string … … 200 206 * command (WITH a trailing EOL). 201 207 */ 202 # define ENGINE_CTRL_GET_NAME_LEN_FROM_CMD 14203 # define ENGINE_CTRL_GET_NAME_FROM_CMD 15208 # define ENGINE_CTRL_GET_NAME_LEN_FROM_CMD 14 209 # define ENGINE_CTRL_GET_NAME_FROM_CMD 15 204 210 /* The next two are similar but give a "short description" of a command. */ 205 # define ENGINE_CTRL_GET_DESC_LEN_FROM_CMD 16206 # define ENGINE_CTRL_GET_DESC_FROM_CMD 17211 # define ENGINE_CTRL_GET_DESC_LEN_FROM_CMD 16 212 # define ENGINE_CTRL_GET_DESC_FROM_CMD 17 207 213 /* 208 214 * With this command, the return value is the OR'd combination of … … 210 216 * engine-specific ctrl command expects. 211 217 */ 212 # define ENGINE_CTRL_GET_CMD_FLAGS 18218 # define ENGINE_CTRL_GET_CMD_FLAGS 18 213 219 214 220 /* … … 216 222 * commands from this value. (ie. ENGINE_CMD_BASE, ENGINE_CMD_BASE + 1, etc). 217 223 */ 218 # define ENGINE_CMD_BASE 200224 # define ENGINE_CMD_BASE 200 219 225 220 226 /* … … 227 233 228 234 /* Flags specific to the nCipher "chil" engine */ 229 # define ENGINE_CTRL_CHIL_SET_FORKCHECK 100230 /*231 * Depending on the value of the (long)i argument, this sets or232 * unsets the SimpleForkCheck flag in the CHIL API to enable or233 * disable checking and workarounds for applications that fork().234 */235 # define ENGINE_CTRL_CHIL_NO_LOCKING 101236 /*237 * This prevents the initialisation function from providing mutex238 * callbacks to the nCipher library.239 */235 # define ENGINE_CTRL_CHIL_SET_FORKCHECK 100 236 /* 237 * Depending on the value of the (long)i argument, this sets or 238 * unsets the SimpleForkCheck flag in the CHIL API to enable or 239 * disable checking and workarounds for applications that fork(). 240 */ 241 # define ENGINE_CTRL_CHIL_NO_LOCKING 101 242 /* 243 * This prevents the initialisation function from providing mutex 244 * callbacks to the nCipher library. 245 */ 240 246 241 247 /* … … 309 315 310 316 /* Get the first/last "ENGINE" type available. */ 311 ENGINE *ENGINE_get_first(void); 312 ENGINE *ENGINE_get_last(void); 317 # ifndef OPENSSL_NO_DEPRECATED_3_0 318 OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_get_first(void); 319 OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_get_last(void); 320 # endif 313 321 /* Iterate to the next/previous "ENGINE" type (NULL = end of the list). */ 314 ENGINE *ENGINE_get_next(ENGINE *e); 315 ENGINE *ENGINE_get_prev(ENGINE *e); 322 # ifndef OPENSSL_NO_DEPRECATED_3_0 323 OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_get_next(ENGINE *e); 324 OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_get_prev(ENGINE *e); 325 # endif 316 326 /* Add another "ENGINE" type into the array. */ 317 int ENGINE_add(ENGINE *e); 327 # ifndef OPENSSL_NO_DEPRECATED_3_0 328 OSSL_DEPRECATEDIN_3_0 int ENGINE_add(ENGINE *e); 329 # endif 318 330 /* Remove an existing "ENGINE" type from the array. */ 319 int ENGINE_remove(ENGINE *e); 331 # ifndef OPENSSL_NO_DEPRECATED_3_0 332 OSSL_DEPRECATEDIN_3_0 int ENGINE_remove(ENGINE *e); 333 # endif 320 334 /* Retrieve an engine from the list by its unique "id" value. */ 321 ENGINE *ENGINE_by_id(const char *id); 322 323 #if OPENSSL_API_COMPAT < 0x10100000L 324 # define ENGINE_load_openssl() \ 325 OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_OPENSSL, NULL) 326 # define ENGINE_load_dynamic() \ 327 OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_DYNAMIC, NULL) 328 # ifndef OPENSSL_NO_STATIC_ENGINE 329 # define ENGINE_load_padlock() \ 330 OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_PADLOCK, NULL) 331 # define ENGINE_load_capi() \ 332 OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_CAPI, NULL) 333 # define ENGINE_load_afalg() \ 334 OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_AFALG, NULL) 335 # endif 336 # define ENGINE_load_cryptodev() \ 337 OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_CRYPTODEV, NULL) 338 # define ENGINE_load_rdrand() \ 339 OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_RDRAND, NULL) 340 #endif 341 void ENGINE_load_builtin_engines(void); 335 # ifndef OPENSSL_NO_DEPRECATED_3_0 336 OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_by_id(const char *id); 337 # endif 338 339 # ifndef OPENSSL_NO_DEPRECATED_1_1_0 340 # define ENGINE_load_openssl() \ 341 OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_OPENSSL, NULL) 342 # define ENGINE_load_dynamic() \ 343 OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_DYNAMIC, NULL) 344 # ifndef OPENSSL_NO_STATIC_ENGINE 345 # define ENGINE_load_padlock() \ 346 OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_PADLOCK, NULL) 347 # define ENGINE_load_capi() \ 348 OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_CAPI, NULL) 349 # define ENGINE_load_afalg() \ 350 OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_AFALG, NULL) 351 # endif 352 # define ENGINE_load_cryptodev() \ 353 OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_CRYPTODEV, NULL) 354 # define ENGINE_load_rdrand() \ 355 OPENSSL_init_crypto(OPENSSL_INIT_ENGINE_RDRAND, NULL) 356 # endif 357 # ifndef OPENSSL_NO_DEPRECATED_3_0 358 OSSL_DEPRECATEDIN_3_0 void ENGINE_load_builtin_engines(void); 359 # endif 342 360 343 361 /* … … 345 363 * "registry" handling. 346 364 */ 347 unsigned int ENGINE_get_table_flags(void); 348 void ENGINE_set_table_flags(unsigned int flags); 365 # ifndef OPENSSL_NO_DEPRECATED_3_0 366 OSSL_DEPRECATEDIN_3_0 unsigned int ENGINE_get_table_flags(void); 367 OSSL_DEPRECATEDIN_3_0 void ENGINE_set_table_flags(unsigned int flags); 368 # endif 349 369 350 370 /*- Manage registration of ENGINEs per "table". For each type, there are 3 … … 355 375 * Cleanup is automatically registered from each table when required. 356 376 */ 357 358 int ENGINE_register_RSA(ENGINE *e); 359 void ENGINE_unregister_RSA(ENGINE *e); 360 void ENGINE_register_all_RSA(void); 361 362 int ENGINE_register_DSA(ENGINE *e); 363 void ENGINE_unregister_DSA(ENGINE *e); 364 void ENGINE_register_all_DSA(void); 365 366 int ENGINE_register_EC(ENGINE *e); 367 void ENGINE_unregister_EC(ENGINE *e); 368 void ENGINE_register_all_EC(void); 369 370 int ENGINE_register_DH(ENGINE *e); 371 void ENGINE_unregister_DH(ENGINE *e); 372 void ENGINE_register_all_DH(void); 373 374 int ENGINE_register_RAND(ENGINE *e); 375 void ENGINE_unregister_RAND(ENGINE *e); 376 void ENGINE_register_all_RAND(void); 377 378 int ENGINE_register_ciphers(ENGINE *e); 379 void ENGINE_unregister_ciphers(ENGINE *e); 380 void ENGINE_register_all_ciphers(void); 381 382 int ENGINE_register_digests(ENGINE *e); 383 void ENGINE_unregister_digests(ENGINE *e); 384 void ENGINE_register_all_digests(void); 385 386 int ENGINE_register_pkey_meths(ENGINE *e); 387 void ENGINE_unregister_pkey_meths(ENGINE *e); 388 void ENGINE_register_all_pkey_meths(void); 389 390 int ENGINE_register_pkey_asn1_meths(ENGINE *e); 391 void ENGINE_unregister_pkey_asn1_meths(ENGINE *e); 392 void ENGINE_register_all_pkey_asn1_meths(void); 377 # ifndef OPENSSL_NO_DEPRECATED_3_0 378 OSSL_DEPRECATEDIN_3_0 int ENGINE_register_RSA(ENGINE *e); 379 OSSL_DEPRECATEDIN_3_0 void ENGINE_unregister_RSA(ENGINE *e); 380 OSSL_DEPRECATEDIN_3_0 void ENGINE_register_all_RSA(void); 381 OSSL_DEPRECATEDIN_3_0 int ENGINE_register_DSA(ENGINE *e); 382 OSSL_DEPRECATEDIN_3_0 void ENGINE_unregister_DSA(ENGINE *e); 383 OSSL_DEPRECATEDIN_3_0 void ENGINE_register_all_DSA(void); 384 OSSL_DEPRECATEDIN_3_0 int ENGINE_register_EC(ENGINE *e); 385 OSSL_DEPRECATEDIN_3_0 void ENGINE_unregister_EC(ENGINE *e); 386 OSSL_DEPRECATEDIN_3_0 void ENGINE_register_all_EC(void); 387 OSSL_DEPRECATEDIN_3_0 int ENGINE_register_DH(ENGINE *e); 388 OSSL_DEPRECATEDIN_3_0 void ENGINE_unregister_DH(ENGINE *e); 389 OSSL_DEPRECATEDIN_3_0 void ENGINE_register_all_DH(void); 390 OSSL_DEPRECATEDIN_3_0 int ENGINE_register_RAND(ENGINE *e); 391 OSSL_DEPRECATEDIN_3_0 void ENGINE_unregister_RAND(ENGINE *e); 392 OSSL_DEPRECATEDIN_3_0 void ENGINE_register_all_RAND(void); 393 OSSL_DEPRECATEDIN_3_0 int ENGINE_register_ciphers(ENGINE *e); 394 OSSL_DEPRECATEDIN_3_0 void ENGINE_unregister_ciphers(ENGINE *e); 395 OSSL_DEPRECATEDIN_3_0 void ENGINE_register_all_ciphers(void); 396 OSSL_DEPRECATEDIN_3_0 int ENGINE_register_digests(ENGINE *e); 397 OSSL_DEPRECATEDIN_3_0 void ENGINE_unregister_digests(ENGINE *e); 398 OSSL_DEPRECATEDIN_3_0 void ENGINE_register_all_digests(void); 399 OSSL_DEPRECATEDIN_3_0 int ENGINE_register_pkey_meths(ENGINE *e); 400 OSSL_DEPRECATEDIN_3_0 void ENGINE_unregister_pkey_meths(ENGINE *e); 401 OSSL_DEPRECATEDIN_3_0 void ENGINE_register_all_pkey_meths(void); 402 OSSL_DEPRECATEDIN_3_0 int ENGINE_register_pkey_asn1_meths(ENGINE *e); 403 OSSL_DEPRECATEDIN_3_0 void ENGINE_unregister_pkey_asn1_meths(ENGINE *e); 404 OSSL_DEPRECATEDIN_3_0 void ENGINE_register_all_pkey_asn1_meths(void); 405 # endif 393 406 394 407 /* … … 398 411 * more selective initialisation. 399 412 */ 400 int ENGINE_register_complete(ENGINE *e); 401 int ENGINE_register_all_complete(void); 413 # ifndef OPENSSL_NO_DEPRECATED_3_0 414 OSSL_DEPRECATEDIN_3_0 int ENGINE_register_complete(ENGINE *e); 415 OSSL_DEPRECATEDIN_3_0 int ENGINE_register_all_complete(void); 416 # endif 402 417 403 418 /* … … 411 426 * references in such situations. 412 427 */ 413 int ENGINE_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f) (void)); 428 # ifndef OPENSSL_NO_DEPRECATED_3_0 429 OSSL_DEPRECATEDIN_3_0 int ENGINE_ctrl(ENGINE *e, int cmd, long i, void *p, 430 void (*f) (void)); 431 # endif 414 432 415 433 /* … … 419 437 * ENGINE_ctrl_cmd_string(), only ENGINE_ctrl(). 420 438 */ 421 int ENGINE_cmd_is_executable(ENGINE *e, int cmd); 439 # ifndef OPENSSL_NO_DEPRECATED_3_0 440 OSSL_DEPRECATEDIN_3_0 int ENGINE_cmd_is_executable(ENGINE *e, int cmd); 441 # endif 422 442 423 443 /* … … 427 447 * on how to use the cmd_name and cmd_optional. 428 448 */ 429 int ENGINE_ctrl_cmd(ENGINE *e, const char *cmd_name, 430 long i, void *p, void (*f) (void), int cmd_optional); 449 # ifndef OPENSSL_NO_DEPRECATED_3_0 450 OSSL_DEPRECATEDIN_3_0 int ENGINE_ctrl_cmd(ENGINE *e, const char *cmd_name, 451 long i, void *p, void (*f) (void), 452 int cmd_optional); 453 # endif 431 454 432 455 /* … … 452 475 * same ENGINE-enabled devices, across applications. 453 476 */ 477 # ifndef OPENSSL_NO_DEPRECATED_3_0 478 OSSL_DEPRECATEDIN_3_0 454 479 int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg, 455 480 int cmd_optional); 481 # endif 456 482 457 483 /* … … 463 489 * exposed and break binary compatibility! 464 490 */ 465 ENGINE *ENGINE_new(void); 466 int ENGINE_free(ENGINE *e); 467 int ENGINE_up_ref(ENGINE *e); 468 int ENGINE_set_id(ENGINE *e, const char *id); 469 int ENGINE_set_name(ENGINE *e, const char *name); 470 int ENGINE_set_RSA(ENGINE *e, const RSA_METHOD *rsa_meth); 471 int ENGINE_set_DSA(ENGINE *e, const DSA_METHOD *dsa_meth); 472 int ENGINE_set_EC(ENGINE *e, const EC_KEY_METHOD *ecdsa_meth); 473 int ENGINE_set_DH(ENGINE *e, const DH_METHOD *dh_meth); 474 int ENGINE_set_RAND(ENGINE *e, const RAND_METHOD *rand_meth); 475 int ENGINE_set_destroy_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR destroy_f); 491 # ifndef OPENSSL_NO_DEPRECATED_3_0 492 OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_new(void); 493 OSSL_DEPRECATEDIN_3_0 int ENGINE_free(ENGINE *e); 494 OSSL_DEPRECATEDIN_3_0 int ENGINE_up_ref(ENGINE *e); 495 OSSL_DEPRECATEDIN_3_0 int ENGINE_set_id(ENGINE *e, const char *id); 496 OSSL_DEPRECATEDIN_3_0 int ENGINE_set_name(ENGINE *e, const char *name); 497 OSSL_DEPRECATEDIN_3_0 int ENGINE_set_RSA(ENGINE *e, const RSA_METHOD *rsa_meth); 498 OSSL_DEPRECATEDIN_3_0 int ENGINE_set_DSA(ENGINE *e, const DSA_METHOD *dsa_meth); 499 OSSL_DEPRECATEDIN_3_0 int ENGINE_set_EC(ENGINE *e, const EC_KEY_METHOD *ecdsa_meth); 500 OSSL_DEPRECATEDIN_3_0 int ENGINE_set_DH(ENGINE *e, const DH_METHOD *dh_meth); 501 OSSL_DEPRECATEDIN_3_0 int ENGINE_set_RAND(ENGINE *e, const RAND_METHOD *rand_meth); 502 OSSL_DEPRECATEDIN_3_0 503 int ENGINE_set_destroy_function(ENGINE *e,ENGINE_GEN_INT_FUNC_PTR destroy_f); 504 OSSL_DEPRECATEDIN_3_0 476 505 int ENGINE_set_init_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR init_f); 506 OSSL_DEPRECATEDIN_3_0 477 507 int ENGINE_set_finish_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR finish_f); 508 OSSL_DEPRECATEDIN_3_0 478 509 int ENGINE_set_ctrl_function(ENGINE *e, ENGINE_CTRL_FUNC_PTR ctrl_f); 479 int ENGINE_set_load_privkey_function(ENGINE *e, 480 ENGINE_LOAD_KEY_PTR loadpriv_f); 510 OSSL_DEPRECATEDIN_3_0 511 int ENGINE_set_load_privkey_function(ENGINE *e, ENGINE_LOAD_KEY_PTR loadpriv_f); 512 OSSL_DEPRECATEDIN_3_0 481 513 int ENGINE_set_load_pubkey_function(ENGINE *e, ENGINE_LOAD_KEY_PTR loadpub_f); 514 OSSL_DEPRECATEDIN_3_0 482 515 int ENGINE_set_load_ssl_client_cert_function(ENGINE *e, 483 ENGINE_SSL_CLIENT_CERT_PTR 484 loadssl_f); 516 ENGINE_SSL_CLIENT_CERT_PTR loadssl_f); 517 OSSL_DEPRECATEDIN_3_0 485 518 int ENGINE_set_ciphers(ENGINE *e, ENGINE_CIPHERS_PTR f); 519 OSSL_DEPRECATEDIN_3_0 486 520 int ENGINE_set_digests(ENGINE *e, ENGINE_DIGESTS_PTR f); 521 OSSL_DEPRECATEDIN_3_0 487 522 int ENGINE_set_pkey_meths(ENGINE *e, ENGINE_PKEY_METHS_PTR f); 523 OSSL_DEPRECATEDIN_3_0 488 524 int ENGINE_set_pkey_asn1_meths(ENGINE *e, ENGINE_PKEY_ASN1_METHS_PTR f); 489 int ENGINE_set_flags(ENGINE *e, int flags); 490 int ENGINE_set_cmd_defns(ENGINE *e, const ENGINE_CMD_DEFN *defns); 525 OSSL_DEPRECATEDIN_3_0 int ENGINE_set_flags(ENGINE *e, int flags); 526 OSSL_DEPRECATEDIN_3_0 int ENGINE_set_cmd_defns(ENGINE *e, 527 const ENGINE_CMD_DEFN *defns); 528 # endif 491 529 /* These functions allow control over any per-structure ENGINE data. */ 492 # define ENGINE_get_ex_new_index(l, p, newf, dupf, freef) \530 # define ENGINE_get_ex_new_index(l, p, newf, dupf, freef) \ 493 531 CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_ENGINE, l, p, newf, dupf, freef) 494 int ENGINE_set_ex_data(ENGINE *e, int idx, void *arg); 495 void *ENGINE_get_ex_data(const ENGINE *e, int idx); 496 497 #if OPENSSL_API_COMPAT < 0x10100000L 532 # ifndef OPENSSL_NO_DEPRECATED_3_0 533 OSSL_DEPRECATEDIN_3_0 int ENGINE_set_ex_data(ENGINE *e, int idx, void *arg); 534 OSSL_DEPRECATEDIN_3_0 void *ENGINE_get_ex_data(const ENGINE *e, int idx); 535 # endif 536 537 # ifndef OPENSSL_NO_DEPRECATED_1_1_0 498 538 /* 499 539 * This function previously cleaned up anything that needs it. Auto-deinit will 500 540 * now take care of it so it is no longer required to call this function. 501 541 */ 502 # define ENGINE_cleanup() while(0) continue503 # endif542 # define ENGINE_cleanup() while(0) continue 543 # endif 504 544 505 545 /* … … 509 549 * obtained a structural reference may be problematic! 510 550 */ 511 const char *ENGINE_get_id(const ENGINE *e); 512 const char *ENGINE_get_name(const ENGINE *e); 513 const RSA_METHOD *ENGINE_get_RSA(const ENGINE *e); 514 const DSA_METHOD *ENGINE_get_DSA(const ENGINE *e); 515 const EC_KEY_METHOD *ENGINE_get_EC(const ENGINE *e); 516 const DH_METHOD *ENGINE_get_DH(const ENGINE *e); 517 const RAND_METHOD *ENGINE_get_RAND(const ENGINE *e); 551 # ifndef OPENSSL_NO_DEPRECATED_3_0 552 OSSL_DEPRECATEDIN_3_0 const char *ENGINE_get_id(const ENGINE *e); 553 OSSL_DEPRECATEDIN_3_0 const char *ENGINE_get_name(const ENGINE *e); 554 OSSL_DEPRECATEDIN_3_0 const RSA_METHOD *ENGINE_get_RSA(const ENGINE *e); 555 OSSL_DEPRECATEDIN_3_0 const DSA_METHOD *ENGINE_get_DSA(const ENGINE *e); 556 OSSL_DEPRECATEDIN_3_0 const EC_KEY_METHOD *ENGINE_get_EC(const ENGINE *e); 557 OSSL_DEPRECATEDIN_3_0 const DH_METHOD *ENGINE_get_DH(const ENGINE *e); 558 OSSL_DEPRECATEDIN_3_0 const RAND_METHOD *ENGINE_get_RAND(const ENGINE *e); 559 OSSL_DEPRECATEDIN_3_0 518 560 ENGINE_GEN_INT_FUNC_PTR ENGINE_get_destroy_function(const ENGINE *e); 561 OSSL_DEPRECATEDIN_3_0 519 562 ENGINE_GEN_INT_FUNC_PTR ENGINE_get_init_function(const ENGINE *e); 563 OSSL_DEPRECATEDIN_3_0 520 564 ENGINE_GEN_INT_FUNC_PTR ENGINE_get_finish_function(const ENGINE *e); 565 OSSL_DEPRECATEDIN_3_0 521 566 ENGINE_CTRL_FUNC_PTR ENGINE_get_ctrl_function(const ENGINE *e); 567 OSSL_DEPRECATEDIN_3_0 522 568 ENGINE_LOAD_KEY_PTR ENGINE_get_load_privkey_function(const ENGINE *e); 569 OSSL_DEPRECATEDIN_3_0 523 570 ENGINE_LOAD_KEY_PTR ENGINE_get_load_pubkey_function(const ENGINE *e); 524 ENGINE_SSL_CLIENT_CERT_PTR ENGINE_get_ssl_client_cert_function(const ENGINE 525 *e); 571 OSSL_DEPRECATEDIN_3_0 572 ENGINE_SSL_CLIENT_CERT_PTR ENGINE_get_ssl_client_cert_function(const ENGINE *e); 573 OSSL_DEPRECATEDIN_3_0 526 574 ENGINE_CIPHERS_PTR ENGINE_get_ciphers(const ENGINE *e); 575 OSSL_DEPRECATEDIN_3_0 527 576 ENGINE_DIGESTS_PTR ENGINE_get_digests(const ENGINE *e); 577 OSSL_DEPRECATEDIN_3_0 528 578 ENGINE_PKEY_METHS_PTR ENGINE_get_pkey_meths(const ENGINE *e); 579 OSSL_DEPRECATEDIN_3_0 529 580 ENGINE_PKEY_ASN1_METHS_PTR ENGINE_get_pkey_asn1_meths(const ENGINE *e); 581 OSSL_DEPRECATEDIN_3_0 530 582 const EVP_CIPHER *ENGINE_get_cipher(ENGINE *e, int nid); 583 OSSL_DEPRECATEDIN_3_0 531 584 const EVP_MD *ENGINE_get_digest(ENGINE *e, int nid); 585 OSSL_DEPRECATEDIN_3_0 532 586 const EVP_PKEY_METHOD *ENGINE_get_pkey_meth(ENGINE *e, int nid); 587 OSSL_DEPRECATEDIN_3_0 533 588 const EVP_PKEY_ASN1_METHOD *ENGINE_get_pkey_asn1_meth(ENGINE *e, int nid); 589 OSSL_DEPRECATEDIN_3_0 534 590 const EVP_PKEY_ASN1_METHOD *ENGINE_get_pkey_asn1_meth_str(ENGINE *e, 535 591 const char *str, 536 592 int len); 593 OSSL_DEPRECATEDIN_3_0 537 594 const EVP_PKEY_ASN1_METHOD *ENGINE_pkey_asn1_find_str(ENGINE **pe, 538 const char *str, 539 int len); 595 const char *str, int len); 596 OSSL_DEPRECATEDIN_3_0 540 597 const ENGINE_CMD_DEFN *ENGINE_get_cmd_defns(const ENGINE *e); 541 int ENGINE_get_flags(const ENGINE *e); 598 OSSL_DEPRECATEDIN_3_0 int ENGINE_get_flags(const ENGINE *e); 599 # endif 542 600 543 601 /* … … 559 617 * and cannot initialise. 560 618 */ 561 int ENGINE_init(ENGINE *e); 619 # ifndef OPENSSL_NO_DEPRECATED_3_0 620 OSSL_DEPRECATEDIN_3_0 int ENGINE_init(ENGINE *e); 621 # endif 562 622 /* 563 623 * Free a functional reference to a engine type. This does not require a … … 565 625 * reference. 566 626 */ 567 int ENGINE_finish(ENGINE *e); 627 # ifndef OPENSSL_NO_DEPRECATED_3_0 628 OSSL_DEPRECATEDIN_3_0 int ENGINE_finish(ENGINE *e); 629 # endif 568 630 569 631 /* … … 572 634 * whatever. 573 635 */ 636 # ifndef OPENSSL_NO_DEPRECATED_3_0 637 OSSL_DEPRECATEDIN_3_0 574 638 EVP_PKEY *ENGINE_load_private_key(ENGINE *e, const char *key_id, 575 639 UI_METHOD *ui_method, void *callback_data); 640 OSSL_DEPRECATEDIN_3_0 576 641 EVP_PKEY *ENGINE_load_public_key(ENGINE *e, const char *key_id, 577 642 UI_METHOD *ui_method, void *callback_data); 578 int ENGINE_load_ssl_client_cert(ENGINE *e, SSL *s, 579 STACK_OF(X509_NAME) *ca_dn, X509 **pcert, 580 EVP_PKEY **ppkey, STACK_OF(X509) **pother, 643 OSSL_DEPRECATEDIN_3_0 644 int ENGINE_load_ssl_client_cert(ENGINE *e, SSL *s, STACK_OF(X509_NAME) *ca_dn, 645 X509 **pcert, EVP_PKEY **ppkey, 646 STACK_OF(X509) **pother, 581 647 UI_METHOD *ui_method, void *callback_data); 648 # endif 582 649 583 650 /* … … 587 654 * discarded. 588 655 */ 589 ENGINE *ENGINE_get_default_RSA(void); 656 # ifndef OPENSSL_NO_DEPRECATED_3_0 657 OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_get_default_RSA(void); 658 # endif 590 659 /* Same for the other "methods" */ 591 ENGINE *ENGINE_get_default_DSA(void); 592 ENGINE *ENGINE_get_default_EC(void); 593 ENGINE *ENGINE_get_default_DH(void); 594 ENGINE *ENGINE_get_default_RAND(void); 660 # ifndef OPENSSL_NO_DEPRECATED_3_0 661 OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_get_default_DSA(void); 662 OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_get_default_EC(void); 663 OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_get_default_DH(void); 664 OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_get_default_RAND(void); 665 # endif 595 666 /* 596 667 * These functions can be used to get a functional reference to perform 597 668 * ciphering or digesting corresponding to "nid". 598 669 */ 599 ENGINE *ENGINE_get_cipher_engine(int nid); 600 ENGINE *ENGINE_get_digest_engine(int nid); 601 ENGINE *ENGINE_get_pkey_meth_engine(int nid); 602 ENGINE *ENGINE_get_pkey_asn1_meth_engine(int nid); 670 # ifndef OPENSSL_NO_DEPRECATED_3_0 671 OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_get_cipher_engine(int nid); 672 OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_get_digest_engine(int nid); 673 OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_get_pkey_meth_engine(int nid); 674 OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_get_pkey_asn1_meth_engine(int nid); 675 # endif 603 676 604 677 /* … … 608 681 * reference 'e'. 609 682 */ 610 int ENGINE_set_default_RSA(ENGINE *e); 611 int ENGINE_set_default_string(ENGINE *e, const char *def_list); 683 # ifndef OPENSSL_NO_DEPRECATED_3_0 684 OSSL_DEPRECATEDIN_3_0 int ENGINE_set_default_RSA(ENGINE *e); 685 OSSL_DEPRECATEDIN_3_0 int ENGINE_set_default_string(ENGINE *e, 686 const char *def_list); 687 # endif 612 688 /* Same for the other "methods" */ 613 int ENGINE_set_default_DSA(ENGINE *e); 614 int ENGINE_set_default_EC(ENGINE *e); 615 int ENGINE_set_default_DH(ENGINE *e); 616 int ENGINE_set_default_RAND(ENGINE *e); 617 int ENGINE_set_default_ciphers(ENGINE *e); 618 int ENGINE_set_default_digests(ENGINE *e); 619 int ENGINE_set_default_pkey_meths(ENGINE *e); 620 int ENGINE_set_default_pkey_asn1_meths(ENGINE *e); 689 # ifndef OPENSSL_NO_DEPRECATED_3_0 690 OSSL_DEPRECATEDIN_3_0 int ENGINE_set_default_DSA(ENGINE *e); 691 OSSL_DEPRECATEDIN_3_0 int ENGINE_set_default_EC(ENGINE *e); 692 OSSL_DEPRECATEDIN_3_0 int ENGINE_set_default_DH(ENGINE *e); 693 OSSL_DEPRECATEDIN_3_0 int ENGINE_set_default_RAND(ENGINE *e); 694 OSSL_DEPRECATEDIN_3_0 int ENGINE_set_default_ciphers(ENGINE *e); 695 OSSL_DEPRECATEDIN_3_0 int ENGINE_set_default_digests(ENGINE *e); 696 OSSL_DEPRECATEDIN_3_0 int ENGINE_set_default_pkey_meths(ENGINE *e); 697 OSSL_DEPRECATEDIN_3_0 int ENGINE_set_default_pkey_asn1_meths(ENGINE *e); 698 # endif 621 699 622 700 /* … … 627 705 * selective functions. 628 706 */ 629 int ENGINE_set_default(ENGINE *e, unsigned int flags); 630 631 void ENGINE_add_conf_module(void); 707 # ifndef OPENSSL_NO_DEPRECATED_3_0 708 OSSL_DEPRECATEDIN_3_0 int ENGINE_set_default(ENGINE *e, unsigned int flags); 709 OSSL_DEPRECATEDIN_3_0 void ENGINE_add_conf_module(void); 710 # endif 632 711 633 712 /* Deprecated functions ... */ … … 639 718 640 719 /* Binary/behaviour compatibility levels */ 641 # define OSSL_DYNAMIC_VERSION (unsigned long)0x00030000720 # define OSSL_DYNAMIC_VERSION (unsigned long)0x00030000 642 721 /* 643 722 * Binary versions older than this are too old for us (whether we're a loader 644 723 * or a loadee) 645 724 */ 646 # define OSSL_DYNAMIC_OLDEST (unsigned long)0x00030000725 # define OSSL_DYNAMIC_OLDEST (unsigned long)0x00030000 647 726 648 727 /* … … 688 767 */ 689 768 typedef unsigned long (*dynamic_v_check_fn) (unsigned long ossl_version); 690 # define IMPLEMENT_DYNAMIC_CHECK_FN() \769 # define IMPLEMENT_DYNAMIC_CHECK_FN() \ 691 770 OPENSSL_EXPORT unsigned long v_check(unsigned long v); \ 692 771 OPENSSL_EXPORT unsigned long v_check(unsigned long v) { \ … … 714 793 typedef int (*dynamic_bind_engine) (ENGINE *e, const char *id, 715 794 const dynamic_fns *fns); 716 # define IMPLEMENT_DYNAMIC_BIND_FN(fn) \795 # define IMPLEMENT_DYNAMIC_BIND_FN(fn) \ 717 796 OPENSSL_EXPORT \ 718 797 int bind_engine(ENGINE *e, const char *id, const dynamic_fns *fns); \ … … 740 819 void *ENGINE_get_static_state(void); 741 820 742 # if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) 743 DEPRECATEDIN_1_1_0(void ENGINE_setup_bsd_cryptodev(void)) 744 # endif 821 # if defined(__OpenBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) 822 # ifndef OPENSSL_NO_DEPRECATED_1_1_0 823 OSSL_DEPRECATEDIN_1_1_0 void ENGINE_setup_bsd_cryptodev(void); 824 # endif 825 # endif 745 826 746 827 … … 748 829 } 749 830 # endif 750 # endif 751 #endif 831 # endif /* OPENSSL_NO_ENGINE */ 832 #endif /* OPENSSL_ENGINE_H */ -
trunk/src/libs/openssl-3.0.1/include/openssl/engineerr.h
r91772 r94082 1 1 /* 2 2 * Generated by util/mkerr.pl DO NOT EDIT 3 * Copyright 1995-20 19The OpenSSL Project Authors. All Rights Reserved.3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 4 * 5 * Licensed under the OpenSSL license(the "License"). You may not use5 * Licensed under the Apache License 2.0 (the "License"). You may not use 6 6 * this file except in compliance with the License. You can obtain a copy 7 7 * in the file LICENSE in the source distribution or at … … 9 9 */ 10 10 11 #ifndef HEADER_ENGINEERR_H 12 # define HEADER_ENGINEERR_H 13 14 # ifndef HEADER_SYMHACKS_H 15 # include <openssl/symhacks.h> 16 # endif 11 #ifndef OPENSSL_ENGINEERR_H 12 # define OPENSSL_ENGINEERR_H 13 # pragma once 17 14 18 15 # include <openssl/opensslconf.h> 16 # include <openssl/symhacks.h> 17 # include <openssl/cryptoerr_legacy.h> 18 19 19 20 20 # ifndef OPENSSL_NO_ENGINE 21 21 22 # ifdef __cplusplus23 extern "C"24 # endif25 int ERR_load_ENGINE_strings(void);26 27 /*28 * ENGINE function codes.29 */30 # define ENGINE_F_DIGEST_UPDATE 19831 # define ENGINE_F_DYNAMIC_CTRL 18032 # define ENGINE_F_DYNAMIC_GET_DATA_CTX 18133 # define ENGINE_F_DYNAMIC_LOAD 18234 # define ENGINE_F_DYNAMIC_SET_DATA_CTX 18335 # define ENGINE_F_ENGINE_ADD 10536 # define ENGINE_F_ENGINE_BY_ID 10637 # define ENGINE_F_ENGINE_CMD_IS_EXECUTABLE 17038 # define ENGINE_F_ENGINE_CTRL 14239 # define ENGINE_F_ENGINE_CTRL_CMD 17840 # define ENGINE_F_ENGINE_CTRL_CMD_STRING 17141 # define ENGINE_F_ENGINE_FINISH 10742 # define ENGINE_F_ENGINE_GET_CIPHER 18543 # define ENGINE_F_ENGINE_GET_DIGEST 18644 # define ENGINE_F_ENGINE_GET_FIRST 19545 # define ENGINE_F_ENGINE_GET_LAST 19646 # define ENGINE_F_ENGINE_GET_NEXT 11547 # define ENGINE_F_ENGINE_GET_PKEY_ASN1_METH 19348 # define ENGINE_F_ENGINE_GET_PKEY_METH 19249 # define ENGINE_F_ENGINE_GET_PREV 11650 # define ENGINE_F_ENGINE_INIT 11951 # define ENGINE_F_ENGINE_LIST_ADD 12052 # define ENGINE_F_ENGINE_LIST_REMOVE 12153 # define ENGINE_F_ENGINE_LOAD_PRIVATE_KEY 15054 # define ENGINE_F_ENGINE_LOAD_PUBLIC_KEY 15155 # define ENGINE_F_ENGINE_LOAD_SSL_CLIENT_CERT 19456 # define ENGINE_F_ENGINE_NEW 12257 # define ENGINE_F_ENGINE_PKEY_ASN1_FIND_STR 19758 # define ENGINE_F_ENGINE_REMOVE 12359 # define ENGINE_F_ENGINE_SET_DEFAULT_STRING 18960 # define ENGINE_F_ENGINE_SET_ID 12961 # define ENGINE_F_ENGINE_SET_NAME 13062 # define ENGINE_F_ENGINE_TABLE_REGISTER 18463 # define ENGINE_F_ENGINE_UNLOCKED_FINISH 19164 # define ENGINE_F_ENGINE_UP_REF 19065 # define ENGINE_F_INT_CLEANUP_ITEM 19966 # define ENGINE_F_INT_CTRL_HELPER 17267 # define ENGINE_F_INT_ENGINE_CONFIGURE 18868 # define ENGINE_F_INT_ENGINE_MODULE_INIT 18769 # define ENGINE_F_OSSL_HMAC_INIT 20070 22 71 23 /* -
trunk/src/libs/openssl-3.0.1/include/openssl/evp.h
r91772 r94082 1 1 /* 2 * Copyright 1995-20 19The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_ENVELOPE_H 11 # define HEADER_ENVELOPE_H 10 #ifndef OPENSSL_EVP_H 11 # define OPENSSL_EVP_H 12 # pragma once 13 14 # include <openssl/macros.h> 15 # ifndef OPENSSL_NO_DEPRECATED_3_0 16 # define HEADER_ENVELOPE_H 17 # endif 18 19 # include <stdarg.h> 20 21 # ifndef OPENSSL_NO_STDIO 22 # include <stdio.h> 23 # endif 12 24 13 25 # include <openssl/opensslconf.h> 14 # include <openssl/ossl_typ.h> 26 # include <openssl/types.h> 27 # include <openssl/core.h> 28 # include <openssl/core_dispatch.h> 15 29 # include <openssl/symhacks.h> 16 30 # include <openssl/bio.h> 17 31 # include <openssl/evperr.h> 32 # include <openssl/params.h> 18 33 19 34 #ifdef ___openssl_mangling_h___ … … 47 62 # include <openssl/objects.h> 48 63 49 # define EVP_PK_RSA 0x0001 50 # define EVP_PK_DSA 0x0002 51 # define EVP_PK_DH 0x0004 52 # define EVP_PK_EC 0x0008 53 # define EVP_PKT_SIGN 0x0010 54 # define EVP_PKT_ENC 0x0020 55 # define EVP_PKT_EXCH 0x0040 56 # define EVP_PKS_RSA 0x0100 57 # define EVP_PKS_DSA 0x0200 58 # define EVP_PKS_EC 0x0400 64 # ifndef OPENSSL_NO_DEPRECATED_3_0 65 # define EVP_PK_RSA 0x0001 66 # define EVP_PK_DSA 0x0002 67 # define EVP_PK_DH 0x0004 68 # define EVP_PK_EC 0x0008 69 # define EVP_PKT_SIGN 0x0010 70 # define EVP_PKT_ENC 0x0020 71 # define EVP_PKT_EXCH 0x0040 72 # define EVP_PKS_RSA 0x0100 73 # define EVP_PKS_DSA 0x0200 74 # define EVP_PKS_EC 0x0400 75 # endif 59 76 60 77 # define EVP_PKEY_NONE NID_undef … … 82 99 # define EVP_PKEY_X448 NID_X448 83 100 # define EVP_PKEY_ED448 NID_ED448 101 /* Special indicator that the object is uniquely provider side */ 102 # define EVP_PKEY_KEYMGMT -1 103 104 /* Easy to use macros for EVP_PKEY related selections */ 105 # define EVP_PKEY_KEY_PARAMETERS \ 106 ( OSSL_KEYMGMT_SELECT_ALL_PARAMETERS ) 107 # define EVP_PKEY_PUBLIC_KEY \ 108 ( EVP_PKEY_KEY_PARAMETERS | OSSL_KEYMGMT_SELECT_PUBLIC_KEY ) 109 # define EVP_PKEY_KEYPAIR \ 110 ( EVP_PKEY_PUBLIC_KEY | OSSL_KEYMGMT_SELECT_PRIVATE_KEY ) 84 111 85 112 #ifdef __cplusplus 86 113 extern "C" { 87 114 #endif 115 116 int EVP_set_default_properties(OSSL_LIB_CTX *libctx, const char *propq); 117 int EVP_default_properties_is_fips_enabled(OSSL_LIB_CTX *libctx); 118 int EVP_default_properties_enable_fips(OSSL_LIB_CTX *libctx, int enable); 88 119 89 120 # define EVP_PKEY_MO_SIGN 0x0001 … … 93 124 94 125 # ifndef EVP_MD 95 EVP_MD *EVP_MD_meth_new(int md_type, int pkey_type); 96 EVP_MD *EVP_MD_meth_dup(const EVP_MD *md); 97 void EVP_MD_meth_free(EVP_MD *md); 98 126 # ifndef OPENSSL_NO_DEPRECATED_3_0 127 OSSL_DEPRECATEDIN_3_0 EVP_MD *EVP_MD_meth_new(int md_type, int pkey_type); 128 OSSL_DEPRECATEDIN_3_0 EVP_MD *EVP_MD_meth_dup(const EVP_MD *md); 129 OSSL_DEPRECATEDIN_3_0 void EVP_MD_meth_free(EVP_MD *md); 130 OSSL_DEPRECATEDIN_3_0 99 131 int EVP_MD_meth_set_input_blocksize(EVP_MD *md, int blocksize); 132 OSSL_DEPRECATEDIN_3_0 100 133 int EVP_MD_meth_set_result_size(EVP_MD *md, int resultsize); 134 OSSL_DEPRECATEDIN_3_0 101 135 int EVP_MD_meth_set_app_datasize(EVP_MD *md, int datasize); 136 OSSL_DEPRECATEDIN_3_0 102 137 int EVP_MD_meth_set_flags(EVP_MD *md, unsigned long flags); 138 OSSL_DEPRECATEDIN_3_0 103 139 int EVP_MD_meth_set_init(EVP_MD *md, int (*init)(EVP_MD_CTX *ctx)); 140 OSSL_DEPRECATEDIN_3_0 104 141 int EVP_MD_meth_set_update(EVP_MD *md, int (*update)(EVP_MD_CTX *ctx, 105 142 const void *data, 106 143 size_t count)); 144 OSSL_DEPRECATEDIN_3_0 107 145 int EVP_MD_meth_set_final(EVP_MD *md, int (*final)(EVP_MD_CTX *ctx, 108 146 unsigned char *md)); 147 OSSL_DEPRECATEDIN_3_0 109 148 int EVP_MD_meth_set_copy(EVP_MD *md, int (*copy)(EVP_MD_CTX *to, 110 149 const EVP_MD_CTX *from)); 150 OSSL_DEPRECATEDIN_3_0 111 151 int EVP_MD_meth_set_cleanup(EVP_MD *md, int (*cleanup)(EVP_MD_CTX *ctx)); 152 OSSL_DEPRECATEDIN_3_0 112 153 int EVP_MD_meth_set_ctrl(EVP_MD *md, int (*ctrl)(EVP_MD_CTX *ctx, int cmd, 113 154 int p1, void *p2)); 114 115 int EVP_MD_meth_get_input_blocksize(const EVP_MD *md);116 int EVP_MD_meth_get_result_size(const EVP_MD *md);117 int EVP_MD_meth_get_app_datasize(const EVP_MD *md);118 unsigned long EVP_MD_meth_get_flags(const EVP_MD *md); 155 OSSL_DEPRECATEDIN_3_0 int EVP_MD_meth_get_input_blocksize(const EVP_MD *md); 156 OSSL_DEPRECATEDIN_3_0 int EVP_MD_meth_get_result_size(const EVP_MD *md); 157 OSSL_DEPRECATEDIN_3_0 int EVP_MD_meth_get_app_datasize(const EVP_MD *md); 158 OSSL_DEPRECATEDIN_3_0 unsigned long EVP_MD_meth_get_flags(const EVP_MD *md); 159 OSSL_DEPRECATEDIN_3_0 119 160 int (*EVP_MD_meth_get_init(const EVP_MD *md))(EVP_MD_CTX *ctx); 161 OSSL_DEPRECATEDIN_3_0 120 162 int (*EVP_MD_meth_get_update(const EVP_MD *md))(EVP_MD_CTX *ctx, 121 const void *data, 122 size_t count); 163 const void *data, size_t count); 164 OSSL_DEPRECATEDIN_3_0 123 165 int (*EVP_MD_meth_get_final(const EVP_MD *md))(EVP_MD_CTX *ctx, 124 166 unsigned char *md); 167 OSSL_DEPRECATEDIN_3_0 125 168 int (*EVP_MD_meth_get_copy(const EVP_MD *md))(EVP_MD_CTX *to, 126 169 const EVP_MD_CTX *from); 170 OSSL_DEPRECATEDIN_3_0 127 171 int (*EVP_MD_meth_get_cleanup(const EVP_MD *md))(EVP_MD_CTX *ctx); 172 OSSL_DEPRECATEDIN_3_0 128 173 int (*EVP_MD_meth_get_ctrl(const EVP_MD *md))(EVP_MD_CTX *ctx, int cmd, 129 174 int p1, void *p2); 130 175 # endif 131 176 /* digest can only handle a single block */ 132 177 # define EVP_MD_FLAG_ONESHOT 0x0001 … … 159 204 # define EVP_MD_CTRL_MICALG 0x2 160 205 # define EVP_MD_CTRL_XOF_LEN 0x3 206 # define EVP_MD_CTRL_TLSTREE 0x4 161 207 162 208 /* Minimum Algorithm specific ctrl value */ … … 201 247 # define EVP_MD_CTX_FLAG_FINALISE 0x0200 202 248 /* NOTE: 0x0400 is reserved for internal usage */ 203 249 # ifndef OPENSSL_NO_DEPRECATED_3_0 250 OSSL_DEPRECATEDIN_3_0 204 251 EVP_CIPHER *EVP_CIPHER_meth_new(int cipher_type, int block_size, int key_len); 252 OSSL_DEPRECATEDIN_3_0 205 253 EVP_CIPHER *EVP_CIPHER_meth_dup(const EVP_CIPHER *cipher); 254 OSSL_DEPRECATEDIN_3_0 206 255 void EVP_CIPHER_meth_free(EVP_CIPHER *cipher); 207 256 OSSL_DEPRECATEDIN_3_0 208 257 int EVP_CIPHER_meth_set_iv_length(EVP_CIPHER *cipher, int iv_len); 258 OSSL_DEPRECATEDIN_3_0 209 259 int EVP_CIPHER_meth_set_flags(EVP_CIPHER *cipher, unsigned long flags); 260 OSSL_DEPRECATEDIN_3_0 210 261 int EVP_CIPHER_meth_set_impl_ctx_size(EVP_CIPHER *cipher, int ctx_size); 262 OSSL_DEPRECATEDIN_3_0 211 263 int EVP_CIPHER_meth_set_init(EVP_CIPHER *cipher, 212 264 int (*init) (EVP_CIPHER_CTX *ctx, … … 214 266 const unsigned char *iv, 215 267 int enc)); 268 OSSL_DEPRECATEDIN_3_0 216 269 int EVP_CIPHER_meth_set_do_cipher(EVP_CIPHER *cipher, 217 270 int (*do_cipher) (EVP_CIPHER_CTX *ctx, … … 219 272 const unsigned char *in, 220 273 size_t inl)); 274 OSSL_DEPRECATEDIN_3_0 221 275 int EVP_CIPHER_meth_set_cleanup(EVP_CIPHER *cipher, 222 276 int (*cleanup) (EVP_CIPHER_CTX *)); 277 OSSL_DEPRECATEDIN_3_0 223 278 int EVP_CIPHER_meth_set_set_asn1_params(EVP_CIPHER *cipher, 224 279 int (*set_asn1_parameters) (EVP_CIPHER_CTX *, 225 280 ASN1_TYPE *)); 281 OSSL_DEPRECATEDIN_3_0 226 282 int EVP_CIPHER_meth_set_get_asn1_params(EVP_CIPHER *cipher, 227 283 int (*get_asn1_parameters) (EVP_CIPHER_CTX *, 228 284 ASN1_TYPE *)); 285 OSSL_DEPRECATEDIN_3_0 229 286 int EVP_CIPHER_meth_set_ctrl(EVP_CIPHER *cipher, 230 287 int (*ctrl) (EVP_CIPHER_CTX *, int type, 231 288 int arg, void *ptr)); 232 233 int (*EVP_CIPHER_meth_get_init(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *ctx, 234 const unsigned char *key, 235 const unsigned char *iv, 236 int enc); 237 int (*EVP_CIPHER_meth_get_do_cipher(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *ctx, 238 unsigned char *out, 239 const unsigned char *in, 240 size_t inl); 241 int (*EVP_CIPHER_meth_get_cleanup(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *); 242 int (*EVP_CIPHER_meth_get_set_asn1_params(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *, 243 ASN1_TYPE *); 244 int (*EVP_CIPHER_meth_get_get_asn1_params(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *, 245 ASN1_TYPE *); 246 int (*EVP_CIPHER_meth_get_ctrl(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *, 247 int type, int arg, 248 void *ptr); 289 OSSL_DEPRECATEDIN_3_0 int 290 (*EVP_CIPHER_meth_get_init(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *ctx, 291 const unsigned char *key, 292 const unsigned char *iv, 293 int enc); 294 OSSL_DEPRECATEDIN_3_0 int 295 (*EVP_CIPHER_meth_get_do_cipher(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *ctx, 296 unsigned char *out, 297 const unsigned char *in, 298 size_t inl); 299 OSSL_DEPRECATEDIN_3_0 int 300 (*EVP_CIPHER_meth_get_cleanup(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *); 301 OSSL_DEPRECATEDIN_3_0 int 302 (*EVP_CIPHER_meth_get_set_asn1_params(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *, 303 ASN1_TYPE *); 304 OSSL_DEPRECATEDIN_3_0 int 305 (*EVP_CIPHER_meth_get_get_asn1_params(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *, 306 ASN1_TYPE *); 307 OSSL_DEPRECATEDIN_3_0 int 308 (*EVP_CIPHER_meth_get_ctrl(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *, int type, 309 int arg, void *ptr); 310 # endif 249 311 250 312 /* Values for cipher flags */ … … 263 325 # define EVP_CIPH_WRAP_MODE 0x10002 264 326 # define EVP_CIPH_OCB_MODE 0x10003 327 # define EVP_CIPH_SIV_MODE 0x10004 265 328 # define EVP_CIPH_MODE 0xF0007 266 329 /* Set if variable length cipher */ … … 282 345 /* Don't use standard iv length function */ 283 346 # define EVP_CIPH_CUSTOM_IV_LENGTH 0x800 284 /* Allow use default ASN1 get/set iv */ 285 # define EVP_CIPH_FLAG_DEFAULT_ASN1 0x1000 347 /* Legacy and no longer relevant: Allow use default ASN1 get/set iv */ 348 # define EVP_CIPH_FLAG_DEFAULT_ASN1 0 349 /* Free: 0x1000 */ 286 350 /* Buffer length in bits not bytes: CFB1 mode only */ 287 351 # define EVP_CIPH_FLAG_LENGTH_BITS 0x2000 288 /* Note if suitable for use in FIPS mode */ 289 # define EVP_CIPH_FLAG_FIPS 0x4000 290 /* Allow non FIPS cipher in FIPS mode */ 291 # define EVP_CIPH_FLAG_NON_FIPS_ALLOW 0x8000 352 /* Deprecated FIPS flag: was 0x4000 */ 353 # define EVP_CIPH_FLAG_FIPS 0 354 /* Deprecated FIPS flag: was 0x8000 */ 355 # define EVP_CIPH_FLAG_NON_FIPS_ALLOW 0 356 292 357 /* 293 358 * Cipher handles any and all padding logic as well as finalisation. 294 359 */ 360 # define EVP_CIPH_FLAG_CTS 0x4000 295 361 # define EVP_CIPH_FLAG_CUSTOM_CIPHER 0x100000 296 362 # define EVP_CIPH_FLAG_AEAD_CIPHER 0x200000 … … 298 364 /* Cipher can handle pipeline operations */ 299 365 # define EVP_CIPH_FLAG_PIPELINE 0X800000 366 /* For provider implementations that handle ASN1 get/set param themselves */ 367 # define EVP_CIPH_FLAG_CUSTOM_ASN1 0x1000000 368 /* For ciphers generating unprotected CMS attributes */ 369 # define EVP_CIPH_FLAG_CIPHER_WITH_MAC 0x2000000 370 /* For supplementary wrap cipher support */ 371 # define EVP_CIPH_FLAG_GET_WRAP_CIPHER 0x4000000 372 # define EVP_CIPH_FLAG_INVERSE_CIPHER 0x8000000 300 373 301 374 /* … … 370 443 /* Set the input buffer lengths to use for a pipelined operation */ 371 444 # define EVP_CTRL_SET_PIPELINE_INPUT_LENS 0x24 372 445 /* Get the IV length used by the cipher */ 373 446 # define EVP_CTRL_GET_IVLEN 0x25 447 /* 0x26 is unused */ 448 /* Tell the cipher it's doing a speed test (SIV disallows multiple ops) */ 449 # define EVP_CTRL_SET_SPEED 0x27 450 /* Get the unprotectedAttrs from cipher ctx */ 451 # define EVP_CTRL_PROCESS_UNPROTECTED 0x28 452 /* Get the supplementary wrap cipher */ 453 #define EVP_CTRL_GET_WRAP_CIPHER 0x29 454 /* TLSTREE key diversification */ 455 #define EVP_CTRL_TLSTREE 0x2A 374 456 375 457 /* Padding modes */ … … 425 507 int en_de); 426 508 427 # ifndef OPENSSL_NO_RSA 509 typedef int (EVP_PBE_KEYGEN_EX) (EVP_CIPHER_CTX *ctx, const char *pass, 510 int passlen, ASN1_TYPE *param, 511 const EVP_CIPHER *cipher, const EVP_MD *md, 512 int en_de, OSSL_LIB_CTX *libctx, const char *propq); 513 514 # ifndef OPENSSL_NO_DEPRECATED_3_0 428 515 # define EVP_PKEY_assign_RSA(pkey,rsa) EVP_PKEY_assign((pkey),EVP_PKEY_RSA,\ 429 (char *)(rsa))516 (rsa)) 430 517 # endif 431 518 432 519 # ifndef OPENSSL_NO_DSA 433 520 # define EVP_PKEY_assign_DSA(pkey,dsa) EVP_PKEY_assign((pkey),EVP_PKEY_DSA,\ 434 (char *)(dsa)) 435 # endif 436 437 # ifndef OPENSSL_NO_DH 438 # define EVP_PKEY_assign_DH(pkey,dh) EVP_PKEY_assign((pkey),EVP_PKEY_DH,\ 439 (char *)(dh)) 440 # endif 441 442 # ifndef OPENSSL_NO_EC 443 # define EVP_PKEY_assign_EC_KEY(pkey,eckey) EVP_PKEY_assign((pkey),EVP_PKEY_EC,\ 444 (char *)(eckey)) 521 (dsa)) 522 # endif 523 524 # if !defined(OPENSSL_NO_DH) && !defined(OPENSSL_NO_DEPRECATED_3_0) 525 # define EVP_PKEY_assign_DH(pkey,dh) EVP_PKEY_assign((pkey),EVP_PKEY_DH,(dh)) 526 # endif 527 528 # ifndef OPENSSL_NO_DEPRECATED_3_0 529 # ifndef OPENSSL_NO_EC 530 # define EVP_PKEY_assign_EC_KEY(pkey,eckey) \ 531 EVP_PKEY_assign((pkey), EVP_PKEY_EC, (eckey)) 532 # endif 445 533 # endif 446 534 # ifndef OPENSSL_NO_SIPHASH 447 # define EVP_PKEY_assign_SIPHASH(pkey,shkey) EVP_PKEY_assign((pkey), EVP_PKEY_SIPHASH,\448 (char *)(shkey))535 # define EVP_PKEY_assign_SIPHASH(pkey,shkey) EVP_PKEY_assign((pkey),\ 536 EVP_PKEY_SIPHASH,(shkey)) 449 537 # endif 450 538 451 539 # ifndef OPENSSL_NO_POLY1305 452 # define EVP_PKEY_assign_POLY1305(pkey,polykey) EVP_PKEY_assign((pkey), EVP_PKEY_POLY1305,\453 (char *)(polykey))540 # define EVP_PKEY_assign_POLY1305(pkey,polykey) EVP_PKEY_assign((pkey),\ 541 EVP_PKEY_POLY1305,(polykey)) 454 542 # endif 455 543 … … 460 548 # define EVP_get_cipherbyobj(a) EVP_get_cipherbynid(OBJ_obj2nid(a)) 461 549 462 int EVP_MD_type(const EVP_MD *md); 463 # define EVP_MD_nid(e) EVP_MD_type(e) 464 # define EVP_MD_name(e) OBJ_nid2sn(EVP_MD_nid(e)) 465 int EVP_MD_pkey_type(const EVP_MD *md); 466 int EVP_MD_size(const EVP_MD *md); 467 int EVP_MD_block_size(const EVP_MD *md); 468 unsigned long EVP_MD_flags(const EVP_MD *md); 469 550 int EVP_MD_get_type(const EVP_MD *md); 551 # define EVP_MD_type EVP_MD_get_type 552 # define EVP_MD_nid EVP_MD_get_type 553 const char *EVP_MD_get0_name(const EVP_MD *md); 554 # define EVP_MD_name EVP_MD_get0_name 555 const char *EVP_MD_get0_description(const EVP_MD *md); 556 int EVP_MD_is_a(const EVP_MD *md, const char *name); 557 int EVP_MD_names_do_all(const EVP_MD *md, 558 void (*fn)(const char *name, void *data), 559 void *data); 560 const OSSL_PROVIDER *EVP_MD_get0_provider(const EVP_MD *md); 561 int EVP_MD_get_pkey_type(const EVP_MD *md); 562 # define EVP_MD_pkey_type EVP_MD_get_pkey_type 563 int EVP_MD_get_size(const EVP_MD *md); 564 # define EVP_MD_size EVP_MD_get_size 565 int EVP_MD_get_block_size(const EVP_MD *md); 566 # define EVP_MD_block_size EVP_MD_get_block_size 567 unsigned long EVP_MD_get_flags(const EVP_MD *md); 568 # define EVP_MD_flags EVP_MD_get_flags 569 570 const EVP_MD *EVP_MD_CTX_get0_md(const EVP_MD_CTX *ctx); 571 EVP_MD *EVP_MD_CTX_get1_md(EVP_MD_CTX *ctx); 572 # ifndef OPENSSL_NO_DEPRECATED_3_0 573 OSSL_DEPRECATEDIN_3_0 470 574 const EVP_MD *EVP_MD_CTX_md(const EVP_MD_CTX *ctx); 575 OSSL_DEPRECATEDIN_3_0 471 576 int (*EVP_MD_CTX_update_fn(EVP_MD_CTX *ctx))(EVP_MD_CTX *ctx, 472 577 const void *data, size_t count); 578 OSSL_DEPRECATEDIN_3_0 473 579 void EVP_MD_CTX_set_update_fn(EVP_MD_CTX *ctx, 474 580 int (*update) (EVP_MD_CTX *ctx, 475 581 const void *data, size_t count)); 476 # define EVP_MD_CTX_size(e) EVP_MD_size(EVP_MD_CTX_md(e)) 477 # define EVP_MD_CTX_block_size(e) EVP_MD_block_size(EVP_MD_CTX_md(e)) 478 # define EVP_MD_CTX_type(e) EVP_MD_type(EVP_MD_CTX_md(e)) 479 EVP_PKEY_CTX *EVP_MD_CTX_pkey_ctx(const EVP_MD_CTX *ctx); 582 # endif 583 # define EVP_MD_CTX_get0_name(e) EVP_MD_get0_name(EVP_MD_CTX_get0_md(e)) 584 # define EVP_MD_CTX_get_size(e) EVP_MD_get_size(EVP_MD_CTX_get0_md(e)) 585 # define EVP_MD_CTX_size EVP_MD_CTX_get_size 586 # define EVP_MD_CTX_get_block_size(e) EVP_MD_get_block_size(EVP_MD_CTX_get0_md(e)) 587 # define EVP_MD_CTX_block_size EVP_MD_CTX_get_block_size 588 # define EVP_MD_CTX_get_type(e) EVP_MD_get_type(EVP_MD_CTX_get0_md(e)) 589 # define EVP_MD_CTX_type EVP_MD_CTX_get_type 590 EVP_PKEY_CTX *EVP_MD_CTX_get_pkey_ctx(const EVP_MD_CTX *ctx); 591 # define EVP_MD_CTX_pkey_ctx EVP_MD_CTX_get_pkey_ctx 480 592 void EVP_MD_CTX_set_pkey_ctx(EVP_MD_CTX *ctx, EVP_PKEY_CTX *pctx); 481 void *EVP_MD_CTX_md_data(const EVP_MD_CTX *ctx); 482 483 int EVP_CIPHER_nid(const EVP_CIPHER *cipher); 484 # define EVP_CIPHER_name(e) OBJ_nid2sn(EVP_CIPHER_nid(e)) 485 int EVP_CIPHER_block_size(const EVP_CIPHER *cipher); 593 void *EVP_MD_CTX_get0_md_data(const EVP_MD_CTX *ctx); 594 # define EVP_MD_CTX_md_data EVP_MD_CTX_get0_md_data 595 596 int EVP_CIPHER_get_nid(const EVP_CIPHER *cipher); 597 # define EVP_CIPHER_nid EVP_CIPHER_get_nid 598 const char *EVP_CIPHER_get0_name(const EVP_CIPHER *cipher); 599 # define EVP_CIPHER_name EVP_CIPHER_get0_name 600 const char *EVP_CIPHER_get0_description(const EVP_CIPHER *cipher); 601 int EVP_CIPHER_is_a(const EVP_CIPHER *cipher, const char *name); 602 int EVP_CIPHER_names_do_all(const EVP_CIPHER *cipher, 603 void (*fn)(const char *name, void *data), 604 void *data); 605 const OSSL_PROVIDER *EVP_CIPHER_get0_provider(const EVP_CIPHER *cipher); 606 int EVP_CIPHER_get_block_size(const EVP_CIPHER *cipher); 607 # define EVP_CIPHER_block_size EVP_CIPHER_get_block_size 608 # ifndef OPENSSL_NO_DEPRECATED_3_0 609 OSSL_DEPRECATEDIN_3_0 486 610 int EVP_CIPHER_impl_ctx_size(const EVP_CIPHER *cipher); 487 int EVP_CIPHER_key_length(const EVP_CIPHER *cipher); 488 int EVP_CIPHER_iv_length(const EVP_CIPHER *cipher); 489 unsigned long EVP_CIPHER_flags(const EVP_CIPHER *cipher); 490 # define EVP_CIPHER_mode(e) (EVP_CIPHER_flags(e) & EVP_CIPH_MODE) 491 611 # endif 612 int EVP_CIPHER_get_key_length(const EVP_CIPHER *cipher); 613 # define EVP_CIPHER_key_length EVP_CIPHER_get_key_length 614 int EVP_CIPHER_get_iv_length(const EVP_CIPHER *cipher); 615 # define EVP_CIPHER_iv_length EVP_CIPHER_get_iv_length 616 unsigned long EVP_CIPHER_get_flags(const EVP_CIPHER *cipher); 617 # define EVP_CIPHER_flags EVP_CIPHER_get_flags 618 int EVP_CIPHER_get_mode(const EVP_CIPHER *cipher); 619 # define EVP_CIPHER_mode EVP_CIPHER_get_mode 620 int EVP_CIPHER_get_type(const EVP_CIPHER *cipher); 621 # define EVP_CIPHER_type EVP_CIPHER_get_type 622 EVP_CIPHER *EVP_CIPHER_fetch(OSSL_LIB_CTX *ctx, const char *algorithm, 623 const char *properties); 624 int EVP_CIPHER_up_ref(EVP_CIPHER *cipher); 625 void EVP_CIPHER_free(EVP_CIPHER *cipher); 626 627 const EVP_CIPHER *EVP_CIPHER_CTX_get0_cipher(const EVP_CIPHER_CTX *ctx); 628 EVP_CIPHER *EVP_CIPHER_CTX_get1_cipher(EVP_CIPHER_CTX *ctx); 629 int EVP_CIPHER_CTX_is_encrypting(const EVP_CIPHER_CTX *ctx); 630 # define EVP_CIPHER_CTX_encrypting EVP_CIPHER_CTX_is_encrypting 631 int EVP_CIPHER_CTX_get_nid(const EVP_CIPHER_CTX *ctx); 632 # define EVP_CIPHER_CTX_nid EVP_CIPHER_CTX_get_nid 633 int EVP_CIPHER_CTX_get_block_size(const EVP_CIPHER_CTX *ctx); 634 # define EVP_CIPHER_CTX_block_size EVP_CIPHER_CTX_get_block_size 635 int EVP_CIPHER_CTX_get_key_length(const EVP_CIPHER_CTX *ctx); 636 # define EVP_CIPHER_CTX_key_length EVP_CIPHER_CTX_get_key_length 637 int EVP_CIPHER_CTX_get_iv_length(const EVP_CIPHER_CTX *ctx); 638 # define EVP_CIPHER_CTX_iv_length EVP_CIPHER_CTX_get_iv_length 639 int EVP_CIPHER_CTX_get_tag_length(const EVP_CIPHER_CTX *ctx); 640 # define EVP_CIPHER_CTX_tag_length EVP_CIPHER_CTX_get_tag_length 641 # ifndef OPENSSL_NO_DEPRECATED_3_0 492 642 const EVP_CIPHER *EVP_CIPHER_CTX_cipher(const EVP_CIPHER_CTX *ctx); 493 int EVP_CIPHER_CTX_encrypting(const EVP_CIPHER_CTX *ctx);494 int EVP_CIPHER_CTX_nid(const EVP_CIPHER_CTX *ctx);495 int EVP_CIPHER_CTX_block_size(constEVP_CIPHER_CTX *ctx);496 int EVP_CIPHER_CTX_key_length(const EVP_CIPHER_CTX *ctx); 497 int EVP_CIPHER_CTX_ iv_length(const EVP_CIPHER_CTX *ctx);498 const unsigned char *EVP_CIPHER_CTX_iv(const EVP_CIPHER_CTX *ctx);499 const unsigned char *EVP_CIPHER_CTX_original_iv(const EVP_CIPHER_CTX *ctx); 500 unsigned char *EVP_CIPHER_CTX_iv_noconst(EVP_CIPHER_CTX *ctx); 643 OSSL_DEPRECATEDIN_3_0 const unsigned char *EVP_CIPHER_CTX_iv(const EVP_CIPHER_CTX *ctx); 644 OSSL_DEPRECATEDIN_3_0 const unsigned char *EVP_CIPHER_CTX_original_iv(const EVP_CIPHER_CTX *ctx); 645 OSSL_DEPRECATEDIN_3_0 unsigned char *EVP_CIPHER_CTX_iv_noconst(EVP_CIPHER_CTX *ctx); 646 # endif 647 int EVP_CIPHER_CTX_get_updated_iv(EVP_CIPHER_CTX *ctx, void *buf, size_t len); 648 int EVP_CIPHER_CTX_get_original_iv(EVP_CIPHER_CTX *ctx, void *buf, size_t len); 649 # ifndef OPENSSL_NO_DEPRECATED_3_0 650 OSSL_DEPRECATEDIN_3_0 501 651 unsigned char *EVP_CIPHER_CTX_buf_noconst(EVP_CIPHER_CTX *ctx); 502 int EVP_CIPHER_CTX_num(const EVP_CIPHER_CTX *ctx); 503 void EVP_CIPHER_CTX_set_num(EVP_CIPHER_CTX *ctx, int num); 652 # endif 653 int EVP_CIPHER_CTX_get_num(const EVP_CIPHER_CTX *ctx); 654 # define EVP_CIPHER_CTX_num EVP_CIPHER_CTX_get_num 655 int EVP_CIPHER_CTX_set_num(EVP_CIPHER_CTX *ctx, int num); 504 656 int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in); 505 657 void *EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx); … … 507 659 void *EVP_CIPHER_CTX_get_cipher_data(const EVP_CIPHER_CTX *ctx); 508 660 void *EVP_CIPHER_CTX_set_cipher_data(EVP_CIPHER_CTX *ctx, void *cipher_data); 509 # define EVP_CIPHER_CTX_type(c) EVP_CIPHER_type(EVP_CIPHER_CTX_cipher(c)) 510 # if OPENSSL_API_COMPAT < 0x10100000L 511 # define EVP_CIPHER_CTX_flags(c) EVP_CIPHER_flags(EVP_CIPHER_CTX_cipher(c)) 512 # endif 513 # define EVP_CIPHER_CTX_mode(c) EVP_CIPHER_mode(EVP_CIPHER_CTX_cipher(c)) 661 # define EVP_CIPHER_CTX_get0_name(c) EVP_CIPHER_get0_name(EVP_CIPHER_CTX_get0_cipher(c)) 662 # define EVP_CIPHER_CTX_get_type(c) EVP_CIPHER_get_type(EVP_CIPHER_CTX_get0_cipher(c)) 663 # define EVP_CIPHER_CTX_type EVP_CIPHER_CTX_get_type 664 # ifndef OPENSSL_NO_DEPRECATED_1_1_0 665 # define EVP_CIPHER_CTX_flags(c) EVP_CIPHER_get_flags(EVP_CIPHER_CTX_get0_cipher(c)) 666 # endif 667 # define EVP_CIPHER_CTX_get_mode(c) EVP_CIPHER_get_mode(EVP_CIPHER_CTX_get0_cipher(c)) 668 # define EVP_CIPHER_CTX_mode EVP_CIPHER_CTX_get_mode 514 669 515 670 # define EVP_ENCODE_LENGTH(l) ((((l)+2)/3*4)+((l)/48+1)*2+80) … … 524 679 # define EVP_OpenUpdate(a,b,c,d,e) EVP_DecryptUpdate(a,b,c,d,e) 525 680 # define EVP_SealUpdate(a,b,c,d,e) EVP_EncryptUpdate(a,b,c,d,e) 526 # define EVP_DigestSignUpdate(a,b,c) EVP_DigestUpdate(a,b,c)527 # define EVP_DigestVerifyUpdate(a,b,c) EVP_DigestUpdate(a,b,c)528 681 529 682 # ifdef CONST_STRICT 530 683 void BIO_set_md(BIO *, const EVP_MD *md); 531 684 # else 532 # define BIO_set_md(b,md) BIO_ctrl(b,BIO_C_SET_MD,0,(char *)(md)) 533 # endif 534 # define BIO_get_md(b,mdp) BIO_ctrl(b,BIO_C_GET_MD,0,(char *)(mdp)) 535 # define BIO_get_md_ctx(b,mdcp) BIO_ctrl(b,BIO_C_GET_MD_CTX,0, \ 536 (char *)(mdcp)) 537 # define BIO_set_md_ctx(b,mdcp) BIO_ctrl(b,BIO_C_SET_MD_CTX,0, \ 538 (char *)(mdcp)) 685 # define BIO_set_md(b,md) BIO_ctrl(b,BIO_C_SET_MD,0,(void *)(md)) 686 # endif 687 # define BIO_get_md(b,mdp) BIO_ctrl(b,BIO_C_GET_MD,0,(mdp)) 688 # define BIO_get_md_ctx(b,mdcp) BIO_ctrl(b,BIO_C_GET_MD_CTX,0,(mdcp)) 689 # define BIO_set_md_ctx(b,mdcp) BIO_ctrl(b,BIO_C_SET_MD_CTX,0,(mdcp)) 539 690 # define BIO_get_cipher_status(b) BIO_ctrl(b,BIO_C_GET_CIPHER_STATUS,0,NULL) 540 # define BIO_get_cipher_ctx(b,c_pp) BIO_ctrl(b,BIO_C_GET_CIPHER_CTX,0, \ 541 (char *)(c_pp)) 691 # define BIO_get_cipher_ctx(b,c_pp) BIO_ctrl(b,BIO_C_GET_CIPHER_CTX,0,(c_pp)) 542 692 543 693 /*__owur*/ int EVP_Cipher(EVP_CIPHER_CTX *c, … … 554 704 OBJ_NAME_remove(alias,OBJ_NAME_TYPE_MD_METH|OBJ_NAME_ALIAS); 555 705 706 int EVP_MD_get_params(const EVP_MD *digest, OSSL_PARAM params[]); 707 int EVP_MD_CTX_set_params(EVP_MD_CTX *ctx, const OSSL_PARAM params[]); 708 int EVP_MD_CTX_get_params(EVP_MD_CTX *ctx, OSSL_PARAM params[]); 709 const OSSL_PARAM *EVP_MD_gettable_params(const EVP_MD *digest); 710 const OSSL_PARAM *EVP_MD_settable_ctx_params(const EVP_MD *md); 711 const OSSL_PARAM *EVP_MD_gettable_ctx_params(const EVP_MD *md); 712 const OSSL_PARAM *EVP_MD_CTX_settable_params(EVP_MD_CTX *ctx); 713 const OSSL_PARAM *EVP_MD_CTX_gettable_params(EVP_MD_CTX *ctx); 556 714 int EVP_MD_CTX_ctrl(EVP_MD_CTX *ctx, int cmd, int p1, void *p2); 557 715 EVP_MD_CTX *EVP_MD_CTX_new(void); … … 565 723 void EVP_MD_CTX_clear_flags(EVP_MD_CTX *ctx, int flags); 566 724 int EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx, int flags); 725 __owur int EVP_DigestInit_ex2(EVP_MD_CTX *ctx, const EVP_MD *type, 726 const OSSL_PARAM params[]); 567 727 __owur int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, 568 728 ENGINE *impl); … … 574 734 unsigned char *md, unsigned int *size, 575 735 const EVP_MD *type, ENGINE *impl); 736 __owur int EVP_Q_digest(OSSL_LIB_CTX *libctx, const char *name, 737 const char *propq, const void *data, size_t datalen, 738 unsigned char *md, size_t *mdlen); 576 739 577 740 __owur int EVP_MD_CTX_copy(EVP_MD_CTX *out, const EVP_MD_CTX *in); … … 582 745 size_t len); 583 746 747 __owur EVP_MD *EVP_MD_fetch(OSSL_LIB_CTX *ctx, const char *algorithm, 748 const char *properties); 749 750 int EVP_MD_up_ref(EVP_MD *md); 751 void EVP_MD_free(EVP_MD *md); 752 584 753 int EVP_read_pw_string(char *buf, int length, const char *prompt, int verify); 585 754 int EVP_read_pw_string_min(char *buf, int minlen, int maxlen, … … 603 772 const unsigned char *key, 604 773 const unsigned char *iv); 774 __owur int EVP_EncryptInit_ex2(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, 775 const unsigned char *key, 776 const unsigned char *iv, 777 const OSSL_PARAM params[]); 605 778 /*__owur*/ int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, 606 779 int *outl, const unsigned char *in, int inl); … … 616 789 const unsigned char *key, 617 790 const unsigned char *iv); 791 __owur int EVP_DecryptInit_ex2(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, 792 const unsigned char *key, 793 const unsigned char *iv, 794 const OSSL_PARAM params[]); 618 795 /*__owur*/ int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, 619 796 int *outl, const unsigned char *in, int inl); … … 630 807 const unsigned char *key, 631 808 const unsigned char *iv, int enc); 809 __owur int EVP_CipherInit_ex2(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, 810 const unsigned char *key, const unsigned char *iv, 811 int enc, const OSSL_PARAM params[]); 632 812 __owur int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, 633 813 int *outl, const unsigned char *in, int inl); … … 639 819 __owur int EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s, 640 820 EVP_PKEY *pkey); 821 __owur int EVP_SignFinal_ex(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s, 822 EVP_PKEY *pkey, OSSL_LIB_CTX *libctx, 823 const char *propq); 641 824 642 825 __owur int EVP_DigestSign(EVP_MD_CTX *ctx, unsigned char *sigret, … … 646 829 __owur int EVP_VerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sigbuf, 647 830 unsigned int siglen, EVP_PKEY *pkey); 831 __owur int EVP_VerifyFinal_ex(EVP_MD_CTX *ctx, const unsigned char *sigbuf, 832 unsigned int siglen, EVP_PKEY *pkey, 833 OSSL_LIB_CTX *libctx, const char *propq); 648 834 649 835 __owur int EVP_DigestVerify(EVP_MD_CTX *ctx, const unsigned char *sigret, … … 651 837 size_t tbslen); 652 838 839 int EVP_DigestSignInit_ex(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx, 840 const char *mdname, OSSL_LIB_CTX *libctx, 841 const char *props, EVP_PKEY *pkey, 842 const OSSL_PARAM params[]); 653 843 /*__owur*/ int EVP_DigestSignInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx, 654 844 const EVP_MD *type, ENGINE *e, 655 845 EVP_PKEY *pkey); 846 int EVP_DigestSignUpdate(EVP_MD_CTX *ctx, const void *data, size_t dsize); 656 847 __owur int EVP_DigestSignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, 657 848 size_t *siglen); 658 849 850 int EVP_DigestVerifyInit_ex(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx, 851 const char *mdname, OSSL_LIB_CTX *libctx, 852 const char *props, EVP_PKEY *pkey, 853 const OSSL_PARAM params[]); 659 854 __owur int EVP_DigestVerifyInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx, 660 855 const EVP_MD *type, ENGINE *e, 661 856 EVP_PKEY *pkey); 857 int EVP_DigestVerifyUpdate(EVP_MD_CTX *ctx, const void *data, size_t dsize); 662 858 __owur int EVP_DigestVerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sig, 663 859 size_t siglen); 664 860 665 # ifndef OPENSSL_NO_RSA666 861 __owur int EVP_OpenInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, 667 862 const unsigned char *ek, int ekl, … … 673 868 EVP_PKEY **pubk, int npubk); 674 869 __owur int EVP_SealFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl); 675 # endif676 870 677 871 EVP_ENCODE_CTX *EVP_ENCODE_CTX_new(void); 678 872 void EVP_ENCODE_CTX_free(EVP_ENCODE_CTX *ctx); 679 int EVP_ENCODE_CTX_copy(EVP_ENCODE_CTX *dctx, EVP_ENCODE_CTX *sctx);873 int EVP_ENCODE_CTX_copy(EVP_ENCODE_CTX *dctx, const EVP_ENCODE_CTX *sctx); 680 874 int EVP_ENCODE_CTX_num(EVP_ENCODE_CTX *ctx); 681 875 void EVP_EncodeInit(EVP_ENCODE_CTX *ctx); … … 692 886 int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n); 693 887 694 # if OPENSSL_API_COMPAT < 0x10100000L888 # ifndef OPENSSL_NO_DEPRECATED_1_1_0 695 889 # define EVP_CIPHER_CTX_init(c) EVP_CIPHER_CTX_reset(c) 696 890 # define EVP_CIPHER_CTX_cleanup(c) EVP_CIPHER_CTX_reset(c) … … 703 897 int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr); 704 898 int EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key); 899 int EVP_CIPHER_get_params(EVP_CIPHER *cipher, OSSL_PARAM params[]); 900 int EVP_CIPHER_CTX_set_params(EVP_CIPHER_CTX *ctx, const OSSL_PARAM params[]); 901 int EVP_CIPHER_CTX_get_params(EVP_CIPHER_CTX *ctx, OSSL_PARAM params[]); 902 const OSSL_PARAM *EVP_CIPHER_gettable_params(const EVP_CIPHER *cipher); 903 const OSSL_PARAM *EVP_CIPHER_settable_ctx_params(const EVP_CIPHER *cipher); 904 const OSSL_PARAM *EVP_CIPHER_gettable_ctx_params(const EVP_CIPHER *cipher); 905 const OSSL_PARAM *EVP_CIPHER_CTX_settable_params(EVP_CIPHER_CTX *ctx); 906 const OSSL_PARAM *EVP_CIPHER_CTX_gettable_params(EVP_CIPHER_CTX *ctx); 705 907 706 908 const BIO_METHOD *BIO_f_md(void); … … 739 941 const EVP_MD *EVP_shake128(void); 740 942 const EVP_MD *EVP_shake256(void); 943 741 944 # ifndef OPENSSL_NO_MDC2 742 945 const EVP_MD *EVP_mdc2(void); … … 959 1162 # endif 960 1163 961 # if OPENSSL_API_COMPAT < 0x10100000L1164 # ifndef OPENSSL_NO_DEPRECATED_1_1_0 962 1165 # define OPENSSL_add_all_algorithms_conf() \ 963 1166 OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS \ … … 994 1197 (const EVP_CIPHER *ciph, const char *from, 995 1198 const char *to, void *x), void *arg); 1199 void EVP_CIPHER_do_all_provided(OSSL_LIB_CTX *libctx, 1200 void (*fn)(EVP_CIPHER *cipher, void *arg), 1201 void *arg); 996 1202 997 1203 void EVP_MD_do_all(void (*fn) (const EVP_MD *ciph, … … 1001 1207 (const EVP_MD *ciph, const char *from, 1002 1208 const char *to, void *x), void *arg); 1003 1004 int EVP_PKEY_decrypt_old(unsigned char *dec_key, 1005 const unsigned char *enc_key, int enc_key_len, 1006 EVP_PKEY *private_key); 1007 int EVP_PKEY_encrypt_old(unsigned char *enc_key, 1008 const unsigned char *key, int key_len, 1009 EVP_PKEY *pub_key); 1209 void EVP_MD_do_all_provided(OSSL_LIB_CTX *libctx, 1210 void (*fn)(EVP_MD *md, void *arg), 1211 void *arg); 1212 1213 /* MAC stuff */ 1214 1215 EVP_MAC *EVP_MAC_fetch(OSSL_LIB_CTX *libctx, const char *algorithm, 1216 const char *properties); 1217 int EVP_MAC_up_ref(EVP_MAC *mac); 1218 void EVP_MAC_free(EVP_MAC *mac); 1219 const char *EVP_MAC_get0_name(const EVP_MAC *mac); 1220 const char *EVP_MAC_get0_description(const EVP_MAC *mac); 1221 int EVP_MAC_is_a(const EVP_MAC *mac, const char *name); 1222 const OSSL_PROVIDER *EVP_MAC_get0_provider(const EVP_MAC *mac); 1223 int EVP_MAC_get_params(EVP_MAC *mac, OSSL_PARAM params[]); 1224 1225 EVP_MAC_CTX *EVP_MAC_CTX_new(EVP_MAC *mac); 1226 void EVP_MAC_CTX_free(EVP_MAC_CTX *ctx); 1227 EVP_MAC_CTX *EVP_MAC_CTX_dup(const EVP_MAC_CTX *src); 1228 EVP_MAC *EVP_MAC_CTX_get0_mac(EVP_MAC_CTX *ctx); 1229 int EVP_MAC_CTX_get_params(EVP_MAC_CTX *ctx, OSSL_PARAM params[]); 1230 int EVP_MAC_CTX_set_params(EVP_MAC_CTX *ctx, const OSSL_PARAM params[]); 1231 1232 size_t EVP_MAC_CTX_get_mac_size(EVP_MAC_CTX *ctx); 1233 size_t EVP_MAC_CTX_get_block_size(EVP_MAC_CTX *ctx); 1234 unsigned char *EVP_Q_mac(OSSL_LIB_CTX *libctx, const char *name, const char *propq, 1235 const char *subalg, const OSSL_PARAM *params, 1236 const void *key, size_t keylen, 1237 const unsigned char *data, size_t datalen, 1238 unsigned char *out, size_t outsize, size_t *outlen); 1239 int EVP_MAC_init(EVP_MAC_CTX *ctx, const unsigned char *key, size_t keylen, 1240 const OSSL_PARAM params[]); 1241 int EVP_MAC_update(EVP_MAC_CTX *ctx, const unsigned char *data, size_t datalen); 1242 int EVP_MAC_final(EVP_MAC_CTX *ctx, 1243 unsigned char *out, size_t *outl, size_t outsize); 1244 int EVP_MAC_finalXOF(EVP_MAC_CTX *ctx, unsigned char *out, size_t outsize); 1245 const OSSL_PARAM *EVP_MAC_gettable_params(const EVP_MAC *mac); 1246 const OSSL_PARAM *EVP_MAC_gettable_ctx_params(const EVP_MAC *mac); 1247 const OSSL_PARAM *EVP_MAC_settable_ctx_params(const EVP_MAC *mac); 1248 const OSSL_PARAM *EVP_MAC_CTX_gettable_params(EVP_MAC_CTX *ctx); 1249 const OSSL_PARAM *EVP_MAC_CTX_settable_params(EVP_MAC_CTX *ctx); 1250 1251 void EVP_MAC_do_all_provided(OSSL_LIB_CTX *libctx, 1252 void (*fn)(EVP_MAC *mac, void *arg), 1253 void *arg); 1254 int EVP_MAC_names_do_all(const EVP_MAC *mac, 1255 void (*fn)(const char *name, void *data), 1256 void *data); 1257 1258 /* RAND stuff */ 1259 EVP_RAND *EVP_RAND_fetch(OSSL_LIB_CTX *libctx, const char *algorithm, 1260 const char *properties); 1261 int EVP_RAND_up_ref(EVP_RAND *rand); 1262 void EVP_RAND_free(EVP_RAND *rand); 1263 const char *EVP_RAND_get0_name(const EVP_RAND *rand); 1264 const char *EVP_RAND_get0_description(const EVP_RAND *md); 1265 int EVP_RAND_is_a(const EVP_RAND *rand, const char *name); 1266 const OSSL_PROVIDER *EVP_RAND_get0_provider(const EVP_RAND *rand); 1267 int EVP_RAND_get_params(EVP_RAND *rand, OSSL_PARAM params[]); 1268 1269 EVP_RAND_CTX *EVP_RAND_CTX_new(EVP_RAND *rand, EVP_RAND_CTX *parent); 1270 void EVP_RAND_CTX_free(EVP_RAND_CTX *ctx); 1271 EVP_RAND *EVP_RAND_CTX_get0_rand(EVP_RAND_CTX *ctx); 1272 int EVP_RAND_CTX_get_params(EVP_RAND_CTX *ctx, OSSL_PARAM params[]); 1273 int EVP_RAND_CTX_set_params(EVP_RAND_CTX *ctx, const OSSL_PARAM params[]); 1274 const OSSL_PARAM *EVP_RAND_gettable_params(const EVP_RAND *rand); 1275 const OSSL_PARAM *EVP_RAND_gettable_ctx_params(const EVP_RAND *rand); 1276 const OSSL_PARAM *EVP_RAND_settable_ctx_params(const EVP_RAND *rand); 1277 const OSSL_PARAM *EVP_RAND_CTX_gettable_params(EVP_RAND_CTX *ctx); 1278 const OSSL_PARAM *EVP_RAND_CTX_settable_params(EVP_RAND_CTX *ctx); 1279 1280 void EVP_RAND_do_all_provided(OSSL_LIB_CTX *libctx, 1281 void (*fn)(EVP_RAND *rand, void *arg), 1282 void *arg); 1283 int EVP_RAND_names_do_all(const EVP_RAND *rand, 1284 void (*fn)(const char *name, void *data), 1285 void *data); 1286 1287 __owur int EVP_RAND_instantiate(EVP_RAND_CTX *ctx, unsigned int strength, 1288 int prediction_resistance, 1289 const unsigned char *pstr, size_t pstr_len, 1290 const OSSL_PARAM params[]); 1291 int EVP_RAND_uninstantiate(EVP_RAND_CTX *ctx); 1292 __owur int EVP_RAND_generate(EVP_RAND_CTX *ctx, unsigned char *out, 1293 size_t outlen, unsigned int strength, 1294 int prediction_resistance, 1295 const unsigned char *addin, size_t addin_len); 1296 int EVP_RAND_reseed(EVP_RAND_CTX *ctx, int prediction_resistance, 1297 const unsigned char *ent, size_t ent_len, 1298 const unsigned char *addin, size_t addin_len); 1299 __owur int EVP_RAND_nonce(EVP_RAND_CTX *ctx, unsigned char *out, size_t outlen); 1300 __owur int EVP_RAND_enable_locking(EVP_RAND_CTX *ctx); 1301 1302 int EVP_RAND_verify_zeroization(EVP_RAND_CTX *ctx); 1303 unsigned int EVP_RAND_get_strength(EVP_RAND_CTX *ctx); 1304 int EVP_RAND_get_state(EVP_RAND_CTX *ctx); 1305 1306 # define EVP_RAND_STATE_UNINITIALISED 0 1307 # define EVP_RAND_STATE_READY 1 1308 # define EVP_RAND_STATE_ERROR 2 1309 1310 /* PKEY stuff */ 1311 # ifndef OPENSSL_NO_DEPRECATED_3_0 1312 OSSL_DEPRECATEDIN_3_0 int EVP_PKEY_decrypt_old(unsigned char *dec_key, 1313 const unsigned char *enc_key, 1314 int enc_key_len, 1315 EVP_PKEY *private_key); 1316 OSSL_DEPRECATEDIN_3_0 int EVP_PKEY_encrypt_old(unsigned char *enc_key, 1317 const unsigned char *key, 1318 int key_len, EVP_PKEY *pub_key); 1319 # endif 1320 int EVP_PKEY_is_a(const EVP_PKEY *pkey, const char *name); 1321 int EVP_PKEY_type_names_do_all(const EVP_PKEY *pkey, 1322 void (*fn)(const char *name, void *data), 1323 void *data); 1010 1324 int EVP_PKEY_type(int type); 1011 int EVP_PKEY_id(const EVP_PKEY *pkey); 1012 int EVP_PKEY_base_id(const EVP_PKEY *pkey); 1013 int EVP_PKEY_bits(const EVP_PKEY *pkey); 1014 int EVP_PKEY_security_bits(const EVP_PKEY *pkey); 1015 int EVP_PKEY_size(const EVP_PKEY *pkey); 1325 int EVP_PKEY_get_id(const EVP_PKEY *pkey); 1326 # define EVP_PKEY_id EVP_PKEY_get_id 1327 int EVP_PKEY_get_base_id(const EVP_PKEY *pkey); 1328 # define EVP_PKEY_base_id EVP_PKEY_get_base_id 1329 int EVP_PKEY_get_bits(const EVP_PKEY *pkey); 1330 # define EVP_PKEY_bits EVP_PKEY_get_bits 1331 int EVP_PKEY_get_security_bits(const EVP_PKEY *pkey); 1332 # define EVP_PKEY_security_bits EVP_PKEY_get_security_bits 1333 int EVP_PKEY_get_size(const EVP_PKEY *pkey); 1334 # define EVP_PKEY_size EVP_PKEY_get_size 1335 int EVP_PKEY_can_sign(const EVP_PKEY *pkey); 1016 1336 int EVP_PKEY_set_type(EVP_PKEY *pkey, int type); 1017 1337 int EVP_PKEY_set_type_str(EVP_PKEY *pkey, const char *str, int len); 1018 int EVP_PKEY_set_alias_type(EVP_PKEY *pkey, int type); 1019 # ifndef OPENSSL_NO_ENGINE 1338 int EVP_PKEY_set_type_by_keymgmt(EVP_PKEY *pkey, EVP_KEYMGMT *keymgmt); 1339 # ifndef OPENSSL_NO_DEPRECATED_3_0 1340 # ifndef OPENSSL_NO_ENGINE 1341 OSSL_DEPRECATEDIN_3_0 1020 1342 int EVP_PKEY_set1_engine(EVP_PKEY *pkey, ENGINE *e); 1343 OSSL_DEPRECATEDIN_3_0 1021 1344 ENGINE *EVP_PKEY_get0_engine(const EVP_PKEY *pkey); 1022 # endif 1345 # endif 1346 OSSL_DEPRECATEDIN_3_0 1023 1347 int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key); 1348 OSSL_DEPRECATEDIN_3_0 1024 1349 void *EVP_PKEY_get0(const EVP_PKEY *pkey); 1350 OSSL_DEPRECATEDIN_3_0 1025 1351 const unsigned char *EVP_PKEY_get0_hmac(const EVP_PKEY *pkey, size_t *len); 1026 # ifndef OPENSSL_NO_POLY1305 1352 # ifndef OPENSSL_NO_POLY1305 1353 OSSL_DEPRECATEDIN_3_0 1027 1354 const unsigned char *EVP_PKEY_get0_poly1305(const EVP_PKEY *pkey, size_t *len); 1028 # endif 1029 # ifndef OPENSSL_NO_SIPHASH 1355 # endif 1356 # ifndef OPENSSL_NO_SIPHASH 1357 OSSL_DEPRECATEDIN_3_0 1030 1358 const unsigned char *EVP_PKEY_get0_siphash(const EVP_PKEY *pkey, size_t *len); 1031 # endif 1032 1033 # ifndef OPENSSL_NO_RSA 1359 # endif 1360 1034 1361 struct rsa_st; 1362 OSSL_DEPRECATEDIN_3_0 1035 1363 int EVP_PKEY_set1_RSA(EVP_PKEY *pkey, struct rsa_st *key); 1036 struct rsa_st *EVP_PKEY_get0_RSA(EVP_PKEY *pkey); 1364 OSSL_DEPRECATEDIN_3_0 1365 const struct rsa_st *EVP_PKEY_get0_RSA(const EVP_PKEY *pkey); 1366 OSSL_DEPRECATEDIN_3_0 1037 1367 struct rsa_st *EVP_PKEY_get1_RSA(EVP_PKEY *pkey); 1038 # endif 1039 # ifndef OPENSSL_NO_DSA1368 1369 # ifndef OPENSSL_NO_DSA 1040 1370 struct dsa_st; 1371 OSSL_DEPRECATEDIN_3_0 1041 1372 int EVP_PKEY_set1_DSA(EVP_PKEY *pkey, struct dsa_st *key); 1042 struct dsa_st *EVP_PKEY_get0_DSA(EVP_PKEY *pkey); 1373 OSSL_DEPRECATEDIN_3_0 1374 const struct dsa_st *EVP_PKEY_get0_DSA(const EVP_PKEY *pkey); 1375 OSSL_DEPRECATEDIN_3_0 1043 1376 struct dsa_st *EVP_PKEY_get1_DSA(EVP_PKEY *pkey); 1044 # endif 1045 # ifndef OPENSSL_NO_DH 1377 # endif 1378 1379 # ifndef OPENSSL_NO_DH 1046 1380 struct dh_st; 1047 int EVP_PKEY_set1_DH(EVP_PKEY *pkey, struct dh_st *key); 1048 struct dh_st *EVP_PKEY_get0_DH(EVP_PKEY *pkey); 1049 struct dh_st *EVP_PKEY_get1_DH(EVP_PKEY *pkey); 1050 # endif 1051 # ifndef OPENSSL_NO_EC 1381 OSSL_DEPRECATEDIN_3_0 int EVP_PKEY_set1_DH(EVP_PKEY *pkey, struct dh_st *key); 1382 OSSL_DEPRECATEDIN_3_0 const struct dh_st *EVP_PKEY_get0_DH(const EVP_PKEY *pkey); 1383 OSSL_DEPRECATEDIN_3_0 struct dh_st *EVP_PKEY_get1_DH(EVP_PKEY *pkey); 1384 # endif 1385 1386 # ifndef OPENSSL_NO_EC 1052 1387 struct ec_key_st; 1388 OSSL_DEPRECATEDIN_3_0 1053 1389 int EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey, struct ec_key_st *key); 1054 struct ec_key_st *EVP_PKEY_get0_EC_KEY(EVP_PKEY *pkey); 1390 OSSL_DEPRECATEDIN_3_0 1391 const struct ec_key_st *EVP_PKEY_get0_EC_KEY(const EVP_PKEY *pkey); 1392 OSSL_DEPRECATEDIN_3_0 1055 1393 struct ec_key_st *EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey); 1056 # endif 1394 # endif 1395 # endif /* OPENSSL_NO_DEPRECATED_3_0 */ 1057 1396 1058 1397 EVP_PKEY *EVP_PKEY_new(void); 1059 1398 int EVP_PKEY_up_ref(EVP_PKEY *pkey); 1399 EVP_PKEY *EVP_PKEY_dup(EVP_PKEY *pkey); 1060 1400 void EVP_PKEY_free(EVP_PKEY *pkey); 1401 const char *EVP_PKEY_get0_description(const EVP_PKEY *pkey); 1402 const OSSL_PROVIDER *EVP_PKEY_get0_provider(const EVP_PKEY *key); 1061 1403 1062 1404 EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp, 1063 1405 long length); 1064 int i2d_PublicKey(EVP_PKEY *a, unsigned char **pp); 1065 1406 int i2d_PublicKey(const EVP_PKEY *a, unsigned char **pp); 1407 1408 1409 EVP_PKEY *d2i_PrivateKey_ex(int type, EVP_PKEY **a, const unsigned char **pp, 1410 long length, OSSL_LIB_CTX *libctx, 1411 const char *propq); 1066 1412 EVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **a, const unsigned char **pp, 1067 1413 long length); 1414 EVP_PKEY *d2i_AutoPrivateKey_ex(EVP_PKEY **a, const unsigned char **pp, 1415 long length, OSSL_LIB_CTX *libctx, 1416 const char *propq); 1068 1417 EVP_PKEY *d2i_AutoPrivateKey(EVP_PKEY **a, const unsigned char **pp, 1069 1418 long length); 1070 int i2d_PrivateKey(EVP_PKEY *a, unsigned char **pp); 1419 int i2d_PrivateKey(const EVP_PKEY *a, unsigned char **pp); 1420 1421 int i2d_KeyParams(const EVP_PKEY *a, unsigned char **pp); 1422 EVP_PKEY *d2i_KeyParams(int type, EVP_PKEY **a, const unsigned char **pp, 1423 long length); 1424 int i2d_KeyParams_bio(BIO *bp, const EVP_PKEY *pkey); 1425 EVP_PKEY *d2i_KeyParams_bio(int type, EVP_PKEY **a, BIO *in); 1071 1426 1072 1427 int EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from); 1073 1428 int EVP_PKEY_missing_parameters(const EVP_PKEY *pkey); 1074 1429 int EVP_PKEY_save_parameters(EVP_PKEY *pkey, int mode); 1430 int EVP_PKEY_parameters_eq(const EVP_PKEY *a, const EVP_PKEY *b); 1431 int EVP_PKEY_eq(const EVP_PKEY *a, const EVP_PKEY *b); 1432 1433 # ifndef OPENSSL_NO_DEPRECATED_3_0 1434 OSSL_DEPRECATEDIN_3_0 1075 1435 int EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b); 1076 1436 OSSL_DEPRECATEDIN_3_0 1077 1437 int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b); 1438 # endif 1078 1439 1079 1440 int EVP_PKEY_print_public(BIO *out, const EVP_PKEY *pkey, … … 1083 1444 int EVP_PKEY_print_params(BIO *out, const EVP_PKEY *pkey, 1084 1445 int indent, ASN1_PCTX *pctx); 1446 # ifndef OPENSSL_NO_STDIO 1447 int EVP_PKEY_print_public_fp(FILE *fp, const EVP_PKEY *pkey, 1448 int indent, ASN1_PCTX *pctx); 1449 int EVP_PKEY_print_private_fp(FILE *fp, const EVP_PKEY *pkey, 1450 int indent, ASN1_PCTX *pctx); 1451 int EVP_PKEY_print_params_fp(FILE *fp, const EVP_PKEY *pkey, 1452 int indent, ASN1_PCTX *pctx); 1453 # endif 1085 1454 1086 1455 int EVP_PKEY_get_default_digest_nid(EVP_PKEY *pkey, int *pnid); 1087 1088 int EVP_PKEY_set1_tls_encodedpoint(EVP_PKEY *pkey, 1089 const unsigned char *pt, size_t ptlen); 1090 size_t EVP_PKEY_get1_tls_encodedpoint(EVP_PKEY *pkey, unsigned char **ppt); 1091 1092 int EVP_CIPHER_type(const EVP_CIPHER *ctx); 1456 int EVP_PKEY_get_default_digest_name(EVP_PKEY *pkey, 1457 char *mdname, size_t mdname_sz); 1458 int EVP_PKEY_digestsign_supports_digest(EVP_PKEY *pkey, OSSL_LIB_CTX *libctx, 1459 const char *name, const char *propq); 1460 1461 # ifndef OPENSSL_NO_DEPRECATED_3_0 1462 /* 1463 * For backwards compatibility. Use EVP_PKEY_set1_encoded_public_key in 1464 * preference 1465 */ 1466 # define EVP_PKEY_set1_tls_encodedpoint(pkey, pt, ptlen) \ 1467 EVP_PKEY_set1_encoded_public_key((pkey), (pt), (ptlen)) 1468 # endif 1469 1470 int EVP_PKEY_set1_encoded_public_key(EVP_PKEY *pkey, 1471 const unsigned char *pub, size_t publen); 1472 1473 # ifndef OPENSSL_NO_DEPRECATED_3_0 1474 /* 1475 * For backwards compatibility. Use EVP_PKEY_get1_encoded_public_key in 1476 * preference 1477 */ 1478 # define EVP_PKEY_get1_tls_encodedpoint(pkey, ppt) \ 1479 EVP_PKEY_get1_encoded_public_key((pkey), (ppt)) 1480 # endif 1481 1482 size_t EVP_PKEY_get1_encoded_public_key(EVP_PKEY *pkey, unsigned char **ppub); 1093 1483 1094 1484 /* calls methods */ … … 1104 1494 ASN1_TYPE *param, const EVP_CIPHER *cipher, 1105 1495 const EVP_MD *md, int en_de); 1496 int PKCS5_PBE_keyivgen_ex(EVP_CIPHER_CTX *cctx, const char *pass, int passlen, 1497 ASN1_TYPE *param, const EVP_CIPHER *cipher, 1498 const EVP_MD *md, int en_de, OSSL_LIB_CTX *libctx, 1499 const char *propq); 1106 1500 int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen, 1107 1501 const unsigned char *salt, int saltlen, int iter, … … 1113 1507 ASN1_TYPE *param, const EVP_CIPHER *cipher, 1114 1508 const EVP_MD *md, int en_de); 1509 int PKCS5_v2_PBE_keyivgen_ex(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, 1510 ASN1_TYPE *param, const EVP_CIPHER *cipher, 1511 const EVP_MD *md, int en_de, 1512 OSSL_LIB_CTX *libctx, const char *propq); 1115 1513 1116 1514 #ifndef OPENSSL_NO_SCRYPT … … 1119 1517 uint64_t N, uint64_t r, uint64_t p, uint64_t maxmem, 1120 1518 unsigned char *key, size_t keylen); 1519 int EVP_PBE_scrypt_ex(const char *pass, size_t passlen, 1520 const unsigned char *salt, size_t saltlen, 1521 uint64_t N, uint64_t r, uint64_t p, uint64_t maxmem, 1522 unsigned char *key, size_t keylen, 1523 OSSL_LIB_CTX *ctx, const char *propq); 1121 1524 1122 1525 int PKCS5_v2_scrypt_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, 1123 1526 int passlen, ASN1_TYPE *param, 1124 1527 const EVP_CIPHER *c, const EVP_MD *md, int en_de); 1528 int PKCS5_v2_scrypt_keyivgen_ex(EVP_CIPHER_CTX *ctx, const char *pass, 1529 int passlen, ASN1_TYPE *param, 1530 const EVP_CIPHER *c, const EVP_MD *md, int en_de, 1531 OSSL_LIB_CTX *libctx, const char *propq); 1125 1532 #endif 1126 1533 … … 1129 1536 int EVP_PBE_CipherInit(ASN1_OBJECT *pbe_obj, const char *pass, int passlen, 1130 1537 ASN1_TYPE *param, EVP_CIPHER_CTX *ctx, int en_de); 1538 1539 int EVP_PBE_CipherInit_ex(ASN1_OBJECT *pbe_obj, const char *pass, int passlen, 1540 ASN1_TYPE *param, EVP_CIPHER_CTX *ctx, int en_de, 1541 OSSL_LIB_CTX *libctx, const char *propq); 1131 1542 1132 1543 /* PBE type */ … … 1145 1556 int EVP_PBE_find(int type, int pbe_nid, int *pcnid, int *pmnid, 1146 1557 EVP_PBE_KEYGEN **pkeygen); 1558 int EVP_PBE_find_ex(int type, int pbe_nid, int *pcnid, int *pmnid, 1559 EVP_PBE_KEYGEN **pkeygen, EVP_PBE_KEYGEN_EX **pkeygen_ex); 1147 1560 void EVP_PBE_cleanup(void); 1148 1561 int EVP_PBE_get(int *ptype, int *ppbe_nid, size_t num); … … 1161 1574 # define ASN1_PKEY_CTRL_SET1_TLS_ENCPT 0x9 1162 1575 # define ASN1_PKEY_CTRL_GET1_TLS_ENCPT 0xa 1576 # define ASN1_PKEY_CTRL_CMS_IS_RI_TYPE_SUPPORTED 0xb 1163 1577 1164 1578 int EVP_PKEY_asn1_get_count(void); … … 1183 1597 void EVP_PKEY_asn1_set_public(EVP_PKEY_ASN1_METHOD *ameth, 1184 1598 int (*pub_decode) (EVP_PKEY *pk, 1185 X509_PUBKEY *pub),1599 const X509_PUBKEY *pub), 1186 1600 int (*pub_encode) (X509_PUBKEY *pub, 1187 1601 const EVP_PKEY *pk), … … 1227 1641 int (*item_verify) (EVP_MD_CTX *ctx, 1228 1642 const ASN1_ITEM *it, 1229 void *asn,1230 X509_ALGOR *a,1231 ASN1_BIT_STRING *sig,1643 const void *data, 1644 const X509_ALGOR *a, 1645 const ASN1_BIT_STRING *sig, 1232 1646 EVP_PKEY *pkey), 1233 1647 int (*item_sign) (EVP_MD_CTX *ctx, 1234 1648 const ASN1_ITEM *it, 1235 void *asn,1649 const void *data, 1236 1650 X509_ALGOR *alg1, 1237 1651 X509_ALGOR *alg2, … … 1274 1688 *pk)); 1275 1689 1690 int EVP_PKEY_CTX_get_signature_md(EVP_PKEY_CTX *ctx, const EVP_MD **md); 1691 int EVP_PKEY_CTX_set_signature_md(EVP_PKEY_CTX *ctx, const EVP_MD *md); 1692 1693 int EVP_PKEY_CTX_set1_id(EVP_PKEY_CTX *ctx, const void *id, int len); 1694 int EVP_PKEY_CTX_get1_id(EVP_PKEY_CTX *ctx, void *id); 1695 int EVP_PKEY_CTX_get1_id_len(EVP_PKEY_CTX *ctx, size_t *id_len); 1696 1697 int EVP_PKEY_CTX_set_kem_op(EVP_PKEY_CTX *ctx, const char *op); 1698 1699 const char *EVP_PKEY_get0_type_name(const EVP_PKEY *key); 1700 1276 1701 # define EVP_PKEY_OP_UNDEFINED 0 1277 1702 # define EVP_PKEY_OP_PARAMGEN (1<<1) 1278 1703 # define EVP_PKEY_OP_KEYGEN (1<<2) 1279 # define EVP_PKEY_OP_SIGN (1<<3) 1280 # define EVP_PKEY_OP_VERIFY (1<<4) 1281 # define EVP_PKEY_OP_VERIFYRECOVER (1<<5) 1282 # define EVP_PKEY_OP_SIGNCTX (1<<6) 1283 # define EVP_PKEY_OP_VERIFYCTX (1<<7) 1284 # define EVP_PKEY_OP_ENCRYPT (1<<8) 1285 # define EVP_PKEY_OP_DECRYPT (1<<9) 1286 # define EVP_PKEY_OP_DERIVE (1<<10) 1704 # define EVP_PKEY_OP_FROMDATA (1<<3) 1705 # define EVP_PKEY_OP_SIGN (1<<4) 1706 # define EVP_PKEY_OP_VERIFY (1<<5) 1707 # define EVP_PKEY_OP_VERIFYRECOVER (1<<6) 1708 # define EVP_PKEY_OP_SIGNCTX (1<<7) 1709 # define EVP_PKEY_OP_VERIFYCTX (1<<8) 1710 # define EVP_PKEY_OP_ENCRYPT (1<<9) 1711 # define EVP_PKEY_OP_DECRYPT (1<<10) 1712 # define EVP_PKEY_OP_DERIVE (1<<11) 1713 # define EVP_PKEY_OP_ENCAPSULATE (1<<12) 1714 # define EVP_PKEY_OP_DECAPSULATE (1<<13) 1287 1715 1288 1716 # define EVP_PKEY_OP_TYPE_SIG \ … … 1297 1725 1298 1726 # define EVP_PKEY_OP_TYPE_GEN \ 1299 (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN) 1300 1301 # define EVP_PKEY_CTX_set_signature_md(ctx, md) \ 1302 EVP_PKEY_CTX_ctrl(ctx, -1, EVP_PKEY_OP_TYPE_SIG, \ 1303 EVP_PKEY_CTRL_MD, 0, (void *)(md)) 1304 1305 # define EVP_PKEY_CTX_get_signature_md(ctx, pmd) \ 1306 EVP_PKEY_CTX_ctrl(ctx, -1, EVP_PKEY_OP_TYPE_SIG, \ 1307 EVP_PKEY_CTRL_GET_MD, 0, (void *)(pmd)) 1308 1309 # define EVP_PKEY_CTX_set_mac_key(ctx, key, len) \ 1310 EVP_PKEY_CTX_ctrl(ctx, -1, EVP_PKEY_OP_KEYGEN, \ 1311 EVP_PKEY_CTRL_SET_MAC_KEY, len, (void *)(key)) 1727 (EVP_PKEY_OP_PARAMGEN | EVP_PKEY_OP_KEYGEN) 1728 1729 1730 int EVP_PKEY_CTX_set_mac_key(EVP_PKEY_CTX *ctx, const unsigned char *key, 1731 int keylen); 1312 1732 1313 1733 # define EVP_PKEY_CTRL_MD 1 1314 1734 # define EVP_PKEY_CTRL_PEER_KEY 2 1315 1316 # define EVP_PKEY_CTRL_PKCS7_ENCRYPT 31317 # define EVP_PKEY_CTRL_PKCS7_DECRYPT 41318 1319 # define EVP_PKEY_CTRL_PKCS7_SIGN 51320 1321 1735 # define EVP_PKEY_CTRL_SET_MAC_KEY 6 1322 1323 1736 # define EVP_PKEY_CTRL_DIGESTINIT 7 1324 1325 1737 /* Used by GOST key encryption in TLS */ 1326 1738 # define EVP_PKEY_CTRL_SET_IV 8 1327 1328 # define EVP_PKEY_CTRL_CMS_ENCRYPT 9 1329 # define EVP_PKEY_CTRL_CMS_DECRYPT 10 1330 # define EVP_PKEY_CTRL_CMS_SIGN 11 1331 1739 # ifndef OPENSSL_NO_DEPRECATED_3_0 1740 # define EVP_PKEY_CTRL_PKCS7_ENCRYPT 3 1741 # define EVP_PKEY_CTRL_PKCS7_DECRYPT 4 1742 # define EVP_PKEY_CTRL_PKCS7_SIGN 5 1743 # define EVP_PKEY_CTRL_CMS_ENCRYPT 9 1744 # define EVP_PKEY_CTRL_CMS_DECRYPT 10 1745 # define EVP_PKEY_CTRL_CMS_SIGN 11 1746 # endif 1332 1747 # define EVP_PKEY_CTRL_CIPHER 12 1333 1334 1748 # define EVP_PKEY_CTRL_GET_MD 13 1335 1336 1749 # define EVP_PKEY_CTRL_SET_DIGEST_SIZE 14 1750 # define EVP_PKEY_CTRL_SET1_ID 15 1751 # define EVP_PKEY_CTRL_GET1_ID 16 1752 # define EVP_PKEY_CTRL_GET1_ID_LEN 17 1337 1753 1338 1754 # define EVP_PKEY_ALG_CTRL 0x1000 … … 1343 1759 */ 1344 1760 # define EVP_PKEY_FLAG_SIGCTX_CUSTOM 4 1345 1346 const EVP_PKEY_METHOD *EVP_PKEY_meth_find(int type); 1347 EVP_PKEY_METHOD *EVP_PKEY_meth_new(int id, int flags); 1348 void EVP_PKEY_meth_get0_info(int *ppkey_id, int *pflags, 1349 const EVP_PKEY_METHOD *meth); 1350 void EVP_PKEY_meth_copy(EVP_PKEY_METHOD *dst, const EVP_PKEY_METHOD *src); 1351 void EVP_PKEY_meth_free(EVP_PKEY_METHOD *pmeth); 1352 int EVP_PKEY_meth_add0(const EVP_PKEY_METHOD *pmeth); 1353 int EVP_PKEY_meth_remove(const EVP_PKEY_METHOD *pmeth); 1354 size_t EVP_PKEY_meth_get_count(void); 1355 const EVP_PKEY_METHOD *EVP_PKEY_meth_get0(size_t idx); 1761 # ifndef OPENSSL_NO_DEPRECATED_3_0 1762 OSSL_DEPRECATEDIN_3_0 const EVP_PKEY_METHOD *EVP_PKEY_meth_find(int type); 1763 OSSL_DEPRECATEDIN_3_0 EVP_PKEY_METHOD *EVP_PKEY_meth_new(int id, int flags); 1764 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_get0_info(int *ppkey_id, int *pflags, 1765 const EVP_PKEY_METHOD *meth); 1766 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_copy(EVP_PKEY_METHOD *dst, 1767 const EVP_PKEY_METHOD *src); 1768 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_free(EVP_PKEY_METHOD *pmeth); 1769 OSSL_DEPRECATEDIN_3_0 int EVP_PKEY_meth_add0(const EVP_PKEY_METHOD *pmeth); 1770 OSSL_DEPRECATEDIN_3_0 int EVP_PKEY_meth_remove(const EVP_PKEY_METHOD *pmeth); 1771 OSSL_DEPRECATEDIN_3_0 size_t EVP_PKEY_meth_get_count(void); 1772 OSSL_DEPRECATEDIN_3_0 const EVP_PKEY_METHOD *EVP_PKEY_meth_get0(size_t idx); 1773 # endif 1774 1775 EVP_KEYMGMT *EVP_KEYMGMT_fetch(OSSL_LIB_CTX *ctx, const char *algorithm, 1776 const char *properties); 1777 int EVP_KEYMGMT_up_ref(EVP_KEYMGMT *keymgmt); 1778 void EVP_KEYMGMT_free(EVP_KEYMGMT *keymgmt); 1779 const OSSL_PROVIDER *EVP_KEYMGMT_get0_provider(const EVP_KEYMGMT *keymgmt); 1780 const char *EVP_KEYMGMT_get0_name(const EVP_KEYMGMT *keymgmt); 1781 const char *EVP_KEYMGMT_get0_description(const EVP_KEYMGMT *keymgmt); 1782 int EVP_KEYMGMT_is_a(const EVP_KEYMGMT *keymgmt, const char *name); 1783 void EVP_KEYMGMT_do_all_provided(OSSL_LIB_CTX *libctx, 1784 void (*fn)(EVP_KEYMGMT *keymgmt, void *arg), 1785 void *arg); 1786 int EVP_KEYMGMT_names_do_all(const EVP_KEYMGMT *keymgmt, 1787 void (*fn)(const char *name, void *data), 1788 void *data); 1789 const OSSL_PARAM *EVP_KEYMGMT_gettable_params(const EVP_KEYMGMT *keymgmt); 1790 const OSSL_PARAM *EVP_KEYMGMT_settable_params(const EVP_KEYMGMT *keymgmt); 1791 const OSSL_PARAM *EVP_KEYMGMT_gen_settable_params(const EVP_KEYMGMT *keymgmt); 1356 1792 1357 1793 EVP_PKEY_CTX *EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e); 1358 1794 EVP_PKEY_CTX *EVP_PKEY_CTX_new_id(int id, ENGINE *e); 1359 EVP_PKEY_CTX *EVP_PKEY_CTX_dup(EVP_PKEY_CTX *ctx); 1795 EVP_PKEY_CTX *EVP_PKEY_CTX_new_from_name(OSSL_LIB_CTX *libctx, 1796 const char *name, 1797 const char *propquery); 1798 EVP_PKEY_CTX *EVP_PKEY_CTX_new_from_pkey(OSSL_LIB_CTX *libctx, 1799 EVP_PKEY *pkey, const char *propquery); 1800 EVP_PKEY_CTX *EVP_PKEY_CTX_dup(const EVP_PKEY_CTX *ctx); 1360 1801 void EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx); 1361 1802 int EVP_PKEY_CTX_is_a(EVP_PKEY_CTX *ctx, const char *keytype); 1803 1804 int EVP_PKEY_CTX_get_params(EVP_PKEY_CTX *ctx, OSSL_PARAM *params); 1805 const OSSL_PARAM *EVP_PKEY_CTX_gettable_params(const EVP_PKEY_CTX *ctx); 1806 int EVP_PKEY_CTX_set_params(EVP_PKEY_CTX *ctx, const OSSL_PARAM *params); 1807 const OSSL_PARAM *EVP_PKEY_CTX_settable_params(const EVP_PKEY_CTX *ctx); 1362 1808 int EVP_PKEY_CTX_ctrl(EVP_PKEY_CTX *ctx, int keytype, int optype, 1363 1809 int cmd, int p1, void *p2); … … 1377 1823 EVP_PKEY *EVP_PKEY_new_mac_key(int type, ENGINE *e, 1378 1824 const unsigned char *key, int keylen); 1825 EVP_PKEY *EVP_PKEY_new_raw_private_key_ex(OSSL_LIB_CTX *libctx, 1826 const char *keytype, 1827 const char *propq, 1828 const unsigned char *priv, size_t len); 1379 1829 EVP_PKEY *EVP_PKEY_new_raw_private_key(int type, ENGINE *e, 1380 1830 const unsigned char *priv, 1381 1831 size_t len); 1832 EVP_PKEY *EVP_PKEY_new_raw_public_key_ex(OSSL_LIB_CTX *libctx, 1833 const char *keytype, const char *propq, 1834 const unsigned char *pub, size_t len); 1382 1835 EVP_PKEY *EVP_PKEY_new_raw_public_key(int type, ENGINE *e, 1383 1836 const unsigned char *pub, … … 1388 1841 size_t *len); 1389 1842 1843 # ifndef OPENSSL_NO_DEPRECATED_3_0 1844 OSSL_DEPRECATEDIN_3_0 1390 1845 EVP_PKEY *EVP_PKEY_new_CMAC_key(ENGINE *e, const unsigned char *priv, 1391 1846 size_t len, const EVP_CIPHER *cipher); 1847 # endif 1392 1848 1393 1849 void EVP_PKEY_CTX_set_data(EVP_PKEY_CTX *ctx, void *data); 1394 void *EVP_PKEY_CTX_get_data( EVP_PKEY_CTX *ctx);1850 void *EVP_PKEY_CTX_get_data(const EVP_PKEY_CTX *ctx); 1395 1851 EVP_PKEY *EVP_PKEY_CTX_get0_pkey(EVP_PKEY_CTX *ctx); 1396 1852 … … 1400 1856 void *EVP_PKEY_CTX_get_app_data(EVP_PKEY_CTX *ctx); 1401 1857 1858 void EVP_SIGNATURE_free(EVP_SIGNATURE *signature); 1859 int EVP_SIGNATURE_up_ref(EVP_SIGNATURE *signature); 1860 OSSL_PROVIDER *EVP_SIGNATURE_get0_provider(const EVP_SIGNATURE *signature); 1861 EVP_SIGNATURE *EVP_SIGNATURE_fetch(OSSL_LIB_CTX *ctx, const char *algorithm, 1862 const char *properties); 1863 int EVP_SIGNATURE_is_a(const EVP_SIGNATURE *signature, const char *name); 1864 const char *EVP_SIGNATURE_get0_name(const EVP_SIGNATURE *signature); 1865 const char *EVP_SIGNATURE_get0_description(const EVP_SIGNATURE *signature); 1866 void EVP_SIGNATURE_do_all_provided(OSSL_LIB_CTX *libctx, 1867 void (*fn)(EVP_SIGNATURE *signature, 1868 void *data), 1869 void *data); 1870 int EVP_SIGNATURE_names_do_all(const EVP_SIGNATURE *signature, 1871 void (*fn)(const char *name, void *data), 1872 void *data); 1873 const OSSL_PARAM *EVP_SIGNATURE_gettable_ctx_params(const EVP_SIGNATURE *sig); 1874 const OSSL_PARAM *EVP_SIGNATURE_settable_ctx_params(const EVP_SIGNATURE *sig); 1875 1876 void EVP_ASYM_CIPHER_free(EVP_ASYM_CIPHER *cipher); 1877 int EVP_ASYM_CIPHER_up_ref(EVP_ASYM_CIPHER *cipher); 1878 OSSL_PROVIDER *EVP_ASYM_CIPHER_get0_provider(const EVP_ASYM_CIPHER *cipher); 1879 EVP_ASYM_CIPHER *EVP_ASYM_CIPHER_fetch(OSSL_LIB_CTX *ctx, const char *algorithm, 1880 const char *properties); 1881 int EVP_ASYM_CIPHER_is_a(const EVP_ASYM_CIPHER *cipher, const char *name); 1882 const char *EVP_ASYM_CIPHER_get0_name(const EVP_ASYM_CIPHER *cipher); 1883 const char *EVP_ASYM_CIPHER_get0_description(const EVP_ASYM_CIPHER *cipher); 1884 void EVP_ASYM_CIPHER_do_all_provided(OSSL_LIB_CTX *libctx, 1885 void (*fn)(EVP_ASYM_CIPHER *cipher, 1886 void *arg), 1887 void *arg); 1888 int EVP_ASYM_CIPHER_names_do_all(const EVP_ASYM_CIPHER *cipher, 1889 void (*fn)(const char *name, void *data), 1890 void *data); 1891 const OSSL_PARAM *EVP_ASYM_CIPHER_gettable_ctx_params(const EVP_ASYM_CIPHER *ciph); 1892 const OSSL_PARAM *EVP_ASYM_CIPHER_settable_ctx_params(const EVP_ASYM_CIPHER *ciph); 1893 1894 void EVP_KEM_free(EVP_KEM *wrap); 1895 int EVP_KEM_up_ref(EVP_KEM *wrap); 1896 OSSL_PROVIDER *EVP_KEM_get0_provider(const EVP_KEM *wrap); 1897 EVP_KEM *EVP_KEM_fetch(OSSL_LIB_CTX *ctx, const char *algorithm, 1898 const char *properties); 1899 int EVP_KEM_is_a(const EVP_KEM *wrap, const char *name); 1900 const char *EVP_KEM_get0_name(const EVP_KEM *wrap); 1901 const char *EVP_KEM_get0_description(const EVP_KEM *wrap); 1902 void EVP_KEM_do_all_provided(OSSL_LIB_CTX *libctx, 1903 void (*fn)(EVP_KEM *wrap, void *arg), void *arg); 1904 int EVP_KEM_names_do_all(const EVP_KEM *wrap, 1905 void (*fn)(const char *name, void *data), void *data); 1906 const OSSL_PARAM *EVP_KEM_gettable_ctx_params(const EVP_KEM *kem); 1907 const OSSL_PARAM *EVP_KEM_settable_ctx_params(const EVP_KEM *kem); 1908 1402 1909 int EVP_PKEY_sign_init(EVP_PKEY_CTX *ctx); 1910 int EVP_PKEY_sign_init_ex(EVP_PKEY_CTX *ctx, const OSSL_PARAM params[]); 1403 1911 int EVP_PKEY_sign(EVP_PKEY_CTX *ctx, 1404 1912 unsigned char *sig, size_t *siglen, 1405 1913 const unsigned char *tbs, size_t tbslen); 1406 1914 int EVP_PKEY_verify_init(EVP_PKEY_CTX *ctx); 1915 int EVP_PKEY_verify_init_ex(EVP_PKEY_CTX *ctx, const OSSL_PARAM params[]); 1407 1916 int EVP_PKEY_verify(EVP_PKEY_CTX *ctx, 1408 1917 const unsigned char *sig, size_t siglen, 1409 1918 const unsigned char *tbs, size_t tbslen); 1410 1919 int EVP_PKEY_verify_recover_init(EVP_PKEY_CTX *ctx); 1920 int EVP_PKEY_verify_recover_init_ex(EVP_PKEY_CTX *ctx, 1921 const OSSL_PARAM params[]); 1411 1922 int EVP_PKEY_verify_recover(EVP_PKEY_CTX *ctx, 1412 1923 unsigned char *rout, size_t *routlen, 1413 1924 const unsigned char *sig, size_t siglen); 1414 1925 int EVP_PKEY_encrypt_init(EVP_PKEY_CTX *ctx); 1926 int EVP_PKEY_encrypt_init_ex(EVP_PKEY_CTX *ctx, const OSSL_PARAM params[]); 1415 1927 int EVP_PKEY_encrypt(EVP_PKEY_CTX *ctx, 1416 1928 unsigned char *out, size_t *outlen, 1417 1929 const unsigned char *in, size_t inlen); 1418 1930 int EVP_PKEY_decrypt_init(EVP_PKEY_CTX *ctx); 1931 int EVP_PKEY_decrypt_init_ex(EVP_PKEY_CTX *ctx, const OSSL_PARAM params[]); 1419 1932 int EVP_PKEY_decrypt(EVP_PKEY_CTX *ctx, 1420 1933 unsigned char *out, size_t *outlen, … … 1422 1935 1423 1936 int EVP_PKEY_derive_init(EVP_PKEY_CTX *ctx); 1937 int EVP_PKEY_derive_init_ex(EVP_PKEY_CTX *ctx, const OSSL_PARAM params[]); 1938 int EVP_PKEY_derive_set_peer_ex(EVP_PKEY_CTX *ctx, EVP_PKEY *peer, 1939 int validate_peer); 1424 1940 int EVP_PKEY_derive_set_peer(EVP_PKEY_CTX *ctx, EVP_PKEY *peer); 1425 1941 int EVP_PKEY_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen); 1426 1942 1943 int EVP_PKEY_encapsulate_init(EVP_PKEY_CTX *ctx, const OSSL_PARAM params[]); 1944 int EVP_PKEY_encapsulate(EVP_PKEY_CTX *ctx, 1945 unsigned char *wrappedkey, size_t *wrappedkeylen, 1946 unsigned char *genkey, size_t *genkeylen); 1947 int EVP_PKEY_decapsulate_init(EVP_PKEY_CTX *ctx, const OSSL_PARAM params[]); 1948 int EVP_PKEY_decapsulate(EVP_PKEY_CTX *ctx, 1949 unsigned char *unwrapped, size_t *unwrappedlen, 1950 const unsigned char *wrapped, size_t wrappedlen); 1951 1427 1952 typedef int EVP_PKEY_gen_cb(EVP_PKEY_CTX *ctx); 1428 1953 1954 int EVP_PKEY_fromdata_init(EVP_PKEY_CTX *ctx); 1955 int EVP_PKEY_fromdata(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey, int selection, 1956 OSSL_PARAM param[]); 1957 const OSSL_PARAM *EVP_PKEY_fromdata_settable(EVP_PKEY_CTX *ctx, int selection); 1958 1959 int EVP_PKEY_todata(const EVP_PKEY *pkey, int selection, OSSL_PARAM **params); 1960 int EVP_PKEY_export(const EVP_PKEY *pkey, int selection, 1961 OSSL_CALLBACK *export_cb, void *export_cbarg); 1962 1963 const OSSL_PARAM *EVP_PKEY_gettable_params(const EVP_PKEY *pkey); 1964 int EVP_PKEY_get_params(const EVP_PKEY *pkey, OSSL_PARAM params[]); 1965 int EVP_PKEY_get_int_param(const EVP_PKEY *pkey, const char *key_name, 1966 int *out); 1967 int EVP_PKEY_get_size_t_param(const EVP_PKEY *pkey, const char *key_name, 1968 size_t *out); 1969 int EVP_PKEY_get_bn_param(const EVP_PKEY *pkey, const char *key_name, 1970 BIGNUM **bn); 1971 int EVP_PKEY_get_utf8_string_param(const EVP_PKEY *pkey, const char *key_name, 1972 char *str, size_t max_buf_sz, size_t *out_sz); 1973 int EVP_PKEY_get_octet_string_param(const EVP_PKEY *pkey, const char *key_name, 1974 unsigned char *buf, size_t max_buf_sz, 1975 size_t *out_sz); 1976 1977 const OSSL_PARAM *EVP_PKEY_settable_params(const EVP_PKEY *pkey); 1978 int EVP_PKEY_set_params(EVP_PKEY *pkey, OSSL_PARAM params[]); 1979 int EVP_PKEY_set_int_param(EVP_PKEY *pkey, const char *key_name, int in); 1980 int EVP_PKEY_set_size_t_param(EVP_PKEY *pkey, const char *key_name, size_t in); 1981 int EVP_PKEY_set_bn_param(EVP_PKEY *pkey, const char *key_name, 1982 const BIGNUM *bn); 1983 int EVP_PKEY_set_utf8_string_param(EVP_PKEY *pkey, const char *key_name, 1984 const char *str); 1985 int EVP_PKEY_set_octet_string_param(EVP_PKEY *pkey, const char *key_name, 1986 const unsigned char *buf, size_t bsize); 1987 1988 int EVP_PKEY_get_ec_point_conv_form(const EVP_PKEY *pkey); 1989 int EVP_PKEY_get_field_type(const EVP_PKEY *pkey); 1990 1991 EVP_PKEY *EVP_PKEY_Q_keygen(OSSL_LIB_CTX *libctx, const char *propq, 1992 const char *type, ...); 1429 1993 int EVP_PKEY_paramgen_init(EVP_PKEY_CTX *ctx); 1430 1994 int EVP_PKEY_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey); 1431 1995 int EVP_PKEY_keygen_init(EVP_PKEY_CTX *ctx); 1432 1996 int EVP_PKEY_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey); 1997 int EVP_PKEY_generate(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey); 1433 1998 int EVP_PKEY_check(EVP_PKEY_CTX *ctx); 1434 1999 int EVP_PKEY_public_check(EVP_PKEY_CTX *ctx); 2000 int EVP_PKEY_public_check_quick(EVP_PKEY_CTX *ctx); 1435 2001 int EVP_PKEY_param_check(EVP_PKEY_CTX *ctx); 2002 int EVP_PKEY_param_check_quick(EVP_PKEY_CTX *ctx); 2003 int EVP_PKEY_private_check(EVP_PKEY_CTX *ctx); 2004 int EVP_PKEY_pairwise_check(EVP_PKEY_CTX *ctx); 2005 2006 # define EVP_PKEY_get_ex_new_index(l, p, newf, dupf, freef) \ 2007 CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_EVP_PKEY, l, p, newf, dupf, freef) 2008 int EVP_PKEY_set_ex_data(EVP_PKEY *key, int idx, void *arg); 2009 void *EVP_PKEY_get_ex_data(const EVP_PKEY *key, int idx); 1436 2010 1437 2011 void EVP_PKEY_CTX_set_cb(EVP_PKEY_CTX *ctx, EVP_PKEY_gen_cb *cb); … … 1439 2013 1440 2014 int EVP_PKEY_CTX_get_keygen_info(EVP_PKEY_CTX *ctx, int idx); 1441 1442 void EVP_PKEY_meth_set_init(EVP_PKEY_METHOD *pmeth, 1443 int (*init) (EVP_PKEY_CTX *ctx)); 1444 1445 void EVP_PKEY_meth_set_copy(EVP_PKEY_METHOD *pmeth, 1446 int (*copy) (EVP_PKEY_CTX *dst, 1447 EVP_PKEY_CTX *src)); 1448 1449 void EVP_PKEY_meth_set_cleanup(EVP_PKEY_METHOD *pmeth, 1450 void (*cleanup) (EVP_PKEY_CTX *ctx)); 1451 1452 void EVP_PKEY_meth_set_paramgen(EVP_PKEY_METHOD *pmeth, 1453 int (*paramgen_init) (EVP_PKEY_CTX *ctx), 1454 int (*paramgen) (EVP_PKEY_CTX *ctx, 1455 EVP_PKEY *pkey)); 1456 1457 void EVP_PKEY_meth_set_keygen(EVP_PKEY_METHOD *pmeth, 1458 int (*keygen_init) (EVP_PKEY_CTX *ctx), 1459 int (*keygen) (EVP_PKEY_CTX *ctx, 1460 EVP_PKEY *pkey)); 1461 1462 void EVP_PKEY_meth_set_sign(EVP_PKEY_METHOD *pmeth, 1463 int (*sign_init) (EVP_PKEY_CTX *ctx), 1464 int (*sign) (EVP_PKEY_CTX *ctx, 1465 unsigned char *sig, size_t *siglen, 1466 const unsigned char *tbs, 1467 size_t tbslen)); 1468 1469 void EVP_PKEY_meth_set_verify(EVP_PKEY_METHOD *pmeth, 1470 int (*verify_init) (EVP_PKEY_CTX *ctx), 1471 int (*verify) (EVP_PKEY_CTX *ctx, 1472 const unsigned char *sig, 1473 size_t siglen, 1474 const unsigned char *tbs, 1475 size_t tbslen)); 1476 1477 void EVP_PKEY_meth_set_verify_recover(EVP_PKEY_METHOD *pmeth, 1478 int (*verify_recover_init) (EVP_PKEY_CTX 1479 *ctx), 1480 int (*verify_recover) (EVP_PKEY_CTX 1481 *ctx, 1482 unsigned char 1483 *sig, 1484 size_t *siglen, 1485 const unsigned 1486 char *tbs, 1487 size_t tbslen)); 1488 1489 void EVP_PKEY_meth_set_signctx(EVP_PKEY_METHOD *pmeth, 1490 int (*signctx_init) (EVP_PKEY_CTX *ctx, 2015 # ifndef OPENSSL_NO_DEPRECATED_3_0 2016 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_set_init(EVP_PKEY_METHOD *pmeth, 2017 int (*init) (EVP_PKEY_CTX *ctx)); 2018 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_set_copy 2019 (EVP_PKEY_METHOD *pmeth, int (*copy) (EVP_PKEY_CTX *dst, 2020 const EVP_PKEY_CTX *src)); 2021 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_set_cleanup 2022 (EVP_PKEY_METHOD *pmeth, void (*cleanup) (EVP_PKEY_CTX *ctx)); 2023 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_set_paramgen 2024 (EVP_PKEY_METHOD *pmeth, int (*paramgen_init) (EVP_PKEY_CTX *ctx), 2025 int (*paramgen) (EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)); 2026 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_set_keygen 2027 (EVP_PKEY_METHOD *pmeth, int (*keygen_init) (EVP_PKEY_CTX *ctx), 2028 int (*keygen) (EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)); 2029 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_set_sign 2030 (EVP_PKEY_METHOD *pmeth, int (*sign_init) (EVP_PKEY_CTX *ctx), 2031 int (*sign) (EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen, 2032 const unsigned char *tbs, size_t tbslen)); 2033 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_set_verify 2034 (EVP_PKEY_METHOD *pmeth, int (*verify_init) (EVP_PKEY_CTX *ctx), 2035 int (*verify) (EVP_PKEY_CTX *ctx, const unsigned char *sig, size_t siglen, 2036 const unsigned char *tbs, size_t tbslen)); 2037 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_set_verify_recover 2038 (EVP_PKEY_METHOD *pmeth, int (*verify_recover_init) (EVP_PKEY_CTX *ctx), 2039 int (*verify_recover) (EVP_PKEY_CTX *ctx, unsigned char *sig, 2040 size_t *siglen, const unsigned char *tbs, 2041 size_t tbslen)); 2042 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_set_signctx 2043 (EVP_PKEY_METHOD *pmeth, int (*signctx_init) (EVP_PKEY_CTX *ctx, 2044 EVP_MD_CTX *mctx), 2045 int (*signctx) (EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen, 2046 EVP_MD_CTX *mctx)); 2047 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_set_verifyctx 2048 (EVP_PKEY_METHOD *pmeth, int (*verifyctx_init) (EVP_PKEY_CTX *ctx, 1491 2049 EVP_MD_CTX *mctx), 1492 int (*signctx) (EVP_PKEY_CTX *ctx, 1493 unsigned char *sig, 1494 size_t *siglen, 1495 EVP_MD_CTX *mctx)); 1496 1497 void EVP_PKEY_meth_set_verifyctx(EVP_PKEY_METHOD *pmeth, 1498 int (*verifyctx_init) (EVP_PKEY_CTX *ctx, 1499 EVP_MD_CTX *mctx), 1500 int (*verifyctx) (EVP_PKEY_CTX *ctx, 1501 const unsigned char *sig, 1502 int siglen, 2050 int (*verifyctx) (EVP_PKEY_CTX *ctx, const unsigned char *sig, int siglen, 2051 EVP_MD_CTX *mctx)); 2052 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_set_encrypt 2053 (EVP_PKEY_METHOD *pmeth, int (*encrypt_init) (EVP_PKEY_CTX *ctx), 2054 int (*encryptfn) (EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen, 2055 const unsigned char *in, size_t inlen)); 2056 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_set_decrypt 2057 (EVP_PKEY_METHOD *pmeth, int (*decrypt_init) (EVP_PKEY_CTX *ctx), 2058 int (*decrypt) (EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen, 2059 const unsigned char *in, size_t inlen)); 2060 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_set_derive 2061 (EVP_PKEY_METHOD *pmeth, int (*derive_init) (EVP_PKEY_CTX *ctx), 2062 int (*derive) (EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen)); 2063 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_set_ctrl 2064 (EVP_PKEY_METHOD *pmeth, int (*ctrl) (EVP_PKEY_CTX *ctx, int type, int p1, 2065 void *p2), 2066 int (*ctrl_str) (EVP_PKEY_CTX *ctx, const char *type, const char *value)); 2067 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_set_digestsign 2068 (EVP_PKEY_METHOD *pmeth, 2069 int (*digestsign) (EVP_MD_CTX *ctx, unsigned char *sig, size_t *siglen, 2070 const unsigned char *tbs, size_t tbslen)); 2071 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_set_digestverify 2072 (EVP_PKEY_METHOD *pmeth, 2073 int (*digestverify) (EVP_MD_CTX *ctx, const unsigned char *sig, 2074 size_t siglen, const unsigned char *tbs, 2075 size_t tbslen)); 2076 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_set_check 2077 (EVP_PKEY_METHOD *pmeth, int (*check) (EVP_PKEY *pkey)); 2078 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_set_public_check 2079 (EVP_PKEY_METHOD *pmeth, int (*check) (EVP_PKEY *pkey)); 2080 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_set_param_check 2081 (EVP_PKEY_METHOD *pmeth, int (*check) (EVP_PKEY *pkey)); 2082 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_set_digest_custom 2083 (EVP_PKEY_METHOD *pmeth, int (*digest_custom) (EVP_PKEY_CTX *ctx, 1503 2084 EVP_MD_CTX *mctx)); 1504 1505 void EVP_PKEY_meth_set_encrypt(EVP_PKEY_METHOD *pmeth, 1506 int (*encrypt_init) (EVP_PKEY_CTX *ctx), 1507 int (*encryptfn) (EVP_PKEY_CTX *ctx, 1508 unsigned char *out, 1509 size_t *outlen, 1510 const unsigned char *in, 1511 size_t inlen)); 1512 1513 void EVP_PKEY_meth_set_decrypt(EVP_PKEY_METHOD *pmeth, 1514 int (*decrypt_init) (EVP_PKEY_CTX *ctx), 1515 int (*decrypt) (EVP_PKEY_CTX *ctx, 1516 unsigned char *out, 1517 size_t *outlen, 1518 const unsigned char *in, 1519 size_t inlen)); 1520 1521 void EVP_PKEY_meth_set_derive(EVP_PKEY_METHOD *pmeth, 1522 int (*derive_init) (EVP_PKEY_CTX *ctx), 1523 int (*derive) (EVP_PKEY_CTX *ctx, 1524 unsigned char *key, 1525 size_t *keylen)); 1526 1527 void EVP_PKEY_meth_set_ctrl(EVP_PKEY_METHOD *pmeth, 1528 int (*ctrl) (EVP_PKEY_CTX *ctx, int type, int p1, 1529 void *p2), 1530 int (*ctrl_str) (EVP_PKEY_CTX *ctx, 1531 const char *type, 1532 const char *value)); 1533 1534 void EVP_PKEY_meth_set_digestsign(EVP_PKEY_METHOD *pmeth, 1535 int (*digestsign) (EVP_MD_CTX *ctx, 1536 unsigned char *sig, 1537 size_t *siglen, 1538 const unsigned char *tbs, 1539 size_t tbslen)); 1540 1541 void EVP_PKEY_meth_set_digestverify(EVP_PKEY_METHOD *pmeth, 1542 int (*digestverify) (EVP_MD_CTX *ctx, 1543 const unsigned char *sig, 1544 size_t siglen, 1545 const unsigned char *tbs, 1546 size_t tbslen)); 1547 1548 void EVP_PKEY_meth_set_check(EVP_PKEY_METHOD *pmeth, 1549 int (*check) (EVP_PKEY *pkey)); 1550 1551 void EVP_PKEY_meth_set_public_check(EVP_PKEY_METHOD *pmeth, 1552 int (*check) (EVP_PKEY *pkey)); 1553 1554 void EVP_PKEY_meth_set_param_check(EVP_PKEY_METHOD *pmeth, 1555 int (*check) (EVP_PKEY *pkey)); 1556 1557 void EVP_PKEY_meth_set_digest_custom(EVP_PKEY_METHOD *pmeth, 1558 int (*digest_custom) (EVP_PKEY_CTX *ctx, 1559 EVP_MD_CTX *mctx)); 1560 1561 void EVP_PKEY_meth_get_init(const EVP_PKEY_METHOD *pmeth, 1562 int (**pinit) (EVP_PKEY_CTX *ctx)); 1563 1564 void EVP_PKEY_meth_get_copy(const EVP_PKEY_METHOD *pmeth, 1565 int (**pcopy) (EVP_PKEY_CTX *dst, 1566 EVP_PKEY_CTX *src)); 1567 1568 void EVP_PKEY_meth_get_cleanup(const EVP_PKEY_METHOD *pmeth, 1569 void (**pcleanup) (EVP_PKEY_CTX *ctx)); 1570 1571 void EVP_PKEY_meth_get_paramgen(const EVP_PKEY_METHOD *pmeth, 1572 int (**pparamgen_init) (EVP_PKEY_CTX *ctx), 1573 int (**pparamgen) (EVP_PKEY_CTX *ctx, 1574 EVP_PKEY *pkey)); 1575 1576 void EVP_PKEY_meth_get_keygen(const EVP_PKEY_METHOD *pmeth, 1577 int (**pkeygen_init) (EVP_PKEY_CTX *ctx), 1578 int (**pkeygen) (EVP_PKEY_CTX *ctx, 1579 EVP_PKEY *pkey)); 1580 1581 void EVP_PKEY_meth_get_sign(const EVP_PKEY_METHOD *pmeth, 1582 int (**psign_init) (EVP_PKEY_CTX *ctx), 1583 int (**psign) (EVP_PKEY_CTX *ctx, 1584 unsigned char *sig, size_t *siglen, 1585 const unsigned char *tbs, 1586 size_t tbslen)); 1587 1588 void EVP_PKEY_meth_get_verify(const EVP_PKEY_METHOD *pmeth, 1589 int (**pverify_init) (EVP_PKEY_CTX *ctx), 1590 int (**pverify) (EVP_PKEY_CTX *ctx, 1591 const unsigned char *sig, 1592 size_t siglen, 1593 const unsigned char *tbs, 1594 size_t tbslen)); 1595 1596 void EVP_PKEY_meth_get_verify_recover(const EVP_PKEY_METHOD *pmeth, 1597 int (**pverify_recover_init) (EVP_PKEY_CTX 1598 *ctx), 1599 int (**pverify_recover) (EVP_PKEY_CTX 1600 *ctx, 1601 unsigned char 1602 *sig, 1603 size_t *siglen, 1604 const unsigned 1605 char *tbs, 1606 size_t tbslen)); 1607 1608 void EVP_PKEY_meth_get_signctx(const EVP_PKEY_METHOD *pmeth, 1609 int (**psignctx_init) (EVP_PKEY_CTX *ctx, 1610 EVP_MD_CTX *mctx), 1611 int (**psignctx) (EVP_PKEY_CTX *ctx, 1612 unsigned char *sig, 1613 size_t *siglen, 1614 EVP_MD_CTX *mctx)); 1615 1616 void EVP_PKEY_meth_get_verifyctx(const EVP_PKEY_METHOD *pmeth, 1617 int (**pverifyctx_init) (EVP_PKEY_CTX *ctx, 1618 EVP_MD_CTX *mctx), 1619 int (**pverifyctx) (EVP_PKEY_CTX *ctx, 1620 const unsigned char *sig, 1621 int siglen, 1622 EVP_MD_CTX *mctx)); 1623 1624 void EVP_PKEY_meth_get_encrypt(const EVP_PKEY_METHOD *pmeth, 1625 int (**pencrypt_init) (EVP_PKEY_CTX *ctx), 1626 int (**pencryptfn) (EVP_PKEY_CTX *ctx, 1627 unsigned char *out, 1628 size_t *outlen, 1629 const unsigned char *in, 1630 size_t inlen)); 1631 1632 void EVP_PKEY_meth_get_decrypt(const EVP_PKEY_METHOD *pmeth, 1633 int (**pdecrypt_init) (EVP_PKEY_CTX *ctx), 1634 int (**pdecrypt) (EVP_PKEY_CTX *ctx, 1635 unsigned char *out, 1636 size_t *outlen, 1637 const unsigned char *in, 1638 size_t inlen)); 1639 1640 void EVP_PKEY_meth_get_derive(const EVP_PKEY_METHOD *pmeth, 1641 int (**pderive_init) (EVP_PKEY_CTX *ctx), 1642 int (**pderive) (EVP_PKEY_CTX *ctx, 1643 unsigned char *key, 1644 size_t *keylen)); 1645 1646 void EVP_PKEY_meth_get_ctrl(const EVP_PKEY_METHOD *pmeth, 1647 int (**pctrl) (EVP_PKEY_CTX *ctx, int type, int p1, 1648 void *p2), 1649 int (**pctrl_str) (EVP_PKEY_CTX *ctx, 1650 const char *type, 1651 const char *value)); 1652 1653 void EVP_PKEY_meth_get_digestsign(EVP_PKEY_METHOD *pmeth, 1654 int (**digestsign) (EVP_MD_CTX *ctx, 1655 unsigned char *sig, 1656 size_t *siglen, 1657 const unsigned char *tbs, 1658 size_t tbslen)); 1659 1660 void EVP_PKEY_meth_get_digestverify(EVP_PKEY_METHOD *pmeth, 1661 int (**digestverify) (EVP_MD_CTX *ctx, 1662 const unsigned char *sig, 1663 size_t siglen, 1664 const unsigned char *tbs, 1665 size_t tbslen)); 1666 1667 void EVP_PKEY_meth_get_check(const EVP_PKEY_METHOD *pmeth, 1668 int (**pcheck) (EVP_PKEY *pkey)); 1669 1670 void EVP_PKEY_meth_get_public_check(const EVP_PKEY_METHOD *pmeth, 1671 int (**pcheck) (EVP_PKEY *pkey)); 1672 1673 void EVP_PKEY_meth_get_param_check(const EVP_PKEY_METHOD *pmeth, 1674 int (**pcheck) (EVP_PKEY *pkey)); 1675 1676 void EVP_PKEY_meth_get_digest_custom(EVP_PKEY_METHOD *pmeth, 1677 int (**pdigest_custom) (EVP_PKEY_CTX *ctx, 1678 EVP_MD_CTX *mctx)); 2085 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_get_init 2086 (const EVP_PKEY_METHOD *pmeth, int (**pinit) (EVP_PKEY_CTX *ctx)); 2087 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_get_copy 2088 (const EVP_PKEY_METHOD *pmeth, int (**pcopy) (EVP_PKEY_CTX *dst, 2089 const EVP_PKEY_CTX *src)); 2090 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_get_cleanup 2091 (const EVP_PKEY_METHOD *pmeth, void (**pcleanup) (EVP_PKEY_CTX *ctx)); 2092 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_get_paramgen 2093 (const EVP_PKEY_METHOD *pmeth, int (**pparamgen_init) (EVP_PKEY_CTX *ctx), 2094 int (**pparamgen) (EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)); 2095 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_get_keygen 2096 (const EVP_PKEY_METHOD *pmeth, int (**pkeygen_init) (EVP_PKEY_CTX *ctx), 2097 int (**pkeygen) (EVP_PKEY_CTX *ctx, EVP_PKEY *pkey)); 2098 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_get_sign 2099 (const EVP_PKEY_METHOD *pmeth, int (**psign_init) (EVP_PKEY_CTX *ctx), 2100 int (**psign) (EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen, 2101 const unsigned char *tbs, size_t tbslen)); 2102 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_get_verify 2103 (const EVP_PKEY_METHOD *pmeth, int (**pverify_init) (EVP_PKEY_CTX *ctx), 2104 int (**pverify) (EVP_PKEY_CTX *ctx, const unsigned char *sig, 2105 size_t siglen, const unsigned char *tbs, size_t tbslen)); 2106 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_get_verify_recover 2107 (const EVP_PKEY_METHOD *pmeth, 2108 int (**pverify_recover_init) (EVP_PKEY_CTX *ctx), 2109 int (**pverify_recover) (EVP_PKEY_CTX *ctx, unsigned char *sig, 2110 size_t *siglen, const unsigned char *tbs, 2111 size_t tbslen)); 2112 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_get_signctx 2113 (const EVP_PKEY_METHOD *pmeth, 2114 int (**psignctx_init) (EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx), 2115 int (**psignctx) (EVP_PKEY_CTX *ctx, unsigned char *sig, size_t *siglen, 2116 EVP_MD_CTX *mctx)); 2117 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_get_verifyctx 2118 (const EVP_PKEY_METHOD *pmeth, 2119 int (**pverifyctx_init) (EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx), 2120 int (**pverifyctx) (EVP_PKEY_CTX *ctx, const unsigned char *sig, 2121 int siglen, EVP_MD_CTX *mctx)); 2122 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_get_encrypt 2123 (const EVP_PKEY_METHOD *pmeth, int (**pencrypt_init) (EVP_PKEY_CTX *ctx), 2124 int (**pencryptfn) (EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen, 2125 const unsigned char *in, size_t inlen)); 2126 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_get_decrypt 2127 (const EVP_PKEY_METHOD *pmeth, int (**pdecrypt_init) (EVP_PKEY_CTX *ctx), 2128 int (**pdecrypt) (EVP_PKEY_CTX *ctx, unsigned char *out, size_t *outlen, 2129 const unsigned char *in, size_t inlen)); 2130 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_get_derive 2131 (const EVP_PKEY_METHOD *pmeth, int (**pderive_init) (EVP_PKEY_CTX *ctx), 2132 int (**pderive) (EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen)); 2133 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_get_ctrl 2134 (const EVP_PKEY_METHOD *pmeth, 2135 int (**pctrl) (EVP_PKEY_CTX *ctx, int type, int p1, void *p2), 2136 int (**pctrl_str) (EVP_PKEY_CTX *ctx, const char *type, 2137 const char *value)); 2138 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_get_digestsign 2139 (const EVP_PKEY_METHOD *pmeth, 2140 int (**digestsign) (EVP_MD_CTX *ctx, unsigned char *sig, size_t *siglen, 2141 const unsigned char *tbs, size_t tbslen)); 2142 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_get_digestverify 2143 (const EVP_PKEY_METHOD *pmeth, 2144 int (**digestverify) (EVP_MD_CTX *ctx, const unsigned char *sig, 2145 size_t siglen, const unsigned char *tbs, 2146 size_t tbslen)); 2147 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_get_check 2148 (const EVP_PKEY_METHOD *pmeth, int (**pcheck) (EVP_PKEY *pkey)); 2149 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_get_public_check 2150 (const EVP_PKEY_METHOD *pmeth, int (**pcheck) (EVP_PKEY *pkey)); 2151 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_get_param_check 2152 (const EVP_PKEY_METHOD *pmeth, int (**pcheck) (EVP_PKEY *pkey)); 2153 OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_get_digest_custom 2154 (const EVP_PKEY_METHOD *pmeth, 2155 int (**pdigest_custom) (EVP_PKEY_CTX *ctx, EVP_MD_CTX *mctx)); 2156 # endif 2157 2158 void EVP_KEYEXCH_free(EVP_KEYEXCH *exchange); 2159 int EVP_KEYEXCH_up_ref(EVP_KEYEXCH *exchange); 2160 EVP_KEYEXCH *EVP_KEYEXCH_fetch(OSSL_LIB_CTX *ctx, const char *algorithm, 2161 const char *properties); 2162 OSSL_PROVIDER *EVP_KEYEXCH_get0_provider(const EVP_KEYEXCH *exchange); 2163 int EVP_KEYEXCH_is_a(const EVP_KEYEXCH *keyexch, const char *name); 2164 const char *EVP_KEYEXCH_get0_name(const EVP_KEYEXCH *keyexch); 2165 const char *EVP_KEYEXCH_get0_description(const EVP_KEYEXCH *keyexch); 2166 void EVP_KEYEXCH_do_all_provided(OSSL_LIB_CTX *libctx, 2167 void (*fn)(EVP_KEYEXCH *keyexch, void *data), 2168 void *data); 2169 int EVP_KEYEXCH_names_do_all(const EVP_KEYEXCH *keyexch, 2170 void (*fn)(const char *name, void *data), 2171 void *data); 2172 const OSSL_PARAM *EVP_KEYEXCH_gettable_ctx_params(const EVP_KEYEXCH *keyexch); 2173 const OSSL_PARAM *EVP_KEYEXCH_settable_ctx_params(const EVP_KEYEXCH *keyexch); 2174 1679 2175 void EVP_add_alg_module(void); 1680 2176 2177 int EVP_PKEY_CTX_set_group_name(EVP_PKEY_CTX *ctx, const char *name); 2178 int EVP_PKEY_CTX_get_group_name(EVP_PKEY_CTX *ctx, char *name, size_t namelen); 2179 int EVP_PKEY_get_group_name(const EVP_PKEY *pkey, char *name, size_t name_sz, 2180 size_t *gname_len); 2181 2182 OSSL_LIB_CTX *EVP_PKEY_CTX_get0_libctx(EVP_PKEY_CTX *ctx); 2183 const char *EVP_PKEY_CTX_get0_propq(const EVP_PKEY_CTX *ctx); 2184 const OSSL_PROVIDER *EVP_PKEY_CTX_get0_provider(const EVP_PKEY_CTX *ctx); 1681 2185 1682 2186 # ifdef __cplusplus -
trunk/src/libs/openssl-3.0.1/include/openssl/evperr.h
r91772 r94082 3 3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 4 * 5 * Licensed under the OpenSSL license(the "License"). You may not use5 * Licensed under the Apache License 2.0 (the "License"). You may not use 6 6 * this file except in compliance with the License. You can obtain a copy 7 7 * in the file LICENSE in the source distribution or at … … 9 9 */ 10 10 11 #ifndef HEADER_EVPERR_H 12 # define HEADER_EVPERR_H 11 #ifndef OPENSSL_EVPERR_H 12 # define OPENSSL_EVPERR_H 13 # pragma once 13 14 15 # include <openssl/opensslconf.h> 14 16 # include <openssl/symhacks.h> 17 # include <openssl/cryptoerr_legacy.h> 15 18 16 # ifdef __cplusplus17 extern "C"18 # endif19 int ERR_load_EVP_strings(void);20 19 21 /*22 * EVP function codes.23 */24 # define EVP_F_AESNI_INIT_KEY 16525 # define EVP_F_AESNI_XTS_INIT_KEY 20726 # define EVP_F_AES_GCM_CTRL 19627 # define EVP_F_AES_INIT_KEY 13328 # define EVP_F_AES_OCB_CIPHER 16929 # define EVP_F_AES_T4_INIT_KEY 17830 # define EVP_F_AES_T4_XTS_INIT_KEY 20831 # define EVP_F_AES_WRAP_CIPHER 17032 # define EVP_F_AES_XTS_INIT_KEY 20933 # define EVP_F_ALG_MODULE_INIT 17734 # define EVP_F_ARIA_CCM_INIT_KEY 17535 # define EVP_F_ARIA_GCM_CTRL 19736 # define EVP_F_ARIA_GCM_INIT_KEY 17637 # define EVP_F_ARIA_INIT_KEY 18538 # define EVP_F_B64_NEW 19839 # define EVP_F_CAMELLIA_INIT_KEY 15940 # define EVP_F_CHACHA20_POLY1305_CTRL 18241 # define EVP_F_CMLL_T4_INIT_KEY 17942 # define EVP_F_DES_EDE3_WRAP_CIPHER 17143 # define EVP_F_DO_SIGVER_INIT 16144 # define EVP_F_ENC_NEW 19945 # define EVP_F_EVP_CIPHERINIT_EX 12346 # define EVP_F_EVP_CIPHER_ASN1_TO_PARAM 20447 # define EVP_F_EVP_CIPHER_CTX_COPY 16348 # define EVP_F_EVP_CIPHER_CTX_CTRL 12449 # define EVP_F_EVP_CIPHER_CTX_SET_KEY_LENGTH 12250 # define EVP_F_EVP_CIPHER_PARAM_TO_ASN1 20551 # define EVP_F_EVP_DECRYPTFINAL_EX 10152 # define EVP_F_EVP_DECRYPTUPDATE 16653 # define EVP_F_EVP_DIGESTFINALXOF 17454 # define EVP_F_EVP_DIGESTINIT_EX 12855 # define EVP_F_EVP_ENCRYPTDECRYPTUPDATE 21956 # define EVP_F_EVP_ENCRYPTFINAL_EX 12757 # define EVP_F_EVP_ENCRYPTUPDATE 16758 # define EVP_F_EVP_MD_CTX_COPY_EX 11059 # define EVP_F_EVP_MD_SIZE 16260 # define EVP_F_EVP_OPENINIT 10261 # define EVP_F_EVP_PBE_ALG_ADD 11562 # define EVP_F_EVP_PBE_ALG_ADD_TYPE 16063 # define EVP_F_EVP_PBE_CIPHERINIT 11664 # define EVP_F_EVP_PBE_SCRYPT 18165 # define EVP_F_EVP_PKCS82PKEY 11166 # define EVP_F_EVP_PKEY2PKCS8 11367 # define EVP_F_EVP_PKEY_ASN1_ADD0 18868 # define EVP_F_EVP_PKEY_CHECK 18669 # define EVP_F_EVP_PKEY_COPY_PARAMETERS 10370 # define EVP_F_EVP_PKEY_CTX_CTRL 13771 # define EVP_F_EVP_PKEY_CTX_CTRL_STR 15072 # define EVP_F_EVP_PKEY_CTX_DUP 15673 # define EVP_F_EVP_PKEY_CTX_MD 16874 # define EVP_F_EVP_PKEY_DECRYPT 10475 # define EVP_F_EVP_PKEY_DECRYPT_INIT 13876 # define EVP_F_EVP_PKEY_DECRYPT_OLD 15177 # define EVP_F_EVP_PKEY_DERIVE 15378 # define EVP_F_EVP_PKEY_DERIVE_INIT 15479 # define EVP_F_EVP_PKEY_DERIVE_SET_PEER 15580 # define EVP_F_EVP_PKEY_ENCRYPT 10581 # define EVP_F_EVP_PKEY_ENCRYPT_INIT 13982 # define EVP_F_EVP_PKEY_ENCRYPT_OLD 15283 # define EVP_F_EVP_PKEY_GET0_DH 11984 # define EVP_F_EVP_PKEY_GET0_DSA 12085 # define EVP_F_EVP_PKEY_GET0_EC_KEY 13186 # define EVP_F_EVP_PKEY_GET0_HMAC 18387 # define EVP_F_EVP_PKEY_GET0_POLY1305 18488 # define EVP_F_EVP_PKEY_GET0_RSA 12189 # define EVP_F_EVP_PKEY_GET0_SIPHASH 17290 # define EVP_F_EVP_PKEY_GET_RAW_PRIVATE_KEY 20291 # define EVP_F_EVP_PKEY_GET_RAW_PUBLIC_KEY 20392 # define EVP_F_EVP_PKEY_KEYGEN 14693 # define EVP_F_EVP_PKEY_KEYGEN_INIT 14794 # define EVP_F_EVP_PKEY_METH_ADD0 19495 # define EVP_F_EVP_PKEY_METH_NEW 19596 # define EVP_F_EVP_PKEY_NEW 10697 # define EVP_F_EVP_PKEY_NEW_CMAC_KEY 19398 # define EVP_F_EVP_PKEY_NEW_RAW_PRIVATE_KEY 19199 # define EVP_F_EVP_PKEY_NEW_RAW_PUBLIC_KEY 192100 # define EVP_F_EVP_PKEY_PARAMGEN 148101 # define EVP_F_EVP_PKEY_PARAMGEN_INIT 149102 # define EVP_F_EVP_PKEY_PARAM_CHECK 189103 # define EVP_F_EVP_PKEY_PUBLIC_CHECK 190104 # define EVP_F_EVP_PKEY_SET1_ENGINE 187105 # define EVP_F_EVP_PKEY_SET_ALIAS_TYPE 206106 # define EVP_F_EVP_PKEY_SIGN 140107 # define EVP_F_EVP_PKEY_SIGN_INIT 141108 # define EVP_F_EVP_PKEY_VERIFY 142109 # define EVP_F_EVP_PKEY_VERIFY_INIT 143110 # define EVP_F_EVP_PKEY_VERIFY_RECOVER 144111 # define EVP_F_EVP_PKEY_VERIFY_RECOVER_INIT 145112 # define EVP_F_EVP_SIGNFINAL 107113 # define EVP_F_EVP_VERIFYFINAL 108114 # define EVP_F_INT_CTX_NEW 157115 # define EVP_F_OK_NEW 200116 # define EVP_F_PKCS5_PBE_KEYIVGEN 117117 # define EVP_F_PKCS5_V2_PBE_KEYIVGEN 118118 # define EVP_F_PKCS5_V2_PBKDF2_KEYIVGEN 164119 # define EVP_F_PKCS5_V2_SCRYPT_KEYIVGEN 180120 # define EVP_F_PKEY_SET_TYPE 158121 # define EVP_F_RC2_MAGIC_TO_METH 109122 # define EVP_F_RC5_CTRL 125123 # define EVP_F_R_32_12_16_INIT_KEY 242124 # define EVP_F_S390X_AES_GCM_CTRL 201125 # define EVP_F_UPDATE 173126 20 127 21 /* … … 130 24 # define EVP_R_AES_KEY_SETUP_FAILED 143 131 25 # define EVP_R_ARIA_KEY_SETUP_FAILED 176 26 # define EVP_R_BAD_ALGORITHM_NAME 200 132 27 # define EVP_R_BAD_DECRYPT 100 133 28 # define EVP_R_BAD_KEY_LENGTH 195 134 29 # define EVP_R_BUFFER_TOO_SMALL 155 30 # define EVP_R_CACHE_CONSTANTS_FAILED 225 135 31 # define EVP_R_CAMELLIA_KEY_SETUP_FAILED 157 32 # define EVP_R_CANNOT_GET_PARAMETERS 197 33 # define EVP_R_CANNOT_SET_PARAMETERS 198 34 # define EVP_R_CIPHER_NOT_GCM_MODE 184 136 35 # define EVP_R_CIPHER_PARAMETER_ERROR 122 137 36 # define EVP_R_COMMAND_NOT_SUPPORTED 147 37 # define EVP_R_CONFLICTING_ALGORITHM_NAME 201 138 38 # define EVP_R_COPY_ERROR 173 139 39 # define EVP_R_CTRL_NOT_IMPLEMENTED 132 … … 141 41 # define EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH 138 142 42 # define EVP_R_DECODE_ERROR 114 43 # define EVP_R_DEFAULT_QUERY_PARSE_ERROR 210 143 44 # define EVP_R_DIFFERENT_KEY_TYPES 101 144 45 # define EVP_R_DIFFERENT_PARAMETERS 153 145 46 # define EVP_R_ERROR_LOADING_SECTION 165 146 # define EVP_R_ERROR_SETTING_FIPS_MODE 166147 47 # define EVP_R_EXPECTING_AN_HMAC_KEY 174 148 48 # define EVP_R_EXPECTING_AN_RSA_KEY 127 149 49 # define EVP_R_EXPECTING_A_DH_KEY 128 150 50 # define EVP_R_EXPECTING_A_DSA_KEY 129 51 # define EVP_R_EXPECTING_A_ECX_KEY 219 151 52 # define EVP_R_EXPECTING_A_EC_KEY 142 152 53 # define EVP_R_EXPECTING_A_POLY1305_KEY 164 153 54 # define EVP_R_EXPECTING_A_SIPHASH_KEY 175 154 # define EVP_R_FIPS_MODE_NOT_SUPPORTED 167 55 # define EVP_R_FINAL_ERROR 188 56 # define EVP_R_GENERATE_ERROR 214 155 57 # define EVP_R_GET_RAW_KEY_FAILED 182 156 58 # define EVP_R_ILLEGAL_SCRYPT_PARAMETERS 171 59 # define EVP_R_INACCESSIBLE_DOMAIN_PARAMETERS 204 60 # define EVP_R_INACCESSIBLE_KEY 203 157 61 # define EVP_R_INITIALIZATION_ERROR 134 158 62 # define EVP_R_INPUT_NOT_INITIALIZED 111 63 # define EVP_R_INVALID_CUSTOM_LENGTH 185 159 64 # define EVP_R_INVALID_DIGEST 152 160 # define EVP_R_INVALID_FIPS_MODE 168161 65 # define EVP_R_INVALID_IV_LENGTH 194 162 66 # define EVP_R_INVALID_KEY 163 163 67 # define EVP_R_INVALID_KEY_LENGTH 130 68 # define EVP_R_INVALID_LENGTH 221 69 # define EVP_R_INVALID_NULL_ALGORITHM 218 164 70 # define EVP_R_INVALID_OPERATION 148 165 # define EVP_R_KEYGEN_FAILURE 120 71 # define EVP_R_INVALID_PROVIDER_FUNCTIONS 193 72 # define EVP_R_INVALID_SALT_LENGTH 186 73 # define EVP_R_INVALID_SECRET_LENGTH 223 74 # define EVP_R_INVALID_SEED_LENGTH 220 75 # define EVP_R_INVALID_VALUE 222 76 # define EVP_R_KEYMGMT_EXPORT_FAILURE 205 166 77 # define EVP_R_KEY_SETUP_FAILED 180 78 # define EVP_R_LOCKING_NOT_SUPPORTED 213 167 79 # define EVP_R_MEMORY_LIMIT_EXCEEDED 172 168 80 # define EVP_R_MESSAGE_DIGEST_IS_NULL 159 169 81 # define EVP_R_METHOD_NOT_SUPPORTED 144 170 82 # define EVP_R_MISSING_PARAMETERS 103 83 # define EVP_R_NOT_ABLE_TO_COPY_CTX 190 171 84 # define EVP_R_NOT_XOF_OR_INVALID_LENGTH 178 172 85 # define EVP_R_NO_CIPHER_SET 131 173 86 # define EVP_R_NO_DEFAULT_DIGEST 158 174 87 # define EVP_R_NO_DIGEST_SET 139 88 # define EVP_R_NO_IMPORT_FUNCTION 206 89 # define EVP_R_NO_KEYMGMT_AVAILABLE 199 90 # define EVP_R_NO_KEYMGMT_PRESENT 196 175 91 # define EVP_R_NO_KEY_SET 154 176 92 # define EVP_R_NO_OPERATION_SET 149 93 # define EVP_R_NULL_MAC_PKEY_CTX 208 177 94 # define EVP_R_ONLY_ONESHOT_SUPPORTED 177 95 # define EVP_R_OPERATION_NOT_INITIALIZED 151 178 96 # define EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE 150 179 # define EVP_R_O PERATON_NOT_INITIALIZED 151180 # define EVP_R_ OUTPUT_WOULD_OVERFLOW 18497 # define EVP_R_OUTPUT_WOULD_OVERFLOW 202 98 # define EVP_R_PARAMETER_TOO_LARGE 187 181 99 # define EVP_R_PARTIALLY_OVERLAPPING 162 182 100 # define EVP_R_PBKDF2_ERROR 181 … … 185 103 # define EVP_R_PRIVATE_KEY_ENCODE_ERROR 146 186 104 # define EVP_R_PUBLIC_KEY_NOT_RSA 106 105 # define EVP_R_SETTING_XOF_FAILED 227 106 # define EVP_R_SET_DEFAULT_PROPERTY_FAILURE 209 107 # define EVP_R_TOO_MANY_RECORDS 183 108 # define EVP_R_UNABLE_TO_ENABLE_LOCKING 212 109 # define EVP_R_UNABLE_TO_GET_MAXIMUM_REQUEST_SIZE 215 110 # define EVP_R_UNABLE_TO_GET_RANDOM_STRENGTH 216 111 # define EVP_R_UNABLE_TO_LOCK_CONTEXT 211 112 # define EVP_R_UNABLE_TO_SET_CALLBACKS 217 187 113 # define EVP_R_UNKNOWN_CIPHER 160 188 114 # define EVP_R_UNKNOWN_DIGEST 161 115 # define EVP_R_UNKNOWN_KEY_TYPE 207 189 116 # define EVP_R_UNKNOWN_OPTION 169 190 117 # define EVP_R_UNKNOWN_PBE_ALGORITHM 121 … … 194 121 # define EVP_R_UNSUPPORTED_KEY_DERIVATION_FUNCTION 124 195 122 # define EVP_R_UNSUPPORTED_KEY_SIZE 108 123 # define EVP_R_UNSUPPORTED_KEY_TYPE 224 196 124 # define EVP_R_UNSUPPORTED_NUMBER_OF_ROUNDS 135 197 125 # define EVP_R_UNSUPPORTED_PRF 125 198 126 # define EVP_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM 118 199 127 # define EVP_R_UNSUPPORTED_SALT_TYPE 126 128 # define EVP_R_UPDATE_ERROR 189 200 129 # define EVP_R_WRAP_MODE_NOT_ALLOWED 170 201 130 # define EVP_R_WRONG_FINAL_BLOCK_LENGTH 109 202 # define EVP_R_XTS_DUPLICATED_KEYS 183 131 # define EVP_R_XTS_DATA_UNIT_IS_TOO_LARGE 191 132 # define EVP_R_XTS_DUPLICATED_KEYS 192 203 133 204 134 #endif -
trunk/src/libs/openssl-3.0.1/include/openssl/hmac.h
r91772 r94082 1 1 /* 2 * Copyright 1995-20 18The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_HMAC_H 11 # define HEADER_HMAC_H 10 #ifndef OPENSSL_HMAC_H 11 # define OPENSSL_HMAC_H 12 # pragma once 13 14 # include <openssl/macros.h> 15 # ifndef OPENSSL_NO_DEPRECATED_3_0 16 # define HEADER_HMAC_H 17 # endif 12 18 13 19 # include <openssl/opensslconf.h> … … 15 21 # include <openssl/evp.h> 16 22 17 # if OPENSSL_API_COMPAT < 0x10200000L18 # define HMAC_MAX_MD_CBLOCK 128/* Deprecated */23 # ifndef OPENSSL_NO_DEPRECATED_3_0 24 # define HMAC_MAX_MD_CBLOCK 200 /* Deprecated */ 19 25 # endif 20 26 21 # ifdef __cplusplus27 # ifdef __cplusplus 22 28 extern "C" { 23 # endif29 # endif 24 30 25 size_t HMAC_size(const HMAC_CTX *e); 26 HMAC_CTX *HMAC_CTX_new(void); 27 int HMAC_CTX_reset(HMAC_CTX *ctx); 28 void HMAC_CTX_free(HMAC_CTX *ctx); 31 # ifndef OPENSSL_NO_DEPRECATED_3_0 32 OSSL_DEPRECATEDIN_3_0 size_t HMAC_size(const HMAC_CTX *e); 33 OSSL_DEPRECATEDIN_3_0 HMAC_CTX *HMAC_CTX_new(void); 34 OSSL_DEPRECATEDIN_3_0 int HMAC_CTX_reset(HMAC_CTX *ctx); 35 OSSL_DEPRECATEDIN_3_0 void HMAC_CTX_free(HMAC_CTX *ctx); 36 # endif 37 # ifndef OPENSSL_NO_DEPRECATED_1_1_0 38 OSSL_DEPRECATEDIN_1_1_0 __owur int HMAC_Init(HMAC_CTX *ctx, 39 const void *key, int len, 40 const EVP_MD *md); 41 # endif 42 # ifndef OPENSSL_NO_DEPRECATED_3_0 43 OSSL_DEPRECATEDIN_3_0 int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, 44 const EVP_MD *md, ENGINE *impl); 45 OSSL_DEPRECATEDIN_3_0 int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, 46 size_t len); 47 OSSL_DEPRECATEDIN_3_0 int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, 48 unsigned int *len); 49 OSSL_DEPRECATEDIN_3_0 __owur int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx); 50 OSSL_DEPRECATEDIN_3_0 void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags); 51 OSSL_DEPRECATEDIN_3_0 const EVP_MD *HMAC_CTX_get_md(const HMAC_CTX *ctx); 52 # endif 29 53 30 DEPRECATEDIN_1_1_0(__owur int HMAC_Init(HMAC_CTX *ctx, const void *key, int len, 31 const EVP_MD *md)) 54 unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len, 55 const unsigned char *data, size_t data_len, 56 unsigned char *md, unsigned int *md_len); 32 57 33 /*__owur*/ int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, 34 const EVP_MD *md, ENGINE *impl); 35 /*__owur*/ int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, 36 size_t len); 37 /*__owur*/ int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, 38 unsigned int *len); 39 unsigned char *HMAC(const EVP_MD *evp_md, const void *key, int key_len, 40 const unsigned char *d, size_t n, unsigned char *md, 41 unsigned int *md_len); 42 __owur int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx); 43 44 void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags); 45 const EVP_MD *HMAC_CTX_get_md(const HMAC_CTX *ctx); 46 47 #ifdef __cplusplus 58 # ifdef __cplusplus 48 59 } 49 # endif60 # endif 50 61 51 62 #endif -
trunk/src/libs/openssl-3.0.1/include/openssl/idea.h
r91772 r94082 1 1 /* 2 * Copyright 1995-20 16The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_IDEA_H 11 # define HEADER_IDEA_H 10 #ifndef OPENSSL_IDEA_H 11 # define OPENSSL_IDEA_H 12 # pragma once 13 14 # include <openssl/macros.h> 15 # ifndef OPENSSL_NO_DEPRECATED_3_0 16 # define HEADER_IDEA_H 17 # endif 12 18 13 19 # include <openssl/opensslconf.h> 14 20 15 21 # ifndef OPENSSL_NO_IDEA 16 # ifdef __cplusplus22 # ifdef __cplusplus 17 23 extern "C" { 18 # endif 24 # endif 25 26 # define IDEA_BLOCK 8 27 # define IDEA_KEY_LENGTH 16 28 29 # ifndef OPENSSL_NO_DEPRECATED_3_0 19 30 20 31 typedef unsigned int IDEA_INT; 21 32 22 # define IDEA_ENCRYPT 1 23 # define IDEA_DECRYPT 0 24 25 # define IDEA_BLOCK 8 26 # define IDEA_KEY_LENGTH 16 33 # define IDEA_ENCRYPT 1 34 # define IDEA_DECRYPT 0 27 35 28 36 typedef struct idea_key_st { 29 37 IDEA_INT data[9][6]; 30 38 } IDEA_KEY_SCHEDULE; 39 #endif 40 #ifndef OPENSSL_NO_DEPRECATED_3_0 41 OSSL_DEPRECATEDIN_3_0 const char *IDEA_options(void); 42 OSSL_DEPRECATEDIN_3_0 void IDEA_ecb_encrypt(const unsigned char *in, 43 unsigned char *out, 44 IDEA_KEY_SCHEDULE *ks); 45 OSSL_DEPRECATEDIN_3_0 void IDEA_set_encrypt_key(const unsigned char *key, 46 IDEA_KEY_SCHEDULE *ks); 47 OSSL_DEPRECATEDIN_3_0 void IDEA_set_decrypt_key(IDEA_KEY_SCHEDULE *ek, 48 IDEA_KEY_SCHEDULE *dk); 49 OSSL_DEPRECATEDIN_3_0 void IDEA_cbc_encrypt(const unsigned char *in, 50 unsigned char *out, long length, 51 IDEA_KEY_SCHEDULE *ks, 52 unsigned char *iv, int enc); 53 OSSL_DEPRECATEDIN_3_0 void IDEA_cfb64_encrypt(const unsigned char *in, 54 unsigned char *out, long length, 55 IDEA_KEY_SCHEDULE *ks, 56 unsigned char *iv, int *num, 57 int enc); 58 OSSL_DEPRECATEDIN_3_0 void IDEA_ofb64_encrypt(const unsigned char *in, 59 unsigned char *out, long length, 60 IDEA_KEY_SCHEDULE *ks, 61 unsigned char *iv, int *num); 62 OSSL_DEPRECATEDIN_3_0 void IDEA_encrypt(unsigned long *in, 63 IDEA_KEY_SCHEDULE *ks); 64 #endif 31 65 32 const char *IDEA_options(void); 33 void IDEA_ecb_encrypt(const unsigned char *in, unsigned char *out, 34 IDEA_KEY_SCHEDULE *ks); 35 void IDEA_set_encrypt_key(const unsigned char *key, IDEA_KEY_SCHEDULE *ks); 36 void IDEA_set_decrypt_key(IDEA_KEY_SCHEDULE *ek, IDEA_KEY_SCHEDULE *dk); 37 void IDEA_cbc_encrypt(const unsigned char *in, unsigned char *out, 38 long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, 39 int enc); 40 void IDEA_cfb64_encrypt(const unsigned char *in, unsigned char *out, 41 long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, 42 int *num, int enc); 43 void IDEA_ofb64_encrypt(const unsigned char *in, unsigned char *out, 44 long length, IDEA_KEY_SCHEDULE *ks, unsigned char *iv, 45 int *num); 46 void IDEA_encrypt(unsigned long *in, IDEA_KEY_SCHEDULE *ks); 66 # ifndef OPENSSL_NO_DEPRECATED_1_1_0 67 # define idea_options IDEA_options 68 # define idea_ecb_encrypt IDEA_ecb_encrypt 69 # define idea_set_encrypt_key IDEA_set_encrypt_key 70 # define idea_set_decrypt_key IDEA_set_decrypt_key 71 # define idea_cbc_encrypt IDEA_cbc_encrypt 72 # define idea_cfb64_encrypt IDEA_cfb64_encrypt 73 # define idea_ofb64_encrypt IDEA_ofb64_encrypt 74 # define idea_encrypt IDEA_encrypt 75 # endif 47 76 48 # if OPENSSL_API_COMPAT < 0x10100000L 49 # define idea_options IDEA_options 50 # define idea_ecb_encrypt IDEA_ecb_encrypt 51 # define idea_set_encrypt_key IDEA_set_encrypt_key 52 # define idea_set_decrypt_key IDEA_set_decrypt_key 53 # define idea_cbc_encrypt IDEA_cbc_encrypt 54 # define idea_cfb64_encrypt IDEA_cfb64_encrypt 55 # define idea_ofb64_encrypt IDEA_ofb64_encrypt 56 # define idea_encrypt IDEA_encrypt 57 # endif 58 59 # ifdef __cplusplus 77 # ifdef __cplusplus 60 78 } 61 # endif79 # endif 62 80 # endif 63 81 -
trunk/src/libs/openssl-3.0.1/include/openssl/kdf.h
r91772 r94082 1 1 /* 2 * Copyright 2016-20 18The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_KDF_H 11 # define HEADER_KDF_H 10 #ifndef OPENSSL_KDF_H 11 # define OPENSSL_KDF_H 12 # pragma once 12 13 13 # include <openssl/kdferr.h> 14 #ifdef __cplusplus 14 # include <openssl/macros.h> 15 # ifndef OPENSSL_NO_DEPRECATED_3_0 16 # define HEADER_KDF_H 17 # endif 18 19 # include <stdarg.h> 20 # include <stddef.h> 21 # include <openssl/types.h> 22 # include <openssl/core.h> 23 24 # ifdef __cplusplus 15 25 extern "C" { 16 #endif 26 # endif 27 28 int EVP_KDF_up_ref(EVP_KDF *kdf); 29 void EVP_KDF_free(EVP_KDF *kdf); 30 EVP_KDF *EVP_KDF_fetch(OSSL_LIB_CTX *libctx, const char *algorithm, 31 const char *properties); 32 33 EVP_KDF_CTX *EVP_KDF_CTX_new(EVP_KDF *kdf); 34 void EVP_KDF_CTX_free(EVP_KDF_CTX *ctx); 35 EVP_KDF_CTX *EVP_KDF_CTX_dup(const EVP_KDF_CTX *src); 36 const char *EVP_KDF_get0_description(const EVP_KDF *kdf); 37 int EVP_KDF_is_a(const EVP_KDF *kdf, const char *name); 38 const char *EVP_KDF_get0_name(const EVP_KDF *kdf); 39 const OSSL_PROVIDER *EVP_KDF_get0_provider(const EVP_KDF *kdf); 40 const EVP_KDF *EVP_KDF_CTX_kdf(EVP_KDF_CTX *ctx); 41 42 void EVP_KDF_CTX_reset(EVP_KDF_CTX *ctx); 43 size_t EVP_KDF_CTX_get_kdf_size(EVP_KDF_CTX *ctx); 44 int EVP_KDF_derive(EVP_KDF_CTX *ctx, unsigned char *key, size_t keylen, 45 const OSSL_PARAM params[]); 46 int EVP_KDF_get_params(EVP_KDF *kdf, OSSL_PARAM params[]); 47 int EVP_KDF_CTX_get_params(EVP_KDF_CTX *ctx, OSSL_PARAM params[]); 48 int EVP_KDF_CTX_set_params(EVP_KDF_CTX *ctx, const OSSL_PARAM params[]); 49 const OSSL_PARAM *EVP_KDF_gettable_params(const EVP_KDF *kdf); 50 const OSSL_PARAM *EVP_KDF_gettable_ctx_params(const EVP_KDF *kdf); 51 const OSSL_PARAM *EVP_KDF_settable_ctx_params(const EVP_KDF *kdf); 52 const OSSL_PARAM *EVP_KDF_CTX_gettable_params(EVP_KDF_CTX *ctx); 53 const OSSL_PARAM *EVP_KDF_CTX_settable_params(EVP_KDF_CTX *ctx); 54 55 void EVP_KDF_do_all_provided(OSSL_LIB_CTX *libctx, 56 void (*fn)(EVP_KDF *kdf, void *arg), 57 void *arg); 58 int EVP_KDF_names_do_all(const EVP_KDF *kdf, 59 void (*fn)(const char *name, void *data), 60 void *data); 61 62 # define EVP_KDF_HKDF_MODE_EXTRACT_AND_EXPAND 0 63 # define EVP_KDF_HKDF_MODE_EXTRACT_ONLY 1 64 # define EVP_KDF_HKDF_MODE_EXPAND_ONLY 2 65 66 #define EVP_KDF_SSHKDF_TYPE_INITIAL_IV_CLI_TO_SRV 65 67 #define EVP_KDF_SSHKDF_TYPE_INITIAL_IV_SRV_TO_CLI 66 68 #define EVP_KDF_SSHKDF_TYPE_ENCRYPTION_KEY_CLI_TO_SRV 67 69 #define EVP_KDF_SSHKDF_TYPE_ENCRYPTION_KEY_SRV_TO_CLI 68 70 #define EVP_KDF_SSHKDF_TYPE_INTEGRITY_KEY_CLI_TO_SRV 69 71 #define EVP_KDF_SSHKDF_TYPE_INTEGRITY_KEY_SRV_TO_CLI 70 72 73 /**** The legacy PKEY-based KDF API follows. ****/ 17 74 18 75 # define EVP_PKEY_CTRL_TLS_MD (EVP_PKEY_ALG_CTRL) … … 31 88 # define EVP_PKEY_CTRL_SCRYPT_MAXMEM_BYTES (EVP_PKEY_ALG_CTRL + 13) 32 89 33 # define EVP_PKEY_HKDEF_MODE_EXTRACT_AND_EXPAND 0 34 # define EVP_PKEY_HKDEF_MODE_EXTRACT_ONLY 1 35 # define EVP_PKEY_HKDEF_MODE_EXPAND_ONLY 2 90 # define EVP_PKEY_HKDEF_MODE_EXTRACT_AND_EXPAND \ 91 EVP_KDF_HKDF_MODE_EXTRACT_AND_EXPAND 92 # define EVP_PKEY_HKDEF_MODE_EXTRACT_ONLY \ 93 EVP_KDF_HKDF_MODE_EXTRACT_ONLY 94 # define EVP_PKEY_HKDEF_MODE_EXPAND_ONLY \ 95 EVP_KDF_HKDF_MODE_EXPAND_ONLY 36 96 37 # define EVP_PKEY_CTX_set_tls1_prf_md(pctx, md) \ 38 EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_DERIVE, \ 39 EVP_PKEY_CTRL_TLS_MD, 0, (void *)(md)) 97 int EVP_PKEY_CTX_set_tls1_prf_md(EVP_PKEY_CTX *ctx, const EVP_MD *md); 40 98 41 # define EVP_PKEY_CTX_set1_tls1_prf_secret(pctx, sec, seclen) \ 42 EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_DERIVE, \ 43 EVP_PKEY_CTRL_TLS_SECRET, seclen, (void *)(sec)) 99 int EVP_PKEY_CTX_set1_tls1_prf_secret(EVP_PKEY_CTX *pctx, 100 const unsigned char *sec, int seclen); 44 101 45 # define EVP_PKEY_CTX_add1_tls1_prf_seed(pctx, seed, seedlen) \ 46 EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_DERIVE, \ 47 EVP_PKEY_CTRL_TLS_SEED, seedlen, (void *)(seed)) 102 int EVP_PKEY_CTX_add1_tls1_prf_seed(EVP_PKEY_CTX *pctx, 103 const unsigned char *seed, int seedlen); 48 104 49 # define EVP_PKEY_CTX_set_hkdf_md(pctx, md) \ 50 EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_DERIVE, \ 51 EVP_PKEY_CTRL_HKDF_MD, 0, (void *)(md)) 105 int EVP_PKEY_CTX_set_hkdf_md(EVP_PKEY_CTX *ctx, const EVP_MD *md); 52 106 53 # define EVP_PKEY_CTX_set1_hkdf_salt(pctx, salt, saltlen) \ 54 EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_DERIVE, \ 55 EVP_PKEY_CTRL_HKDF_SALT, saltlen, (void *)(salt)) 107 int EVP_PKEY_CTX_set1_hkdf_salt(EVP_PKEY_CTX *ctx, 108 const unsigned char *salt, int saltlen); 56 109 57 # define EVP_PKEY_CTX_set1_hkdf_key(pctx, key, keylen) \ 58 EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_DERIVE, \ 59 EVP_PKEY_CTRL_HKDF_KEY, keylen, (void *)(key)) 110 int EVP_PKEY_CTX_set1_hkdf_key(EVP_PKEY_CTX *ctx, 111 const unsigned char *key, int keylen); 60 112 61 # define EVP_PKEY_CTX_add1_hkdf_info(pctx, info, infolen) \ 62 EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_DERIVE, \ 63 EVP_PKEY_CTRL_HKDF_INFO, infolen, (void *)(info)) 113 int EVP_PKEY_CTX_add1_hkdf_info(EVP_PKEY_CTX *ctx, 114 const unsigned char *info, int infolen); 64 115 65 # define EVP_PKEY_CTX_hkdf_mode(pctx, mode) \ 66 EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_DERIVE, \ 67 EVP_PKEY_CTRL_HKDF_MODE, mode, NULL) 116 int EVP_PKEY_CTX_set_hkdf_mode(EVP_PKEY_CTX *ctx, int mode); 117 # define EVP_PKEY_CTX_hkdf_mode EVP_PKEY_CTX_set_hkdf_mode 68 118 69 # define EVP_PKEY_CTX_set1_pbe_pass(pctx, pass, passlen) \ 70 EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_DERIVE, \ 71 EVP_PKEY_CTRL_PASS, passlen, (void *)(pass)) 119 int EVP_PKEY_CTX_set1_pbe_pass(EVP_PKEY_CTX *ctx, const char *pass, 120 int passlen); 72 121 73 # define EVP_PKEY_CTX_set1_scrypt_salt(pctx, salt, saltlen) \ 74 EVP_PKEY_CTX_ctrl(pctx, -1, EVP_PKEY_OP_DERIVE, \ 75 EVP_PKEY_CTRL_SCRYPT_SALT, saltlen, (void *)(salt)) 122 int EVP_PKEY_CTX_set1_scrypt_salt(EVP_PKEY_CTX *ctx, 123 const unsigned char *salt, int saltlen); 76 124 77 # define EVP_PKEY_CTX_set_scrypt_N(pctx, n) \ 78 EVP_PKEY_CTX_ctrl_uint64(pctx, -1, EVP_PKEY_OP_DERIVE, \ 79 EVP_PKEY_CTRL_SCRYPT_N, n) 125 int EVP_PKEY_CTX_set_scrypt_N(EVP_PKEY_CTX *ctx, uint64_t n); 80 126 81 # define EVP_PKEY_CTX_set_scrypt_r(pctx, r) \ 82 EVP_PKEY_CTX_ctrl_uint64(pctx, -1, EVP_PKEY_OP_DERIVE, \ 83 EVP_PKEY_CTRL_SCRYPT_R, r) 127 int EVP_PKEY_CTX_set_scrypt_r(EVP_PKEY_CTX *ctx, uint64_t r); 84 128 85 # define EVP_PKEY_CTX_set_scrypt_p(pctx, p) \ 86 EVP_PKEY_CTX_ctrl_uint64(pctx, -1, EVP_PKEY_OP_DERIVE, \ 87 EVP_PKEY_CTRL_SCRYPT_P, p) 129 int EVP_PKEY_CTX_set_scrypt_p(EVP_PKEY_CTX *ctx, uint64_t p); 88 130 89 # define EVP_PKEY_CTX_set_scrypt_maxmem_bytes(pctx, maxmem_bytes) \ 90 EVP_PKEY_CTX_ctrl_uint64(pctx, -1, EVP_PKEY_OP_DERIVE, \ 91 EVP_PKEY_CTRL_SCRYPT_MAXMEM_BYTES, maxmem_bytes) 131 int EVP_PKEY_CTX_set_scrypt_maxmem_bytes(EVP_PKEY_CTX *ctx, 132 uint64_t maxmem_bytes); 92 133 93 134 94 # ifdef 135 # ifdef __cplusplus 95 136 } 96 137 # endif -
trunk/src/libs/openssl-3.0.1/include/openssl/kdferr.h
r91772 r94082 1 1 /* 2 * Generated by util/mkerr.pl DO NOT EDIT 3 * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. 2 * Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved. 4 3 * 5 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 6 5 * this file except in compliance with the License. You can obtain a copy 7 6 * in the file LICENSE in the source distribution or at … … 9 8 */ 10 9 11 #ifndef HEADER_KDFERR_H 12 # define HEADER_KDFERR_H 10 #ifndef OPENSSL_KDFERR_H 11 # define OPENSSL_KDFERR_H 12 # pragma once 13 13 14 # ifndef HEADER_SYMHACKS_H 15 # include <openssl/symhacks.h> 16 # endif 14 #include <openssl/cryptoerr_legacy.h> 17 15 18 # ifdef __cplusplus 19 extern "C" 20 # endif 21 int ERR_load_KDF_strings(void); 22 23 /* 24 * KDF function codes. 25 */ 26 # define KDF_F_PKEY_HKDF_CTRL_STR 103 27 # define KDF_F_PKEY_HKDF_DERIVE 102 28 # define KDF_F_PKEY_HKDF_INIT 108 29 # define KDF_F_PKEY_SCRYPT_CTRL_STR 104 30 # define KDF_F_PKEY_SCRYPT_CTRL_UINT64 105 31 # define KDF_F_PKEY_SCRYPT_DERIVE 109 32 # define KDF_F_PKEY_SCRYPT_INIT 106 33 # define KDF_F_PKEY_SCRYPT_SET_MEMBUF 107 34 # define KDF_F_PKEY_TLS1_PRF_CTRL_STR 100 35 # define KDF_F_PKEY_TLS1_PRF_DERIVE 101 36 # define KDF_F_PKEY_TLS1_PRF_INIT 110 37 # define KDF_F_TLS1_PRF_ALG 111 38 39 /* 40 * KDF reason codes. 41 */ 42 # define KDF_R_INVALID_DIGEST 100 43 # define KDF_R_MISSING_ITERATION_COUNT 109 44 # define KDF_R_MISSING_KEY 104 45 # define KDF_R_MISSING_MESSAGE_DIGEST 105 46 # define KDF_R_MISSING_PARAMETER 101 47 # define KDF_R_MISSING_PASS 110 48 # define KDF_R_MISSING_SALT 111 49 # define KDF_R_MISSING_SECRET 107 50 # define KDF_R_MISSING_SEED 106 51 # define KDF_R_UNKNOWN_PARAMETER_TYPE 103 52 # define KDF_R_VALUE_ERROR 108 53 # define KDF_R_VALUE_MISSING 102 54 55 #endif 16 #endif /* !defined(OPENSSL_KDFERR_H) */ -
trunk/src/libs/openssl-3.0.1/include/openssl/md2.h
r91772 r94082 1 1 /* 2 * Copyright 1995-20 16The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_MD2_H 11 # define HEADER_MD2_H 10 #ifndef OPENSSL_MD2_H 11 # define OPENSSL_MD2_H 12 # pragma once 13 14 # include <openssl/macros.h> 15 # ifndef OPENSSL_NO_DEPRECATED_3_0 16 # define HEADER_MD2_H 17 # endif 12 18 13 19 # include <openssl/opensslconf.h> 14 20 15 21 # ifndef OPENSSL_NO_MD2 16 # include <stddef.h>17 # ifdef __cplusplus22 # include <stddef.h> 23 # ifdef __cplusplus 18 24 extern "C" { 19 # endif 25 # endif 26 27 # define MD2_DIGEST_LENGTH 16 28 29 # if !defined(OPENSSL_NO_DEPRECATED_3_0) 20 30 21 31 typedef unsigned char MD2_INT; 22 32 23 # define MD2_DIGEST_LENGTH 16 24 # define MD2_BLOCK 16 33 # define MD2_BLOCK 16 25 34 26 35 typedef struct MD2state_st { … … 30 39 MD2_INT state[MD2_BLOCK]; 31 40 } MD2_CTX; 41 # endif 42 # ifndef OPENSSL_NO_DEPRECATED_3_0 43 OSSL_DEPRECATEDIN_3_0 const char *MD2_options(void); 44 OSSL_DEPRECATEDIN_3_0 int MD2_Init(MD2_CTX *c); 45 OSSL_DEPRECATEDIN_3_0 int MD2_Update(MD2_CTX *c, const unsigned char *data, 46 size_t len); 47 OSSL_DEPRECATEDIN_3_0 int MD2_Final(unsigned char *md, MD2_CTX *c); 48 OSSL_DEPRECATEDIN_3_0 unsigned char *MD2(const unsigned char *d, size_t n, 49 unsigned char *md); 50 # endif 32 51 33 const char *MD2_options(void); 34 int MD2_Init(MD2_CTX *c); 35 int MD2_Update(MD2_CTX *c, const unsigned char *data, size_t len); 36 int MD2_Final(unsigned char *md, MD2_CTX *c); 37 unsigned char *MD2(const unsigned char *d, size_t n, unsigned char *md); 38 39 # ifdef __cplusplus 52 # ifdef __cplusplus 40 53 } 54 # endif 41 55 # endif 42 # endif43 44 56 #endif -
trunk/src/libs/openssl-3.0.1/include/openssl/md4.h
r91772 r94082 1 1 /* 2 * Copyright 1995-20 16The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_MD4_H 11 # define HEADER_MD4_H 10 #ifndef OPENSSL_MD4_H 11 # define OPENSSL_MD4_H 12 # pragma once 13 14 # include <openssl/macros.h> 15 # ifndef OPENSSL_NO_DEPRECATED_3_0 16 # define HEADER_MD4_H 17 # endif 12 18 13 19 # include <openssl/opensslconf.h> 14 20 15 21 # ifndef OPENSSL_NO_MD4 16 # include <openssl/e_os2.h>17 # include <stddef.h>18 # ifdef __cplusplus22 # include <openssl/e_os2.h> 23 # include <stddef.h> 24 # ifdef __cplusplus 19 25 extern "C" { 20 # endif 26 # endif 27 28 # define MD4_DIGEST_LENGTH 16 29 30 # if !defined(OPENSSL_NO_DEPRECATED_3_0) 21 31 22 32 /*- … … 25 35 * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 26 36 */ 27 # define MD4_LONG unsigned int37 # define MD4_LONG unsigned int 28 38 29 # define MD4_CBLOCK 64 30 # define MD4_LBLOCK (MD4_CBLOCK/4) 31 # define MD4_DIGEST_LENGTH 16 39 # define MD4_CBLOCK 64 40 # define MD4_LBLOCK (MD4_CBLOCK/4) 32 41 33 42 typedef struct MD4state_st { … … 37 46 unsigned int num; 38 47 } MD4_CTX; 48 # endif 49 # ifndef OPENSSL_NO_DEPRECATED_3_0 50 OSSL_DEPRECATEDIN_3_0 int MD4_Init(MD4_CTX *c); 51 OSSL_DEPRECATEDIN_3_0 int MD4_Update(MD4_CTX *c, const void *data, size_t len); 52 OSSL_DEPRECATEDIN_3_0 int MD4_Final(unsigned char *md, MD4_CTX *c); 53 OSSL_DEPRECATEDIN_3_0 unsigned char *MD4(const unsigned char *d, size_t n, 54 unsigned char *md); 55 OSSL_DEPRECATEDIN_3_0 void MD4_Transform(MD4_CTX *c, const unsigned char *b); 56 # endif 39 57 40 int MD4_Init(MD4_CTX *c); 41 int MD4_Update(MD4_CTX *c, const void *data, size_t len); 42 int MD4_Final(unsigned char *md, MD4_CTX *c); 43 unsigned char *MD4(const unsigned char *d, size_t n, unsigned char *md); 44 void MD4_Transform(MD4_CTX *c, const unsigned char *b); 45 46 # ifdef __cplusplus 58 # ifdef __cplusplus 47 59 } 48 # endif60 # endif 49 61 # endif 50 62 -
trunk/src/libs/openssl-3.0.1/include/openssl/md5.h
r91772 r94082 1 1 /* 2 * Copyright 1995-20 16The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_MD5_H 11 # define HEADER_MD5_H 10 #ifndef OPENSSL_MD5_H 11 # define OPENSSL_MD5_H 12 # pragma once 13 14 # include <openssl/macros.h> 15 # ifndef OPENSSL_NO_DEPRECATED_3_0 16 # define HEADER_MD5_H 17 # endif 12 18 13 19 # include <openssl/opensslconf.h> 14 20 15 21 # ifndef OPENSSL_NO_MD5 16 # include <openssl/e_os2.h>17 # include <stddef.h>18 # ifdef __cplusplus22 # include <openssl/e_os2.h> 23 # include <stddef.h> 24 # ifdef __cplusplus 19 25 extern "C" { 20 # endif26 # endif 21 27 28 # define MD5_DIGEST_LENGTH 16 29 30 # if !defined(OPENSSL_NO_DEPRECATED_3_0) 22 31 /* 23 32 * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 25 34 * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 26 35 */ 27 # define MD5_LONG unsigned int36 # define MD5_LONG unsigned int 28 37 29 # define MD5_CBLOCK 64 30 # define MD5_LBLOCK (MD5_CBLOCK/4) 31 # define MD5_DIGEST_LENGTH 16 38 # define MD5_CBLOCK 64 39 # define MD5_LBLOCK (MD5_CBLOCK/4) 32 40 33 41 typedef struct MD5state_st { … … 37 45 unsigned int num; 38 46 } MD5_CTX; 47 # endif 48 # ifndef OPENSSL_NO_DEPRECATED_3_0 49 OSSL_DEPRECATEDIN_3_0 int MD5_Init(MD5_CTX *c); 50 OSSL_DEPRECATEDIN_3_0 int MD5_Update(MD5_CTX *c, const void *data, size_t len); 51 OSSL_DEPRECATEDIN_3_0 int MD5_Final(unsigned char *md, MD5_CTX *c); 52 OSSL_DEPRECATEDIN_3_0 unsigned char *MD5(const unsigned char *d, size_t n, 53 unsigned char *md); 54 OSSL_DEPRECATEDIN_3_0 void MD5_Transform(MD5_CTX *c, const unsigned char *b); 55 # endif 39 56 40 int MD5_Init(MD5_CTX *c); 41 int MD5_Update(MD5_CTX *c, const void *data, size_t len); 42 int MD5_Final(unsigned char *md, MD5_CTX *c); 43 unsigned char *MD5(const unsigned char *d, size_t n, unsigned char *md); 44 void MD5_Transform(MD5_CTX *c, const unsigned char *b); 45 # ifdef __cplusplus 57 # ifdef __cplusplus 46 58 } 47 # endif59 # endif 48 60 # endif 49 61 -
trunk/src/libs/openssl-3.0.1/include/openssl/mdc2.h
r91772 r94082 1 1 /* 2 * Copyright 1995-20 16The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_MDC2_H 11 # define HEADER_MDC2_H 10 #ifndef OPENSSL_MDC2_H 11 # define OPENSSL_MDC2_H 12 # pragma once 13 14 # include <openssl/macros.h> 15 # ifndef OPENSSL_NO_DEPRECATED_3_0 16 # define HEADER_MDC2_H 17 # endif 12 18 13 19 # include <openssl/opensslconf.h> 14 20 15 # ifndef OPENSSL_NO_MDC216 # include <stdlib.h>17 # include <openssl/des.h>18 # ifdef __cplusplus21 # ifndef OPENSSL_NO_MDC2 22 # include <stdlib.h> 23 # include <openssl/des.h> 24 # ifdef __cplusplus 19 25 extern "C" { 20 # endif26 # endif 21 27 22 # define MDC2_BLOCK 8 23 # define MDC2_DIGEST_LENGTH 16 28 # define MDC2_DIGEST_LENGTH 16 29 30 # if !defined(OPENSSL_NO_DEPRECATED_3_0) 31 32 # define MDC2_BLOCK 8 24 33 25 34 typedef struct mdc2_ctx_st { … … 27 36 unsigned char data[MDC2_BLOCK]; 28 37 DES_cblock h, hh; 29 int pad_type;/* either 1 or 2, default 1 */38 unsigned int pad_type; /* either 1 or 2, default 1 */ 30 39 } MDC2_CTX; 40 # endif 41 # ifndef OPENSSL_NO_DEPRECATED_3_0 42 OSSL_DEPRECATEDIN_3_0 int MDC2_Init(MDC2_CTX *c); 43 OSSL_DEPRECATEDIN_3_0 int MDC2_Update(MDC2_CTX *c, const unsigned char *data, 44 size_t len); 45 OSSL_DEPRECATEDIN_3_0 int MDC2_Final(unsigned char *md, MDC2_CTX *c); 46 OSSL_DEPRECATEDIN_3_0 unsigned char *MDC2(const unsigned char *d, size_t n, 47 unsigned char *md); 48 # endif 31 49 32 int MDC2_Init(MDC2_CTX *c); 33 int MDC2_Update(MDC2_CTX *c, const unsigned char *data, size_t len); 34 int MDC2_Final(unsigned char *md, MDC2_CTX *c); 35 unsigned char *MDC2(const unsigned char *d, size_t n, unsigned char *md); 36 37 # ifdef __cplusplus 50 # ifdef __cplusplus 38 51 } 39 # endif52 # endif 40 53 # endif 41 54 -
trunk/src/libs/openssl-3.0.1/include/openssl/modes.h
r91772 r94082 2 2 * Copyright 2008-2016 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_MODES_H 11 # define HEADER_MODES_H 10 #ifndef OPENSSL_MODES_H 11 # define OPENSSL_MODES_H 12 # pragma once 13 14 # include <openssl/macros.h> 15 # ifndef OPENSSL_NO_DEPRECATED_3_0 16 # define HEADER_MODES_H 17 # endif 12 18 13 19 # include <stddef.h> 20 # include <openssl/types.h> 14 21 15 22 # ifdef __cplusplus … … 22 29 size_t len, const void *key, 23 30 unsigned char ivec[16], int enc); 31 32 typedef void (*ecb128_f) (const unsigned char *in, unsigned char *out, 33 size_t len, const void *key, 34 int enc); 24 35 25 36 typedef void (*ctr128_f) (const unsigned char *in, unsigned char *out, -
trunk/src/libs/openssl-3.0.1/include/openssl/obj_mac.h
r91772 r94082 4 4 * 5 5 * Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved. 6 * Licensed under the OpenSSL license(the "License"). You may not use6 * Licensed under the Apache License 2.0 (the "License"). You may not use 7 7 * this file except in compliance with the License. You can obtain a copy 8 8 * in the file LICENSE in the source distribution or at … … 10 10 */ 11 11 12 #ifndef OPENSSL_OBJ_MAC_H 13 # define OPENSSL_OBJ_MAC_H 14 # pragma once 15 12 16 #define SN_undef "UNDEF" 13 17 #define LN_undef "undefined" … … 45 49 #define OBJ_identified_organization OBJ_iso,3L 46 50 51 #define SN_gmac "GMAC" 52 #define LN_gmac "gmac" 53 #define NID_gmac 1195 54 #define OBJ_gmac OBJ_iso,0L,9797L,3L,4L 55 47 56 #define SN_hmac_md5 "HMAC-MD5" 48 57 #define LN_hmac_md5 "hmac-md5" … … 846 855 #define OBJ_id_smime_ct_authEnvelopedData OBJ_id_smime_ct,23L 847 856 857 #define SN_id_ct_routeOriginAuthz "id-ct-routeOriginAuthz" 858 #define NID_id_ct_routeOriginAuthz 1234 859 #define OBJ_id_ct_routeOriginAuthz OBJ_id_smime_ct,24L 860 861 #define SN_id_ct_rpkiManifest "id-ct-rpkiManifest" 862 #define NID_id_ct_rpkiManifest 1235 863 #define OBJ_id_ct_rpkiManifest OBJ_id_smime_ct,26L 864 848 865 #define SN_id_ct_asciiTextWithCRLF "id-ct-asciiTextWithCRLF" 849 866 #define NID_id_ct_asciiTextWithCRLF 787 … … 853 870 #define NID_id_ct_xml 1060 854 871 #define OBJ_id_ct_xml OBJ_id_smime_ct,28L 872 873 #define SN_id_ct_rpkiGhostbusters "id-ct-rpkiGhostbusters" 874 #define NID_id_ct_rpkiGhostbusters 1236 875 #define OBJ_id_ct_rpkiGhostbusters OBJ_id_smime_ct,35L 876 877 #define SN_id_ct_resourceTaggedAttest "id-ct-resourceTaggedAttest" 878 #define NID_id_ct_resourceTaggedAttest 1237 879 #define OBJ_id_ct_resourceTaggedAttest OBJ_id_smime_ct,36L 880 881 #define SN_id_ct_geofeedCSVwithCRLF "id-ct-geofeedCSVwithCRLF" 882 #define NID_id_ct_geofeedCSVwithCRLF 1246 883 #define OBJ_id_ct_geofeedCSVwithCRLF OBJ_id_smime_ct,47L 884 885 #define SN_id_ct_signedChecklist "id-ct-signedChecklist" 886 #define NID_id_ct_signedChecklist 1247 887 #define OBJ_id_ct_signedChecklist OBJ_id_smime_ct,48L 855 888 856 889 #define SN_id_smime_aa_receiptRequest "id-smime-aa-receiptRequest" … … 1180 1213 #define OBJ_sm3WithRSAEncryption OBJ_sm_scheme,504L 1181 1214 1215 #define SN_SM2_with_SM3 "SM2-SM3" 1216 #define LN_SM2_with_SM3 "SM2-with-SM3" 1217 #define NID_SM2_with_SM3 1204 1218 #define OBJ_SM2_with_SM3 OBJ_sm_scheme,501L 1219 1182 1220 #define LN_hmacWithSHA224 "hmacWithSHA224" 1183 1221 #define NID_hmacWithSHA224 798 … … 1386 1424 #define OBJ_id_qcs OBJ_id_pkix,11L 1387 1425 1426 #define SN_id_cp "id-cp" 1427 #define NID_id_cp 1238 1428 #define OBJ_id_cp OBJ_id_pkix,14L 1429 1388 1430 #define SN_id_cct "id-cct" 1389 1431 #define NID_id_cct 268 … … 1519 1561 #define OBJ_tlsfeature OBJ_id_pe,24L 1520 1562 1563 #define SN_sbgp_ipAddrBlockv2 "sbgp-ipAddrBlockv2" 1564 #define NID_sbgp_ipAddrBlockv2 1239 1565 #define OBJ_sbgp_ipAddrBlockv2 OBJ_id_pe,28L 1566 1567 #define SN_sbgp_autonomousSysNumv2 "sbgp-autonomousSysNumv2" 1568 #define NID_sbgp_autonomousSysNumv2 1240 1569 #define OBJ_sbgp_autonomousSysNumv2 OBJ_id_pe,29L 1570 1521 1571 #define SN_id_qt_cps "id-qt-cps" 1522 1572 #define LN_id_qt_cps "Policy Qualifier CPS" … … 1638 1688 #define OBJ_cmcRA OBJ_id_kp,28L 1639 1689 1690 #define SN_cmcArchive "cmcArchive" 1691 #define LN_cmcArchive "CMC Archive Server" 1692 #define NID_cmcArchive 1219 1693 #define OBJ_cmcArchive OBJ_id_kp,29L 1694 1695 #define SN_id_kp_bgpsec_router "id-kp-bgpsec-router" 1696 #define LN_id_kp_bgpsec_router "BGPsec Router" 1697 #define NID_id_kp_bgpsec_router 1220 1698 #define OBJ_id_kp_bgpsec_router OBJ_id_kp,30L 1699 1700 #define SN_id_kp_BrandIndicatorforMessageIdentification "id-kp-BrandIndicatorforMessageIdentification" 1701 #define LN_id_kp_BrandIndicatorforMessageIdentification "Brand Indicator for Message Identification" 1702 #define NID_id_kp_BrandIndicatorforMessageIdentification 1221 1703 #define OBJ_id_kp_BrandIndicatorforMessageIdentification OBJ_id_kp,31L 1704 1705 #define SN_cmKGA "cmKGA" 1706 #define LN_cmKGA "Certificate Management Key Generation Authority" 1707 #define NID_cmKGA 1222 1708 #define OBJ_cmKGA OBJ_id_kp,32L 1709 1640 1710 #define SN_id_it_caProtEncCert "id-it-caProtEncCert" 1641 1711 #define NID_id_it_caProtEncCert 298 … … 1701 1771 #define NID_id_it_suppLangTags 784 1702 1772 #define OBJ_id_it_suppLangTags OBJ_id_it,16L 1773 1774 #define SN_id_it_caCerts "id-it-caCerts" 1775 #define NID_id_it_caCerts 1223 1776 #define OBJ_id_it_caCerts OBJ_id_it,17L 1777 1778 #define SN_id_it_rootCaKeyUpdate "id-it-rootCaKeyUpdate" 1779 #define NID_id_it_rootCaKeyUpdate 1224 1780 #define OBJ_id_it_rootCaKeyUpdate OBJ_id_it,18L 1781 1782 #define SN_id_it_certReqTemplate "id-it-certReqTemplate" 1783 #define NID_id_it_certReqTemplate 1225 1784 #define OBJ_id_it_certReqTemplate OBJ_id_it,19L 1703 1785 1704 1786 #define SN_id_regCtrl "id-regCtrl" … … 1847 1929 #define OBJ_id_on_permanentIdentifier OBJ_id_on,3L 1848 1930 1931 #define SN_XmppAddr "id-on-xmppAddr" 1932 #define LN_XmppAddr "XmppAddr" 1933 #define NID_XmppAddr 1209 1934 #define OBJ_XmppAddr OBJ_id_on,5L 1935 1936 #define SN_SRVName "id-on-dnsSRV" 1937 #define LN_SRVName "SRVName" 1938 #define NID_SRVName 1210 1939 #define OBJ_SRVName OBJ_id_on,7L 1940 1941 #define SN_NAIRealm "id-on-NAIRealm" 1942 #define LN_NAIRealm "NAIRealm" 1943 #define NID_NAIRealm 1211 1944 #define OBJ_NAIRealm OBJ_id_on,8L 1945 1946 #define SN_id_on_SmtpUTF8Mailbox "id-on-SmtpUTF8Mailbox" 1947 #define LN_id_on_SmtpUTF8Mailbox "Smtp UTF8 Mailbox" 1948 #define NID_id_on_SmtpUTF8Mailbox 1208 1949 #define OBJ_id_on_SmtpUTF8Mailbox OBJ_id_on,9L 1950 1849 1951 #define SN_id_pda_dateOfBirth "id-pda-dateOfBirth" 1850 1952 #define NID_id_pda_dateOfBirth 348 … … 1894 1996 #define NID_id_qcs_pkixQCSyntax_v1 359 1895 1997 #define OBJ_id_qcs_pkixQCSyntax_v1 OBJ_id_qcs,1L 1998 1999 #define SN_ipAddr_asNumber "ipAddr-asNumber" 2000 #define NID_ipAddr_asNumber 1241 2001 #define OBJ_ipAddr_asNumber OBJ_id_cp,2L 2002 2003 #define SN_ipAddr_asNumberv2 "ipAddr-asNumberv2" 2004 #define NID_ipAddr_asNumberv2 1242 2005 #define OBJ_ipAddr_asNumberv2 OBJ_id_cp,3L 1896 2006 1897 2007 #define SN_id_cct_crs "id-cct-crs" … … 1947 2057 #define OBJ_caRepository OBJ_id_ad,5L 1948 2058 2059 #define SN_rpkiManifest "rpkiManifest" 2060 #define LN_rpkiManifest "RPKI Manifest" 2061 #define NID_rpkiManifest 1243 2062 #define OBJ_rpkiManifest OBJ_id_ad,10L 2063 2064 #define SN_signedObject "signedObject" 2065 #define LN_signedObject "Signed Object" 2066 #define NID_signedObject 1244 2067 #define OBJ_signedObject OBJ_id_ad,11L 2068 2069 #define SN_rpkiNotify "rpkiNotify" 2070 #define LN_rpkiNotify "RPKI Notify" 2071 #define NID_rpkiNotify 1245 2072 #define OBJ_rpkiNotify OBJ_id_ad,13L 2073 1949 2074 #define OBJ_id_pkix_OCSP OBJ_ad_OCSP 1950 2075 … … 2114 2239 #define OBJ_ripemd160WithRSA 1L,3L,36L,3L,3L,1L,2L 2115 2240 2241 #define SN_blake2bmac "BLAKE2BMAC" 2242 #define LN_blake2bmac "blake2bmac" 2243 #define NID_blake2bmac 1201 2244 #define OBJ_blake2bmac 1L,3L,6L,1L,4L,1L,1722L,12L,2L,1L 2245 2246 #define SN_blake2smac "BLAKE2SMAC" 2247 #define LN_blake2smac "blake2smac" 2248 #define NID_blake2smac 1202 2249 #define OBJ_blake2smac 1L,3L,6L,1L,4L,1L,1722L,12L,2L,2L 2250 2116 2251 #define SN_blake2b512 "BLAKE2b512" 2117 2252 #define LN_blake2b512 "blake2b512" 2118 2253 #define NID_blake2b512 1056 2119 #define OBJ_blake2b512 1L,3L,6L,1L,4L,1L,1722L,12L,2L,1L,16L2254 #define OBJ_blake2b512 OBJ_blake2bmac,16L 2120 2255 2121 2256 #define SN_blake2s256 "BLAKE2s256" 2122 2257 #define LN_blake2s256 "blake2s256" 2123 2258 #define NID_blake2s256 1057 2124 #define OBJ_blake2s256 1L,3L,6L,1L,4L,1L,1722L,12L,2L,2L,8L2259 #define OBJ_blake2s256 OBJ_blake2smac,8L 2125 2260 2126 2261 #define SN_sxnet "SXNetID" … … 2972 3107 #define OBJ_hmac_sha3_512 OBJ_nist_hashalgs,16L 2973 3108 3109 #define SN_kmac128 "KMAC128" 3110 #define LN_kmac128 "kmac128" 3111 #define NID_kmac128 1196 3112 #define OBJ_kmac128 OBJ_nist_hashalgs,19L 3113 3114 #define SN_kmac256 "KMAC256" 3115 #define LN_kmac256 "kmac256" 3116 #define NID_kmac256 1197 3117 #define OBJ_kmac256 OBJ_nist_hashalgs,20L 3118 2974 3119 #define OBJ_dsa_with_sha2 OBJ_nistAlgorithms,3L 2975 3120 … … 4231 4376 #define OBJ_id_tc26_cipher_gostr3412_2015_magma OBJ_id_tc26_cipher,1L 4232 4377 4233 #define SN_ id_tc26_cipher_gostr3412_2015_magma_ctracpkm "id-tc26-cipher-gostr3412-2015-magma-ctracpkm"4234 #define NID_ id_tc26_cipher_gostr3412_2015_magma_ctracpkm11744235 #define OBJ_ id_tc26_cipher_gostr3412_2015_magma_ctracpkmOBJ_id_tc26_cipher_gostr3412_2015_magma,1L4236 4237 #define SN_ id_tc26_cipher_gostr3412_2015_magma_ctracpkm_omac "id-tc26-cipher-gostr3412-2015-magma-ctracpkm-omac"4238 #define NID_ id_tc26_cipher_gostr3412_2015_magma_ctracpkm_omac11754239 #define OBJ_ id_tc26_cipher_gostr3412_2015_magma_ctracpkm_omacOBJ_id_tc26_cipher_gostr3412_2015_magma,2L4378 #define SN_magma_ctr_acpkm "magma-ctr-acpkm" 4379 #define NID_magma_ctr_acpkm 1174 4380 #define OBJ_magma_ctr_acpkm OBJ_id_tc26_cipher_gostr3412_2015_magma,1L 4381 4382 #define SN_magma_ctr_acpkm_omac "magma-ctr-acpkm-omac" 4383 #define NID_magma_ctr_acpkm_omac 1175 4384 #define OBJ_magma_ctr_acpkm_omac OBJ_id_tc26_cipher_gostr3412_2015_magma,2L 4240 4385 4241 4386 #define SN_id_tc26_cipher_gostr3412_2015_kuznyechik "id-tc26-cipher-gostr3412-2015-kuznyechik" … … 4243 4388 #define OBJ_id_tc26_cipher_gostr3412_2015_kuznyechik OBJ_id_tc26_cipher,2L 4244 4389 4245 #define SN_ id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm "id-tc26-cipher-gostr3412-2015-kuznyechik-ctracpkm"4246 #define NID_ id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm11774247 #define OBJ_ id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkmOBJ_id_tc26_cipher_gostr3412_2015_kuznyechik,1L4248 4249 #define SN_ id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm_omac "id-tc26-cipher-gostr3412-2015-kuznyechik-ctracpkm-omac"4250 #define NID_ id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm_omac11784251 #define OBJ_ id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm_omacOBJ_id_tc26_cipher_gostr3412_2015_kuznyechik,2L4390 #define SN_kuznyechik_ctr_acpkm "kuznyechik-ctr-acpkm" 4391 #define NID_kuznyechik_ctr_acpkm 1177 4392 #define OBJ_kuznyechik_ctr_acpkm OBJ_id_tc26_cipher_gostr3412_2015_kuznyechik,1L 4393 4394 #define SN_kuznyechik_ctr_acpkm_omac "kuznyechik-ctr-acpkm-omac" 4395 #define NID_kuznyechik_ctr_acpkm_omac 1178 4396 #define OBJ_kuznyechik_ctr_acpkm_omac OBJ_id_tc26_cipher_gostr3412_2015_kuznyechik,2L 4252 4397 4253 4398 #define SN_id_tc26_agreement "id-tc26-agreement" … … 4271 4416 #define OBJ_id_tc26_wrap_gostr3412_2015_magma OBJ_id_tc26_wrap,1L 4272 4417 4273 #define SN_ id_tc26_wrap_gostr3412_2015_magma_kexp15 "id-tc26-wrap-gostr3412-2015-magma-kexp15"4274 #define NID_ id_tc26_wrap_gostr3412_2015_magma_kexp1511814275 #define OBJ_ id_tc26_wrap_gostr3412_2015_magma_kexp15OBJ_id_tc26_wrap_gostr3412_2015_magma,1L4418 #define SN_magma_kexp15 "magma-kexp15" 4419 #define NID_magma_kexp15 1181 4420 #define OBJ_magma_kexp15 OBJ_id_tc26_wrap_gostr3412_2015_magma,1L 4276 4421 4277 4422 #define SN_id_tc26_wrap_gostr3412_2015_kuznyechik "id-tc26-wrap-gostr3412-2015-kuznyechik" … … 4279 4424 #define OBJ_id_tc26_wrap_gostr3412_2015_kuznyechik OBJ_id_tc26_wrap,2L 4280 4425 4281 #define SN_ id_tc26_wrap_gostr3412_2015_kuznyechik_kexp15 "id-tc26-wrap-gostr3412-2015-kuznyechik-kexp15"4282 #define NID_ id_tc26_wrap_gostr3412_2015_kuznyechik_kexp1511834283 #define OBJ_ id_tc26_wrap_gostr3412_2015_kuznyechik_kexp15OBJ_id_tc26_wrap_gostr3412_2015_kuznyechik,1L4426 #define SN_kuznyechik_kexp15 "kuznyechik-kexp15" 4427 #define NID_kuznyechik_kexp15 1183 4428 #define OBJ_kuznyechik_kexp15 OBJ_id_tc26_wrap_gostr3412_2015_kuznyechik,1L 4284 4429 4285 4430 #define SN_id_tc26_constants "id-tc26-constants" … … 4371 4516 #define OBJ_SNILS OBJ_member_body,643L,100L,3L 4372 4517 4518 #define SN_OGRNIP "OGRNIP" 4519 #define LN_OGRNIP "OGRNIP" 4520 #define NID_OGRNIP 1226 4521 #define OBJ_OGRNIP OBJ_member_body,643L,100L,5L 4522 4373 4523 #define SN_subjectSignTool "subjectSignTool" 4374 4524 #define LN_subjectSignTool "Signing Tool of Subject" … … 4381 4531 #define OBJ_issuerSignTool OBJ_member_body,643L,100L,112L 4382 4532 4383 #define SN_grasshopper_ecb "grasshopper-ecb" 4384 #define NID_grasshopper_ecb 1012 4385 4386 #define SN_grasshopper_ctr "grasshopper-ctr" 4387 #define NID_grasshopper_ctr 1013 4388 4389 #define SN_grasshopper_ofb "grasshopper-ofb" 4390 #define NID_grasshopper_ofb 1014 4391 4392 #define SN_grasshopper_cbc "grasshopper-cbc" 4393 #define NID_grasshopper_cbc 1015 4394 4395 #define SN_grasshopper_cfb "grasshopper-cfb" 4396 #define NID_grasshopper_cfb 1016 4397 4398 #define SN_grasshopper_mac "grasshopper-mac" 4399 #define NID_grasshopper_mac 1017 4533 #define SN_classSignTool "classSignTool" 4534 #define LN_classSignTool "Class of Signing Tool" 4535 #define NID_classSignTool 1227 4536 #define OBJ_classSignTool OBJ_member_body,643L,100L,113L 4537 4538 #define SN_classSignToolKC1 "classSignToolKC1" 4539 #define LN_classSignToolKC1 "Class of Signing Tool KC1" 4540 #define NID_classSignToolKC1 1228 4541 #define OBJ_classSignToolKC1 OBJ_member_body,643L,100L,113L,1L 4542 4543 #define SN_classSignToolKC2 "classSignToolKC2" 4544 #define LN_classSignToolKC2 "Class of Signing Tool KC2" 4545 #define NID_classSignToolKC2 1229 4546 #define OBJ_classSignToolKC2 OBJ_member_body,643L,100L,113L,2L 4547 4548 #define SN_classSignToolKC3 "classSignToolKC3" 4549 #define LN_classSignToolKC3 "Class of Signing Tool KC3" 4550 #define NID_classSignToolKC3 1230 4551 #define OBJ_classSignToolKC3 OBJ_member_body,643L,100L,113L,3L 4552 4553 #define SN_classSignToolKB1 "classSignToolKB1" 4554 #define LN_classSignToolKB1 "Class of Signing Tool KB1" 4555 #define NID_classSignToolKB1 1231 4556 #define OBJ_classSignToolKB1 OBJ_member_body,643L,100L,113L,4L 4557 4558 #define SN_classSignToolKB2 "classSignToolKB2" 4559 #define LN_classSignToolKB2 "Class of Signing Tool KB2" 4560 #define NID_classSignToolKB2 1232 4561 #define OBJ_classSignToolKB2 OBJ_member_body,643L,100L,113L,5L 4562 4563 #define SN_classSignToolKA1 "classSignToolKA1" 4564 #define LN_classSignToolKA1 "Class of Signing Tool KA1" 4565 #define NID_classSignToolKA1 1233 4566 #define OBJ_classSignToolKA1 OBJ_member_body,643L,100L,113L,6L 4567 4568 #define SN_kuznyechik_ecb "kuznyechik-ecb" 4569 #define NID_kuznyechik_ecb 1012 4570 4571 #define SN_kuznyechik_ctr "kuznyechik-ctr" 4572 #define NID_kuznyechik_ctr 1013 4573 4574 #define SN_kuznyechik_ofb "kuznyechik-ofb" 4575 #define NID_kuznyechik_ofb 1014 4576 4577 #define SN_kuznyechik_cbc "kuznyechik-cbc" 4578 #define NID_kuznyechik_cbc 1015 4579 4580 #define SN_kuznyechik_cfb "kuznyechik-cfb" 4581 #define NID_kuznyechik_cfb 1016 4582 4583 #define SN_kuznyechik_mac "kuznyechik-mac" 4584 #define NID_kuznyechik_mac 1017 4400 4585 4401 4586 #define SN_magma_ecb "magma-ecb" … … 4971 5156 #define NID_hkdf 1036 4972 5157 5158 #define SN_sshkdf "SSHKDF" 5159 #define LN_sshkdf "sshkdf" 5160 #define NID_sshkdf 1203 5161 5162 #define SN_sskdf "SSKDF" 5163 #define LN_sskdf "sskdf" 5164 #define NID_sskdf 1205 5165 5166 #define SN_x942kdf "X942KDF" 5167 #define LN_x942kdf "x942kdf" 5168 #define NID_x942kdf 1207 5169 5170 #define SN_x963kdf "X963KDF" 5171 #define LN_x963kdf "x963kdf" 5172 #define NID_x963kdf 1206 5173 4973 5174 #define SN_id_pkinit "id-pkinit" 4974 5175 #define NID_id_pkinit 1031 … … 5037 5238 #define NID_kx_gost 1045 5038 5239 5240 #define SN_kx_gost18 "KxGOST18" 5241 #define LN_kx_gost18 "kx-gost18" 5242 #define NID_kx_gost18 1218 5243 5039 5244 #define SN_kx_any "KxANY" 5040 5245 #define LN_kx_any "kx-any" … … 5099 5304 #define SN_ffdhe8192 "ffdhe8192" 5100 5305 #define NID_ffdhe8192 1130 5306 5307 #define SN_modp_1536 "modp_1536" 5308 #define NID_modp_1536 1212 5309 5310 #define SN_modp_2048 "modp_2048" 5311 #define NID_modp_2048 1213 5312 5313 #define SN_modp_3072 "modp_3072" 5314 #define NID_modp_3072 1214 5315 5316 #define SN_modp_4096 "modp_4096" 5317 #define NID_modp_4096 1215 5318 5319 #define SN_modp_6144 "modp_6144" 5320 #define NID_modp_6144 1216 5321 5322 #define SN_modp_8192 "modp_8192" 5323 #define NID_modp_8192 1217 5101 5324 5102 5325 #define SN_ISO_UA "ISO-UA" … … 5197 5420 #define NID_uacurve9 1169 5198 5421 #define OBJ_uacurve9 OBJ_dstu4145le,2L,9L 5422 5423 #define SN_aes_128_siv "AES-128-SIV" 5424 #define LN_aes_128_siv "aes-128-siv" 5425 #define NID_aes_128_siv 1198 5426 5427 #define SN_aes_192_siv "AES-192-SIV" 5428 #define LN_aes_192_siv "aes-192-siv" 5429 #define NID_aes_192_siv 1199 5430 5431 #define SN_aes_256_siv "AES-256-SIV" 5432 #define LN_aes_256_siv "aes-256-siv" 5433 #define NID_aes_256_siv 1200 5434 5435 #endif /* OPENSSL_OBJ_MAC_H */ 5436 5437 #ifndef OPENSSL_NO_DEPRECATED_3_0 5438 5439 #define SN_id_tc26_cipher_gostr3412_2015_magma_ctracpkm SN_magma_ctr_acpkm 5440 #define NID_id_tc26_cipher_gostr3412_2015_magma_ctracpkm NID_magma_ctr_acpkm 5441 #define OBJ_id_tc26_cipher_gostr3412_2015_magma_ctracpkm OBJ_magma_ctr_acpkm 5442 5443 #define SN_id_tc26_cipher_gostr3412_2015_magma_ctracpkm_omac SN_magma_ctr_acpkm_omac 5444 #define NID_id_tc26_cipher_gostr3412_2015_magma_ctracpkm_omac NID_magma_ctr_acpkm_omac 5445 #define OBJ_id_tc26_cipher_gostr3412_2015_magma_ctracpkm_omac OBJ_magma_ctr_acpkm_omac 5446 5447 #define SN_id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm SN_kuznyechik_ctr_acpkm 5448 #define NID_id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm NID_kuznyechik_ctr_acpkm 5449 #define OBJ_id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm OBJ_kuznyechik_ctr_acpkm 5450 5451 #define SN_id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm_omac SN_kuznyechik_ctr_acpkm_omac 5452 #define NID_id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm_omac NID_kuznyechik_ctr_acpkm_omac 5453 #define OBJ_id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm_omac OBJ_kuznyechik_ctr_acpkm_omac 5454 5455 #define SN_id_tc26_wrap_gostr3412_2015_magma_kexp15 SN_magma_kexp15 5456 #define NID_id_tc26_wrap_gostr3412_2015_magma_kexp15 NID_magma_kexp15 5457 #define OBJ_id_tc26_wrap_gostr3412_2015_magma_kexp15 OBJ_magma_kexp15 5458 5459 #define SN_id_tc26_wrap_gostr3412_2015_kuznyechik_kexp15 SN_kuznyechik_kexp15 5460 #define NID_id_tc26_wrap_gostr3412_2015_kuznyechik_kexp15 NID_kuznyechik_kexp15 5461 #define OBJ_id_tc26_wrap_gostr3412_2015_kuznyechik_kexp15 OBJ_kuznyechik_kexp15 5462 5463 #define SN_grasshopper_ecb SN_kuznyechik_ecb 5464 #define NID_grasshopper_ecb NID_kuznyechik_ecb 5465 5466 #define SN_grasshopper_ctr SN_kuznyechik_ctr 5467 #define NID_grasshopper_ctr NID_kuznyechik_ctr 5468 5469 #define SN_grasshopper_ofb SN_kuznyechik_ofb 5470 #define NID_grasshopper_ofb NID_kuznyechik_ofb 5471 5472 #define SN_grasshopper_cbc SN_kuznyechik_cbc 5473 #define NID_grasshopper_cbc NID_kuznyechik_cbc 5474 5475 #define SN_grasshopper_cfb SN_kuznyechik_cfb 5476 #define NID_grasshopper_cfb NID_kuznyechik_cfb 5477 5478 #define SN_grasshopper_mac SN_kuznyechik_mac 5479 #define NID_grasshopper_mac NID_kuznyechik_mac 5480 5481 #endif /* OPENSSL_NO_DEPRECATED_3_0 */ -
trunk/src/libs/openssl-3.0.1/include/openssl/objects.h
r91772 r94082 1 1 /* 2 * Copyright 1995-201 8The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_OBJECTS_H 11 # define HEADER_OBJECTS_H 10 #ifndef OPENSSL_OBJECTS_H 11 # define OPENSSL_OBJECTS_H 12 # pragma once 13 14 # include <openssl/macros.h> 15 # ifndef OPENSSL_NO_DEPRECATED_3_0 16 # define HEADER_OBJECTS_H 17 # endif 12 18 13 19 # include <openssl/obj_mac.h> … … 21 27 # define OBJ_NAME_TYPE_PKEY_METH 0x03 22 28 # define OBJ_NAME_TYPE_COMP_METH 0x04 23 # define OBJ_NAME_TYPE_NUM 0x05 29 # define OBJ_NAME_TYPE_MAC_METH 0x05 30 # define OBJ_NAME_TYPE_KDF_METH 0x06 31 # define OBJ_NAME_TYPE_NUM 0x07 24 32 25 33 # define OBJ_NAME_ALIAS 0x8000 … … 56 64 void *arg); 57 65 58 ASN1_OBJECT *OBJ_dup(const ASN1_OBJECT *o); 66 DECLARE_ASN1_DUP_FUNCTION_name(ASN1_OBJECT, OBJ) 59 67 ASN1_OBJECT *OBJ_nid2obj(int n); 60 68 const char *OBJ_nid2ln(int n); … … 156 164 int OBJ_add_object(const ASN1_OBJECT *obj); 157 165 int OBJ_create(const char *oid, const char *sn, const char *ln); 158 #if OPENSSL_API_COMPAT < 0x10100000L166 #ifndef OPENSSL_NO_DEPRECATED_1_1_0 159 167 # define OBJ_cleanup() while(0) continue 160 168 #endif -
trunk/src/libs/openssl-3.0.1/include/openssl/objectserr.h
r91772 r94082 1 1 /* 2 2 * Generated by util/mkerr.pl DO NOT EDIT 3 * Copyright 1995-20 19The OpenSSL Project Authors. All Rights Reserved.3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 4 * 5 * Licensed under the OpenSSL license(the "License"). You may not use5 * Licensed under the Apache License 2.0 (the "License"). You may not use 6 6 * this file except in compliance with the License. You can obtain a copy 7 7 * in the file LICENSE in the source distribution or at … … 9 9 */ 10 10 11 #ifndef HEADER_OBJERR_H 12 # define HEADER_OBJERR_H 11 #ifndef OPENSSL_OBJECTSERR_H 12 # define OPENSSL_OBJECTSERR_H 13 # pragma once 13 14 14 # i fndef HEADER_SYMHACKS_H15 # 16 # endif15 # include <openssl/opensslconf.h> 16 # include <openssl/symhacks.h> 17 # include <openssl/cryptoerr_legacy.h> 17 18 18 # ifdef __cplusplus19 extern "C"20 # endif21 int ERR_load_OBJ_strings(void);22 19 23 /*24 * OBJ function codes.25 */26 # define OBJ_F_OBJ_ADD_OBJECT 10527 # define OBJ_F_OBJ_ADD_SIGID 10728 # define OBJ_F_OBJ_CREATE 10029 # define OBJ_F_OBJ_DUP 10130 # define OBJ_F_OBJ_NAME_NEW_INDEX 10631 # define OBJ_F_OBJ_NID2LN 10232 # define OBJ_F_OBJ_NID2OBJ 10333 # define OBJ_F_OBJ_NID2SN 10434 # define OBJ_F_OBJ_TXT2OBJ 10835 20 36 21 /* … … 39 24 # define OBJ_R_OID_EXISTS 102 40 25 # define OBJ_R_UNKNOWN_NID 101 26 # define OBJ_R_UNKNOWN_OBJECT_NAME 103 41 27 42 28 #endif -
trunk/src/libs/openssl-3.0.1/include/openssl/ocsperr.h
r91772 r94082 1 1 /* 2 2 * Generated by util/mkerr.pl DO NOT EDIT 3 * Copyright 1995-20 19The OpenSSL Project Authors. All Rights Reserved.3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 4 * 5 * Licensed under the OpenSSL license(the "License"). You may not use5 * Licensed under the Apache License 2.0 (the "License"). You may not use 6 6 * this file except in compliance with the License. You can obtain a copy 7 7 * in the file LICENSE in the source distribution or at … … 9 9 */ 10 10 11 #ifndef HEADER_OCSPERR_H 12 # define HEADER_OCSPERR_H 13 14 # ifndef HEADER_SYMHACKS_H 15 # include <openssl/symhacks.h> 16 # endif 11 #ifndef OPENSSL_OCSPERR_H 12 # define OPENSSL_OCSPERR_H 13 # pragma once 17 14 18 15 # include <openssl/opensslconf.h> 16 # include <openssl/symhacks.h> 17 # include <openssl/cryptoerr_legacy.h> 18 19 19 20 20 # ifndef OPENSSL_NO_OCSP 21 21 22 # ifdef __cplusplus23 extern "C"24 # endif25 int ERR_load_OCSP_strings(void);26 27 /*28 * OCSP function codes.29 */30 # define OCSP_F_D2I_OCSP_NONCE 10231 # define OCSP_F_OCSP_BASIC_ADD1_STATUS 10332 # define OCSP_F_OCSP_BASIC_SIGN 10433 # define OCSP_F_OCSP_BASIC_SIGN_CTX 11934 # define OCSP_F_OCSP_BASIC_VERIFY 10535 # define OCSP_F_OCSP_CERT_ID_NEW 10136 # define OCSP_F_OCSP_CHECK_DELEGATED 10637 # define OCSP_F_OCSP_CHECK_IDS 10738 # define OCSP_F_OCSP_CHECK_ISSUER 10839 # define OCSP_F_OCSP_CHECK_VALIDITY 11540 # define OCSP_F_OCSP_MATCH_ISSUERID 10941 # define OCSP_F_OCSP_PARSE_URL 11442 # define OCSP_F_OCSP_REQUEST_SIGN 11043 # define OCSP_F_OCSP_REQUEST_VERIFY 11644 # define OCSP_F_OCSP_RESPONSE_GET1_BASIC 11145 # define OCSP_F_PARSE_HTTP_LINE1 11846 22 47 23 /* … … 50 26 # define OCSP_R_CERTIFICATE_VERIFY_ERROR 101 51 27 # define OCSP_R_DIGEST_ERR 102 28 # define OCSP_R_DIGEST_NAME_ERR 106 29 # define OCSP_R_DIGEST_SIZE_ERR 107 52 30 # define OCSP_R_ERROR_IN_NEXTUPDATE_FIELD 122 53 31 # define OCSP_R_ERROR_IN_THISUPDATE_FIELD 123 54 # define OCSP_R_ERROR_PARSING_URL 12155 32 # define OCSP_R_MISSING_OCSPSIGNING_USAGE 103 56 33 # define OCSP_R_NEXTUPDATE_BEFORE_THISUPDATE 124 … … 64 41 # define OCSP_R_RESPONSE_CONTAINS_NO_REVOCATION_DATA 111 65 42 # define OCSP_R_ROOT_CA_NOT_TRUSTED 112 66 # define OCSP_R_SERVER_RESPONSE_ERROR 11467 # define OCSP_R_SERVER_RESPONSE_PARSE_ERROR 11568 43 # define OCSP_R_SIGNATURE_FAILURE 117 69 44 # define OCSP_R_SIGNER_CERTIFICATE_NOT_FOUND 118 -
trunk/src/libs/openssl-3.0.1/include/openssl/opensslconf.h
r91772 r94082 1 1 /* 2 * WARNING: do not edit! 3 * Generated by Makefile from include/openssl/opensslconf.h.in 2 * Copyright 2019-2021 The OpenSSL Project Authors. All Rights Reserved. 4 3 * 5 * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved. 6 * 7 * Licensed under the OpenSSL license (the "License"). You may not use 4 * Licensed under the Apache License 2.0 (the "License"). You may not use 8 5 * this file except in compliance with the License. You can obtain a copy 9 6 * in the file LICENSE in the source distribution or at … … 11 8 */ 12 9 13 #include <openssl/opensslv.h> 10 #ifndef OPENSSL_OPENSSLCONF_H 11 # define OPENSSL_OPENSSLCONF_H 12 # pragma once 14 13 15 #ifdef __cplusplus 16 extern "C" { 17 #endif 14 # include <openssl/configuration.h> 15 # include <openssl/macros.h> 18 16 19 17 /* Mangle OpenSSL symbols to prevent clashes with other OpenSSL libraries … … 26 24 #endif 27 25 28 #ifdef OPENSSL_ALGORITHM_DEFINES 29 # error OPENSSL_ALGORITHM_DEFINES no longer supported 30 #endif 31 32 /* 33 * OpenSSL was configured with the following options: 34 */ 35 36 #ifndef OPENSSL_NO_CAST 37 # define OPENSSL_NO_CAST 38 #endif 39 #ifndef OPENSSL_NO_COMP 40 # define OPENSSL_NO_COMP 41 #endif 42 #ifndef OPENSSL_NO_IDEA 43 # define OPENSSL_NO_IDEA 44 #endif 45 #ifndef OPENSSL_NO_MD4 46 # define OPENSSL_NO_MD4 47 #endif 48 #ifndef OPENSSL_NO_MDC2 49 # define OPENSSL_NO_MDC2 50 #endif 51 #ifndef OPENSSL_NO_POLY1305 52 # define OPENSSL_NO_POLY1305 53 #endif 54 #ifndef OPENSSL_NO_RC2 55 # define OPENSSL_NO_RC2 56 #endif 57 #ifndef OPENSSL_NO_RC5 58 # define OPENSSL_NO_RC5 59 #endif 60 #ifndef OPENSSL_NO_RMD160 61 # define OPENSSL_NO_RMD160 62 #endif 63 #ifndef OPENSSL_NO_SM2 64 # define OPENSSL_NO_SM2 /* Following Oracle Linux' lead and disable this. */ 65 #endif 66 #ifndef OPENSSL_NO_SM4 67 # define OPENSSL_NO_SM4 /* Following Oracle Linux' lead and disable this. */ 68 #endif 69 #ifndef OPENSSL_NO_WHIRLPOOL 70 # define OPENSSL_NO_WHIRLPOOL 71 #endif 72 #ifndef OPENSSL_THREADS 73 # define OPENSSL_THREADS 74 #endif 75 #ifndef OPENSSL_RAND_SEED_OS 76 # define OPENSSL_RAND_SEED_OS 77 #endif 78 #ifndef OPENSSL_NO_AFALGENG 79 # define OPENSSL_NO_AFALGENG 80 #endif 81 #ifndef OPENSSL_NO_ASAN 82 # define OPENSSL_NO_ASAN 83 #endif 84 #ifndef OPENSSL_NO_CRYPTO_MDEBUG 85 # define OPENSSL_NO_CRYPTO_MDEBUG 86 #endif 87 #ifndef OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE 88 # define OPENSSL_NO_CRYPTO_MDEBUG_BACKTRACE 89 #endif 90 #ifndef OPENSSL_NO_DEVCRYPTOENG 91 # define OPENSSL_NO_DEVCRYPTOENG 92 #endif 93 #ifndef OPENSSL_NO_EC_NISTP_64_GCC_128 94 # define OPENSSL_NO_EC_NISTP_64_GCC_128 95 #endif 96 #ifndef OPENSSL_NO_ECDH 97 # define OPENSSL_NO_ECDH 98 #endif 99 #ifndef OPENSSL_NO_ECDSA 100 # define OPENSSL_NO_ECDSA 101 #endif 102 #ifndef OPENSSL_NO_EGD 103 # define OPENSSL_NO_EGD 104 #endif 105 #ifndef OPENSSL_NO_ENGINE 106 # define OPENSSL_NO_ENGINE 107 #endif 108 #ifndef OPENSSL_NO_ERR 109 # define OPENSSL_NO_ERR 110 #endif 111 #ifndef OPENSSL_NO_EXTERNAL_TESTS 112 # define OPENSSL_NO_EXTERNAL_TESTS 113 #endif 114 #ifndef OPENSSL_NO_FUZZ_AFL 115 # define OPENSSL_NO_FUZZ_AFL 116 #endif 117 #ifndef OPENSSL_NO_FUZZ_LIBFUZZER 118 # define OPENSSL_NO_FUZZ_LIBFUZZER 119 #endif 120 #ifndef OPENSSL_NO_HEARTBEATS 121 # define OPENSSL_NO_HEARTBEATS 122 #endif 123 #ifndef OPENSSL_NO_MSAN 124 # define OPENSSL_NO_MSAN 125 #endif 126 #ifndef OPENSSL_NO_SCTP 127 # define OPENSSL_NO_SCTP 128 #endif 129 #ifndef OPENSSL_NO_SSL_TRACE 130 # define OPENSSL_NO_SSL_TRACE 131 #endif 132 #ifndef OPENSSL_NO_SSL3 133 # define OPENSSL_NO_SSL3 134 #endif 135 #ifndef OPENSSL_NO_SSL3_METHOD 136 # define OPENSSL_NO_SSL3_METHOD 137 #endif 138 #ifndef OPENSSL_NO_UBSAN 139 # define OPENSSL_NO_UBSAN 140 #endif 141 #ifndef OPENSSL_NO_UNIT_TEST 142 # define OPENSSL_NO_UNIT_TEST 143 #endif 144 #ifndef OPENSSL_NO_WEAK_SSL_CIPHERS 145 # define OPENSSL_NO_WEAK_SSL_CIPHERS 146 #endif 147 #ifndef OPENSSL_NO_DYNAMIC_ENGINE 148 # define OPENSSL_NO_DYNAMIC_ENGINE 149 #endif 150 #ifndef OPENSSL_NO_AFALGENG 151 # define OPENSSL_NO_AFALGENG 152 #endif 153 154 155 /* 156 * Sometimes OPENSSSL_NO_xxx ends up with an empty file and some compilers 157 * don't like that. This will hopefully silence them. 158 */ 159 #define NON_EMPTY_TRANSLATION_UNIT static void *dummy = &dummy; 160 161 /* 162 * Applications should use -DOPENSSL_API_COMPAT=<version> to suppress the 163 * declarations of functions deprecated in or before <version>. Otherwise, they 164 * still won't see them if the library has been built to disable deprecated 165 * functions. 166 */ 167 #ifndef DECLARE_DEPRECATED 168 # if defined(_MSC_VER) /* vbox */ 169 # ifdef __cplusplus /* vbox */ 170 # define DECLARE_DEPRECATED(f) __declspec(deprecated) f; /* vbox */ 171 # else /* vbox */ 172 # define DECLARE_DEPRECATED(f) f; /* vbox */ 173 # endif /* vbox */ 174 # else 175 # define DECLARE_DEPRECATED(f) f; 176 # ifdef __GNUC__ 177 # if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ > 0) 178 # undef DECLARE_DEPRECATED 179 # define DECLARE_DEPRECATED(f) f __attribute__ ((deprecated)); 180 # endif 181 # endif 182 # endif 183 #endif 184 185 #ifndef OPENSSL_FILE 186 # ifdef OPENSSL_NO_FILENAMES 187 # define OPENSSL_FILE "" 188 # define OPENSSL_LINE 0 189 # else 190 # define OPENSSL_FILE __FILE__ 191 # define OPENSSL_LINE __LINE__ 192 # endif 193 #endif 194 195 #ifndef OPENSSL_MIN_API 196 # define OPENSSL_MIN_API 0 197 #endif 198 199 #if !defined(OPENSSL_API_COMPAT) || OPENSSL_API_COMPAT < OPENSSL_MIN_API 200 # undef OPENSSL_API_COMPAT 201 # define OPENSSL_API_COMPAT OPENSSL_MIN_API 202 #endif 203 204 /* 205 * Do not deprecate things to be deprecated in version 1.2.0 before the 206 * OpenSSL version number matches. 207 */ 208 #if OPENSSL_VERSION_NUMBER < 0x10200000L 209 # define DEPRECATEDIN_1_2_0(f) f; 210 #elif OPENSSL_API_COMPAT < 0x10200000L 211 # define DEPRECATEDIN_1_2_0(f) DECLARE_DEPRECATED(f) 212 #else 213 # define DEPRECATEDIN_1_2_0(f) 214 #endif 215 216 #if OPENSSL_API_COMPAT < 0x10100000L 217 # define DEPRECATEDIN_1_1_0(f) DECLARE_DEPRECATED(f) 218 #else 219 # define DEPRECATEDIN_1_1_0(f) 220 #endif 221 222 #if OPENSSL_API_COMPAT < 0x10000000L 223 # define DEPRECATEDIN_1_0_0(f) DECLARE_DEPRECATED(f) 224 #else 225 # define DEPRECATEDIN_1_0_0(f) 226 #endif 227 228 #if OPENSSL_API_COMPAT < 0x00908000L 229 # define DEPRECATEDIN_0_9_8(f) DECLARE_DEPRECATED(f) 230 #else 231 # define DEPRECATEDIN_0_9_8(f) 232 #endif 233 234 /* Generate 80386 code? */ 235 #undef I386_ONLY 236 237 #undef OPENSSL_UNISTD 238 #define OPENSSL_UNISTD <unistd.h> 239 240 #undef OPENSSL_EXPORT_VAR_AS_FUNCTION 241 242 /* 243 * The following are cipher-specific, but are part of the public API. 244 */ 245 #if !defined(OPENSSL_SYS_UEFI) 246 # undef BN_LLONG 247 /* Only one for the following should be defined */ 248 # include <iprt/cdefs.h> 249 # if defined(RT_ARCH_AMD64) || defined(RT_ARCH_SPARC64) || defined(RT_ARCH_ARM64) 250 # ifdef _MSC_VER 251 # undef SIXTY_FOUR_BIT_LONG 252 # define SIXTY_FOUR_BIT 253 # undef THIRTY_TWO_BIT 254 # else 255 # define SIXTY_FOUR_BIT_LONG 256 # undef SIXTY_FOUR_BIT 257 # undef THIRTY_TWO_BIT 258 # endif 259 # elif defined(RT_ARCH_X86) || defined(RT_ARCH_SPARC) || defined(RT_ARCH_ARM32) 260 # undef SIXTY_FOUR_BIT_LONG 261 # undef SIXTY_FOUR_BIT 262 # define THIRTY_TWO_BIT 263 # else 264 # error "Unknown/missing RT_ARCH_*." /* vbox: 64-bit (cannot safely use ARCH_BITS without including iprt/cdefs.h) */ 265 # endif 266 #endif 267 268 #define RC4_INT unsigned int 269 270 #ifdef __cplusplus 271 } 272 #endif 26 #endif /* OPENSSL_OPENSSLCONF_H */ -
trunk/src/libs/openssl-3.0.1/include/openssl/ossl_typ.h
r91772 r94082 1 1 /* 2 * Copyright 20 01-2018The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 2019 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_OPENSSL_TYPES_H11 # define HEADER_OPENSSL_TYPES_H12 13 #include <limits.h>14 15 #ifdef __cplusplus16 extern "C" {17 #endif18 19 # include <openssl/e_os2.h>20 21 # ifdef NO_ASN1_TYPEDEFS22 # define ASN1_INTEGER ASN1_STRING23 # define ASN1_ENUMERATED ASN1_STRING24 # define ASN1_BIT_STRING ASN1_STRING25 # define ASN1_OCTET_STRING ASN1_STRING26 # define ASN1_PRINTABLESTRING ASN1_STRING27 # define ASN1_T61STRING ASN1_STRING28 # define ASN1_IA5STRING ASN1_STRING29 # define ASN1_UTCTIME ASN1_STRING30 # define ASN1_GENERALIZEDTIME ASN1_STRING31 # define ASN1_TIME ASN1_STRING32 # define ASN1_GENERALSTRING ASN1_STRING33 # define ASN1_UNIVERSALSTRING ASN1_STRING34 # define ASN1_BMPSTRING ASN1_STRING35 # define ASN1_VISIBLESTRING ASN1_STRING36 # define ASN1_UTF8STRING ASN1_STRING37 # define ASN1_BOOLEAN int38 # define ASN1_NULL int39 # else40 typedef struct asn1_string_st ASN1_INTEGER;41 typedef struct asn1_string_st ASN1_ENUMERATED;42 typedef struct asn1_string_st ASN1_BIT_STRING;43 typedef struct asn1_string_st ASN1_OCTET_STRING;44 typedef struct asn1_string_st ASN1_PRINTABLESTRING;45 typedef struct asn1_string_st ASN1_T61STRING;46 typedef struct asn1_string_st ASN1_IA5STRING;47 typedef struct asn1_string_st ASN1_GENERALSTRING;48 typedef struct asn1_string_st ASN1_UNIVERSALSTRING;49 typedef struct asn1_string_st ASN1_BMPSTRING;50 typedef struct asn1_string_st ASN1_UTCTIME;51 typedef struct asn1_string_st ASN1_TIME;52 typedef struct asn1_string_st ASN1_GENERALIZEDTIME;53 typedef struct asn1_string_st ASN1_VISIBLESTRING;54 typedef struct asn1_string_st ASN1_UTF8STRING;55 typedef struct asn1_string_st ASN1_STRING;56 typedef int ASN1_BOOLEAN;57 typedef int ASN1_NULL;58 # endif59 60 typedef struct asn1_object_st ASN1_OBJECT;61 62 typedef struct ASN1_ITEM_st ASN1_ITEM;63 typedef struct asn1_pctx_st ASN1_PCTX;64 typedef struct asn1_sctx_st ASN1_SCTX;65 66 # ifdef _WIN3267 # undef X509_NAME68 # undef X509_EXTENSIONS69 # undef PKCS7_ISSUER_AND_SERIAL70 # undef PKCS7_SIGNER_INFO71 # undef OCSP_REQUEST72 # undef OCSP_RESPONSE73 # endif74 75 # ifdef BIGNUM76 # undef BIGNUM77 # endif78 struct dane_st;79 typedef struct bio_st BIO;80 typedef struct bignum_st BIGNUM;81 typedef struct bignum_ctx BN_CTX;82 typedef struct bn_blinding_st BN_BLINDING;83 typedef struct bn_mont_ctx_st BN_MONT_CTX;84 typedef struct bn_recp_ctx_st BN_RECP_CTX;85 typedef struct bn_gencb_st BN_GENCB;86 87 typedef struct buf_mem_st BUF_MEM;88 89 typedef struct evp_cipher_st EVP_CIPHER;90 typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX;91 typedef struct evp_md_st EVP_MD;92 typedef struct evp_md_ctx_st EVP_MD_CTX;93 typedef struct evp_pkey_st EVP_PKEY;94 95 typedef struct evp_pkey_asn1_method_st EVP_PKEY_ASN1_METHOD;96 97 typedef struct evp_pkey_method_st EVP_PKEY_METHOD;98 typedef struct evp_pkey_ctx_st EVP_PKEY_CTX;99 100 typedef struct evp_Encode_Ctx_st EVP_ENCODE_CTX;101 102 typedef struct hmac_ctx_st HMAC_CTX;103 104 typedef struct dh_st DH;105 typedef struct dh_method DH_METHOD;106 107 typedef struct dsa_st DSA;108 typedef struct dsa_method DSA_METHOD;109 110 typedef struct rsa_st RSA;111 typedef struct rsa_meth_st RSA_METHOD;112 typedef struct rsa_pss_params_st RSA_PSS_PARAMS;113 114 typedef struct ec_key_st EC_KEY;115 typedef struct ec_key_method_st EC_KEY_METHOD;116 117 typedef struct rand_meth_st RAND_METHOD;118 typedef struct rand_drbg_st RAND_DRBG;119 120 typedef struct ssl_dane_st SSL_DANE;121 typedef struct x509_st X509;122 typedef struct X509_algor_st X509_ALGOR;123 typedef struct X509_crl_st X509_CRL;124 typedef struct x509_crl_method_st X509_CRL_METHOD;125 typedef struct x509_revoked_st X509_REVOKED;126 typedef struct X509_name_st X509_NAME;127 typedef struct X509_pubkey_st X509_PUBKEY;128 typedef struct x509_store_st X509_STORE;129 typedef struct x509_store_ctx_st X509_STORE_CTX;130 131 typedef struct x509_object_st X509_OBJECT;132 typedef struct x509_lookup_st X509_LOOKUP;133 typedef struct x509_lookup_method_st X509_LOOKUP_METHOD;134 typedef struct X509_VERIFY_PARAM_st X509_VERIFY_PARAM;135 136 typedef struct x509_sig_info_st X509_SIG_INFO;137 138 typedef struct pkcs8_priv_key_info_st PKCS8_PRIV_KEY_INFO;139 140 typedef struct v3_ext_ctx X509V3_CTX;141 typedef struct conf_st CONF;142 typedef struct ossl_init_settings_st OPENSSL_INIT_SETTINGS;143 144 typedef struct ui_st UI;145 typedef struct ui_method_st UI_METHOD;146 147 typedef struct engine_st ENGINE;148 typedef struct ssl_st SSL;149 typedef struct ssl_ctx_st SSL_CTX;150 151 typedef struct comp_ctx_st COMP_CTX;152 typedef struct comp_method_st COMP_METHOD;153 154 typedef struct X509_POLICY_NODE_st X509_POLICY_NODE;155 typedef struct X509_POLICY_LEVEL_st X509_POLICY_LEVEL;156 typedef struct X509_POLICY_TREE_st X509_POLICY_TREE;157 typedef struct X509_POLICY_CACHE_st X509_POLICY_CACHE;158 159 typedef struct AUTHORITY_KEYID_st AUTHORITY_KEYID;160 typedef struct DIST_POINT_st DIST_POINT;161 typedef struct ISSUING_DIST_POINT_st ISSUING_DIST_POINT;162 typedef struct NAME_CONSTRAINTS_st NAME_CONSTRAINTS;163 164 typedef struct crypto_ex_data_st CRYPTO_EX_DATA;165 166 typedef struct ocsp_req_ctx_st OCSP_REQ_CTX;167 typedef struct ocsp_response_st OCSP_RESPONSE;168 typedef struct ocsp_responder_id_st OCSP_RESPID;169 170 typedef struct sct_st SCT;171 typedef struct sct_ctx_st SCT_CTX;172 typedef struct ctlog_st CTLOG;173 typedef struct ctlog_store_st CTLOG_STORE;174 typedef struct ct_policy_eval_ctx_st CT_POLICY_EVAL_CTX;175 176 typedef struct ossl_store_info_st OSSL_STORE_INFO;177 typedef struct ossl_store_search_st OSSL_STORE_SEARCH;178 179 #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L && \180 defined(INTMAX_MAX) && defined(UINTMAX_MAX)181 typedef intmax_t ossl_intmax_t;182 typedef uintmax_t ossl_uintmax_t;183 #else184 10 /* 185 * Not long long, because the C-library can only be expected to provide186 * strtoll(), strtoull() at the same time as intmax_t and strtoimax(),187 * strtoumax(). Since we use these for parsing arguments, we need the188 * conversion functions, not just the sizes.11 * The original <openssl/ossl_typ.h> was renamed to <openssl/types.h> 12 * 13 * This header file only exists for compatibility reasons with older 14 * applications which #include <openssl/ossl_typ.h>. 189 15 */ 190 typedef long ossl_intmax_t; 191 typedef unsigned long ossl_uintmax_t; 192 #endif 193 194 #ifdef __cplusplus 195 } 196 #endif 197 #endif /* def HEADER_OPENSSL_TYPES_H */ 16 # include <openssl/types.h> -
trunk/src/libs/openssl-3.0.1/include/openssl/pem.h
r91772 r94082 1 1 /* 2 * Copyright 1995-20 18The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_PEM_H 11 # define HEADER_PEM_H 10 #ifndef OPENSSL_PEM_H 11 # define OPENSSL_PEM_H 12 # pragma once 13 14 # include <openssl/macros.h> 15 # ifndef OPENSSL_NO_DEPRECATED_3_0 16 # define HEADER_PEM_H 17 # endif 12 18 13 19 # include <openssl/e_os2.h> … … 61 67 */ 62 68 69 # define PEM_read_cb_fnsig(name, type, INTYPE, readname) \ 70 type *PEM_##readname##_##name(INTYPE *out, type **x, \ 71 pem_password_cb *cb, void *u) 72 # define PEM_read_cb_ex_fnsig(name, type, INTYPE, readname) \ 73 type *PEM_##readname##_##name##_ex(INTYPE *out, type **x, \ 74 pem_password_cb *cb, void *u, \ 75 OSSL_LIB_CTX *libctx, \ 76 const char *propq) 77 78 # define PEM_write_fnsig(name, type, OUTTYPE, writename) \ 79 int PEM_##writename##_##name(OUTTYPE *out, const type *x) 80 # define PEM_write_cb_fnsig(name, type, OUTTYPE, writename) \ 81 int PEM_##writename##_##name(OUTTYPE *out, const type *x, \ 82 const EVP_CIPHER *enc, \ 83 const unsigned char *kstr, int klen, \ 84 pem_password_cb *cb, void *u) 85 # define PEM_write_ex_fnsig(name, type, OUTTYPE, writename) \ 86 int PEM_##writename##_##name##_ex(OUTTYPE *out, const type *x, \ 87 OSSL_LIB_CTX *libctx, \ 88 const char *propq) 89 # define PEM_write_cb_ex_fnsig(name, type, OUTTYPE, writename) \ 90 int PEM_##writename##_##name##_ex(OUTTYPE *out, const type *x, \ 91 const EVP_CIPHER *enc, \ 92 const unsigned char *kstr, int klen, \ 93 pem_password_cb *cb, void *u, \ 94 OSSL_LIB_CTX *libctx, \ 95 const char *propq) 96 63 97 # ifdef OPENSSL_NO_STDIO 64 98 65 99 # define IMPLEMENT_PEM_read_fp(name, type, str, asn1) /**/ 66 100 # define IMPLEMENT_PEM_write_fp(name, type, str, asn1) /**/ 67 # define IMPLEMENT_PEM_write_fp_const(name, type, str, asn1) /**/ 101 # ifndef OPENSSL_NO_DEPRECATED_3_0 102 # define IMPLEMENT_PEM_write_fp_const(name, type, str, asn1) /**/ 103 # endif 68 104 # define IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1) /**/ 69 # define IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1) /**/ 105 # ifndef OPENSSL_NO_DEPRECATED_3_0 106 # define IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1) /**/ 107 # endif 70 108 # else 71 109 72 # define IMPLEMENT_PEM_read_fp(name, type, str, asn1) \ 73 type *PEM_read_##name(FILE *fp, type **x, pem_password_cb *cb, void *u)\ 74 { \ 75 return PEM_ASN1_read((d2i_of_void *)d2i_##asn1, str,fp,(void **)x,cb,u); \ 76 } 77 78 # define IMPLEMENT_PEM_write_fp(name, type, str, asn1) \ 79 int PEM_write_##name(FILE *fp, type *x) \ 80 { \ 81 return PEM_ASN1_write((i2d_of_void *)i2d_##asn1,str,fp,x,NULL,NULL,0,NULL,NULL); \ 82 } 83 84 # define IMPLEMENT_PEM_write_fp_const(name, type, str, asn1) \ 85 int PEM_write_##name(FILE *fp, const type *x) \ 86 { \ 87 return PEM_ASN1_write((i2d_of_void *)i2d_##asn1,str,fp,(void *)x,NULL,NULL,0,NULL,NULL); \ 88 } 89 90 # define IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1) \ 91 int PEM_write_##name(FILE *fp, type *x, const EVP_CIPHER *enc, \ 92 unsigned char *kstr, int klen, pem_password_cb *cb, \ 93 void *u) \ 94 { \ 95 return PEM_ASN1_write((i2d_of_void *)i2d_##asn1,str,fp,x,enc,kstr,klen,cb,u); \ 96 } 97 98 # define IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1) \ 99 int PEM_write_##name(FILE *fp, type *x, const EVP_CIPHER *enc, \ 100 unsigned char *kstr, int klen, pem_password_cb *cb, \ 101 void *u) \ 102 { \ 103 return PEM_ASN1_write((i2d_of_void *)i2d_##asn1,str,fp,x,enc,kstr,klen,cb,u); \ 104 } 105 106 # endif 107 108 # define IMPLEMENT_PEM_read_bio(name, type, str, asn1) \ 109 type *PEM_read_bio_##name(BIO *bp, type **x, pem_password_cb *cb, void *u)\ 110 { \ 111 return PEM_ASN1_read_bio((d2i_of_void *)d2i_##asn1, str,bp,(void **)x,cb,u); \ 112 } 113 114 # define IMPLEMENT_PEM_write_bio(name, type, str, asn1) \ 115 int PEM_write_bio_##name(BIO *bp, type *x) \ 116 { \ 117 return PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1,str,bp,x,NULL,NULL,0,NULL,NULL); \ 118 } 119 120 # define IMPLEMENT_PEM_write_bio_const(name, type, str, asn1) \ 121 int PEM_write_bio_##name(BIO *bp, const type *x) \ 122 { \ 123 return PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1,str,bp,(void *)x,NULL,NULL,0,NULL,NULL); \ 124 } 125 126 # define IMPLEMENT_PEM_write_cb_bio(name, type, str, asn1) \ 127 int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \ 128 unsigned char *kstr, int klen, pem_password_cb *cb, void *u) \ 129 { \ 130 return PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1,str,bp,x,enc,kstr,klen,cb,u); \ 131 } 132 133 # define IMPLEMENT_PEM_write_cb_bio_const(name, type, str, asn1) \ 134 int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \ 135 unsigned char *kstr, int klen, pem_password_cb *cb, void *u) \ 136 { \ 137 return PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1,str,bp,(void *)x,enc,kstr,klen,cb,u); \ 138 } 110 # define IMPLEMENT_PEM_read_fp(name, type, str, asn1) \ 111 type *PEM_read_##name(FILE *fp, type **x, pem_password_cb *cb, void *u) \ 112 { \ 113 return PEM_ASN1_read((d2i_of_void *)d2i_##asn1, str, fp, \ 114 (void **)x, cb, u); \ 115 } 116 117 # define IMPLEMENT_PEM_write_fp(name, type, str, asn1) \ 118 PEM_write_fnsig(name, type, FILE, write) \ 119 { \ 120 return PEM_ASN1_write((i2d_of_void *)i2d_##asn1, str, out, \ 121 x, NULL, NULL, 0, NULL, NULL); \ 122 } 123 124 # ifndef OPENSSL_NO_DEPRECATED_3_0 125 # define IMPLEMENT_PEM_write_fp_const(name, type, str, asn1) \ 126 IMPLEMENT_PEM_write_fp(name, type, str, asn1) 127 # endif 128 129 # define IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1) \ 130 PEM_write_cb_fnsig(name, type, FILE, write) \ 131 { \ 132 return PEM_ASN1_write((i2d_of_void *)i2d_##asn1, str, out, \ 133 x, enc, kstr, klen, cb, u); \ 134 } 135 136 # ifndef OPENSSL_NO_DEPRECATED_3_0 137 # define IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1) \ 138 IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1) 139 # endif 140 # endif 141 142 # define IMPLEMENT_PEM_read_bio(name, type, str, asn1) \ 143 type *PEM_read_bio_##name(BIO *bp, type **x, \ 144 pem_password_cb *cb, void *u) \ 145 { \ 146 return PEM_ASN1_read_bio((d2i_of_void *)d2i_##asn1, str, bp, \ 147 (void **)x, cb, u); \ 148 } 149 150 # define IMPLEMENT_PEM_write_bio(name, type, str, asn1) \ 151 PEM_write_fnsig(name, type, BIO, write_bio) \ 152 { \ 153 return PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1, str, out, \ 154 x, NULL,NULL,0,NULL,NULL); \ 155 } 156 157 # ifndef OPENSSL_NO_DEPRECATED_3_0 158 # define IMPLEMENT_PEM_write_bio_const(name, type, str, asn1) \ 159 IMPLEMENT_PEM_write_bio(name, type, str, asn1) 160 # endif 161 162 # define IMPLEMENT_PEM_write_cb_bio(name, type, str, asn1) \ 163 PEM_write_cb_fnsig(name, type, BIO, write_bio) \ 164 { \ 165 return PEM_ASN1_write_bio((i2d_of_void *)i2d_##asn1, str, out, \ 166 x, enc, kstr, klen, cb, u); \ 167 } 168 169 # ifndef OPENSSL_NO_DEPRECATED_3_0 170 # define IMPLEMENT_PEM_write_cb_bio_const(name, type, str, asn1) \ 171 IMPLEMENT_PEM_write_cb_bio(name, type, str, asn1) 172 # endif 139 173 140 174 # define IMPLEMENT_PEM_write(name, type, str, asn1) \ … … 142 176 IMPLEMENT_PEM_write_fp(name, type, str, asn1) 143 177 144 # define IMPLEMENT_PEM_write_const(name, type, str, asn1) \ 178 # ifndef OPENSSL_NO_DEPRECATED_3_0 179 # define IMPLEMENT_PEM_write_const(name, type, str, asn1) \ 145 180 IMPLEMENT_PEM_write_bio_const(name, type, str, asn1) \ 146 181 IMPLEMENT_PEM_write_fp_const(name, type, str, asn1) 182 # endif 147 183 148 184 # define IMPLEMENT_PEM_write_cb(name, type, str, asn1) \ … … 150 186 IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1) 151 187 152 # define IMPLEMENT_PEM_write_cb_const(name, type, str, asn1) \ 188 # ifndef OPENSSL_NO_DEPRECATED_3_0 189 # define IMPLEMENT_PEM_write_cb_const(name, type, str, asn1) \ 153 190 IMPLEMENT_PEM_write_cb_bio_const(name, type, str, asn1) \ 154 191 IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1) 192 # endif 155 193 156 194 # define IMPLEMENT_PEM_read(name, type, str, asn1) \ … … 162 200 IMPLEMENT_PEM_write(name, type, str, asn1) 163 201 164 # define IMPLEMENT_PEM_rw_const(name, type, str, asn1) \ 202 # ifndef OPENSSL_NO_DEPRECATED_3_0 203 # define IMPLEMENT_PEM_rw_const(name, type, str, asn1) \ 165 204 IMPLEMENT_PEM_read(name, type, str, asn1) \ 166 205 IMPLEMENT_PEM_write_const(name, type, str, asn1) 206 # endif 167 207 168 208 # define IMPLEMENT_PEM_rw_cb(name, type, str, asn1) \ … … 172 212 /* These are the same except they are for the declarations */ 173 213 214 /* 215 * The mysterious 'extern' that's passed to some macros is innocuous, 216 * and is there to quiet pre-C99 compilers that may complain about empty 217 * arguments in macro calls. 218 */ 174 219 # if defined(OPENSSL_NO_STDIO) 175 220 176 # define DECLARE_PEM_read_fp(name, type) /**/ 177 # define DECLARE_PEM_write_fp(name, type) /**/ 178 # define DECLARE_PEM_write_fp_const(name, type) /**/ 179 # define DECLARE_PEM_write_cb_fp(name, type) /**/ 221 # define DECLARE_PEM_read_fp_attr(attr, name, type) /**/ 222 # define DECLARE_PEM_read_fp_ex_attr(attr, name, type) /**/ 223 # define DECLARE_PEM_write_fp_attr(attr, name, type) /**/ 224 # define DECLARE_PEM_write_fp_ex_attr(attr, name, type) /**/ 225 # ifndef OPENSSL_NO_DEPRECATED_3_0 226 # define DECLARE_PEM_write_fp_const_attr(attr, name, type) /**/ 227 # endif 228 # define DECLARE_PEM_write_cb_fp_attr(attr, name, type) /**/ 229 # define DECLARE_PEM_write_cb_fp_ex_attr(attr, name, type) /**/ 230 180 231 # else 181 232 182 # define DECLARE_PEM_read_fp(name, type) \ 183 type *PEM_read_##name(FILE *fp, type **x, pem_password_cb *cb, void *u); 184 185 # define DECLARE_PEM_write_fp(name, type) \ 186 int PEM_write_##name(FILE *fp, type *x); 187 188 # define DECLARE_PEM_write_fp_const(name, type) \ 189 int PEM_write_##name(FILE *fp, const type *x); 190 191 # define DECLARE_PEM_write_cb_fp(name, type) \ 192 int PEM_write_##name(FILE *fp, type *x, const EVP_CIPHER *enc, \ 193 unsigned char *kstr, int klen, pem_password_cb *cb, void *u); 194 195 # endif 196 197 # define DECLARE_PEM_read_bio(name, type) \ 198 type *PEM_read_bio_##name(BIO *bp, type **x, pem_password_cb *cb, void *u); 199 200 # define DECLARE_PEM_write_bio(name, type) \ 201 int PEM_write_bio_##name(BIO *bp, type *x); 202 203 # define DECLARE_PEM_write_bio_const(name, type) \ 204 int PEM_write_bio_##name(BIO *bp, const type *x); 205 206 # define DECLARE_PEM_write_cb_bio(name, type) \ 207 int PEM_write_bio_##name(BIO *bp, type *x, const EVP_CIPHER *enc, \ 208 unsigned char *kstr, int klen, pem_password_cb *cb, void *u); 209 233 # define DECLARE_PEM_read_fp_attr(attr, name, type) \ 234 attr PEM_read_cb_fnsig(name, type, FILE, read); 235 # define DECLARE_PEM_read_fp_ex_attr(attr, name, type) \ 236 attr PEM_read_cb_fnsig(name, type, FILE, read); \ 237 attr PEM_read_cb_ex_fnsig(name, type, FILE, read); 238 239 # define DECLARE_PEM_write_fp_attr(attr, name, type) \ 240 attr PEM_write_fnsig(name, type, FILE, write); 241 # define DECLARE_PEM_write_fp_ex_attr(attr, name, type) \ 242 attr PEM_write_fnsig(name, type, FILE, write); \ 243 attr PEM_write_ex_fnsig(name, type, FILE, write); 244 # ifndef OPENSSL_NO_DEPRECATED_3_0 245 # define DECLARE_PEM_write_fp_const_attr(attr, name, type) \ 246 attr PEM_write_fnsig(name, type, FILE, write); 247 # endif 248 # define DECLARE_PEM_write_cb_fp_attr(attr, name, type) \ 249 attr PEM_write_cb_fnsig(name, type, FILE, write); 250 # define DECLARE_PEM_write_cb_fp_ex_attr(attr, name, type) \ 251 attr PEM_write_cb_fnsig(name, type, FILE, write); \ 252 attr PEM_write_cb_ex_fnsig(name, type, FILE, write); 253 254 # endif 255 256 # define DECLARE_PEM_read_fp(name, type) \ 257 DECLARE_PEM_read_fp_attr(extern, name, type) 258 # define DECLARE_PEM_write_fp(name, type) \ 259 DECLARE_PEM_write_fp_attr(extern, name, type) 260 # ifndef OPENSSL_NO_DEPRECATED_3_0 261 # define DECLARE_PEM_write_fp_const(name, type) \ 262 DECLARE_PEM_write_fp_const_attr(extern, name, type) 263 # endif 264 # define DECLARE_PEM_write_cb_fp(name, type) \ 265 DECLARE_PEM_write_cb_fp_attr(extern, name, type) 266 267 # define DECLARE_PEM_read_bio_attr(attr, name, type) \ 268 attr PEM_read_cb_fnsig(name, type, BIO, read_bio); 269 # define DECLARE_PEM_read_bio_ex_attr(attr, name, type) \ 270 attr PEM_read_cb_fnsig(name, type, BIO, read_bio); \ 271 attr PEM_read_cb_ex_fnsig(name, type, BIO, read_bio); 272 # define DECLARE_PEM_read_bio(name, type) \ 273 DECLARE_PEM_read_bio_attr(extern, name, type) 274 # define DECLARE_PEM_read_bio_ex(name, type) \ 275 DECLARE_PEM_read_bio_ex_attr(extern, name, type) 276 277 # define DECLARE_PEM_write_bio_attr(attr, name, type) \ 278 attr PEM_write_fnsig(name, type, BIO, write_bio); 279 # define DECLARE_PEM_write_bio_ex_attr(attr, name, type) \ 280 attr PEM_write_fnsig(name, type, BIO, write_bio); \ 281 attr PEM_write_ex_fnsig(name, type, BIO, write_bio); 282 # define DECLARE_PEM_write_bio(name, type) \ 283 DECLARE_PEM_write_bio_attr(extern, name, type) 284 # define DECLARE_PEM_write_bio_ex(name, type) \ 285 DECLARE_PEM_write_bio_ex_attr(extern, name, type) 286 287 # ifndef OPENSSL_NO_DEPRECATED_3_0 288 # define DECLARE_PEM_write_bio_const_attr(attr, name, type) \ 289 attr PEM_write_fnsig(name, type, BIO, write_bio); 290 # define DECLARE_PEM_write_bio_const(name, type) \ 291 DECLARE_PEM_write_bio_const_attr(extern, name, type) 292 # endif 293 294 # define DECLARE_PEM_write_cb_bio_attr(attr, name, type) \ 295 attr PEM_write_cb_fnsig(name, type, BIO, write_bio); 296 # define DECLARE_PEM_write_cb_bio_ex_attr(attr, name, type) \ 297 attr PEM_write_cb_fnsig(name, type, BIO, write_bio); \ 298 attr PEM_write_cb_ex_fnsig(name, type, BIO, write_bio); 299 # define DECLARE_PEM_write_cb_bio(name, type) \ 300 DECLARE_PEM_write_cb_bio_attr(extern, name, type) 301 # define DECLARE_PEM_write_cb_ex_bio(name, type) \ 302 DECLARE_PEM_write_cb_bio_ex_attr(extern, name, type) 303 304 # define DECLARE_PEM_write_attr(attr, name, type) \ 305 DECLARE_PEM_write_bio_attr(attr, name, type) \ 306 DECLARE_PEM_write_fp_attr(attr, name, type) 307 # define DECLARE_PEM_write_ex_attr(attr, name, type) \ 308 DECLARE_PEM_write_bio_ex_attr(attr, name, type) \ 309 DECLARE_PEM_write_fp_ex_attr(attr, name, type) 210 310 # define DECLARE_PEM_write(name, type) \ 211 DECLARE_PEM_write_bio(name, type) \ 212 DECLARE_PEM_write_fp(name, type) 213 # define DECLARE_PEM_write_const(name, type) \ 214 DECLARE_PEM_write_bio_const(name, type) \ 215 DECLARE_PEM_write_fp_const(name, type) 216 # define DECLARE_PEM_write_cb(name, type) \ 217 DECLARE_PEM_write_cb_bio(name, type) \ 218 DECLARE_PEM_write_cb_fp(name, type) 219 # define DECLARE_PEM_read(name, type) \ 220 DECLARE_PEM_read_bio(name, type) \ 221 DECLARE_PEM_read_fp(name, type) 311 DECLARE_PEM_write_attr(extern, name, type) 312 # define DECLARE_PEM_write_ex(name, type) \ 313 DECLARE_PEM_write_ex_attr(extern, name, type) 314 # ifndef OPENSSL_NO_DEPRECATED_3_0 315 # define DECLARE_PEM_write_const_attr(attr, name, type) \ 316 DECLARE_PEM_write_bio_const_attr(attr, name, type) \ 317 DECLARE_PEM_write_fp_const_attr(attr, name, type) 318 # define DECLARE_PEM_write_const(name, type) \ 319 DECLARE_PEM_write_const_attr(extern, name, type) 320 # endif 321 # define DECLARE_PEM_write_cb_attr(attr, name, type) \ 322 DECLARE_PEM_write_cb_bio_attr(attr, name, type) \ 323 DECLARE_PEM_write_cb_fp_attr(attr, name, type) 324 # define DECLARE_PEM_write_cb_ex_attr(attr, name, type) \ 325 DECLARE_PEM_write_cb_bio_ex_attr(attr, name, type) \ 326 DECLARE_PEM_write_cb_fp_ex_attr(attr, name, type) 327 # define DECLARE_PEM_write_cb(name, type) \ 328 DECLARE_PEM_write_cb_attr(extern, name, type) 329 # define DECLARE_PEM_write_cb_ex(name, type) \ 330 DECLARE_PEM_write_cb_ex_attr(extern, name, type) 331 # define DECLARE_PEM_read_attr(attr, name, type) \ 332 DECLARE_PEM_read_bio_attr(attr, name, type) \ 333 DECLARE_PEM_read_fp_attr(attr, name, type) 334 # define DECLARE_PEM_read_ex_attr(attr, name, type) \ 335 DECLARE_PEM_read_bio_ex_attr(attr, name, type) \ 336 DECLARE_PEM_read_fp_ex_attr(attr, name, type) 337 # define DECLARE_PEM_read(name, type) \ 338 DECLARE_PEM_read_attr(extern, name, type) 339 # define DECLARE_PEM_read_ex(name, type) \ 340 DECLARE_PEM_read_ex_attr(extern, name, type) 341 # define DECLARE_PEM_rw_attr(attr, name, type) \ 342 DECLARE_PEM_read_attr(attr, name, type) \ 343 DECLARE_PEM_write_attr(attr, name, type) 344 # define DECLARE_PEM_rw_ex_attr(attr, name, type) \ 345 DECLARE_PEM_read_ex_attr(attr, name, type) \ 346 DECLARE_PEM_write_ex_attr(attr, name, type) 222 347 # define DECLARE_PEM_rw(name, type) \ 223 DECLARE_PEM_read(name, type) \ 224 DECLARE_PEM_write(name, type) 225 # define DECLARE_PEM_rw_const(name, type) \ 226 DECLARE_PEM_read(name, type) \ 227 DECLARE_PEM_write_const(name, type) 348 DECLARE_PEM_rw_attr(extern, name, type) 349 # define DECLARE_PEM_rw_ex(name, type) \ 350 DECLARE_PEM_rw_ex_attr(extern, name, type) 351 # ifndef OPENSSL_NO_DEPRECATED_3_0 352 # define DECLARE_PEM_rw_const_attr(attr, name, type) \ 353 DECLARE_PEM_read_attr(attr, name, type) \ 354 DECLARE_PEM_write_const_attr(attr, name, type) 355 # define DECLARE_PEM_rw_const(name, type) \ 356 DECLARE_PEM_rw_const_attr(extern, name, type) 357 # endif 358 # define DECLARE_PEM_rw_cb_attr(attr, name, type) \ 359 DECLARE_PEM_read_attr(attr, name, type) \ 360 DECLARE_PEM_write_cb_attr(attr, name, type) 361 # define DECLARE_PEM_rw_cb_ex_attr(attr, name, type) \ 362 DECLARE_PEM_read_ex_attr(attr, name, type) \ 363 DECLARE_PEM_write_cb_ex_attr(attr, name, type) 228 364 # define DECLARE_PEM_rw_cb(name, type) \ 229 DECLARE_PEM_read(name, type) \230 DECLARE_PEM_write_cb(name, type) 231 typedef int pem_password_cb (char *buf, int size, int rwflag, void *userdata); 365 DECLARE_PEM_rw_cb_attr(extern, name, type) 366 # define DECLARE_PEM_rw_cb_ex(name, type) \ 367 DECLARE_PEM_rw_cb_ex_attr(extern, name, type) 232 368 233 369 int PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher); … … 252 388 void *PEM_ASN1_read_bio(d2i_of_void *d2i, const char *name, BIO *bp, void **x, 253 389 pem_password_cb *cb, void *u); 254 int PEM_ASN1_write_bio(i2d_of_void *i2d, const char *name, BIO *bp, void *x, 255 const EVP_CIPHER *enc, unsigned char *kstr, int klen, 390 int PEM_ASN1_write_bio(i2d_of_void *i2d, const char *name, BIO *bp, 391 const void *x, const EVP_CIPHER *enc, 392 const unsigned char *kstr, int klen, 256 393 pem_password_cb *cb, void *u); 257 394 258 395 STACK_OF(X509_INFO) *PEM_X509_INFO_read_bio(BIO *bp, STACK_OF(X509_INFO) *sk, 259 396 pem_password_cb *cb, void *u); 260 int PEM_X509_INFO_write_bio(BIO *bp, X509_INFO *xi, EVP_CIPHER *enc, 261 unsigned char *kstr, int klen, 397 STACK_OF(X509_INFO) 398 *PEM_X509_INFO_read_bio_ex(BIO *bp, STACK_OF(X509_INFO) *sk, 399 pem_password_cb *cb, void *u, OSSL_LIB_CTX *libctx, 400 const char *propq); 401 402 int PEM_X509_INFO_write_bio(BIO *bp, const X509_INFO *xi, EVP_CIPHER *enc, 403 const unsigned char *kstr, int klen, 262 404 pem_password_cb *cd, void *u); 263 405 … … 270 412 pem_password_cb *cb, void *u); 271 413 int PEM_ASN1_write(i2d_of_void *i2d, const char *name, FILE *fp, 272 void *x, const EVP_CIPHER *enc, unsigned char *kstr, 273 int klen, pem_password_cb *callback, void *u); 414 const void *x, const EVP_CIPHER *enc, 415 const unsigned char *kstr, int klen, 416 pem_password_cb *callback, void *u); 274 417 STACK_OF(X509_INFO) *PEM_X509_INFO_read(FILE *fp, STACK_OF(X509_INFO) *sk, 275 418 pem_password_cb *cb, void *u); 419 STACK_OF(X509_INFO) 420 *PEM_X509_INFO_read_ex(FILE *fp, STACK_OF(X509_INFO) *sk, pem_password_cb *cb, 421 void *u, OSSL_LIB_CTX *libctx, const char *propq); 276 422 #endif 277 423 278 424 int PEM_SignInit(EVP_MD_CTX *ctx, EVP_MD *type); 279 int PEM_SignUpdate(EVP_MD_CTX *ctx, unsigned char *d, unsigned int cnt);425 int PEM_SignUpdate(EVP_MD_CTX *ctx, const unsigned char *d, unsigned int cnt); 280 426 int PEM_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, 281 427 unsigned int *siglen, EVP_PKEY *pkey); … … 284 430 int PEM_def_callback(char *buf, int num, int rwflag, void *userdata); 285 431 void PEM_proc_type(char *buf, int type); 286 void PEM_dek_info(char *buf, const char *type, int len, c har *str);432 void PEM_dek_info(char *buf, const char *type, int len, const char *str); 287 433 288 434 # include <openssl/symhacks.h> … … 293 439 DECLARE_PEM_write(X509_REQ_NEW, X509_REQ) 294 440 DECLARE_PEM_rw(X509_CRL, X509_CRL) 441 DECLARE_PEM_rw(X509_PUBKEY, X509_PUBKEY) 295 442 DECLARE_PEM_rw(PKCS7, PKCS7) 296 443 DECLARE_PEM_rw(NETSCAPE_CERT_SEQUENCE, NETSCAPE_CERT_SEQUENCE) 297 444 DECLARE_PEM_rw(PKCS8, X509_SIG) 298 445 DECLARE_PEM_rw(PKCS8_PRIV_KEY_INFO, PKCS8_PRIV_KEY_INFO) 299 # ifndef OPENSSL_NO_RSA 300 DECLARE_PEM_rw_cb(RSAPrivateKey, RSA) 301 DECLARE_PEM_rw_const(RSAPublicKey, RSA) 302 DECLARE_PEM_rw(RSA_PUBKEY, RSA) 303 # endif 304 # ifndef OPENSSL_NO_DSA 305 DECLARE_PEM_rw_cb(DSAPrivateKey, DSA) 306 DECLARE_PEM_rw(DSA_PUBKEY, DSA) 307 DECLARE_PEM_rw_const(DSAparams, DSA) 308 # endif 309 # ifndef OPENSSL_NO_EC 310 DECLARE_PEM_rw_const(ECPKParameters, EC_GROUP) 311 DECLARE_PEM_rw_cb(ECPrivateKey, EC_KEY) 312 DECLARE_PEM_rw(EC_PUBKEY, EC_KEY) 313 # endif 446 # ifndef OPENSSL_NO_DEPRECATED_3_0 447 DECLARE_PEM_rw_cb_attr(OSSL_DEPRECATEDIN_3_0, RSAPrivateKey, RSA) 448 DECLARE_PEM_rw_attr(OSSL_DEPRECATEDIN_3_0, RSAPublicKey, RSA) 449 DECLARE_PEM_rw_attr(OSSL_DEPRECATEDIN_3_0, RSA_PUBKEY, RSA) 450 # endif 451 # ifndef OPENSSL_NO_DEPRECATED_3_0 452 # ifndef OPENSSL_NO_DSA 453 DECLARE_PEM_rw_cb_attr(OSSL_DEPRECATEDIN_3_0, DSAPrivateKey, DSA) 454 DECLARE_PEM_rw_attr(OSSL_DEPRECATEDIN_3_0, DSA_PUBKEY, DSA) 455 DECLARE_PEM_rw_attr(OSSL_DEPRECATEDIN_3_0, DSAparams, DSA) 456 # endif 457 # endif 458 459 # ifndef OPENSSL_NO_DEPRECATED_3_0 460 # ifndef OPENSSL_NO_EC 461 DECLARE_PEM_rw_attr(OSSL_DEPRECATEDIN_3_0, ECPKParameters, EC_GROUP) 462 DECLARE_PEM_rw_cb_attr(OSSL_DEPRECATEDIN_3_0, ECPrivateKey, EC_KEY) 463 DECLARE_PEM_rw_attr(OSSL_DEPRECATEDIN_3_0, EC_PUBKEY, EC_KEY) 464 # endif 465 # endif 466 314 467 # ifndef OPENSSL_NO_DH 315 DECLARE_PEM_rw_const(DHparams, DH) 316 DECLARE_PEM_write_const(DHxparams, DH) 317 # endif 318 DECLARE_PEM_rw_cb(PrivateKey, EVP_PKEY) 319 DECLARE_PEM_rw(PUBKEY, EVP_PKEY) 320 321 int PEM_write_bio_PrivateKey_traditional(BIO *bp, EVP_PKEY *x, 468 # ifndef OPENSSL_NO_DEPRECATED_3_0 469 DECLARE_PEM_rw_attr(OSSL_DEPRECATEDIN_3_0, DHparams, DH) 470 DECLARE_PEM_write_attr(OSSL_DEPRECATEDIN_3_0, DHxparams, DH) 471 # endif 472 # endif 473 DECLARE_PEM_rw_cb_ex(PrivateKey, EVP_PKEY) 474 DECLARE_PEM_rw_ex(PUBKEY, EVP_PKEY) 475 476 int PEM_write_bio_PrivateKey_traditional(BIO *bp, const EVP_PKEY *x, 322 477 const EVP_CIPHER *enc, 323 unsigned char *kstr, int klen,478 const unsigned char *kstr, int klen, 324 479 pem_password_cb *cb, void *u); 325 480 326 int PEM_write_bio_PKCS8PrivateKey_nid(BIO *bp, EVP_PKEY *x, int nid, 327 char *kstr, int klen, 481 /* Why do these take a signed char *kstr? */ 482 int PEM_write_bio_PKCS8PrivateKey_nid(BIO *bp, const EVP_PKEY *x, int nid, 483 const char *kstr, int klen, 328 484 pem_password_cb *cb, void *u); 329 int PEM_write_bio_PKCS8PrivateKey(BIO *, EVP_PKEY *, const EVP_CIPHER *, 330 char *, int, pem_password_cb *, void *); 331 int i2d_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc, 332 char *kstr, int klen, 485 int PEM_write_bio_PKCS8PrivateKey(BIO *, const EVP_PKEY *, const EVP_CIPHER *, 486 const char *kstr, int klen, 487 pem_password_cb *cb, void *u); 488 int i2d_PKCS8PrivateKey_bio(BIO *bp, const EVP_PKEY *x, const EVP_CIPHER *enc, 489 const char *kstr, int klen, 333 490 pem_password_cb *cb, void *u); 334 int i2d_PKCS8PrivateKey_nid_bio(BIO *bp, EVP_PKEY *x, int nid,335 c har *kstr, int klen,491 int i2d_PKCS8PrivateKey_nid_bio(BIO *bp, const EVP_PKEY *x, int nid, 492 const char *kstr, int klen, 336 493 pem_password_cb *cb, void *u); 337 494 EVP_PKEY *d2i_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY **x, pem_password_cb *cb, … … 339 496 340 497 # ifndef OPENSSL_NO_STDIO 341 int i2d_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc,342 c har *kstr, int klen,498 int i2d_PKCS8PrivateKey_fp(FILE *fp, const EVP_PKEY *x, const EVP_CIPHER *enc, 499 const char *kstr, int klen, 343 500 pem_password_cb *cb, void *u); 344 int i2d_PKCS8PrivateKey_nid_fp(FILE *fp, EVP_PKEY *x, int nid,345 c har *kstr, int klen,501 int i2d_PKCS8PrivateKey_nid_fp(FILE *fp, const EVP_PKEY *x, int nid, 502 const char *kstr, int klen, 346 503 pem_password_cb *cb, void *u); 347 int PEM_write_PKCS8PrivateKey_nid(FILE *fp, EVP_PKEY *x, int nid,348 c har *kstr, int klen,504 int PEM_write_PKCS8PrivateKey_nid(FILE *fp, const EVP_PKEY *x, int nid, 505 const char *kstr, int klen, 349 506 pem_password_cb *cb, void *u); 350 507 … … 352 509 void *u); 353 510 354 int PEM_write_PKCS8PrivateKey(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc, 355 char *kstr, int klen, pem_password_cb *cd, 356 void *u); 357 # endif 511 int PEM_write_PKCS8PrivateKey(FILE *fp, const EVP_PKEY *x, const EVP_CIPHER *enc, 512 const char *kstr, int klen, 513 pem_password_cb *cd, void *u); 514 # endif 515 EVP_PKEY *PEM_read_bio_Parameters_ex(BIO *bp, EVP_PKEY **x, 516 OSSL_LIB_CTX *libctx, const char *propq); 358 517 EVP_PKEY *PEM_read_bio_Parameters(BIO *bp, EVP_PKEY **x); 359 int PEM_write_bio_Parameters(BIO *bp, EVP_PKEY *x); 360 361 # ifndef OPENSSL_NO_DSA 518 int PEM_write_bio_Parameters(BIO *bp, const EVP_PKEY *x); 519 362 520 EVP_PKEY *b2i_PrivateKey(const unsigned char **in, long length); 363 521 EVP_PKEY *b2i_PublicKey(const unsigned char **in, long length); 364 522 EVP_PKEY *b2i_PrivateKey_bio(BIO *in); 365 523 EVP_PKEY *b2i_PublicKey_bio(BIO *in); 366 int i2b_PrivateKey_bio(BIO *out, EVP_PKEY *pk); 367 int i2b_PublicKey_bio(BIO *out, EVP_PKEY *pk); 368 # ifndef OPENSSL_NO_RC4 524 int i2b_PrivateKey_bio(BIO *out, const EVP_PKEY *pk); 525 int i2b_PublicKey_bio(BIO *out, const EVP_PKEY *pk); 369 526 EVP_PKEY *b2i_PVK_bio(BIO *in, pem_password_cb *cb, void *u); 370 int i2b_PVK_bio(BIO *out, EVP_PKEY *pk, int enclevel, 527 EVP_PKEY *b2i_PVK_bio_ex(BIO *in, pem_password_cb *cb, void *u, 528 OSSL_LIB_CTX *libctx, const char *propq); 529 int i2b_PVK_bio(BIO *out, const EVP_PKEY *pk, int enclevel, 371 530 pem_password_cb *cb, void *u); 372 # endif 373 # endif 531 int i2b_PVK_bio_ex(BIO *out, const EVP_PKEY *pk, int enclevel, 532 pem_password_cb *cb, void *u, 533 OSSL_LIB_CTX *libctx, const char *propq); 374 534 375 535 # ifdef __cplusplus -
trunk/src/libs/openssl-3.0.1/include/openssl/pem2.h
r91772 r94082 2 2 * Copyright 1999-2018 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_PEM2_H 11 # define HEADER_PEM2_H 10 #ifndef OPENSSL_PEM2_H 11 # define OPENSSL_PEM2_H 12 # pragma once 13 14 # include <openssl/macros.h> 15 # ifndef OPENSSL_NO_DEPRECATED_3_0 16 # define HEADER_PEM2_H 17 # endif 12 18 # include <openssl/pemerr.h> 13 19 #endif -
trunk/src/libs/openssl-3.0.1/include/openssl/pemerr.h
r91772 r94082 1 1 /* 2 2 * Generated by util/mkerr.pl DO NOT EDIT 3 * Copyright 1995-202 0The OpenSSL Project Authors. All Rights Reserved.3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 4 * 5 * Licensed under the OpenSSL license(the "License"). You may not use5 * Licensed under the Apache License 2.0 (the "License"). You may not use 6 6 * this file except in compliance with the License. You can obtain a copy 7 7 * in the file LICENSE in the source distribution or at … … 9 9 */ 10 10 11 #ifndef HEADER_PEMERR_H 12 # define HEADER_PEMERR_H 11 #ifndef OPENSSL_PEMERR_H 12 # define OPENSSL_PEMERR_H 13 # pragma once 13 14 14 # i fndef HEADER_SYMHACKS_H15 # 16 # endif15 # include <openssl/opensslconf.h> 16 # include <openssl/symhacks.h> 17 # include <openssl/cryptoerr_legacy.h> 17 18 18 # ifdef __cplusplus19 extern "C"20 # endif21 int ERR_load_PEM_strings(void);22 19 23 /*24 * PEM function codes.25 */26 # define PEM_F_B2I_DSS 12727 # define PEM_F_B2I_PVK_BIO 12828 # define PEM_F_B2I_RSA 12929 # define PEM_F_CHECK_BITLEN_DSA 13030 # define PEM_F_CHECK_BITLEN_RSA 13131 # define PEM_F_D2I_PKCS8PRIVATEKEY_BIO 12032 # define PEM_F_D2I_PKCS8PRIVATEKEY_FP 12133 # define PEM_F_DO_B2I 13234 # define PEM_F_DO_B2I_BIO 13335 # define PEM_F_DO_BLOB_HEADER 13436 # define PEM_F_DO_I2B 14637 # define PEM_F_DO_PK8PKEY 12638 # define PEM_F_DO_PK8PKEY_FP 12539 # define PEM_F_DO_PVK_BODY 13540 # define PEM_F_DO_PVK_HEADER 13641 # define PEM_F_GET_HEADER_AND_DATA 14342 # define PEM_F_GET_NAME 14443 # define PEM_F_I2B_PVK 13744 # define PEM_F_I2B_PVK_BIO 13845 # define PEM_F_LOAD_IV 10146 # define PEM_F_PEM_ASN1_READ 10247 # define PEM_F_PEM_ASN1_READ_BIO 10348 # define PEM_F_PEM_ASN1_WRITE 10449 # define PEM_F_PEM_ASN1_WRITE_BIO 10550 # define PEM_F_PEM_DEF_CALLBACK 10051 # define PEM_F_PEM_DO_HEADER 10652 # define PEM_F_PEM_GET_EVP_CIPHER_INFO 10753 # define PEM_F_PEM_READ 10854 # define PEM_F_PEM_READ_BIO 10955 # define PEM_F_PEM_READ_BIO_DHPARAMS 14156 # define PEM_F_PEM_READ_BIO_EX 14557 # define PEM_F_PEM_READ_BIO_PARAMETERS 14058 # define PEM_F_PEM_READ_BIO_PRIVATEKEY 12359 # define PEM_F_PEM_READ_DHPARAMS 14260 # define PEM_F_PEM_READ_PRIVATEKEY 12461 # define PEM_F_PEM_SIGNFINAL 11262 # define PEM_F_PEM_WRITE 11363 # define PEM_F_PEM_WRITE_BIO 11464 # define PEM_F_PEM_WRITE_BIO_PRIVATEKEY_TRADITIONAL 14765 # define PEM_F_PEM_WRITE_PRIVATEKEY 13966 # define PEM_F_PEM_X509_INFO_READ 11567 # define PEM_F_PEM_X509_INFO_READ_BIO 11668 # define PEM_F_PEM_X509_INFO_WRITE_BIO 11769 20 70 21 /* … … 81 32 # define PEM_R_CIPHER_IS_NULL 127 82 33 # define PEM_R_ERROR_CONVERTING_PRIVATE_KEY 115 34 # define PEM_R_EXPECTING_DSS_KEY_BLOB 131 83 35 # define PEM_R_EXPECTING_PRIVATE_KEY_BLOB 119 84 36 # define PEM_R_EXPECTING_PUBLIC_KEY_BLOB 120 37 # define PEM_R_EXPECTING_RSA_KEY_BLOB 132 85 38 # define PEM_R_HEADER_TOO_LONG 128 86 39 # define PEM_R_INCONSISTENT_HEADER 121 -
trunk/src/libs/openssl-3.0.1/include/openssl/pkcs12err.h
r91772 r94082 1 1 /* 2 2 * Generated by util/mkerr.pl DO NOT EDIT 3 * Copyright 1995-20 19The OpenSSL Project Authors. All Rights Reserved.3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 4 * 5 * Licensed under the OpenSSL license(the "License"). You may not use5 * Licensed under the Apache License 2.0 (the "License"). You may not use 6 6 * this file except in compliance with the License. You can obtain a copy 7 7 * in the file LICENSE in the source distribution or at … … 9 9 */ 10 10 11 #ifndef HEADER_PKCS12ERR_H 12 # define HEADER_PKCS12ERR_H 11 #ifndef OPENSSL_PKCS12ERR_H 12 # define OPENSSL_PKCS12ERR_H 13 # pragma once 13 14 14 # i fndef HEADER_SYMHACKS_H15 # 16 # endif15 # include <openssl/opensslconf.h> 16 # include <openssl/symhacks.h> 17 # include <openssl/cryptoerr_legacy.h> 17 18 18 # ifdef __cplusplus19 extern "C"20 # endif21 int ERR_load_PKCS12_strings(void);22 19 23 /*24 * PKCS12 function codes.25 */26 # define PKCS12_F_OPENSSL_ASC2UNI 12127 # define PKCS12_F_OPENSSL_UNI2ASC 12428 # define PKCS12_F_OPENSSL_UNI2UTF8 12729 # define PKCS12_F_OPENSSL_UTF82UNI 12930 # define PKCS12_F_PKCS12_CREATE 10531 # define PKCS12_F_PKCS12_GEN_MAC 10732 # define PKCS12_F_PKCS12_INIT 10933 # define PKCS12_F_PKCS12_ITEM_DECRYPT_D2I 10634 # define PKCS12_F_PKCS12_ITEM_I2D_ENCRYPT 10835 # define PKCS12_F_PKCS12_ITEM_PACK_SAFEBAG 11736 # define PKCS12_F_PKCS12_KEY_GEN_ASC 11037 # define PKCS12_F_PKCS12_KEY_GEN_UNI 11138 # define PKCS12_F_PKCS12_KEY_GEN_UTF8 11639 # define PKCS12_F_PKCS12_NEWPASS 12840 # define PKCS12_F_PKCS12_PACK_P7DATA 11441 # define PKCS12_F_PKCS12_PACK_P7ENCDATA 11542 # define PKCS12_F_PKCS12_PARSE 11843 # define PKCS12_F_PKCS12_PBE_CRYPT 11944 # define PKCS12_F_PKCS12_PBE_KEYIVGEN 12045 # define PKCS12_F_PKCS12_SAFEBAG_CREATE0_P8INF 11246 # define PKCS12_F_PKCS12_SAFEBAG_CREATE0_PKCS8 11347 # define PKCS12_F_PKCS12_SAFEBAG_CREATE_PKCS8_ENCRYPT 13348 # define PKCS12_F_PKCS12_SETUP_MAC 12249 # define PKCS12_F_PKCS12_SET_MAC 12350 # define PKCS12_F_PKCS12_UNPACK_AUTHSAFES 13051 # define PKCS12_F_PKCS12_UNPACK_P7DATA 13152 # define PKCS12_F_PKCS12_VERIFY_MAC 12653 # define PKCS12_F_PKCS8_ENCRYPT 12554 # define PKCS12_F_PKCS8_SET0_PBE 13255 20 56 21 /* … … 65 30 # define PKCS12_R_INVALID_NULL_ARGUMENT 104 66 31 # define PKCS12_R_INVALID_NULL_PKCS12_POINTER 105 32 # define PKCS12_R_INVALID_TYPE 112 67 33 # define PKCS12_R_IV_GEN_ERROR 106 68 34 # define PKCS12_R_KEY_GEN_ERROR 107 … … 73 39 # define PKCS12_R_MAC_VERIFY_FAILURE 113 74 40 # define PKCS12_R_PARSE_ERROR 114 75 # define PKCS12_R_PKCS12_ALGOR_CIPHERINIT_ERROR 11576 41 # define PKCS12_R_PKCS12_CIPHERFINAL_ERROR 116 77 # define PKCS12_R_PKCS12_PBE_CRYPT_ERROR 11778 42 # define PKCS12_R_UNKNOWN_DIGEST_ALGORITHM 118 79 43 # define PKCS12_R_UNSUPPORTED_PKCS12_MODE 119 -
trunk/src/libs/openssl-3.0.1/include/openssl/pkcs7err.h
r91772 r94082 1 1 /* 2 2 * Generated by util/mkerr.pl DO NOT EDIT 3 * Copyright 1995-20 19The OpenSSL Project Authors. All Rights Reserved.3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 4 * 5 * Licensed under the OpenSSL license(the "License"). You may not use5 * Licensed under the Apache License 2.0 (the "License"). You may not use 6 6 * this file except in compliance with the License. You can obtain a copy 7 7 * in the file LICENSE in the source distribution or at … … 9 9 */ 10 10 11 #ifndef HEADER_PKCS7ERR_H 12 # define HEADER_PKCS7ERR_H 11 #ifndef OPENSSL_PKCS7ERR_H 12 # define OPENSSL_PKCS7ERR_H 13 # pragma once 13 14 14 # i fndef HEADER_SYMHACKS_H15 # 16 # endif15 # include <openssl/opensslconf.h> 16 # include <openssl/symhacks.h> 17 # include <openssl/cryptoerr_legacy.h> 17 18 18 # ifdef __cplusplus19 extern "C"20 # endif21 int ERR_load_PKCS7_strings(void);22 19 23 /*24 * PKCS7 function codes.25 */26 # define PKCS7_F_DO_PKCS7_SIGNED_ATTRIB 13627 # define PKCS7_F_PKCS7_ADD0_ATTRIB_SIGNING_TIME 13528 # define PKCS7_F_PKCS7_ADD_ATTRIB_SMIMECAP 11829 # define PKCS7_F_PKCS7_ADD_CERTIFICATE 10030 # define PKCS7_F_PKCS7_ADD_CRL 10131 # define PKCS7_F_PKCS7_ADD_RECIPIENT_INFO 10232 # define PKCS7_F_PKCS7_ADD_SIGNATURE 13133 # define PKCS7_F_PKCS7_ADD_SIGNER 10334 # define PKCS7_F_PKCS7_BIO_ADD_DIGEST 12535 # define PKCS7_F_PKCS7_COPY_EXISTING_DIGEST 13836 # define PKCS7_F_PKCS7_CTRL 10437 # define PKCS7_F_PKCS7_DATADECODE 11238 # define PKCS7_F_PKCS7_DATAFINAL 12839 # define PKCS7_F_PKCS7_DATAINIT 10540 # define PKCS7_F_PKCS7_DATAVERIFY 10741 # define PKCS7_F_PKCS7_DECRYPT 11442 # define PKCS7_F_PKCS7_DECRYPT_RINFO 13343 # define PKCS7_F_PKCS7_ENCODE_RINFO 13244 # define PKCS7_F_PKCS7_ENCRYPT 11545 # define PKCS7_F_PKCS7_FINAL 13446 # define PKCS7_F_PKCS7_FIND_DIGEST 12747 # define PKCS7_F_PKCS7_GET0_SIGNERS 12448 # define PKCS7_F_PKCS7_RECIP_INFO_SET 13049 # define PKCS7_F_PKCS7_SET_CIPHER 10850 # define PKCS7_F_PKCS7_SET_CONTENT 10951 # define PKCS7_F_PKCS7_SET_DIGEST 12652 # define PKCS7_F_PKCS7_SET_TYPE 11053 # define PKCS7_F_PKCS7_SIGN 11654 # define PKCS7_F_PKCS7_SIGNATUREVERIFY 11355 # define PKCS7_F_PKCS7_SIGNER_INFO_SET 12956 # define PKCS7_F_PKCS7_SIGNER_INFO_SIGN 13957 # define PKCS7_F_PKCS7_SIGN_ADD_SIGNER 13758 # define PKCS7_F_PKCS7_SIMPLE_SMIMECAP 11959 # define PKCS7_F_PKCS7_VERIFY 11760 20 61 21 /* -
trunk/src/libs/openssl-3.0.1/include/openssl/rand.h
r91772 r94082 1 1 /* 2 * Copyright 1995-20 18The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_RAND_H 11 # define HEADER_RAND_H 10 #ifndef OPENSSL_RAND_H 11 # define OPENSSL_RAND_H 12 # pragma once 13 14 # include <openssl/macros.h> 15 # ifndef OPENSSL_NO_DEPRECATED_3_0 16 # define HEADER_RAND_H 17 # endif 12 18 13 19 # include <stdlib.h> 14 # include <openssl/ ossl_typ.h>20 # include <openssl/types.h> 15 21 # include <openssl/e_os2.h> 16 22 # include <openssl/randerr.h> 23 # include <openssl/evp.h> 17 24 18 25 #ifdef __cplusplus … … 20 27 #endif 21 28 29 /* 30 * Default security strength (in the sense of [NIST SP 800-90Ar1]) 31 * 32 * NIST SP 800-90Ar1 supports the strength of the DRBG being smaller than that 33 * of the cipher by collecting less entropy. The current DRBG implementation 34 * does not take RAND_DRBG_STRENGTH into account and sets the strength of the 35 * DRBG to that of the cipher. 36 */ 37 # define RAND_DRBG_STRENGTH 256 38 39 # ifndef OPENSSL_NO_DEPRECATED_3_0 22 40 struct rand_meth_st { 23 41 int (*seed) (const void *buf, int num); … … 29 47 }; 30 48 31 int RAND_set_rand_method(const RAND_METHOD *meth);32 const RAND_METHOD *RAND_get_rand_method(void);33 # ifndef OPENSSL_NO_ENGINE34 int RAND_set_rand_engine(ENGINE *engine);35 # endif49 OSSL_DEPRECATEDIN_3_0 int RAND_set_rand_method(const RAND_METHOD *meth); 50 OSSL_DEPRECATEDIN_3_0 const RAND_METHOD *RAND_get_rand_method(void); 51 # ifndef OPENSSL_NO_ENGINE 52 OSSL_DEPRECATEDIN_3_0 int RAND_set_rand_engine(ENGINE *engine); 53 # endif 36 54 37 RAND_METHOD *RAND_OpenSSL(void); 55 OSSL_DEPRECATEDIN_3_0 RAND_METHOD *RAND_OpenSSL(void); 56 # endif /* OPENSSL_NO_DEPRECATED_3_0 */ 38 57 39 # if OPENSSL_API_COMPAT < 0x10100000L58 # ifndef OPENSSL_NO_DEPRECATED_1_1_0 40 59 # define RAND_cleanup() while(0) continue 41 60 # endif 42 61 int RAND_bytes(unsigned char *buf, int num); 43 62 int RAND_priv_bytes(unsigned char *buf, int num); 44 DEPRECATEDIN_1_1_0(int RAND_pseudo_bytes(unsigned char *buf, int num)) 63 64 /* 65 * Equivalent of RAND_priv_bytes() but additionally taking an OSSL_LIB_CTX and 66 * a strength. 67 */ 68 int RAND_priv_bytes_ex(OSSL_LIB_CTX *ctx, unsigned char *buf, size_t num, 69 unsigned int strength); 70 71 /* 72 * Equivalent of RAND_bytes() but additionally taking an OSSL_LIB_CTX and 73 * a strength. 74 */ 75 int RAND_bytes_ex(OSSL_LIB_CTX *ctx, unsigned char *buf, size_t num, 76 unsigned int strength); 77 78 # ifndef OPENSSL_NO_DEPRECATED_1_1_0 79 OSSL_DEPRECATEDIN_1_1_0 int RAND_pseudo_bytes(unsigned char *buf, int num); 80 # endif 81 82 EVP_RAND_CTX *RAND_get0_primary(OSSL_LIB_CTX *ctx); 83 EVP_RAND_CTX *RAND_get0_public(OSSL_LIB_CTX *ctx); 84 EVP_RAND_CTX *RAND_get0_private(OSSL_LIB_CTX *ctx); 85 86 int RAND_set_DRBG_type(OSSL_LIB_CTX *ctx, const char *drbg, const char *propq, 87 const char *cipher, const char *digest); 88 int RAND_set_seed_source_type(OSSL_LIB_CTX *ctx, const char *seed, 89 const char *propq); 45 90 46 91 void RAND_seed(const void *buf, int num); … … 48 93 49 94 # if defined(__ANDROID__) && defined(__NDK_FPABI__) 50 __NDK_FPABI__ 95 __NDK_FPABI__ /* __attribute__((pcs("aapcs"))) on ARM */ 51 96 # endif 52 97 void RAND_add(const void *buf, int num, double randomness); … … 66 111 # if defined(_WIN32) && (defined(BASETYPES) || defined(_WINDEF_H)) 67 112 /* application has to include <windows.h> in order to use these */ 68 DEPRECATEDIN_1_1_0(void RAND_screen(void)) 69 DEPRECATEDIN_1_1_0(int RAND_event(UINT, WPARAM, LPARAM)) 113 # ifndef OPENSSL_NO_DEPRECATED_1_1_0 114 OSSL_DEPRECATEDIN_1_1_0 void RAND_screen(void); 115 OSSL_DEPRECATEDIN_1_1_0 int RAND_event(UINT, WPARAM, LPARAM); 116 # endif 70 117 # endif 71 72 118 73 119 #ifdef __cplusplus -
trunk/src/libs/openssl-3.0.1/include/openssl/randerr.h
r91772 r94082 1 1 /* 2 2 * Generated by util/mkerr.pl DO NOT EDIT 3 * Copyright 1995-202 0The OpenSSL Project Authors. All Rights Reserved.3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 4 * 5 * Licensed under the OpenSSL license(the "License"). You may not use5 * Licensed under the Apache License 2.0 (the "License"). You may not use 6 6 * this file except in compliance with the License. You can obtain a copy 7 7 * in the file LICENSE in the source distribution or at … … 9 9 */ 10 10 11 #ifndef HEADER_RANDERR_H 12 # define HEADER_RANDERR_H 11 #ifndef OPENSSL_RANDERR_H 12 # define OPENSSL_RANDERR_H 13 # pragma once 13 14 15 # include <openssl/opensslconf.h> 14 16 # include <openssl/symhacks.h> 17 # include <openssl/cryptoerr_legacy.h> 15 18 16 # ifdef __cplusplus17 extern "C"18 # endif19 int ERR_load_RAND_strings(void);20 19 21 /*22 * RAND function codes.23 */24 # define RAND_F_DATA_COLLECT_METHOD 12725 # define RAND_F_DRBG_BYTES 10126 # define RAND_F_DRBG_GET_ENTROPY 10527 # define RAND_F_DRBG_SETUP 11728 # define RAND_F_GET_ENTROPY 10629 # define RAND_F_RAND_BYTES 10030 # define RAND_F_RAND_DRBG_ENABLE_LOCKING 11931 # define RAND_F_RAND_DRBG_GENERATE 10732 # define RAND_F_RAND_DRBG_GET_ENTROPY 12033 # define RAND_F_RAND_DRBG_GET_NONCE 12334 # define RAND_F_RAND_DRBG_INSTANTIATE 10835 # define RAND_F_RAND_DRBG_NEW 10936 # define RAND_F_RAND_DRBG_RESEED 11037 # define RAND_F_RAND_DRBG_RESTART 10238 # define RAND_F_RAND_DRBG_SET 10439 # define RAND_F_RAND_DRBG_SET_DEFAULTS 12140 # define RAND_F_RAND_DRBG_UNINSTANTIATE 11841 # define RAND_F_RAND_LOAD_FILE 11142 # define RAND_F_RAND_POOL_ACQUIRE_ENTROPY 12243 # define RAND_F_RAND_POOL_ADD 10344 # define RAND_F_RAND_POOL_ADD_BEGIN 11345 # define RAND_F_RAND_POOL_ADD_END 11446 # define RAND_F_RAND_POOL_ATTACH 12447 # define RAND_F_RAND_POOL_BYTES_NEEDED 11548 # define RAND_F_RAND_POOL_GROW 12549 # define RAND_F_RAND_POOL_NEW 11650 # define RAND_F_RAND_PSEUDO_BYTES 12651 # define RAND_F_RAND_WRITE_FILE 11252 20 53 21 /* … … 72 40 # define RAND_R_FWRITE_ERROR 123 73 41 # define RAND_R_GENERATE_ERROR 112 42 # define RAND_R_INSUFFICIENT_DRBG_STRENGTH 139 74 43 # define RAND_R_INTERNAL_ERROR 113 75 44 # define RAND_R_IN_ERROR_STATE 114 … … 89 58 # define RAND_R_TOO_LITTLE_NONCE_REQUESTED 135 90 59 # define RAND_R_TOO_MUCH_NONCE_REQUESTED 136 60 # define RAND_R_UNABLE_TO_CREATE_DRBG 143 61 # define RAND_R_UNABLE_TO_FETCH_DRBG 144 62 # define RAND_R_UNABLE_TO_GET_PARENT_RESEED_PROP_COUNTER 141 63 # define RAND_R_UNABLE_TO_GET_PARENT_STRENGTH 138 64 # define RAND_R_UNABLE_TO_LOCK_PARENT 140 91 65 # define RAND_R_UNSUPPORTED_DRBG_FLAGS 132 92 66 # define RAND_R_UNSUPPORTED_DRBG_TYPE 120 -
trunk/src/libs/openssl-3.0.1/include/openssl/rc2.h
r91772 r94082 1 1 /* 2 * Copyright 1995-20 16The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_RC2_H 11 # define HEADER_RC2_H 10 #ifndef OPENSSL_RC2_H 11 # define OPENSSL_RC2_H 12 # pragma once 13 14 # include <openssl/macros.h> 15 # ifndef OPENSSL_NO_DEPRECATED_3_0 16 # define HEADER_RC2_H 17 # endif 12 18 13 19 # include <openssl/opensslconf.h> 14 20 15 21 # ifndef OPENSSL_NO_RC2 16 # ifdef __cplusplus22 # ifdef __cplusplus 17 23 extern "C" { 18 # endif24 # endif 19 25 26 # define RC2_BLOCK 8 27 # define RC2_KEY_LENGTH 16 28 29 # ifndef OPENSSL_NO_DEPRECATED_3_0 20 30 typedef unsigned int RC2_INT; 21 31 22 # define RC2_ENCRYPT 1 23 # define RC2_DECRYPT 0 24 25 # define RC2_BLOCK 8 26 # define RC2_KEY_LENGTH 16 32 # define RC2_ENCRYPT 1 33 # define RC2_DECRYPT 0 27 34 28 35 typedef struct rc2_key_st { 29 36 RC2_INT data[64]; 30 37 } RC2_KEY; 38 # endif 39 # ifndef OPENSSL_NO_DEPRECATED_3_0 40 OSSL_DEPRECATEDIN_3_0 void RC2_set_key(RC2_KEY *key, int len, 41 const unsigned char *data, int bits); 42 OSSL_DEPRECATEDIN_3_0 void RC2_ecb_encrypt(const unsigned char *in, 43 unsigned char *out, RC2_KEY *key, 44 int enc); 45 OSSL_DEPRECATEDIN_3_0 void RC2_encrypt(unsigned long *data, RC2_KEY *key); 46 OSSL_DEPRECATEDIN_3_0 void RC2_decrypt(unsigned long *data, RC2_KEY *key); 47 OSSL_DEPRECATEDIN_3_0 void RC2_cbc_encrypt(const unsigned char *in, 48 unsigned char *out, long length, 49 RC2_KEY *ks, unsigned char *iv, 50 int enc); 51 OSSL_DEPRECATEDIN_3_0 void RC2_cfb64_encrypt(const unsigned char *in, 52 unsigned char *out, long length, 53 RC2_KEY *schedule, 54 unsigned char *ivec, 55 int *num, int enc); 56 OSSL_DEPRECATEDIN_3_0 void RC2_ofb64_encrypt(const unsigned char *in, 57 unsigned char *out, long length, 58 RC2_KEY *schedule, 59 unsigned char *ivec, 60 int *num); 61 # endif 31 62 32 void RC2_set_key(RC2_KEY *key, int len, const unsigned char *data, int bits); 33 void RC2_ecb_encrypt(const unsigned char *in, unsigned char *out, 34 RC2_KEY *key, int enc); 35 void RC2_encrypt(unsigned long *data, RC2_KEY *key); 36 void RC2_decrypt(unsigned long *data, RC2_KEY *key); 37 void RC2_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, 38 RC2_KEY *ks, unsigned char *iv, int enc); 39 void RC2_cfb64_encrypt(const unsigned char *in, unsigned char *out, 40 long length, RC2_KEY *schedule, unsigned char *ivec, 41 int *num, int enc); 42 void RC2_ofb64_encrypt(const unsigned char *in, unsigned char *out, 43 long length, RC2_KEY *schedule, unsigned char *ivec, 44 int *num); 45 46 # ifdef __cplusplus 63 # ifdef __cplusplus 47 64 } 48 # endif65 # endif 49 66 # endif 50 67 -
trunk/src/libs/openssl-3.0.1/include/openssl/rc4.h
r91772 r94082 1 1 /* 2 * Copyright 1995-20 16The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_RC4_H 11 # define HEADER_RC4_H 10 #ifndef OPENSSL_RC4_H 11 # define OPENSSL_RC4_H 12 # pragma once 13 14 # include <openssl/macros.h> 15 # ifndef OPENSSL_NO_DEPRECATED_3_0 16 # define HEADER_RC4_H 17 # endif 12 18 13 19 # include <openssl/opensslconf.h> 14 20 15 21 # ifndef OPENSSL_NO_RC4 16 # include <stddef.h>17 # ifdef __cplusplus22 # include <stddef.h> 23 # ifdef __cplusplus 18 24 extern "C" { 19 # endif25 # endif 20 26 27 # ifndef OPENSSL_NO_DEPRECATED_3_0 21 28 typedef struct rc4_key_st { 22 29 RC4_INT x, y; 23 30 RC4_INT data[256]; 24 31 } RC4_KEY; 32 # endif 33 # ifndef OPENSSL_NO_DEPRECATED_3_0 34 OSSL_DEPRECATEDIN_3_0 const char *RC4_options(void); 35 OSSL_DEPRECATEDIN_3_0 void RC4_set_key(RC4_KEY *key, int len, 36 const unsigned char *data); 37 OSSL_DEPRECATEDIN_3_0 void RC4(RC4_KEY *key, size_t len, 38 const unsigned char *indata, 39 unsigned char *outdata); 40 # endif 25 41 26 const char *RC4_options(void); 27 void RC4_set_key(RC4_KEY *key, int len, const unsigned char *data); 28 void RC4(RC4_KEY *key, size_t len, const unsigned char *indata, 29 unsigned char *outdata); 30 31 # ifdef __cplusplus 42 # ifdef __cplusplus 32 43 } 33 # endif44 # endif 34 45 # endif 35 46 -
trunk/src/libs/openssl-3.0.1/include/openssl/rc5.h
r91772 r94082 1 1 /* 2 * Copyright 1995-20 16The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_RC5_H 11 # define HEADER_RC5_H 10 #ifndef OPENSSL_RC5_H 11 # define OPENSSL_RC5_H 12 # pragma once 13 14 # include <openssl/macros.h> 15 # ifndef OPENSSL_NO_DEPRECATED_3_0 16 # define HEADER_RC5_H 17 # endif 12 18 13 19 # include <openssl/opensslconf.h> 14 20 15 21 # ifndef OPENSSL_NO_RC5 16 # ifdef __cplusplus22 # ifdef __cplusplus 17 23 extern "C" { 18 # endif24 # endif 19 25 20 # define RC5_ENCRYPT 121 # define RC5_DECRYPT 026 # define RC5_32_BLOCK 8 27 # define RC5_32_KEY_LENGTH 16/* This is a default, max is 255 */ 22 28 23 # define RC5_32_INT unsigned int 29 # ifndef OPENSSL_NO_DEPRECATED_3_0 30 # define RC5_ENCRYPT 1 31 # define RC5_DECRYPT 0 24 32 25 # define RC5_32_BLOCK 8 26 # define RC5_32_KEY_LENGTH 16/* This is a default, max is 255 */ 33 # define RC5_32_INT unsigned int 27 34 28 35 /* … … 30 37 * most supported modes will be RC5-32/12/16 RC5-32/16/8 31 38 */ 32 # define RC5_8_ROUNDS 833 # define RC5_12_ROUNDS 1234 # define RC5_16_ROUNDS 1639 # define RC5_8_ROUNDS 8 40 # define RC5_12_ROUNDS 12 41 # define RC5_16_ROUNDS 16 35 42 36 43 typedef struct rc5_key_st { … … 39 46 RC5_32_INT data[2 * (RC5_16_ROUNDS + 1)]; 40 47 } RC5_32_KEY; 48 # endif 49 # ifndef OPENSSL_NO_DEPRECATED_3_0 50 OSSL_DEPRECATEDIN_3_0 int RC5_32_set_key(RC5_32_KEY *key, int len, 51 const unsigned char *data, 52 int rounds); 53 OSSL_DEPRECATEDIN_3_0 void RC5_32_ecb_encrypt(const unsigned char *in, 54 unsigned char *out, 55 RC5_32_KEY *key, 56 int enc); 57 OSSL_DEPRECATEDIN_3_0 void RC5_32_encrypt(unsigned long *data, RC5_32_KEY *key); 58 OSSL_DEPRECATEDIN_3_0 void RC5_32_decrypt(unsigned long *data, RC5_32_KEY *key); 59 OSSL_DEPRECATEDIN_3_0 void RC5_32_cbc_encrypt(const unsigned char *in, 60 unsigned char *out, long length, 61 RC5_32_KEY *ks, unsigned char *iv, 62 int enc); 63 OSSL_DEPRECATEDIN_3_0 void RC5_32_cfb64_encrypt(const unsigned char *in, 64 unsigned char *out, long length, 65 RC5_32_KEY *schedule, 66 unsigned char *ivec, int *num, 67 int enc); 68 OSSL_DEPRECATEDIN_3_0 void RC5_32_ofb64_encrypt(const unsigned char *in, 69 unsigned char *out, long length, 70 RC5_32_KEY *schedule, 71 unsigned char *ivec, int *num); 72 # endif 41 73 42 void RC5_32_set_key(RC5_32_KEY *key, int len, const unsigned char *data, 43 int rounds); 44 void RC5_32_ecb_encrypt(const unsigned char *in, unsigned char *out, 45 RC5_32_KEY *key, int enc); 46 void RC5_32_encrypt(unsigned long *data, RC5_32_KEY *key); 47 void RC5_32_decrypt(unsigned long *data, RC5_32_KEY *key); 48 void RC5_32_cbc_encrypt(const unsigned char *in, unsigned char *out, 49 long length, RC5_32_KEY *ks, unsigned char *iv, 50 int enc); 51 void RC5_32_cfb64_encrypt(const unsigned char *in, unsigned char *out, 52 long length, RC5_32_KEY *schedule, 53 unsigned char *ivec, int *num, int enc); 54 void RC5_32_ofb64_encrypt(const unsigned char *in, unsigned char *out, 55 long length, RC5_32_KEY *schedule, 56 unsigned char *ivec, int *num); 57 58 # ifdef __cplusplus 74 # ifdef __cplusplus 59 75 } 60 # endif76 # endif 61 77 # endif 62 78 -
trunk/src/libs/openssl-3.0.1/include/openssl/ripemd.h
r91772 r94082 1 1 /* 2 * Copyright 1995-20 16The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_RIPEMD_H 11 # define HEADER_RIPEMD_H 10 #ifndef OPENSSL_RIPEMD_H 11 # define OPENSSL_RIPEMD_H 12 # pragma once 13 14 # include <openssl/macros.h> 15 # ifndef OPENSSL_NO_DEPRECATED_3_0 16 # define HEADER_RIPEMD_H 17 # endif 12 18 13 19 # include <openssl/opensslconf.h> 14 20 15 #ifndef OPENSSL_NO_RMD160 16 # include <openssl/e_os2.h> 17 # include <stddef.h> 18 # ifdef __cplusplus 21 # ifndef OPENSSL_NO_RMD160 22 # include <openssl/e_os2.h> 23 # include <stddef.h> 24 25 # define RIPEMD160_DIGEST_LENGTH 20 26 27 # ifdef __cplusplus 19 28 extern "C" { 20 # endif 29 # endif 30 # if !defined(OPENSSL_NO_DEPRECATED_3_0) 21 31 22 # define RIPEMD160_LONG unsigned int32 # define RIPEMD160_LONG unsigned int 23 33 24 # define RIPEMD160_CBLOCK 64 25 # define RIPEMD160_LBLOCK (RIPEMD160_CBLOCK/4) 26 # define RIPEMD160_DIGEST_LENGTH 20 34 # define RIPEMD160_CBLOCK 64 35 # define RIPEMD160_LBLOCK (RIPEMD160_CBLOCK/4) 27 36 28 37 typedef struct RIPEMD160state_st { … … 32 41 unsigned int num; 33 42 } RIPEMD160_CTX; 43 # endif 44 # ifndef OPENSSL_NO_DEPRECATED_3_0 45 OSSL_DEPRECATEDIN_3_0 int RIPEMD160_Init(RIPEMD160_CTX *c); 46 OSSL_DEPRECATEDIN_3_0 int RIPEMD160_Update(RIPEMD160_CTX *c, const void *data, 47 size_t len); 48 OSSL_DEPRECATEDIN_3_0 int RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c); 49 OSSL_DEPRECATEDIN_3_0 unsigned char *RIPEMD160(const unsigned char *d, size_t n, 50 unsigned char *md); 51 OSSL_DEPRECATEDIN_3_0 void RIPEMD160_Transform(RIPEMD160_CTX *c, 52 const unsigned char *b); 53 # endif 34 54 35 int RIPEMD160_Init(RIPEMD160_CTX *c); 36 int RIPEMD160_Update(RIPEMD160_CTX *c, const void *data, size_t len); 37 int RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c); 38 unsigned char *RIPEMD160(const unsigned char *d, size_t n, unsigned char *md); 39 void RIPEMD160_Transform(RIPEMD160_CTX *c, const unsigned char *b); 40 41 # ifdef __cplusplus 55 # ifdef __cplusplus 42 56 } 57 # endif 43 58 # endif 44 # endif45 46 47 59 #endif -
trunk/src/libs/openssl-3.0.1/include/openssl/rsa.h
r91772 r94082 1 1 /* 2 * Copyright 1995-20 18The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_RSA_H 11 # define HEADER_RSA_H 10 #ifndef OPENSSL_RSA_H 11 # define OPENSSL_RSA_H 12 # pragma once 13 14 # include <openssl/macros.h> 15 # ifndef OPENSSL_NO_DEPRECATED_3_0 16 # define HEADER_RSA_H 17 # endif 12 18 13 19 # include <openssl/opensslconf.h> 14 20 15 # ifndef OPENSSL_NO_RSA16 21 # include <openssl/asn1.h> 17 22 # include <openssl/bio.h> 18 23 # include <openssl/crypto.h> 19 # include <openssl/ ossl_typ.h>20 # if OPENSSL_API_COMPAT < 0x10100000L24 # include <openssl/types.h> 25 # ifndef OPENSSL_NO_DEPRECATED_1_1_0 21 26 # include <openssl/bn.h> 22 27 # endif 23 28 # include <openssl/rsaerr.h> 29 # include <openssl/safestack.h> 30 24 31 # ifdef __cplusplus 25 32 extern "C" { 26 33 # endif 27 34 28 /* The types RSA and RSA_METHOD are defined in ossl_typ.h */29 30 35 # ifndef OPENSSL_RSA_MAX_MODULUS_BITS 31 36 # define OPENSSL_RSA_MAX_MODULUS_BITS 16384 32 37 # endif 33 38 34 # define OPENSSL_RSA_FIPS_MIN_MODULUS_BITS 102435 36 # ifndef OPENSSL_RSA_SMALL_MODULUS_BITS37 # define OPENSSL_RSA_SMALL_MODULUS_BITS 307238 # endif39 # ifndef OPENSSL_RSA_MAX_PUBEXP_BITS40 41 /* exponent limit enforced for "large" modulus only */42 # define OPENSSL_RSA_MAX_PUBEXP_BITS 6443 # endif44 45 39 # define RSA_3 0x3L 46 40 # define RSA_F4 0x10001L 47 41 42 # ifndef OPENSSL_NO_DEPRECATED_3_0 43 /* The types RSA and RSA_METHOD are defined in ossl_typ.h */ 44 45 # define OPENSSL_RSA_FIPS_MIN_MODULUS_BITS 2048 46 47 # ifndef OPENSSL_RSA_SMALL_MODULUS_BITS 48 # define OPENSSL_RSA_SMALL_MODULUS_BITS 3072 49 # endif 50 51 /* exponent limit enforced for "large" modulus only */ 52 # ifndef OPENSSL_RSA_MAX_PUBEXP_BITS 53 # define OPENSSL_RSA_MAX_PUBEXP_BITS 64 54 # endif 48 55 /* based on RFC 8017 appendix A.1.2 */ 49 # define RSA_ASN1_VERSION_DEFAULT 0 50 # define RSA_ASN1_VERSION_MULTI 1 51 52 # define RSA_DEFAULT_PRIME_NUM 2 53 54 # define RSA_METHOD_FLAG_NO_CHECK 0x0001/* don't check pub/private 55 * match */ 56 57 # define RSA_FLAG_CACHE_PUBLIC 0x0002 58 # define RSA_FLAG_CACHE_PRIVATE 0x0004 59 # define RSA_FLAG_BLINDING 0x0008 60 # define RSA_FLAG_THREAD_SAFE 0x0010 56 # define RSA_ASN1_VERSION_DEFAULT 0 57 # define RSA_ASN1_VERSION_MULTI 1 58 59 # define RSA_DEFAULT_PRIME_NUM 2 60 61 # define RSA_METHOD_FLAG_NO_CHECK 0x0001 62 # define RSA_FLAG_CACHE_PUBLIC 0x0002 63 # define RSA_FLAG_CACHE_PRIVATE 0x0004 64 # define RSA_FLAG_BLINDING 0x0008 65 # define RSA_FLAG_THREAD_SAFE 0x0010 61 66 /* 62 67 * This flag means the private key operations will be handled by rsa_mod_exp … … 65 70 * bn_mod_exp gets called when private key components are absent. 66 71 */ 67 # define RSA_FLAG_EXT_PKEY 0x002072 # define RSA_FLAG_EXT_PKEY 0x0020 68 73 69 74 /* … … 73 78 * but other engines might not need it 74 79 */ 75 # define RSA_FLAG_NO_BLINDING 0x008076 # if OPENSSL_API_COMPAT < 0x10100000L80 # define RSA_FLAG_NO_BLINDING 0x0080 81 # endif /* OPENSSL_NO_DEPRECATED_3_0 */ 77 82 /* 78 83 * Does nothing. Previously this switched off constant time behaviour. 79 84 */ 85 # ifndef OPENSSL_NO_DEPRECATED_1_1_0 80 86 # define RSA_FLAG_NO_CONSTTIME 0x0000 81 87 # endif 82 # if OPENSSL_API_COMPAT < 0x00908000L83 88 /* deprecated name for the flag*/ 84 89 /* … … 90 95 * be used for all exponents. 91 96 */ 97 # ifndef OPENSSL_NO_DEPRECATED_0_9_8 92 98 # define RSA_FLAG_NO_EXP_CONSTTIME RSA_FLAG_NO_CONSTTIME 93 99 # endif 94 100 95 # define EVP_PKEY_CTX_set_rsa_padding(ctx, pad) \ 96 RSA_pkey_ctx_ctrl(ctx, -1, EVP_PKEY_CTRL_RSA_PADDING, pad, NULL) 97 98 # define EVP_PKEY_CTX_get_rsa_padding(ctx, ppad) \ 99 RSA_pkey_ctx_ctrl(ctx, -1, EVP_PKEY_CTRL_GET_RSA_PADDING, 0, ppad) 100 101 # define EVP_PKEY_CTX_set_rsa_pss_saltlen(ctx, len) \ 102 RSA_pkey_ctx_ctrl(ctx, (EVP_PKEY_OP_SIGN|EVP_PKEY_OP_VERIFY), \ 103 EVP_PKEY_CTRL_RSA_PSS_SALTLEN, len, NULL) 101 /*- 102 * New with 3.0: use part of the flags to denote exact type of RSA key, 103 * some of which are limited to specific signature and encryption schemes. 104 * These different types share the same RSA structure, but indicate the 105 * use of certain fields in that structure. 106 * Currently known are: 107 * RSA - this is the "normal" unlimited RSA structure (typenum 0) 108 * RSASSA-PSS - indicates that the PSS parameters are used. 109 * RSAES-OAEP - no specific field used for the moment, but OAEP padding 110 * is expected. (currently unused) 111 * 112 * 4 bits allow for 16 types 113 */ 114 # define RSA_FLAG_TYPE_MASK 0xF000 115 # define RSA_FLAG_TYPE_RSA 0x0000 116 # define RSA_FLAG_TYPE_RSASSAPSS 0x1000 117 # define RSA_FLAG_TYPE_RSAESOAEP 0x2000 118 119 int EVP_PKEY_CTX_set_rsa_padding(EVP_PKEY_CTX *ctx, int pad_mode); 120 int EVP_PKEY_CTX_get_rsa_padding(EVP_PKEY_CTX *ctx, int *pad_mode); 121 122 int EVP_PKEY_CTX_set_rsa_pss_saltlen(EVP_PKEY_CTX *ctx, int saltlen); 123 int EVP_PKEY_CTX_get_rsa_pss_saltlen(EVP_PKEY_CTX *ctx, int *saltlen); 124 125 int EVP_PKEY_CTX_set_rsa_keygen_bits(EVP_PKEY_CTX *ctx, int bits); 126 int EVP_PKEY_CTX_set1_rsa_keygen_pubexp(EVP_PKEY_CTX *ctx, BIGNUM *pubexp); 127 int EVP_PKEY_CTX_set_rsa_keygen_primes(EVP_PKEY_CTX *ctx, int primes); 128 int EVP_PKEY_CTX_set_rsa_pss_keygen_saltlen(EVP_PKEY_CTX *ctx, int saltlen); 129 # ifndef OPENSSL_NO_DEPRECATED_3_0 130 OSSL_DEPRECATEDIN_3_0 131 int EVP_PKEY_CTX_set_rsa_keygen_pubexp(EVP_PKEY_CTX *ctx, BIGNUM *pubexp); 132 # endif 133 104 134 /* Salt length matches digest */ 105 135 # define RSA_PSS_SALTLEN_DIGEST -1 … … 111 141 # define RSA_PSS_SALTLEN_MAX_SIGN -2 112 142 113 # define EVP_PKEY_CTX_set_rsa_pss_keygen_saltlen(ctx, len) \ 114 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA_PSS, EVP_PKEY_OP_KEYGEN, \ 115 EVP_PKEY_CTRL_RSA_PSS_SALTLEN, len, NULL) 116 117 # define EVP_PKEY_CTX_get_rsa_pss_saltlen(ctx, plen) \ 118 RSA_pkey_ctx_ctrl(ctx, (EVP_PKEY_OP_SIGN|EVP_PKEY_OP_VERIFY), \ 119 EVP_PKEY_CTRL_GET_RSA_PSS_SALTLEN, 0, plen) 120 121 # define EVP_PKEY_CTX_set_rsa_keygen_bits(ctx, bits) \ 122 RSA_pkey_ctx_ctrl(ctx, EVP_PKEY_OP_KEYGEN, \ 123 EVP_PKEY_CTRL_RSA_KEYGEN_BITS, bits, NULL) 124 125 # define EVP_PKEY_CTX_set_rsa_keygen_pubexp(ctx, pubexp) \ 126 RSA_pkey_ctx_ctrl(ctx, EVP_PKEY_OP_KEYGEN, \ 127 EVP_PKEY_CTRL_RSA_KEYGEN_PUBEXP, 0, pubexp) 128 129 # define EVP_PKEY_CTX_set_rsa_keygen_primes(ctx, primes) \ 130 RSA_pkey_ctx_ctrl(ctx, EVP_PKEY_OP_KEYGEN, \ 131 EVP_PKEY_CTRL_RSA_KEYGEN_PRIMES, primes, NULL) 132 133 # define EVP_PKEY_CTX_set_rsa_mgf1_md(ctx, md) \ 134 RSA_pkey_ctx_ctrl(ctx, EVP_PKEY_OP_TYPE_SIG | EVP_PKEY_OP_TYPE_CRYPT, \ 135 EVP_PKEY_CTRL_RSA_MGF1_MD, 0, (void *)(md)) 136 137 # define EVP_PKEY_CTX_set_rsa_pss_keygen_mgf1_md(ctx, md) \ 138 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA_PSS, EVP_PKEY_OP_KEYGEN, \ 139 EVP_PKEY_CTRL_RSA_MGF1_MD, 0, (void *)(md)) 140 141 # define EVP_PKEY_CTX_set_rsa_oaep_md(ctx, md) \ 142 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_TYPE_CRYPT, \ 143 EVP_PKEY_CTRL_RSA_OAEP_MD, 0, (void *)(md)) 144 145 # define EVP_PKEY_CTX_get_rsa_mgf1_md(ctx, pmd) \ 146 RSA_pkey_ctx_ctrl(ctx, EVP_PKEY_OP_TYPE_SIG | EVP_PKEY_OP_TYPE_CRYPT, \ 147 EVP_PKEY_CTRL_GET_RSA_MGF1_MD, 0, (void *)(pmd)) 148 149 # define EVP_PKEY_CTX_get_rsa_oaep_md(ctx, pmd) \ 150 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_TYPE_CRYPT, \ 151 EVP_PKEY_CTRL_GET_RSA_OAEP_MD, 0, (void *)(pmd)) 152 153 # define EVP_PKEY_CTX_set0_rsa_oaep_label(ctx, l, llen) \ 154 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_TYPE_CRYPT, \ 155 EVP_PKEY_CTRL_RSA_OAEP_LABEL, llen, (void *)(l)) 156 157 # define EVP_PKEY_CTX_get0_rsa_oaep_label(ctx, l) \ 158 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA, EVP_PKEY_OP_TYPE_CRYPT, \ 159 EVP_PKEY_CTRL_GET_RSA_OAEP_LABEL, 0, (void *)(l)) 160 161 # define EVP_PKEY_CTX_set_rsa_pss_keygen_md(ctx, md) \ 162 EVP_PKEY_CTX_ctrl(ctx, EVP_PKEY_RSA_PSS, \ 163 EVP_PKEY_OP_KEYGEN, EVP_PKEY_CTRL_MD, \ 164 0, (void *)(md)) 143 int EVP_PKEY_CTX_set_rsa_mgf1_md(EVP_PKEY_CTX *ctx, const EVP_MD *md); 144 int EVP_PKEY_CTX_set_rsa_mgf1_md_name(EVP_PKEY_CTX *ctx, const char *mdname, 145 const char *mdprops); 146 int EVP_PKEY_CTX_get_rsa_mgf1_md(EVP_PKEY_CTX *ctx, const EVP_MD **md); 147 int EVP_PKEY_CTX_get_rsa_mgf1_md_name(EVP_PKEY_CTX *ctx, char *name, 148 size_t namelen); 149 int EVP_PKEY_CTX_set_rsa_pss_keygen_mgf1_md(EVP_PKEY_CTX *ctx, const EVP_MD *md); 150 int EVP_PKEY_CTX_set_rsa_pss_keygen_mgf1_md_name(EVP_PKEY_CTX *ctx, 151 const char *mdname); 152 153 int EVP_PKEY_CTX_set_rsa_pss_keygen_md(EVP_PKEY_CTX *ctx, const EVP_MD *md); 154 int EVP_PKEY_CTX_set_rsa_pss_keygen_md_name(EVP_PKEY_CTX *ctx, 155 const char *mdname, 156 const char *mdprops); 157 158 int EVP_PKEY_CTX_set_rsa_oaep_md(EVP_PKEY_CTX *ctx, const EVP_MD *md); 159 int EVP_PKEY_CTX_set_rsa_oaep_md_name(EVP_PKEY_CTX *ctx, const char *mdname, 160 const char *mdprops); 161 int EVP_PKEY_CTX_get_rsa_oaep_md(EVP_PKEY_CTX *ctx, const EVP_MD **md); 162 int EVP_PKEY_CTX_get_rsa_oaep_md_name(EVP_PKEY_CTX *ctx, char *name, 163 size_t namelen); 164 int EVP_PKEY_CTX_set0_rsa_oaep_label(EVP_PKEY_CTX *ctx, void *label, int llen); 165 int EVP_PKEY_CTX_get0_rsa_oaep_label(EVP_PKEY_CTX *ctx, unsigned char **label); 165 166 166 167 # define EVP_PKEY_CTRL_RSA_PADDING (EVP_PKEY_ALG_CTRL + 1) … … 183 184 # define EVP_PKEY_CTRL_RSA_KEYGEN_PRIMES (EVP_PKEY_ALG_CTRL + 13) 184 185 185 # define RSA_PKCS1_PADDING 1186 # define RSA_ SSLV23_PADDING 2187 # define RSA_ NO_PADDING 3188 # define RSA_ PKCS1_OAEP_PADDING 4189 # define RSA_X931_PADDING 5 186 # define RSA_PKCS1_PADDING 1 187 # define RSA_NO_PADDING 3 188 # define RSA_PKCS1_OAEP_PADDING 4 189 # define RSA_X931_PADDING 5 190 190 191 /* EVP_PKEY_ only */ 191 # define RSA_PKCS1_PSS_PADDING 6 192 193 # define RSA_PKCS1_PADDING_SIZE 11 192 # define RSA_PKCS1_PSS_PADDING 6 193 # define RSA_PKCS1_WITH_TLS_PADDING 7 194 195 # define RSA_PKCS1_PADDING_SIZE 11 194 196 195 197 # define RSA_set_app_data(s,arg) RSA_set_ex_data(s,0,arg) 196 198 # define RSA_get_app_data(s) RSA_get_ex_data(s,0) 197 199 198 RSA *RSA_new(void); 199 RSA *RSA_new_method(ENGINE *engine); 200 int RSA_bits(const RSA *rsa); 201 int RSA_size(const RSA *rsa); 202 int RSA_security_bits(const RSA *rsa); 203 204 int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d); 205 int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q); 206 int RSA_set0_crt_params(RSA *r,BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp); 207 int RSA_set0_multi_prime_params(RSA *r, BIGNUM *primes[], BIGNUM *exps[], 208 BIGNUM *coeffs[], int pnum); 209 void RSA_get0_key(const RSA *r, 210 const BIGNUM **n, const BIGNUM **e, const BIGNUM **d); 211 void RSA_get0_factors(const RSA *r, const BIGNUM **p, const BIGNUM **q); 212 int RSA_get_multi_prime_extra_count(const RSA *r); 213 int RSA_get0_multi_prime_factors(const RSA *r, const BIGNUM *primes[]); 214 void RSA_get0_crt_params(const RSA *r, 215 const BIGNUM **dmp1, const BIGNUM **dmq1, 216 const BIGNUM **iqmp); 200 # ifndef OPENSSL_NO_DEPRECATED_3_0 201 OSSL_DEPRECATEDIN_3_0 RSA *RSA_new(void); 202 OSSL_DEPRECATEDIN_3_0 RSA *RSA_new_method(ENGINE *engine); 203 OSSL_DEPRECATEDIN_3_0 int RSA_bits(const RSA *rsa); 204 OSSL_DEPRECATEDIN_3_0 int RSA_size(const RSA *rsa); 205 OSSL_DEPRECATEDIN_3_0 int RSA_security_bits(const RSA *rsa); 206 207 OSSL_DEPRECATEDIN_3_0 int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d); 208 OSSL_DEPRECATEDIN_3_0 int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q); 209 OSSL_DEPRECATEDIN_3_0 int RSA_set0_crt_params(RSA *r, 210 BIGNUM *dmp1, BIGNUM *dmq1, 211 BIGNUM *iqmp); 212 OSSL_DEPRECATEDIN_3_0 int RSA_set0_multi_prime_params(RSA *r, 213 BIGNUM *primes[], 214 BIGNUM *exps[], 215 BIGNUM *coeffs[], 216 int pnum); 217 OSSL_DEPRECATEDIN_3_0 void RSA_get0_key(const RSA *r, 218 const BIGNUM **n, const BIGNUM **e, 219 const BIGNUM **d); 220 OSSL_DEPRECATEDIN_3_0 void RSA_get0_factors(const RSA *r, 221 const BIGNUM **p, const BIGNUM **q); 222 OSSL_DEPRECATEDIN_3_0 int RSA_get_multi_prime_extra_count(const RSA *r); 223 OSSL_DEPRECATEDIN_3_0 int RSA_get0_multi_prime_factors(const RSA *r, 224 const BIGNUM *primes[]); 225 OSSL_DEPRECATEDIN_3_0 void RSA_get0_crt_params(const RSA *r, 226 const BIGNUM **dmp1, 227 const BIGNUM **dmq1, 228 const BIGNUM **iqmp); 229 OSSL_DEPRECATEDIN_3_0 217 230 int RSA_get0_multi_prime_crt_params(const RSA *r, const BIGNUM *exps[], 218 231 const BIGNUM *coeffs[]); 219 const BIGNUM *RSA_get0_n(const RSA *d); 220 const BIGNUM *RSA_get0_e(const RSA *d); 221 const BIGNUM *RSA_get0_d(const RSA *d); 222 const BIGNUM *RSA_get0_p(const RSA *d); 223 const BIGNUM *RSA_get0_q(const RSA *d); 224 const BIGNUM *RSA_get0_dmp1(const RSA *r); 225 const BIGNUM *RSA_get0_dmq1(const RSA *r); 226 const BIGNUM *RSA_get0_iqmp(const RSA *r); 227 const RSA_PSS_PARAMS *RSA_get0_pss_params(const RSA *r); 228 void RSA_clear_flags(RSA *r, int flags); 229 int RSA_test_flags(const RSA *r, int flags); 230 void RSA_set_flags(RSA *r, int flags); 231 int RSA_get_version(RSA *r); 232 ENGINE *RSA_get0_engine(const RSA *r); 232 OSSL_DEPRECATEDIN_3_0 const BIGNUM *RSA_get0_n(const RSA *d); 233 OSSL_DEPRECATEDIN_3_0 const BIGNUM *RSA_get0_e(const RSA *d); 234 OSSL_DEPRECATEDIN_3_0 const BIGNUM *RSA_get0_d(const RSA *d); 235 OSSL_DEPRECATEDIN_3_0 const BIGNUM *RSA_get0_p(const RSA *d); 236 OSSL_DEPRECATEDIN_3_0 const BIGNUM *RSA_get0_q(const RSA *d); 237 OSSL_DEPRECATEDIN_3_0 const BIGNUM *RSA_get0_dmp1(const RSA *r); 238 OSSL_DEPRECATEDIN_3_0 const BIGNUM *RSA_get0_dmq1(const RSA *r); 239 OSSL_DEPRECATEDIN_3_0 const BIGNUM *RSA_get0_iqmp(const RSA *r); 240 OSSL_DEPRECATEDIN_3_0 const RSA_PSS_PARAMS *RSA_get0_pss_params(const RSA *r); 241 OSSL_DEPRECATEDIN_3_0 void RSA_clear_flags(RSA *r, int flags); 242 OSSL_DEPRECATEDIN_3_0 int RSA_test_flags(const RSA *r, int flags); 243 OSSL_DEPRECATEDIN_3_0 void RSA_set_flags(RSA *r, int flags); 244 OSSL_DEPRECATEDIN_3_0 int RSA_get_version(RSA *r); 245 OSSL_DEPRECATEDIN_3_0 ENGINE *RSA_get0_engine(const RSA *r); 246 # endif /* !OPENSSL_NO_DEPRECATED_3_0 */ 247 248 # define EVP_RSA_gen(bits) \ 249 EVP_PKEY_Q_keygen(NULL, NULL, "RSA", (size_t)(0 + (bits))) 233 250 234 251 /* Deprecated version */ 235 DEPRECATEDIN_0_9_8(RSA *RSA_generate_key(int bits, unsigned long e, void 236 (*callback) (int, int, void *), 237 void *cb_arg)) 252 # ifndef OPENSSL_NO_DEPRECATED_0_9_8 253 OSSL_DEPRECATEDIN_0_9_8 RSA *RSA_generate_key(int bits, unsigned long e, void 254 (*callback) (int, int, void *), 255 void *cb_arg); 256 # endif 238 257 239 258 /* New version */ 240 int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb); 259 # ifndef OPENSSL_NO_DEPRECATED_3_0 260 OSSL_DEPRECATEDIN_3_0 int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e, 261 BN_GENCB *cb); 241 262 /* Multi-prime version */ 242 int RSA_generate_multi_prime_key(RSA *rsa, int bits, int primes, 243 BIGNUM *e, BN_GENCB *cb); 244 245 int RSA_X931_derive_ex(RSA *rsa, BIGNUM *p1, BIGNUM *p2, BIGNUM *q1, 246 BIGNUM *q2, const BIGNUM *Xp1, const BIGNUM *Xp2, 247 const BIGNUM *Xp, const BIGNUM *Xq1, const BIGNUM *Xq2, 248 const BIGNUM *Xq, const BIGNUM *e, BN_GENCB *cb); 249 int RSA_X931_generate_key_ex(RSA *rsa, int bits, const BIGNUM *e, 250 BN_GENCB *cb); 251 252 int RSA_check_key(const RSA *); 253 int RSA_check_key_ex(const RSA *, BN_GENCB *cb); 263 OSSL_DEPRECATEDIN_3_0 int RSA_generate_multi_prime_key(RSA *rsa, int bits, 264 int primes, BIGNUM *e, 265 BN_GENCB *cb); 266 267 OSSL_DEPRECATEDIN_3_0 268 int RSA_X931_derive_ex(RSA *rsa, BIGNUM *p1, BIGNUM *p2, 269 BIGNUM *q1, BIGNUM *q2, 270 const BIGNUM *Xp1, const BIGNUM *Xp2, 271 const BIGNUM *Xp, const BIGNUM *Xq1, 272 const BIGNUM *Xq2, const BIGNUM *Xq, 273 const BIGNUM *e, BN_GENCB *cb); 274 OSSL_DEPRECATEDIN_3_0 int RSA_X931_generate_key_ex(RSA *rsa, int bits, 275 const BIGNUM *e, 276 BN_GENCB *cb); 277 278 OSSL_DEPRECATEDIN_3_0 int RSA_check_key(const RSA *); 279 OSSL_DEPRECATEDIN_3_0 int RSA_check_key_ex(const RSA *, BN_GENCB *cb); 254 280 /* next 4 return -1 on error */ 255 int RSA_public_encrypt(int flen, const unsigned char *from, 256 unsigned char *to, RSA *rsa, int padding); 257 int RSA_private_encrypt(int flen, const unsigned char *from, 258 unsigned char *to, RSA *rsa, int padding); 259 int RSA_public_decrypt(int flen, const unsigned char *from, 260 unsigned char *to, RSA *rsa, int padding); 261 int RSA_private_decrypt(int flen, const unsigned char *from, 262 unsigned char *to, RSA *rsa, int padding); 263 void RSA_free(RSA *r); 281 OSSL_DEPRECATEDIN_3_0 282 int RSA_public_encrypt(int flen, const unsigned char *from, unsigned char *to, 283 RSA *rsa, int padding); 284 OSSL_DEPRECATEDIN_3_0 285 int RSA_private_encrypt(int flen, const unsigned char *from, unsigned char *to, 286 RSA *rsa, int padding); 287 OSSL_DEPRECATEDIN_3_0 288 int RSA_public_decrypt(int flen, const unsigned char *from, unsigned char *to, 289 RSA *rsa, int padding); 290 OSSL_DEPRECATEDIN_3_0 291 int RSA_private_decrypt(int flen, const unsigned char *from, unsigned char *to, 292 RSA *rsa, int padding); 293 OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r); 264 294 /* "up" the RSA object's reference count */ 265 int RSA_up_ref(RSA *r); 266 267 int RSA_flags(const RSA *r); 268 269 void RSA_set_default_method(const RSA_METHOD *meth); 270 const RSA_METHOD *RSA_get_default_method(void); 271 const RSA_METHOD *RSA_null_method(void); 272 const RSA_METHOD *RSA_get_method(const RSA *rsa); 273 int RSA_set_method(RSA *rsa, const RSA_METHOD *meth); 295 OSSL_DEPRECATEDIN_3_0 int RSA_up_ref(RSA *r); 296 OSSL_DEPRECATEDIN_3_0 int RSA_flags(const RSA *r); 297 298 OSSL_DEPRECATEDIN_3_0 void RSA_set_default_method(const RSA_METHOD *meth); 299 OSSL_DEPRECATEDIN_3_0 const RSA_METHOD *RSA_get_default_method(void); 300 OSSL_DEPRECATEDIN_3_0 const RSA_METHOD *RSA_null_method(void); 301 OSSL_DEPRECATEDIN_3_0 const RSA_METHOD *RSA_get_method(const RSA *rsa); 302 OSSL_DEPRECATEDIN_3_0 int RSA_set_method(RSA *rsa, const RSA_METHOD *meth); 274 303 275 304 /* these are the actual RSA functions */ 276 const RSA_METHOD *RSA_PKCS1_OpenSSL(void); 305 OSSL_DEPRECATEDIN_3_0 const RSA_METHOD *RSA_PKCS1_OpenSSL(void); 306 307 DECLARE_ASN1_ENCODE_FUNCTIONS_name_attr(OSSL_DEPRECATEDIN_3_0, 308 RSA, RSAPublicKey) 309 DECLARE_ASN1_ENCODE_FUNCTIONS_name_attr(OSSL_DEPRECATEDIN_3_0, 310 RSA, RSAPrivateKey) 311 # endif /* !OPENSSL_NO_DEPRECATED_3_0 */ 277 312 278 313 int RSA_pkey_ctx_ctrl(EVP_PKEY_CTX *ctx, int optype, int cmd, int p1, void *p2); 279 280 DECLARE_ASN1_ENCODE_FUNCTIONS_const(RSA, RSAPublicKey)281 DECLARE_ASN1_ENCODE_FUNCTIONS_const(RSA, RSAPrivateKey)282 314 283 315 struct rsa_pss_params_st { … … 291 323 292 324 DECLARE_ASN1_FUNCTIONS(RSA_PSS_PARAMS) 325 DECLARE_ASN1_DUP_FUNCTION(RSA_PSS_PARAMS) 293 326 294 327 typedef struct rsa_oaep_params_st { … … 302 335 DECLARE_ASN1_FUNCTIONS(RSA_OAEP_PARAMS) 303 336 304 # ifndef OPENSSL_NO_STDIO 305 int RSA_print_fp(FILE *fp, const RSA *r, int offset); 306 # endif 307 308 int RSA_print(BIO *bp, const RSA *r, int offset); 337 # ifndef OPENSSL_NO_DEPRECATED_3_0 338 # ifndef OPENSSL_NO_STDIO 339 OSSL_DEPRECATEDIN_3_0 int RSA_print_fp(FILE *fp, const RSA *r, int offset); 340 # endif 341 342 OSSL_DEPRECATEDIN_3_0 int RSA_print(BIO *bp, const RSA *r, int offset); 309 343 310 344 /* … … 312 346 * PKCS#1 padded RSA encryption 313 347 */ 314 int RSA_sign(int type, const unsigned char *m, unsigned int m_length, 315 unsigned char *sigret, unsigned int *siglen, RSA *rsa); 316 int RSA_verify(int type, const unsigned char *m, unsigned int m_length, 317 const unsigned char *sigbuf, unsigned int siglen, RSA *rsa); 348 OSSL_DEPRECATEDIN_3_0 int RSA_sign(int type, const unsigned char *m, 349 unsigned int m_length, unsigned char *sigret, 350 unsigned int *siglen, RSA *rsa); 351 OSSL_DEPRECATEDIN_3_0 int RSA_verify(int type, const unsigned char *m, 352 unsigned int m_length, 353 const unsigned char *sigbuf, 354 unsigned int siglen, RSA *rsa); 318 355 319 356 /* … … 321 358 * PKCS#1 padded RSA encryption 322 359 */ 360 OSSL_DEPRECATEDIN_3_0 323 361 int RSA_sign_ASN1_OCTET_STRING(int type, 324 362 const unsigned char *m, unsigned int m_length, 325 363 unsigned char *sigret, unsigned int *siglen, 326 364 RSA *rsa); 327 int RSA_verify_ASN1_OCTET_STRING(int type, const unsigned char *m, 328 unsigned int m_length, unsigned char *sigbuf, 329 unsigned int siglen, RSA *rsa); 330 331 int RSA_blinding_on(RSA *rsa, BN_CTX *ctx); 332 void RSA_blinding_off(RSA *rsa); 333 BN_BLINDING *RSA_setup_blinding(RSA *rsa, BN_CTX *ctx); 334 365 OSSL_DEPRECATEDIN_3_0 366 int RSA_verify_ASN1_OCTET_STRING(int type, 367 const unsigned char *m, unsigned int m_length, 368 unsigned char *sigbuf, unsigned int siglen, 369 RSA *rsa); 370 371 OSSL_DEPRECATEDIN_3_0 int RSA_blinding_on(RSA *rsa, BN_CTX *ctx); 372 OSSL_DEPRECATEDIN_3_0 void RSA_blinding_off(RSA *rsa); 373 OSSL_DEPRECATEDIN_3_0 BN_BLINDING *RSA_setup_blinding(RSA *rsa, BN_CTX *ctx); 374 375 OSSL_DEPRECATEDIN_3_0 335 376 int RSA_padding_add_PKCS1_type_1(unsigned char *to, int tlen, 336 377 const unsigned char *f, int fl); 378 OSSL_DEPRECATEDIN_3_0 337 379 int RSA_padding_check_PKCS1_type_1(unsigned char *to, int tlen, 338 380 const unsigned char *f, int fl, 339 381 int rsa_len); 382 OSSL_DEPRECATEDIN_3_0 340 383 int RSA_padding_add_PKCS1_type_2(unsigned char *to, int tlen, 341 384 const unsigned char *f, int fl); 385 OSSL_DEPRECATEDIN_3_0 342 386 int RSA_padding_check_PKCS1_type_2(unsigned char *to, int tlen, 343 387 const unsigned char *f, int fl, 344 388 int rsa_len); 345 int PKCS1_MGF1(unsigned char *mask, long len, const unsigned char *seed, 346 long seedlen, const EVP_MD *dgst); 389 OSSL_DEPRECATEDIN_3_0 int PKCS1_MGF1(unsigned char *mask, long len, 390 const unsigned char *seed, long seedlen, 391 const EVP_MD *dgst); 392 OSSL_DEPRECATEDIN_3_0 347 393 int RSA_padding_add_PKCS1_OAEP(unsigned char *to, int tlen, 348 394 const unsigned char *f, int fl, 349 395 const unsigned char *p, int pl); 396 OSSL_DEPRECATEDIN_3_0 350 397 int RSA_padding_check_PKCS1_OAEP(unsigned char *to, int tlen, 351 398 const unsigned char *f, int fl, int rsa_len, 352 399 const unsigned char *p, int pl); 400 OSSL_DEPRECATEDIN_3_0 353 401 int RSA_padding_add_PKCS1_OAEP_mgf1(unsigned char *to, int tlen, 354 402 const unsigned char *from, int flen, 355 403 const unsigned char *param, int plen, 356 404 const EVP_MD *md, const EVP_MD *mgf1md); 405 OSSL_DEPRECATEDIN_3_0 357 406 int RSA_padding_check_PKCS1_OAEP_mgf1(unsigned char *to, int tlen, 358 407 const unsigned char *from, int flen, 359 int num, const unsigned char *param, 360 int plen, const EVP_MD *md, 361 const EVP_MD *mgf1md); 362 int RSA_padding_add_SSLv23(unsigned char *to, int tlen, 363 const unsigned char *f, int fl); 364 int RSA_padding_check_SSLv23(unsigned char *to, int tlen, 365 const unsigned char *f, int fl, int rsa_len); 366 int RSA_padding_add_none(unsigned char *to, int tlen, const unsigned char *f, 367 int fl); 368 int RSA_padding_check_none(unsigned char *to, int tlen, 369 const unsigned char *f, int fl, int rsa_len); 370 int RSA_padding_add_X931(unsigned char *to, int tlen, const unsigned char *f, 371 int fl); 372 int RSA_padding_check_X931(unsigned char *to, int tlen, 373 const unsigned char *f, int fl, int rsa_len); 374 int RSA_X931_hash_id(int nid); 375 408 int num, 409 const unsigned char *param, int plen, 410 const EVP_MD *md, const EVP_MD *mgf1md); 411 OSSL_DEPRECATEDIN_3_0 int RSA_padding_add_none(unsigned char *to, int tlen, 412 const unsigned char *f, int fl); 413 OSSL_DEPRECATEDIN_3_0 int RSA_padding_check_none(unsigned char *to, int tlen, 414 const unsigned char *f, int fl, 415 int rsa_len); 416 OSSL_DEPRECATEDIN_3_0 int RSA_padding_add_X931(unsigned char *to, int tlen, 417 const unsigned char *f, int fl); 418 OSSL_DEPRECATEDIN_3_0 int RSA_padding_check_X931(unsigned char *to, int tlen, 419 const unsigned char *f, int fl, 420 int rsa_len); 421 OSSL_DEPRECATEDIN_3_0 int RSA_X931_hash_id(int nid); 422 423 OSSL_DEPRECATEDIN_3_0 376 424 int RSA_verify_PKCS1_PSS(RSA *rsa, const unsigned char *mHash, 377 425 const EVP_MD *Hash, const unsigned char *EM, 378 426 int sLen); 427 OSSL_DEPRECATEDIN_3_0 379 428 int RSA_padding_add_PKCS1_PSS(RSA *rsa, unsigned char *EM, 380 429 const unsigned char *mHash, const EVP_MD *Hash, 381 430 int sLen); 382 431 432 OSSL_DEPRECATEDIN_3_0 383 433 int RSA_verify_PKCS1_PSS_mgf1(RSA *rsa, const unsigned char *mHash, 384 434 const EVP_MD *Hash, const EVP_MD *mgf1Hash, 385 435 const unsigned char *EM, int sLen); 386 436 437 OSSL_DEPRECATEDIN_3_0 387 438 int RSA_padding_add_PKCS1_PSS_mgf1(RSA *rsa, unsigned char *EM, 388 439 const unsigned char *mHash, … … 390 441 int sLen); 391 442 392 # define RSA_get_ex_new_index(l, p, newf, dupf, freef) \443 # define RSA_get_ex_new_index(l, p, newf, dupf, freef) \ 393 444 CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_RSA, l, p, newf, dupf, freef) 394 int RSA_set_ex_data(RSA *r, int idx, void *arg);395 void *RSA_get_ex_data(const RSA *r, int idx);396 397 RSA *RSAPublicKey_dup(RSA *rsa); 398 RSA *RSAPrivateKey_dup(RSA *rsa); 445 OSSL_DEPRECATEDIN_3_0 int RSA_set_ex_data(RSA *r, int idx, void *arg); 446 OSSL_DEPRECATEDIN_3_0 void *RSA_get_ex_data(const RSA *r, int idx); 447 448 DECLARE_ASN1_DUP_FUNCTION_name_attr(OSSL_DEPRECATEDIN_3_0, RSA, RSAPublicKey) 449 DECLARE_ASN1_DUP_FUNCTION_name_attr(OSSL_DEPRECATEDIN_3_0, RSA, RSAPrivateKey) 399 450 400 451 /* … … 405 456 */ 406 457 407 # define RSA_FLAG_FIPS_METHOD 0x0400458 # define RSA_FLAG_FIPS_METHOD 0x0400 408 459 409 460 /* … … 413 464 */ 414 465 415 # define RSA_FLAG_NON_FIPS_ALLOW 0x0400466 # define RSA_FLAG_NON_FIPS_ALLOW 0x0400 416 467 /* 417 468 * Application has decided PRNG is good enough to generate a key: don't 418 469 * check. 419 470 */ 420 # define RSA_FLAG_CHECKED 0x0800 421 422 RSA_METHOD *RSA_meth_new(const char *name, int flags); 423 void RSA_meth_free(RSA_METHOD *meth); 424 RSA_METHOD *RSA_meth_dup(const RSA_METHOD *meth); 425 const char *RSA_meth_get0_name(const RSA_METHOD *meth); 426 int RSA_meth_set1_name(RSA_METHOD *meth, const char *name); 427 int RSA_meth_get_flags(const RSA_METHOD *meth); 428 int RSA_meth_set_flags(RSA_METHOD *meth, int flags); 429 void *RSA_meth_get0_app_data(const RSA_METHOD *meth); 430 int RSA_meth_set0_app_data(RSA_METHOD *meth, void *app_data); 431 int (*RSA_meth_get_pub_enc(const RSA_METHOD *meth)) 432 (int flen, const unsigned char *from, 433 unsigned char *to, RSA *rsa, int padding); 471 # define RSA_FLAG_CHECKED 0x0800 472 473 OSSL_DEPRECATEDIN_3_0 RSA_METHOD *RSA_meth_new(const char *name, int flags); 474 OSSL_DEPRECATEDIN_3_0 void RSA_meth_free(RSA_METHOD *meth); 475 OSSL_DEPRECATEDIN_3_0 RSA_METHOD *RSA_meth_dup(const RSA_METHOD *meth); 476 OSSL_DEPRECATEDIN_3_0 const char *RSA_meth_get0_name(const RSA_METHOD *meth); 477 OSSL_DEPRECATEDIN_3_0 int RSA_meth_set1_name(RSA_METHOD *meth, 478 const char *name); 479 OSSL_DEPRECATEDIN_3_0 int RSA_meth_get_flags(const RSA_METHOD *meth); 480 OSSL_DEPRECATEDIN_3_0 int RSA_meth_set_flags(RSA_METHOD *meth, int flags); 481 OSSL_DEPRECATEDIN_3_0 void *RSA_meth_get0_app_data(const RSA_METHOD *meth); 482 OSSL_DEPRECATEDIN_3_0 int RSA_meth_set0_app_data(RSA_METHOD *meth, 483 void *app_data); 484 OSSL_DEPRECATEDIN_3_0 485 int (*RSA_meth_get_pub_enc(const RSA_METHOD *meth)) (int flen, 486 const unsigned char *from, 487 unsigned char *to, 488 RSA *rsa, int padding); 489 OSSL_DEPRECATEDIN_3_0 434 490 int RSA_meth_set_pub_enc(RSA_METHOD *rsa, 435 491 int (*pub_enc) (int flen, const unsigned char *from, 436 492 unsigned char *to, RSA *rsa, 437 493 int padding)); 438 int (*RSA_meth_get_pub_dec(const RSA_METHOD *meth)) 439 (int flen, const unsigned char *from, 440 unsigned char *to, RSA *rsa, int padding); 494 OSSL_DEPRECATEDIN_3_0 495 int (*RSA_meth_get_pub_dec(const RSA_METHOD *meth)) (int flen, 496 const unsigned char *from, 497 unsigned char *to, 498 RSA *rsa, int padding); 499 OSSL_DEPRECATEDIN_3_0 441 500 int RSA_meth_set_pub_dec(RSA_METHOD *rsa, 442 501 int (*pub_dec) (int flen, const unsigned char *from, 443 502 unsigned char *to, RSA *rsa, 444 503 int padding)); 445 int (*RSA_meth_get_priv_enc(const RSA_METHOD *meth)) 446 (int flen, const unsigned char *from, 447 unsigned char *to, RSA *rsa, int padding); 504 OSSL_DEPRECATEDIN_3_0 505 int (*RSA_meth_get_priv_enc(const RSA_METHOD *meth)) (int flen, 506 const unsigned char *from, 507 unsigned char *to, 508 RSA *rsa, int padding); 509 OSSL_DEPRECATEDIN_3_0 448 510 int RSA_meth_set_priv_enc(RSA_METHOD *rsa, 449 511 int (*priv_enc) (int flen, const unsigned char *from, 450 512 unsigned char *to, RSA *rsa, 451 513 int padding)); 452 int (*RSA_meth_get_priv_dec(const RSA_METHOD *meth)) 453 (int flen, const unsigned char *from, 454 unsigned char *to, RSA *rsa, int padding); 514 OSSL_DEPRECATEDIN_3_0 515 int (*RSA_meth_get_priv_dec(const RSA_METHOD *meth)) (int flen, 516 const unsigned char *from, 517 unsigned char *to, 518 RSA *rsa, int padding); 519 OSSL_DEPRECATEDIN_3_0 455 520 int RSA_meth_set_priv_dec(RSA_METHOD *rsa, 456 521 int (*priv_dec) (int flen, const unsigned char *from, 457 522 unsigned char *to, RSA *rsa, 458 523 int padding)); 459 int (*RSA_meth_get_mod_exp(const RSA_METHOD *meth)) 460 (BIGNUM *r0, const BIGNUM *i, RSA *rsa, BN_CTX *ctx); 524 OSSL_DEPRECATEDIN_3_0 525 int (*RSA_meth_get_mod_exp(const RSA_METHOD *meth)) (BIGNUM *r0, 526 const BIGNUM *i, 527 RSA *rsa, BN_CTX *ctx); 528 OSSL_DEPRECATEDIN_3_0 461 529 int RSA_meth_set_mod_exp(RSA_METHOD *rsa, 462 530 int (*mod_exp) (BIGNUM *r0, const BIGNUM *i, RSA *rsa, 463 531 BN_CTX *ctx)); 464 int (*RSA_meth_get_bn_mod_exp(const RSA_METHOD *meth)) 465 (BIGNUM *r, const BIGNUM *a, const BIGNUM *p, 466 const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx); 532 OSSL_DEPRECATEDIN_3_0 533 int (*RSA_meth_get_bn_mod_exp(const RSA_METHOD *meth)) (BIGNUM *r, 534 const BIGNUM *a, 535 const BIGNUM *p, 536 const BIGNUM *m, 537 BN_CTX *ctx, 538 BN_MONT_CTX *m_ctx); 539 OSSL_DEPRECATEDIN_3_0 467 540 int RSA_meth_set_bn_mod_exp(RSA_METHOD *rsa, 468 541 int (*bn_mod_exp) (BIGNUM *r, … … 472 545 BN_CTX *ctx, 473 546 BN_MONT_CTX *m_ctx)); 547 OSSL_DEPRECATEDIN_3_0 474 548 int (*RSA_meth_get_init(const RSA_METHOD *meth)) (RSA *rsa); 549 OSSL_DEPRECATEDIN_3_0 475 550 int RSA_meth_set_init(RSA_METHOD *rsa, int (*init) (RSA *rsa)); 551 OSSL_DEPRECATEDIN_3_0 476 552 int (*RSA_meth_get_finish(const RSA_METHOD *meth)) (RSA *rsa); 553 OSSL_DEPRECATEDIN_3_0 477 554 int RSA_meth_set_finish(RSA_METHOD *rsa, int (*finish) (RSA *rsa)); 478 int (*RSA_meth_get_sign(const RSA_METHOD *meth)) 479 (int type, 480 const unsigned char *m, unsigned int m_length, 481 unsigned char *sigret, unsigned int *siglen, 482 const RSA *rsa); 555 OSSL_DEPRECATEDIN_3_0 556 int (*RSA_meth_get_sign(const RSA_METHOD *meth)) (int type, 557 const unsigned char *m, 558 unsigned int m_length, 559 unsigned char *sigret, 560 unsigned int *siglen, 561 const RSA *rsa); 562 OSSL_DEPRECATEDIN_3_0 483 563 int RSA_meth_set_sign(RSA_METHOD *rsa, 484 564 int (*sign) (int type, const unsigned char *m, … … 486 566 unsigned char *sigret, unsigned int *siglen, 487 567 const RSA *rsa)); 488 int (*RSA_meth_get_verify(const RSA_METHOD *meth)) 489 (int dtype, const unsigned char *m, 490 unsigned int m_length, const unsigned char *sigbuf, 491 unsigned int siglen, const RSA *rsa); 568 OSSL_DEPRECATEDIN_3_0 569 int (*RSA_meth_get_verify(const RSA_METHOD *meth)) (int dtype, 570 const unsigned char *m, 571 unsigned int m_length, 572 const unsigned char *sigbuf, 573 unsigned int siglen, 574 const RSA *rsa); 575 OSSL_DEPRECATEDIN_3_0 492 576 int RSA_meth_set_verify(RSA_METHOD *rsa, 493 577 int (*verify) (int dtype, const unsigned char *m, … … 495 579 const unsigned char *sigbuf, 496 580 unsigned int siglen, const RSA *rsa)); 497 int (*RSA_meth_get_keygen(const RSA_METHOD *meth)) 498 (RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb); 581 OSSL_DEPRECATEDIN_3_0 582 int (*RSA_meth_get_keygen(const RSA_METHOD *meth)) (RSA *rsa, int bits, 583 BIGNUM *e, BN_GENCB *cb); 584 OSSL_DEPRECATEDIN_3_0 499 585 int RSA_meth_set_keygen(RSA_METHOD *rsa, 500 586 int (*keygen) (RSA *rsa, int bits, BIGNUM *e, 501 587 BN_GENCB *cb)); 502 int (*RSA_meth_get_multi_prime_keygen(const RSA_METHOD *meth)) 503 (RSA *rsa, int bits, int primes, BIGNUM *e, BN_GENCB *cb); 588 OSSL_DEPRECATEDIN_3_0 589 int (*RSA_meth_get_multi_prime_keygen(const RSA_METHOD *meth)) (RSA *rsa, 590 int bits, 591 int primes, 592 BIGNUM *e, 593 BN_GENCB *cb); 594 OSSL_DEPRECATEDIN_3_0 504 595 int RSA_meth_set_multi_prime_keygen(RSA_METHOD *meth, 505 596 int (*keygen) (RSA *rsa, int bits, 506 597 int primes, BIGNUM *e, 507 598 BN_GENCB *cb)); 508 509 # ifdef __cplusplus 599 #endif /* !OPENSSL_NO_DEPRECATED_3_0 */ 600 601 # ifdef __cplusplus 510 602 } 511 # endif512 603 # endif 513 604 #endif -
trunk/src/libs/openssl-3.0.1/include/openssl/rsaerr.h
r91772 r94082 1 1 /* 2 2 * Generated by util/mkerr.pl DO NOT EDIT 3 * Copyright 1995-20 19The OpenSSL Project Authors. All Rights Reserved.3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 4 * 5 * Licensed under the OpenSSL license(the "License"). You may not use5 * Licensed under the Apache License 2.0 (the "License"). You may not use 6 6 * this file except in compliance with the License. You can obtain a copy 7 7 * in the file LICENSE in the source distribution or at … … 9 9 */ 10 10 11 #ifndef HEADER_RSAERR_H 12 # define HEADER_RSAERR_H 11 #ifndef OPENSSL_RSAERR_H 12 # define OPENSSL_RSAERR_H 13 # pragma once 13 14 14 # i fndef HEADER_SYMHACKS_H15 # 16 # endif15 # include <openssl/opensslconf.h> 16 # include <openssl/symhacks.h> 17 # include <openssl/cryptoerr_legacy.h> 17 18 18 # ifdef __cplusplus19 extern "C"20 # endif21 int ERR_load_RSA_strings(void);22 19 23 /*24 * RSA function codes.25 */26 # define RSA_F_CHECK_PADDING_MD 14027 # define RSA_F_ENCODE_PKCS1 14628 # define RSA_F_INT_RSA_VERIFY 14529 # define RSA_F_OLD_RSA_PRIV_DECODE 14730 # define RSA_F_PKEY_PSS_INIT 16531 # define RSA_F_PKEY_RSA_CTRL 14332 # define RSA_F_PKEY_RSA_CTRL_STR 14433 # define RSA_F_PKEY_RSA_SIGN 14234 # define RSA_F_PKEY_RSA_VERIFY 14935 # define RSA_F_PKEY_RSA_VERIFYRECOVER 14136 # define RSA_F_RSA_ALGOR_TO_MD 15637 # define RSA_F_RSA_BUILTIN_KEYGEN 12938 # define RSA_F_RSA_CHECK_KEY 12339 # define RSA_F_RSA_CHECK_KEY_EX 16040 # define RSA_F_RSA_CMS_DECRYPT 15941 # define RSA_F_RSA_CMS_VERIFY 15842 # define RSA_F_RSA_ITEM_VERIFY 14843 # define RSA_F_RSA_METH_DUP 16144 # define RSA_F_RSA_METH_NEW 16245 # define RSA_F_RSA_METH_SET1_NAME 16346 # define RSA_F_RSA_MGF1_TO_MD 15747 # define RSA_F_RSA_MULTIP_INFO_NEW 16648 # define RSA_F_RSA_NEW_METHOD 10649 # define RSA_F_RSA_NULL 12450 # define RSA_F_RSA_NULL_PRIVATE_DECRYPT 13251 # define RSA_F_RSA_NULL_PRIVATE_ENCRYPT 13352 # define RSA_F_RSA_NULL_PUBLIC_DECRYPT 13453 # define RSA_F_RSA_NULL_PUBLIC_ENCRYPT 13554 # define RSA_F_RSA_OSSL_PRIVATE_DECRYPT 10155 # define RSA_F_RSA_OSSL_PRIVATE_ENCRYPT 10256 # define RSA_F_RSA_OSSL_PUBLIC_DECRYPT 10357 # define RSA_F_RSA_OSSL_PUBLIC_ENCRYPT 10458 # define RSA_F_RSA_PADDING_ADD_NONE 10759 # define RSA_F_RSA_PADDING_ADD_PKCS1_OAEP 12160 # define RSA_F_RSA_PADDING_ADD_PKCS1_OAEP_MGF1 15461 # define RSA_F_RSA_PADDING_ADD_PKCS1_PSS 12562 # define RSA_F_RSA_PADDING_ADD_PKCS1_PSS_MGF1 15263 # define RSA_F_RSA_PADDING_ADD_PKCS1_TYPE_1 10864 # define RSA_F_RSA_PADDING_ADD_PKCS1_TYPE_2 10965 # define RSA_F_RSA_PADDING_ADD_SSLV23 11066 # define RSA_F_RSA_PADDING_ADD_X931 12767 # define RSA_F_RSA_PADDING_CHECK_NONE 11168 # define RSA_F_RSA_PADDING_CHECK_PKCS1_OAEP 12269 # define RSA_F_RSA_PADDING_CHECK_PKCS1_OAEP_MGF1 15370 # define RSA_F_RSA_PADDING_CHECK_PKCS1_TYPE_1 11271 # define RSA_F_RSA_PADDING_CHECK_PKCS1_TYPE_2 11372 # define RSA_F_RSA_PADDING_CHECK_SSLV23 11473 # define RSA_F_RSA_PADDING_CHECK_X931 12874 # define RSA_F_RSA_PARAM_DECODE 16475 # define RSA_F_RSA_PRINT 11576 # define RSA_F_RSA_PRINT_FP 11677 # define RSA_F_RSA_PRIV_DECODE 15078 # define RSA_F_RSA_PRIV_ENCODE 13879 # define RSA_F_RSA_PSS_GET_PARAM 15180 # define RSA_F_RSA_PSS_TO_CTX 15581 # define RSA_F_RSA_PUB_DECODE 13982 # define RSA_F_RSA_SETUP_BLINDING 13683 # define RSA_F_RSA_SIGN 11784 # define RSA_F_RSA_SIGN_ASN1_OCTET_STRING 11885 # define RSA_F_RSA_VERIFY 11986 # define RSA_F_RSA_VERIFY_ASN1_OCTET_STRING 12087 # define RSA_F_RSA_VERIFY_PKCS1_PSS_MGF1 12688 # define RSA_F_SETUP_TBUF 16789 20 90 21 /* … … 115 46 # define RSA_R_INVALID_DIGEST_LENGTH 143 116 47 # define RSA_R_INVALID_HEADER 137 48 # define RSA_R_INVALID_KEYPAIR 171 49 # define RSA_R_INVALID_KEY_LENGTH 173 117 50 # define RSA_R_INVALID_LABEL 160 51 # define RSA_R_INVALID_LENGTH 181 118 52 # define RSA_R_INVALID_MESSAGE_LENGTH 131 119 53 # define RSA_R_INVALID_MGF1_MD 156 54 # define RSA_R_INVALID_MODULUS 174 120 55 # define RSA_R_INVALID_MULTI_PRIME_KEY 167 121 56 # define RSA_R_INVALID_OAEP_PARAMETERS 161 … … 124 59 # define RSA_R_INVALID_PSS_PARAMETERS 149 125 60 # define RSA_R_INVALID_PSS_SALTLEN 146 61 # define RSA_R_INVALID_REQUEST 175 126 62 # define RSA_R_INVALID_SALT_LENGTH 150 63 # define RSA_R_INVALID_STRENGTH 176 127 64 # define RSA_R_INVALID_TRAILER 139 128 65 # define RSA_R_INVALID_X931_DIGEST 142 … … 131 68 # define RSA_R_KEY_SIZE_TOO_SMALL 120 132 69 # define RSA_R_LAST_OCTET_INVALID 134 70 # define RSA_R_MGF1_DIGEST_NOT_ALLOWED 152 133 71 # define RSA_R_MISSING_PRIVATE_KEY 179 134 # define RSA_R_MGF1_DIGEST_NOT_ALLOWED 152135 72 # define RSA_R_MODULUS_TOO_LARGE 105 136 73 # define RSA_R_MP_COEFFICIENT_NOT_INVERSE_OF_R 168 … … 144 81 # define RSA_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE 148 145 82 # define RSA_R_PADDING_CHECK_FAILED 114 83 # define RSA_R_PAIRWISE_TEST_FAILURE 177 146 84 # define RSA_R_PKCS_DECODING_ERROR 159 147 85 # define RSA_R_PSS_SALTLEN_TOO_SMALL 164 86 # define RSA_R_PUB_EXPONENT_OUT_OF_RANGE 178 148 87 # define RSA_R_P_NOT_PRIME 128 149 88 # define RSA_R_Q_NOT_PRIME 129 89 # define RSA_R_RANDOMNESS_SOURCE_STRENGTH_INSUFFICIENT 180 150 90 # define RSA_R_RSA_OPERATIONS_NOT_SUPPORTED 130 151 91 # define RSA_R_SLEN_CHECK_FAILED 136 -
trunk/src/libs/openssl-3.0.1/include/openssl/seed.h
r91772 r94082 1 1 /* 2 * Copyright 2007-20 16The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 2007-2020 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 33 33 */ 34 34 35 #ifndef HEADER_SEED_H 36 # define HEADER_SEED_H 35 #ifndef OPENSSL_SEED_H 36 # define OPENSSL_SEED_H 37 # pragma once 38 39 # include <openssl/macros.h> 40 # ifndef OPENSSL_NO_DEPRECATED_3_0 41 # define HEADER_SEED_H 42 # endif 37 43 38 44 # include <openssl/opensslconf.h> 39 45 40 46 # ifndef OPENSSL_NO_SEED 41 # include <openssl/e_os2.h> 42 # include <openssl/crypto.h> 47 # include <openssl/e_os2.h> 48 # include <openssl/crypto.h> 49 # include <sys/types.h> 43 50 44 # ifdef __cplusplus51 # ifdef __cplusplus 45 52 extern "C" { 46 # endif53 # endif 47 54 55 # define SEED_BLOCK_SIZE 16 56 # define SEED_KEY_LENGTH 16 57 58 # ifndef OPENSSL_NO_DEPRECATED_3_0 48 59 /* look whether we need 'long' to get 32 bits */ 49 # ifdef AES_LONG 50 # ifndef SEED_LONG 51 # define SEED_LONG 1 60 # ifdef AES_LONG 61 # ifndef SEED_LONG 62 # define SEED_LONG 1 63 # endif 64 # endif 65 66 67 typedef struct seed_key_st { 68 # ifdef SEED_LONG 69 unsigned long data[32]; 70 # else 71 unsigned int data[32]; 72 # endif 73 } SEED_KEY_SCHEDULE; 74 # endif /* OPENSSL_NO_DEPRECATED_3_0 */ 75 # ifndef OPENSSL_NO_DEPRECATED_3_0 76 OSSL_DEPRECATEDIN_3_0 77 void SEED_set_key(const unsigned char rawkey[SEED_KEY_LENGTH], 78 SEED_KEY_SCHEDULE *ks); 79 OSSL_DEPRECATEDIN_3_0 80 void SEED_encrypt(const unsigned char s[SEED_BLOCK_SIZE], 81 unsigned char d[SEED_BLOCK_SIZE], 82 const SEED_KEY_SCHEDULE *ks); 83 OSSL_DEPRECATEDIN_3_0 84 void SEED_decrypt(const unsigned char s[SEED_BLOCK_SIZE], 85 unsigned char d[SEED_BLOCK_SIZE], 86 const SEED_KEY_SCHEDULE *ks); 87 OSSL_DEPRECATEDIN_3_0 88 void SEED_ecb_encrypt(const unsigned char *in, 89 unsigned char *out, 90 const SEED_KEY_SCHEDULE *ks, int enc); 91 OSSL_DEPRECATEDIN_3_0 92 void SEED_cbc_encrypt(const unsigned char *in, unsigned char *out, size_t len, 93 const SEED_KEY_SCHEDULE *ks, 94 unsigned char ivec[SEED_BLOCK_SIZE], 95 int enc); 96 OSSL_DEPRECATEDIN_3_0 97 void SEED_cfb128_encrypt(const unsigned char *in, unsigned char *out, 98 size_t len, const SEED_KEY_SCHEDULE *ks, 99 unsigned char ivec[SEED_BLOCK_SIZE], 100 int *num, int enc); 101 OSSL_DEPRECATEDIN_3_0 102 void SEED_ofb128_encrypt(const unsigned char *in, unsigned char *out, 103 size_t len, const SEED_KEY_SCHEDULE *ks, 104 unsigned char ivec[SEED_BLOCK_SIZE], 105 int *num); 106 # endif 107 108 # ifdef __cplusplus 109 } 52 110 # endif 53 111 # endif 54 112 55 # include <sys/types.h>56 57 # define SEED_BLOCK_SIZE 1658 # define SEED_KEY_LENGTH 1659 60 typedef struct seed_key_st {61 # ifdef SEED_LONG62 unsigned long data[32];63 # else64 unsigned int data[32];65 # endif66 } SEED_KEY_SCHEDULE;67 68 void SEED_set_key(const unsigned char rawkey[SEED_KEY_LENGTH],69 SEED_KEY_SCHEDULE *ks);70 71 void SEED_encrypt(const unsigned char s[SEED_BLOCK_SIZE],72 unsigned char d[SEED_BLOCK_SIZE],73 const SEED_KEY_SCHEDULE *ks);74 void SEED_decrypt(const unsigned char s[SEED_BLOCK_SIZE],75 unsigned char d[SEED_BLOCK_SIZE],76 const SEED_KEY_SCHEDULE *ks);77 78 void SEED_ecb_encrypt(const unsigned char *in, unsigned char *out,79 const SEED_KEY_SCHEDULE *ks, int enc);80 void SEED_cbc_encrypt(const unsigned char *in, unsigned char *out, size_t len,81 const SEED_KEY_SCHEDULE *ks,82 unsigned char ivec[SEED_BLOCK_SIZE], int enc);83 void SEED_cfb128_encrypt(const unsigned char *in, unsigned char *out,84 size_t len, const SEED_KEY_SCHEDULE *ks,85 unsigned char ivec[SEED_BLOCK_SIZE], int *num,86 int enc);87 void SEED_ofb128_encrypt(const unsigned char *in, unsigned char *out,88 size_t len, const SEED_KEY_SCHEDULE *ks,89 unsigned char ivec[SEED_BLOCK_SIZE], int *num);90 91 # ifdef __cplusplus92 }93 # endif94 # endif95 96 113 #endif -
trunk/src/libs/openssl-3.0.1/include/openssl/sha.h
r91772 r94082 1 1 /* 2 * Copyright 1995-20 16The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_SHA_H 11 # define HEADER_SHA_H 10 #ifndef OPENSSL_SHA_H 11 # define OPENSSL_SHA_H 12 # pragma once 13 14 # include <openssl/macros.h> 15 # ifndef OPENSSL_NO_DEPRECATED_3_0 16 # define HEADER_SHA_H 17 # endif 12 18 13 19 # include <openssl/e_os2.h> 14 20 # include <stddef.h> 15 21 16 # ifdef __cplusplus22 # ifdef __cplusplus 17 23 extern "C" { 18 # endif24 # endif 19 25 26 # define SHA_DIGEST_LENGTH 20 27 28 # ifndef OPENSSL_NO_DEPRECATED_3_0 20 29 /*- 21 30 * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! … … 23 32 * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! 24 33 */ 25 # define SHA_LONG unsigned int34 # define SHA_LONG unsigned int 26 35 27 # define SHA_LBLOCK 16 28 # define SHA_CBLOCK (SHA_LBLOCK*4)/* SHA treats input data as a 29 * contiguous array of 32 bit wide 30 * big-endian values. */ 31 # define SHA_LAST_BLOCK (SHA_CBLOCK-8) 32 # define SHA_DIGEST_LENGTH 20 36 # define SHA_LBLOCK 16 37 # define SHA_CBLOCK (SHA_LBLOCK*4)/* SHA treats input data as a 38 * contiguous array of 32 bit wide 39 * big-endian values. */ 40 # define SHA_LAST_BLOCK (SHA_CBLOCK-8) 33 41 34 42 typedef struct SHAstate_st { … … 39 47 } SHA_CTX; 40 48 41 int SHA1_Init(SHA_CTX *c); 42 int SHA1_Update(SHA_CTX *c, const void *data, size_t len); 43 int SHA1_Final(unsigned char *md, SHA_CTX *c); 49 OSSL_DEPRECATEDIN_3_0 int SHA1_Init(SHA_CTX *c); 50 OSSL_DEPRECATEDIN_3_0 int SHA1_Update(SHA_CTX *c, const void *data, size_t len); 51 OSSL_DEPRECATEDIN_3_0 int SHA1_Final(unsigned char *md, SHA_CTX *c); 52 OSSL_DEPRECATEDIN_3_0 void SHA1_Transform(SHA_CTX *c, const unsigned char *data); 53 # endif 54 44 55 unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md); 45 void SHA1_Transform(SHA_CTX *c, const unsigned char *data);46 56 47 # define SHA256_CBLOCK (SHA_LBLOCK*4)/* SHA-256 treats input data as a 57 # ifndef OPENSSL_NO_DEPRECATED_3_0 58 # define SHA256_CBLOCK (SHA_LBLOCK*4)/* SHA-256 treats input data as a 48 59 * contiguous array of 32 bit wide 49 60 * big-endian values. */ … … 56 67 } SHA256_CTX; 57 68 58 int SHA224_Init(SHA256_CTX *c); 59 int SHA224_Update(SHA256_CTX *c, const void *data, size_t len); 60 int SHA224_Final(unsigned char *md, SHA256_CTX *c); 69 OSSL_DEPRECATEDIN_3_0 int SHA224_Init(SHA256_CTX *c); 70 OSSL_DEPRECATEDIN_3_0 int SHA224_Update(SHA256_CTX *c, 71 const void *data, size_t len); 72 OSSL_DEPRECATEDIN_3_0 int SHA224_Final(unsigned char *md, SHA256_CTX *c); 73 OSSL_DEPRECATEDIN_3_0 int SHA256_Init(SHA256_CTX *c); 74 OSSL_DEPRECATEDIN_3_0 int SHA256_Update(SHA256_CTX *c, 75 const void *data, size_t len); 76 OSSL_DEPRECATEDIN_3_0 int SHA256_Final(unsigned char *md, SHA256_CTX *c); 77 OSSL_DEPRECATEDIN_3_0 void SHA256_Transform(SHA256_CTX *c, 78 const unsigned char *data); 79 # endif 80 61 81 unsigned char *SHA224(const unsigned char *d, size_t n, unsigned char *md); 62 int SHA256_Init(SHA256_CTX *c);63 int SHA256_Update(SHA256_CTX *c, const void *data, size_t len);64 int SHA256_Final(unsigned char *md, SHA256_CTX *c);65 82 unsigned char *SHA256(const unsigned char *d, size_t n, unsigned char *md); 66 void SHA256_Transform(SHA256_CTX *c, const unsigned char *data);67 83 68 84 # define SHA224_DIGEST_LENGTH 28 … … 71 87 # define SHA512_DIGEST_LENGTH 64 72 88 89 # ifndef OPENSSL_NO_DEPRECATED_3_0 73 90 /* 74 91 * Unlike 32-bit digest algorithms, SHA-512 *relies* on SHA_LONG64 … … 81 98 * wide big-endian values. 82 99 */ 83 # define SHA512_CBLOCK (SHA_LBLOCK*8) 84 # if (defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW32__) 85 # define SHA_LONG64 unsigned __int64 86 # define U64(C) C##UI64 87 # elif defined(__arch64__) 88 # define SHA_LONG64 unsigned long 89 # define U64(C) C##UL 90 # else 91 # define SHA_LONG64 unsigned long long 92 # define U64(C) C##ULL 93 # endif 100 # define SHA512_CBLOCK (SHA_LBLOCK*8) 101 # if (defined(_WIN32) || defined(_WIN64)) && !defined(__MINGW32__) 102 # define SHA_LONG64 unsigned __int64 103 # elif defined(__arch64__) 104 # define SHA_LONG64 unsigned long 105 # else 106 # define SHA_LONG64 unsigned long long 107 # endif 94 108 95 109 typedef struct SHA512state_st { … … 103 117 } SHA512_CTX; 104 118 105 int SHA384_Init(SHA512_CTX *c); 106 int SHA384_Update(SHA512_CTX *c, const void *data, size_t len); 107 int SHA384_Final(unsigned char *md, SHA512_CTX *c); 119 OSSL_DEPRECATEDIN_3_0 int SHA384_Init(SHA512_CTX *c); 120 OSSL_DEPRECATEDIN_3_0 int SHA384_Update(SHA512_CTX *c, 121 const void *data, size_t len); 122 OSSL_DEPRECATEDIN_3_0 int SHA384_Final(unsigned char *md, SHA512_CTX *c); 123 OSSL_DEPRECATEDIN_3_0 int SHA512_Init(SHA512_CTX *c); 124 OSSL_DEPRECATEDIN_3_0 int SHA512_Update(SHA512_CTX *c, 125 const void *data, size_t len); 126 OSSL_DEPRECATEDIN_3_0 int SHA512_Final(unsigned char *md, SHA512_CTX *c); 127 OSSL_DEPRECATEDIN_3_0 void SHA512_Transform(SHA512_CTX *c, 128 const unsigned char *data); 129 # endif 130 108 131 unsigned char *SHA384(const unsigned char *d, size_t n, unsigned char *md); 109 int SHA512_Init(SHA512_CTX *c);110 int SHA512_Update(SHA512_CTX *c, const void *data, size_t len);111 int SHA512_Final(unsigned char *md, SHA512_CTX *c);112 132 unsigned char *SHA512(const unsigned char *d, size_t n, unsigned char *md); 113 void SHA512_Transform(SHA512_CTX *c, const unsigned char *data);114 133 115 # ifdef __cplusplus134 # ifdef __cplusplus 116 135 } 117 # endif136 # endif 118 137 119 138 #endif -
trunk/src/libs/openssl-3.0.1/include/openssl/srtp.h
r91772 r94082 2 2 * Copyright 2011-2016 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 14 14 */ 15 15 16 #ifndef HEADER_D1_SRTP_H 17 # define HEADER_D1_SRTP_H 16 #ifndef OPENSSL_SRTP_H 17 # define OPENSSL_SRTP_H 18 # pragma once 19 20 # include <openssl/macros.h> 21 # ifndef OPENSSL_NO_DEPRECATED_3_0 22 # define HEADER_D1_SRTP_H 23 # endif 18 24 19 25 # include <openssl/ssl.h> -
trunk/src/libs/openssl-3.0.1/include/openssl/ssl2.h
r91772 r94082 2 2 * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_SSL2_H 11 # define HEADER_SSL2_H 10 #ifndef OPENSSL_SSL2_H 11 # define OPENSSL_SSL2_H 12 # pragma once 13 14 # include <openssl/macros.h> 15 # ifndef OPENSSL_NO_DEPRECATED_3_0 16 # define HEADER_SSL2_H 17 # endif 12 18 13 19 #ifdef __cplusplus -
trunk/src/libs/openssl-3.0.1/include/openssl/ssl3.h
r91772 r94082 1 1 /* 2 * Copyright 1995-202 0The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 3 3 * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved 4 4 * 5 * Licensed under the OpenSSL license(the "License"). You may not use5 * Licensed under the Apache License 2.0 (the "License"). You may not use 6 6 * this file except in compliance with the License. You can obtain a copy 7 7 * in the file LICENSE in the source distribution or at … … 9 9 */ 10 10 11 #ifndef HEADER_SSL3_H 12 # define HEADER_SSL3_H 11 #ifndef OPENSSL_SSL3_H 12 # define OPENSSL_SSL3_H 13 # pragma once 14 15 # include <openssl/macros.h> 16 # ifndef OPENSSL_NO_DEPRECATED_3_0 17 # define HEADER_SSL3_H 18 # endif 13 19 14 20 # include <openssl/comp.h> … … 207 213 # define SSL3_MD_SERVER_FINISHED_CONST "\x53\x52\x56\x52" 208 214 209 # define SSL3_VERSION 0x0300 215 /* SSL3_VERSION is defined in prov_ssl.h */ 210 216 # define SSL3_VERSION_MAJOR 0x03 211 217 # define SSL3_VERSION_MINOR 0x00 … … 215 221 # define SSL3_RT_HANDSHAKE 22 216 222 # define SSL3_RT_APPLICATION_DATA 23 217 # define DTLS1_RT_HEARTBEAT 24218 223 219 224 /* Pseudo content types to indicate additional parameters */ … … 266 271 * contain all of the cert types defined for *either* SSLv3 and TLSv1. 267 272 */ 268 # define SSL3_CT_NUMBER 1 0273 # define SSL3_CT_NUMBER 12 269 274 270 275 # if defined(TLS_CT_NUMBER) -
trunk/src/libs/openssl-3.0.1/include/openssl/sslerr.h
r91772 r94082 3 3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 4 * 5 * Licensed under the OpenSSL license(the "License"). You may not use5 * Licensed under the Apache License 2.0 (the "License"). You may not use 6 6 * this file except in compliance with the License. You can obtain a copy 7 7 * in the file LICENSE in the source distribution or at … … 9 9 */ 10 10 11 #ifndef HEADER_SSLERR_H 12 # define HEADER_SSLERR_H 13 14 # ifndef HEADER_SYMHACKS_H 15 # include <openssl/symhacks.h> 16 # endif 17 18 # ifdef __cplusplus 19 extern "C" 20 # endif 21 int ERR_load_SSL_strings(void); 22 23 /* 24 * SSL function codes. 25 */ 26 # define SSL_F_ADD_CLIENT_KEY_SHARE_EXT 438 27 # define SSL_F_ADD_KEY_SHARE 512 28 # define SSL_F_BYTES_TO_CIPHER_LIST 519 29 # define SSL_F_CHECK_SUITEB_CIPHER_LIST 331 30 # define SSL_F_CIPHERSUITE_CB 622 31 # define SSL_F_CONSTRUCT_CA_NAMES 552 32 # define SSL_F_CONSTRUCT_KEY_EXCHANGE_TBS 553 33 # define SSL_F_CONSTRUCT_STATEFUL_TICKET 636 34 # define SSL_F_CONSTRUCT_STATELESS_TICKET 637 35 # define SSL_F_CREATE_SYNTHETIC_MESSAGE_HASH 539 36 # define SSL_F_CREATE_TICKET_PREQUEL 638 37 # define SSL_F_CT_MOVE_SCTS 345 38 # define SSL_F_CT_STRICT 349 39 # define SSL_F_CUSTOM_EXT_ADD 554 40 # define SSL_F_CUSTOM_EXT_PARSE 555 41 # define SSL_F_D2I_SSL_SESSION 103 42 # define SSL_F_DANE_CTX_ENABLE 347 43 # define SSL_F_DANE_MTYPE_SET 393 44 # define SSL_F_DANE_TLSA_ADD 394 45 # define SSL_F_DERIVE_SECRET_KEY_AND_IV 514 46 # define SSL_F_DO_DTLS1_WRITE 245 47 # define SSL_F_DO_SSL3_WRITE 104 48 # define SSL_F_DTLS1_BUFFER_RECORD 247 49 # define SSL_F_DTLS1_CHECK_TIMEOUT_NUM 318 50 # define SSL_F_DTLS1_HEARTBEAT 305 51 # define SSL_F_DTLS1_HM_FRAGMENT_NEW 623 52 # define SSL_F_DTLS1_PREPROCESS_FRAGMENT 288 53 # define SSL_F_DTLS1_PROCESS_BUFFERED_RECORDS 424 54 # define SSL_F_DTLS1_PROCESS_RECORD 257 55 # define SSL_F_DTLS1_READ_BYTES 258 56 # define SSL_F_DTLS1_READ_FAILED 339 57 # define SSL_F_DTLS1_RETRANSMIT_MESSAGE 390 58 # define SSL_F_DTLS1_WRITE_APP_DATA_BYTES 268 59 # define SSL_F_DTLS1_WRITE_BYTES 545 60 # define SSL_F_DTLSV1_LISTEN 350 61 # define SSL_F_DTLS_CONSTRUCT_CHANGE_CIPHER_SPEC 371 62 # define SSL_F_DTLS_CONSTRUCT_HELLO_VERIFY_REQUEST 385 63 # define SSL_F_DTLS_GET_REASSEMBLED_MESSAGE 370 64 # define SSL_F_DTLS_PROCESS_HELLO_VERIFY 386 65 # define SSL_F_DTLS_RECORD_LAYER_NEW 635 66 # define SSL_F_DTLS_WAIT_FOR_DRY 592 67 # define SSL_F_EARLY_DATA_COUNT_OK 532 68 # define SSL_F_FINAL_EARLY_DATA 556 69 # define SSL_F_FINAL_EC_PT_FORMATS 485 70 # define SSL_F_FINAL_EMS 486 71 # define SSL_F_FINAL_KEY_SHARE 503 72 # define SSL_F_FINAL_MAXFRAGMENTLEN 557 73 # define SSL_F_FINAL_PSK 639 74 # define SSL_F_FINAL_RENEGOTIATE 483 75 # define SSL_F_FINAL_SERVER_NAME 558 76 # define SSL_F_FINAL_SIG_ALGS 497 77 # define SSL_F_GET_CERT_VERIFY_TBS_DATA 588 78 # define SSL_F_NSS_KEYLOG_INT 500 79 # define SSL_F_OPENSSL_INIT_SSL 342 80 # define SSL_F_OSSL_STATEM_CLIENT13_READ_TRANSITION 436 81 # define SSL_F_OSSL_STATEM_CLIENT13_WRITE_TRANSITION 598 82 # define SSL_F_OSSL_STATEM_CLIENT_CONSTRUCT_MESSAGE 430 83 # define SSL_F_OSSL_STATEM_CLIENT_POST_PROCESS_MESSAGE 593 84 # define SSL_F_OSSL_STATEM_CLIENT_PROCESS_MESSAGE 594 85 # define SSL_F_OSSL_STATEM_CLIENT_READ_TRANSITION 417 86 # define SSL_F_OSSL_STATEM_CLIENT_WRITE_TRANSITION 599 87 # define SSL_F_OSSL_STATEM_SERVER13_READ_TRANSITION 437 88 # define SSL_F_OSSL_STATEM_SERVER13_WRITE_TRANSITION 600 89 # define SSL_F_OSSL_STATEM_SERVER_CONSTRUCT_MESSAGE 431 90 # define SSL_F_OSSL_STATEM_SERVER_POST_PROCESS_MESSAGE 601 91 # define SSL_F_OSSL_STATEM_SERVER_POST_WORK 602 92 # define SSL_F_OSSL_STATEM_SERVER_PRE_WORK 640 93 # define SSL_F_OSSL_STATEM_SERVER_PROCESS_MESSAGE 603 94 # define SSL_F_OSSL_STATEM_SERVER_READ_TRANSITION 418 95 # define SSL_F_OSSL_STATEM_SERVER_WRITE_TRANSITION 604 96 # define SSL_F_PARSE_CA_NAMES 541 97 # define SSL_F_PITEM_NEW 624 98 # define SSL_F_PQUEUE_NEW 625 99 # define SSL_F_PROCESS_KEY_SHARE_EXT 439 100 # define SSL_F_READ_STATE_MACHINE 352 101 # define SSL_F_SET_CLIENT_CIPHERSUITE 540 102 # define SSL_F_SRP_GENERATE_CLIENT_MASTER_SECRET 595 103 # define SSL_F_SRP_GENERATE_SERVER_MASTER_SECRET 589 104 # define SSL_F_SRP_VERIFY_SERVER_PARAM 596 105 # define SSL_F_SSL3_CHANGE_CIPHER_STATE 129 106 # define SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM 130 107 # define SSL_F_SSL3_CTRL 213 108 # define SSL_F_SSL3_CTX_CTRL 133 109 # define SSL_F_SSL3_DIGEST_CACHED_RECORDS 293 110 # define SSL_F_SSL3_DO_CHANGE_CIPHER_SPEC 292 111 # define SSL_F_SSL3_ENC 608 112 # define SSL_F_SSL3_FINAL_FINISH_MAC 285 113 # define SSL_F_SSL3_FINISH_MAC 587 114 # define SSL_F_SSL3_GENERATE_KEY_BLOCK 238 115 # define SSL_F_SSL3_GENERATE_MASTER_SECRET 388 116 # define SSL_F_SSL3_GET_RECORD 143 117 # define SSL_F_SSL3_INIT_FINISHED_MAC 397 118 # define SSL_F_SSL3_OUTPUT_CERT_CHAIN 147 119 # define SSL_F_SSL3_READ_BYTES 148 120 # define SSL_F_SSL3_READ_N 149 121 # define SSL_F_SSL3_SETUP_KEY_BLOCK 157 122 # define SSL_F_SSL3_SETUP_READ_BUFFER 156 123 # define SSL_F_SSL3_SETUP_WRITE_BUFFER 291 124 # define SSL_F_SSL3_WRITE_BYTES 158 125 # define SSL_F_SSL3_WRITE_PENDING 159 126 # define SSL_F_SSL_ADD_CERT_CHAIN 316 127 # define SSL_F_SSL_ADD_CERT_TO_BUF 319 128 # define SSL_F_SSL_ADD_CERT_TO_WPACKET 493 129 # define SSL_F_SSL_ADD_CLIENTHELLO_RENEGOTIATE_EXT 298 130 # define SSL_F_SSL_ADD_CLIENTHELLO_TLSEXT 277 131 # define SSL_F_SSL_ADD_CLIENTHELLO_USE_SRTP_EXT 307 132 # define SSL_F_SSL_ADD_DIR_CERT_SUBJECTS_TO_STACK 215 133 # define SSL_F_SSL_ADD_FILE_CERT_SUBJECTS_TO_STACK 216 134 # define SSL_F_SSL_ADD_SERVERHELLO_RENEGOTIATE_EXT 299 135 # define SSL_F_SSL_ADD_SERVERHELLO_TLSEXT 278 136 # define SSL_F_SSL_ADD_SERVERHELLO_USE_SRTP_EXT 308 137 # define SSL_F_SSL_BAD_METHOD 160 138 # define SSL_F_SSL_BUILD_CERT_CHAIN 332 139 # define SSL_F_SSL_BYTES_TO_CIPHER_LIST 161 140 # define SSL_F_SSL_CACHE_CIPHERLIST 520 141 # define SSL_F_SSL_CERT_ADD0_CHAIN_CERT 346 142 # define SSL_F_SSL_CERT_DUP 221 143 # define SSL_F_SSL_CERT_NEW 162 144 # define SSL_F_SSL_CERT_SET0_CHAIN 340 145 # define SSL_F_SSL_CHECK_PRIVATE_KEY 163 146 # define SSL_F_SSL_CHECK_SERVERHELLO_TLSEXT 280 147 # define SSL_F_SSL_CHECK_SRP_EXT_CLIENTHELLO 606 148 # define SSL_F_SSL_CHECK_SRVR_ECC_CERT_AND_ALG 279 149 # define SSL_F_SSL_CHOOSE_CLIENT_VERSION 607 150 # define SSL_F_SSL_CIPHER_DESCRIPTION 626 151 # define SSL_F_SSL_CIPHER_LIST_TO_BYTES 425 152 # define SSL_F_SSL_CIPHER_PROCESS_RULESTR 230 153 # define SSL_F_SSL_CIPHER_STRENGTH_SORT 231 154 # define SSL_F_SSL_CLEAR 164 155 # define SSL_F_SSL_CLIENT_HELLO_GET1_EXTENSIONS_PRESENT 627 156 # define SSL_F_SSL_COMP_ADD_COMPRESSION_METHOD 165 157 # define SSL_F_SSL_CONF_CMD 334 158 # define SSL_F_SSL_CREATE_CIPHER_LIST 166 159 # define SSL_F_SSL_CTRL 232 160 # define SSL_F_SSL_CTX_CHECK_PRIVATE_KEY 168 161 # define SSL_F_SSL_CTX_ENABLE_CT 398 162 # define SSL_F_SSL_CTX_MAKE_PROFILES 309 163 # define SSL_F_SSL_CTX_NEW 169 164 # define SSL_F_SSL_CTX_SET_ALPN_PROTOS 343 165 # define SSL_F_SSL_CTX_SET_CIPHER_LIST 269 166 # define SSL_F_SSL_CTX_SET_CLIENT_CERT_ENGINE 290 167 # define SSL_F_SSL_CTX_SET_CT_VALIDATION_CALLBACK 396 168 # define SSL_F_SSL_CTX_SET_SESSION_ID_CONTEXT 219 169 # define SSL_F_SSL_CTX_SET_SSL_VERSION 170 170 # define SSL_F_SSL_CTX_SET_TLSEXT_MAX_FRAGMENT_LENGTH 551 171 # define SSL_F_SSL_CTX_USE_CERTIFICATE 171 172 # define SSL_F_SSL_CTX_USE_CERTIFICATE_ASN1 172 173 # define SSL_F_SSL_CTX_USE_CERTIFICATE_FILE 173 174 # define SSL_F_SSL_CTX_USE_PRIVATEKEY 174 175 # define SSL_F_SSL_CTX_USE_PRIVATEKEY_ASN1 175 176 # define SSL_F_SSL_CTX_USE_PRIVATEKEY_FILE 176 177 # define SSL_F_SSL_CTX_USE_PSK_IDENTITY_HINT 272 178 # define SSL_F_SSL_CTX_USE_RSAPRIVATEKEY 177 179 # define SSL_F_SSL_CTX_USE_RSAPRIVATEKEY_ASN1 178 180 # define SSL_F_SSL_CTX_USE_RSAPRIVATEKEY_FILE 179 181 # define SSL_F_SSL_CTX_USE_SERVERINFO 336 182 # define SSL_F_SSL_CTX_USE_SERVERINFO_EX 543 183 # define SSL_F_SSL_CTX_USE_SERVERINFO_FILE 337 184 # define SSL_F_SSL_DANE_DUP 403 185 # define SSL_F_SSL_DANE_ENABLE 395 186 # define SSL_F_SSL_DERIVE 590 187 # define SSL_F_SSL_DO_CONFIG 391 188 # define SSL_F_SSL_DO_HANDSHAKE 180 189 # define SSL_F_SSL_DUP_CA_LIST 408 190 # define SSL_F_SSL_ENABLE_CT 402 191 # define SSL_F_SSL_GENERATE_PKEY_GROUP 559 192 # define SSL_F_SSL_GENERATE_SESSION_ID 547 193 # define SSL_F_SSL_GET_NEW_SESSION 181 194 # define SSL_F_SSL_GET_PREV_SESSION 217 195 # define SSL_F_SSL_GET_SERVER_CERT_INDEX 322 196 # define SSL_F_SSL_GET_SIGN_PKEY 183 197 # define SSL_F_SSL_HANDSHAKE_HASH 560 198 # define SSL_F_SSL_INIT_WBIO_BUFFER 184 199 # define SSL_F_SSL_KEY_UPDATE 515 200 # define SSL_F_SSL_LOAD_CLIENT_CA_FILE 185 201 # define SSL_F_SSL_LOG_MASTER_SECRET 498 202 # define SSL_F_SSL_LOG_RSA_CLIENT_KEY_EXCHANGE 499 203 # define SSL_F_SSL_MODULE_INIT 392 204 # define SSL_F_SSL_NEW 186 205 # define SSL_F_SSL_NEXT_PROTO_VALIDATE 565 206 # define SSL_F_SSL_PARSE_CLIENTHELLO_RENEGOTIATE_EXT 300 207 # define SSL_F_SSL_PARSE_CLIENTHELLO_TLSEXT 302 208 # define SSL_F_SSL_PARSE_CLIENTHELLO_USE_SRTP_EXT 310 209 # define SSL_F_SSL_PARSE_SERVERHELLO_RENEGOTIATE_EXT 301 210 # define SSL_F_SSL_PARSE_SERVERHELLO_TLSEXT 303 211 # define SSL_F_SSL_PARSE_SERVERHELLO_USE_SRTP_EXT 311 212 # define SSL_F_SSL_PEEK 270 213 # define SSL_F_SSL_PEEK_EX 432 214 # define SSL_F_SSL_PEEK_INTERNAL 522 215 # define SSL_F_SSL_READ 223 216 # define SSL_F_SSL_READ_EARLY_DATA 529 217 # define SSL_F_SSL_READ_EX 434 218 # define SSL_F_SSL_READ_INTERNAL 523 219 # define SSL_F_SSL_RENEGOTIATE 516 220 # define SSL_F_SSL_RENEGOTIATE_ABBREVIATED 546 221 # define SSL_F_SSL_SCAN_CLIENTHELLO_TLSEXT 320 222 # define SSL_F_SSL_SCAN_SERVERHELLO_TLSEXT 321 223 # define SSL_F_SSL_SESSION_DUP 348 224 # define SSL_F_SSL_SESSION_NEW 189 225 # define SSL_F_SSL_SESSION_PRINT_FP 190 226 # define SSL_F_SSL_SESSION_SET1_ID 423 227 # define SSL_F_SSL_SESSION_SET1_ID_CONTEXT 312 228 # define SSL_F_SSL_SET_ALPN_PROTOS 344 229 # define SSL_F_SSL_SET_CERT 191 230 # define SSL_F_SSL_SET_CERT_AND_KEY 621 231 # define SSL_F_SSL_SET_CIPHER_LIST 271 232 # define SSL_F_SSL_SET_CT_VALIDATION_CALLBACK 399 233 # define SSL_F_SSL_SET_FD 192 234 # define SSL_F_SSL_SET_PKEY 193 235 # define SSL_F_SSL_SET_RFD 194 236 # define SSL_F_SSL_SET_SESSION 195 237 # define SSL_F_SSL_SET_SESSION_ID_CONTEXT 218 238 # define SSL_F_SSL_SET_SESSION_TICKET_EXT 294 239 # define SSL_F_SSL_SET_TLSEXT_MAX_FRAGMENT_LENGTH 550 240 # define SSL_F_SSL_SET_WFD 196 241 # define SSL_F_SSL_SHUTDOWN 224 242 # define SSL_F_SSL_SRP_CTX_INIT 313 243 # define SSL_F_SSL_START_ASYNC_JOB 389 244 # define SSL_F_SSL_UNDEFINED_FUNCTION 197 245 # define SSL_F_SSL_UNDEFINED_VOID_FUNCTION 244 246 # define SSL_F_SSL_USE_CERTIFICATE 198 247 # define SSL_F_SSL_USE_CERTIFICATE_ASN1 199 248 # define SSL_F_SSL_USE_CERTIFICATE_FILE 200 249 # define SSL_F_SSL_USE_PRIVATEKEY 201 250 # define SSL_F_SSL_USE_PRIVATEKEY_ASN1 202 251 # define SSL_F_SSL_USE_PRIVATEKEY_FILE 203 252 # define SSL_F_SSL_USE_PSK_IDENTITY_HINT 273 253 # define SSL_F_SSL_USE_RSAPRIVATEKEY 204 254 # define SSL_F_SSL_USE_RSAPRIVATEKEY_ASN1 205 255 # define SSL_F_SSL_USE_RSAPRIVATEKEY_FILE 206 256 # define SSL_F_SSL_VALIDATE_CT 400 257 # define SSL_F_SSL_VERIFY_CERT_CHAIN 207 258 # define SSL_F_SSL_VERIFY_CLIENT_POST_HANDSHAKE 616 259 # define SSL_F_SSL_WRITE 208 260 # define SSL_F_SSL_WRITE_EARLY_DATA 526 261 # define SSL_F_SSL_WRITE_EARLY_FINISH 527 262 # define SSL_F_SSL_WRITE_EX 433 263 # define SSL_F_SSL_WRITE_INTERNAL 524 264 # define SSL_F_STATE_MACHINE 353 265 # define SSL_F_TLS12_CHECK_PEER_SIGALG 333 266 # define SSL_F_TLS12_COPY_SIGALGS 533 267 # define SSL_F_TLS13_CHANGE_CIPHER_STATE 440 268 # define SSL_F_TLS13_ENC 609 269 # define SSL_F_TLS13_FINAL_FINISH_MAC 605 270 # define SSL_F_TLS13_GENERATE_SECRET 591 271 # define SSL_F_TLS13_HKDF_EXPAND 561 272 # define SSL_F_TLS13_RESTORE_HANDSHAKE_DIGEST_FOR_PHA 617 273 # define SSL_F_TLS13_SAVE_HANDSHAKE_DIGEST_FOR_PHA 618 274 # define SSL_F_TLS13_SETUP_KEY_BLOCK 441 275 # define SSL_F_TLS1_CHANGE_CIPHER_STATE 209 276 # define SSL_F_TLS1_CHECK_DUPLICATE_EXTENSIONS 341 277 # define SSL_F_TLS1_ENC 401 278 # define SSL_F_TLS1_EXPORT_KEYING_MATERIAL 314 279 # define SSL_F_TLS1_GET_CURVELIST 338 280 # define SSL_F_TLS1_PRF 284 281 # define SSL_F_TLS1_SAVE_U16 628 282 # define SSL_F_TLS1_SETUP_KEY_BLOCK 211 283 # define SSL_F_TLS1_SET_GROUPS 629 284 # define SSL_F_TLS1_SET_RAW_SIGALGS 630 285 # define SSL_F_TLS1_SET_SERVER_SIGALGS 335 286 # define SSL_F_TLS1_SET_SHARED_SIGALGS 631 287 # define SSL_F_TLS1_SET_SIGALGS 632 288 # define SSL_F_TLS_CHOOSE_SIGALG 513 289 # define SSL_F_TLS_CLIENT_KEY_EXCHANGE_POST_WORK 354 290 # define SSL_F_TLS_COLLECT_EXTENSIONS 435 291 # define SSL_F_TLS_CONSTRUCT_CERTIFICATE_AUTHORITIES 542 292 # define SSL_F_TLS_CONSTRUCT_CERTIFICATE_REQUEST 372 293 # define SSL_F_TLS_CONSTRUCT_CERT_STATUS 429 294 # define SSL_F_TLS_CONSTRUCT_CERT_STATUS_BODY 494 295 # define SSL_F_TLS_CONSTRUCT_CERT_VERIFY 496 296 # define SSL_F_TLS_CONSTRUCT_CHANGE_CIPHER_SPEC 427 297 # define SSL_F_TLS_CONSTRUCT_CKE_DHE 404 298 # define SSL_F_TLS_CONSTRUCT_CKE_ECDHE 405 299 # define SSL_F_TLS_CONSTRUCT_CKE_GOST 406 300 # define SSL_F_TLS_CONSTRUCT_CKE_PSK_PREAMBLE 407 301 # define SSL_F_TLS_CONSTRUCT_CKE_RSA 409 302 # define SSL_F_TLS_CONSTRUCT_CKE_SRP 410 303 # define SSL_F_TLS_CONSTRUCT_CLIENT_CERTIFICATE 484 304 # define SSL_F_TLS_CONSTRUCT_CLIENT_HELLO 487 305 # define SSL_F_TLS_CONSTRUCT_CLIENT_KEY_EXCHANGE 488 306 # define SSL_F_TLS_CONSTRUCT_CLIENT_VERIFY 489 307 # define SSL_F_TLS_CONSTRUCT_CTOS_ALPN 466 308 # define SSL_F_TLS_CONSTRUCT_CTOS_CERTIFICATE 355 309 # define SSL_F_TLS_CONSTRUCT_CTOS_COOKIE 535 310 # define SSL_F_TLS_CONSTRUCT_CTOS_EARLY_DATA 530 311 # define SSL_F_TLS_CONSTRUCT_CTOS_EC_PT_FORMATS 467 312 # define SSL_F_TLS_CONSTRUCT_CTOS_EMS 468 313 # define SSL_F_TLS_CONSTRUCT_CTOS_ETM 469 314 # define SSL_F_TLS_CONSTRUCT_CTOS_HELLO 356 315 # define SSL_F_TLS_CONSTRUCT_CTOS_KEY_EXCHANGE 357 316 # define SSL_F_TLS_CONSTRUCT_CTOS_KEY_SHARE 470 317 # define SSL_F_TLS_CONSTRUCT_CTOS_MAXFRAGMENTLEN 549 318 # define SSL_F_TLS_CONSTRUCT_CTOS_NPN 471 319 # define SSL_F_TLS_CONSTRUCT_CTOS_PADDING 472 320 # define SSL_F_TLS_CONSTRUCT_CTOS_POST_HANDSHAKE_AUTH 619 321 # define SSL_F_TLS_CONSTRUCT_CTOS_PSK 501 322 # define SSL_F_TLS_CONSTRUCT_CTOS_PSK_KEX_MODES 509 323 # define SSL_F_TLS_CONSTRUCT_CTOS_RENEGOTIATE 473 324 # define SSL_F_TLS_CONSTRUCT_CTOS_SCT 474 325 # define SSL_F_TLS_CONSTRUCT_CTOS_SERVER_NAME 475 326 # define SSL_F_TLS_CONSTRUCT_CTOS_SESSION_TICKET 476 327 # define SSL_F_TLS_CONSTRUCT_CTOS_SIG_ALGS 477 328 # define SSL_F_TLS_CONSTRUCT_CTOS_SRP 478 329 # define SSL_F_TLS_CONSTRUCT_CTOS_STATUS_REQUEST 479 330 # define SSL_F_TLS_CONSTRUCT_CTOS_SUPPORTED_GROUPS 480 331 # define SSL_F_TLS_CONSTRUCT_CTOS_SUPPORTED_VERSIONS 481 332 # define SSL_F_TLS_CONSTRUCT_CTOS_USE_SRTP 482 333 # define SSL_F_TLS_CONSTRUCT_CTOS_VERIFY 358 334 # define SSL_F_TLS_CONSTRUCT_ENCRYPTED_EXTENSIONS 443 335 # define SSL_F_TLS_CONSTRUCT_END_OF_EARLY_DATA 536 336 # define SSL_F_TLS_CONSTRUCT_EXTENSIONS 447 337 # define SSL_F_TLS_CONSTRUCT_FINISHED 359 338 # define SSL_F_TLS_CONSTRUCT_HELLO_REQUEST 373 339 # define SSL_F_TLS_CONSTRUCT_HELLO_RETRY_REQUEST 510 340 # define SSL_F_TLS_CONSTRUCT_KEY_UPDATE 517 341 # define SSL_F_TLS_CONSTRUCT_NEW_SESSION_TICKET 428 342 # define SSL_F_TLS_CONSTRUCT_NEXT_PROTO 426 343 # define SSL_F_TLS_CONSTRUCT_SERVER_CERTIFICATE 490 344 # define SSL_F_TLS_CONSTRUCT_SERVER_HELLO 491 345 # define SSL_F_TLS_CONSTRUCT_SERVER_KEY_EXCHANGE 492 346 # define SSL_F_TLS_CONSTRUCT_STOC_ALPN 451 347 # define SSL_F_TLS_CONSTRUCT_STOC_CERTIFICATE 374 348 # define SSL_F_TLS_CONSTRUCT_STOC_COOKIE 613 349 # define SSL_F_TLS_CONSTRUCT_STOC_CRYPTOPRO_BUG 452 350 # define SSL_F_TLS_CONSTRUCT_STOC_DONE 375 351 # define SSL_F_TLS_CONSTRUCT_STOC_EARLY_DATA 531 352 # define SSL_F_TLS_CONSTRUCT_STOC_EARLY_DATA_INFO 525 353 # define SSL_F_TLS_CONSTRUCT_STOC_EC_PT_FORMATS 453 354 # define SSL_F_TLS_CONSTRUCT_STOC_EMS 454 355 # define SSL_F_TLS_CONSTRUCT_STOC_ETM 455 356 # define SSL_F_TLS_CONSTRUCT_STOC_HELLO 376 357 # define SSL_F_TLS_CONSTRUCT_STOC_KEY_EXCHANGE 377 358 # define SSL_F_TLS_CONSTRUCT_STOC_KEY_SHARE 456 359 # define SSL_F_TLS_CONSTRUCT_STOC_MAXFRAGMENTLEN 548 360 # define SSL_F_TLS_CONSTRUCT_STOC_NEXT_PROTO_NEG 457 361 # define SSL_F_TLS_CONSTRUCT_STOC_PSK 504 362 # define SSL_F_TLS_CONSTRUCT_STOC_RENEGOTIATE 458 363 # define SSL_F_TLS_CONSTRUCT_STOC_SERVER_NAME 459 364 # define SSL_F_TLS_CONSTRUCT_STOC_SESSION_TICKET 460 365 # define SSL_F_TLS_CONSTRUCT_STOC_STATUS_REQUEST 461 366 # define SSL_F_TLS_CONSTRUCT_STOC_SUPPORTED_GROUPS 544 367 # define SSL_F_TLS_CONSTRUCT_STOC_SUPPORTED_VERSIONS 611 368 # define SSL_F_TLS_CONSTRUCT_STOC_USE_SRTP 462 369 # define SSL_F_TLS_EARLY_POST_PROCESS_CLIENT_HELLO 521 370 # define SSL_F_TLS_FINISH_HANDSHAKE 597 371 # define SSL_F_TLS_GET_MESSAGE_BODY 351 372 # define SSL_F_TLS_GET_MESSAGE_HEADER 387 373 # define SSL_F_TLS_HANDLE_ALPN 562 374 # define SSL_F_TLS_HANDLE_STATUS_REQUEST 563 375 # define SSL_F_TLS_PARSE_CERTIFICATE_AUTHORITIES 566 376 # define SSL_F_TLS_PARSE_CLIENTHELLO_TLSEXT 449 377 # define SSL_F_TLS_PARSE_CTOS_ALPN 567 378 # define SSL_F_TLS_PARSE_CTOS_COOKIE 614 379 # define SSL_F_TLS_PARSE_CTOS_EARLY_DATA 568 380 # define SSL_F_TLS_PARSE_CTOS_EC_PT_FORMATS 569 381 # define SSL_F_TLS_PARSE_CTOS_EMS 570 382 # define SSL_F_TLS_PARSE_CTOS_KEY_SHARE 463 383 # define SSL_F_TLS_PARSE_CTOS_MAXFRAGMENTLEN 571 384 # define SSL_F_TLS_PARSE_CTOS_POST_HANDSHAKE_AUTH 620 385 # define SSL_F_TLS_PARSE_CTOS_PSK 505 386 # define SSL_F_TLS_PARSE_CTOS_PSK_KEX_MODES 572 387 # define SSL_F_TLS_PARSE_CTOS_RENEGOTIATE 464 388 # define SSL_F_TLS_PARSE_CTOS_SERVER_NAME 573 389 # define SSL_F_TLS_PARSE_CTOS_SESSION_TICKET 574 390 # define SSL_F_TLS_PARSE_CTOS_SIG_ALGS 575 391 # define SSL_F_TLS_PARSE_CTOS_SIG_ALGS_CERT 615 392 # define SSL_F_TLS_PARSE_CTOS_SRP 576 393 # define SSL_F_TLS_PARSE_CTOS_STATUS_REQUEST 577 394 # define SSL_F_TLS_PARSE_CTOS_SUPPORTED_GROUPS 578 395 # define SSL_F_TLS_PARSE_CTOS_USE_SRTP 465 396 # define SSL_F_TLS_PARSE_STOC_ALPN 579 397 # define SSL_F_TLS_PARSE_STOC_COOKIE 534 398 # define SSL_F_TLS_PARSE_STOC_EARLY_DATA 538 399 # define SSL_F_TLS_PARSE_STOC_EARLY_DATA_INFO 528 400 # define SSL_F_TLS_PARSE_STOC_EC_PT_FORMATS 580 401 # define SSL_F_TLS_PARSE_STOC_KEY_SHARE 445 402 # define SSL_F_TLS_PARSE_STOC_MAXFRAGMENTLEN 581 403 # define SSL_F_TLS_PARSE_STOC_NPN 582 404 # define SSL_F_TLS_PARSE_STOC_PSK 502 405 # define SSL_F_TLS_PARSE_STOC_RENEGOTIATE 448 406 # define SSL_F_TLS_PARSE_STOC_SCT 564 407 # define SSL_F_TLS_PARSE_STOC_SERVER_NAME 583 408 # define SSL_F_TLS_PARSE_STOC_SESSION_TICKET 584 409 # define SSL_F_TLS_PARSE_STOC_STATUS_REQUEST 585 410 # define SSL_F_TLS_PARSE_STOC_SUPPORTED_VERSIONS 612 411 # define SSL_F_TLS_PARSE_STOC_USE_SRTP 446 412 # define SSL_F_TLS_POST_PROCESS_CLIENT_HELLO 378 413 # define SSL_F_TLS_POST_PROCESS_CLIENT_KEY_EXCHANGE 384 414 # define SSL_F_TLS_PREPARE_CLIENT_CERTIFICATE 360 415 # define SSL_F_TLS_PROCESS_AS_HELLO_RETRY_REQUEST 610 416 # define SSL_F_TLS_PROCESS_CERTIFICATE_REQUEST 361 417 # define SSL_F_TLS_PROCESS_CERT_STATUS 362 418 # define SSL_F_TLS_PROCESS_CERT_STATUS_BODY 495 419 # define SSL_F_TLS_PROCESS_CERT_VERIFY 379 420 # define SSL_F_TLS_PROCESS_CHANGE_CIPHER_SPEC 363 421 # define SSL_F_TLS_PROCESS_CKE_DHE 411 422 # define SSL_F_TLS_PROCESS_CKE_ECDHE 412 423 # define SSL_F_TLS_PROCESS_CKE_GOST 413 424 # define SSL_F_TLS_PROCESS_CKE_PSK_PREAMBLE 414 425 # define SSL_F_TLS_PROCESS_CKE_RSA 415 426 # define SSL_F_TLS_PROCESS_CKE_SRP 416 427 # define SSL_F_TLS_PROCESS_CLIENT_CERTIFICATE 380 428 # define SSL_F_TLS_PROCESS_CLIENT_HELLO 381 429 # define SSL_F_TLS_PROCESS_CLIENT_KEY_EXCHANGE 382 430 # define SSL_F_TLS_PROCESS_ENCRYPTED_EXTENSIONS 444 431 # define SSL_F_TLS_PROCESS_END_OF_EARLY_DATA 537 432 # define SSL_F_TLS_PROCESS_FINISHED 364 433 # define SSL_F_TLS_PROCESS_HELLO_REQ 507 434 # define SSL_F_TLS_PROCESS_HELLO_RETRY_REQUEST 511 435 # define SSL_F_TLS_PROCESS_INITIAL_SERVER_FLIGHT 442 436 # define SSL_F_TLS_PROCESS_KEY_EXCHANGE 365 437 # define SSL_F_TLS_PROCESS_KEY_UPDATE 518 438 # define SSL_F_TLS_PROCESS_NEW_SESSION_TICKET 366 439 # define SSL_F_TLS_PROCESS_NEXT_PROTO 383 440 # define SSL_F_TLS_PROCESS_SERVER_CERTIFICATE 367 441 # define SSL_F_TLS_PROCESS_SERVER_DONE 368 442 # define SSL_F_TLS_PROCESS_SERVER_HELLO 369 443 # define SSL_F_TLS_PROCESS_SKE_DHE 419 444 # define SSL_F_TLS_PROCESS_SKE_ECDHE 420 445 # define SSL_F_TLS_PROCESS_SKE_PSK_PREAMBLE 421 446 # define SSL_F_TLS_PROCESS_SKE_SRP 422 447 # define SSL_F_TLS_PSK_DO_BINDER 506 448 # define SSL_F_TLS_SCAN_CLIENTHELLO_TLSEXT 450 449 # define SSL_F_TLS_SETUP_HANDSHAKE 508 450 # define SSL_F_USE_CERTIFICATE_CHAIN_FILE 220 451 # define SSL_F_WPACKET_INTERN_INIT_LEN 633 452 # define SSL_F_WPACKET_START_SUB_PACKET_LEN__ 634 453 # define SSL_F_WRITE_STATE_MACHINE 586 11 #ifndef OPENSSL_SSLERR_H 12 # define OPENSSL_SSLERR_H 13 # pragma once 14 15 # include <openssl/opensslconf.h> 16 # include <openssl/symhacks.h> 17 # include <openssl/sslerr_legacy.h> 18 19 454 20 455 21 /* … … 459 25 # define SSL_R_APP_DATA_IN_HANDSHAKE 100 460 26 # define SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT 272 461 # define SSL_R_AT_LEAST_TLS_1_0_NEEDED_IN_FIPS_MODE 143462 27 # define SSL_R_AT_LEAST_TLS_1_2_NEEDED_IN_SUITEB_MODE 158 463 28 # define SSL_R_BAD_CHANGE_CIPHER_SPEC 103 … … 501 66 # define SSL_R_CALLBACK_FAILED 234 502 67 # define SSL_R_CANNOT_CHANGE_CIPHER 109 68 # define SSL_R_CANNOT_GET_GROUP_NAME 299 503 69 # define SSL_R_CA_DN_LENGTH_MISMATCH 131 504 70 # define SSL_R_CA_KEY_TOO_SMALL 397 … … 510 76 # define SSL_R_CIPHERSUITE_DIGEST_HAS_CHANGED 218 511 77 # define SSL_R_CIPHER_CODE_WRONG_LENGTH 137 512 # define SSL_R_CIPHER_OR_HASH_UNAVAILABLE 138513 78 # define SSL_R_CLIENTHELLO_TLSEXT 226 514 79 # define SSL_R_COMPRESSED_LENGTH_TOO_LONG 140 … … 521 86 # define SSL_R_COOKIE_GEN_CALLBACK_FAILURE 400 522 87 # define SSL_R_COOKIE_MISMATCH 308 88 # define SSL_R_COPY_PARAMETERS_FAILED 296 523 89 # define SSL_R_CUSTOM_EXT_HANDLER_ALREADY_INSTALLED 206 524 90 # define SSL_R_DANE_ALREADY_ENABLED 172 … … 630 196 # define SSL_R_NO_SHARED_SIGNATURE_ALGORITHMS 376 631 197 # define SSL_R_NO_SRTP_PROFILES 359 198 # define SSL_R_NO_SUITABLE_DIGEST_ALGORITHM 297 199 # define SSL_R_NO_SUITABLE_GROUPS 295 632 200 # define SSL_R_NO_SUITABLE_KEY_SHARE 101 633 201 # define SSL_R_NO_SUITABLE_SIGNATURE_ALGORITHM 118 … … 636 204 # define SSL_R_NULL_SSL_CTX 195 637 205 # define SSL_R_NULL_SSL_METHOD_PASSED 196 638 # define SSL_R_OCSP_CALLBACK_FAILURE 294206 # define SSL_R_OCSP_CALLBACK_FAILURE 305 639 207 # define SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED 197 640 208 # define SSL_R_OLD_SESSION_COMPRESSION_ALGORITHM_NOT_RETURNED 344 … … 725 293 # define SSL_R_TLSV1_UNRECOGNIZED_NAME 1112 726 294 # define SSL_R_TLSV1_UNSUPPORTED_EXTENSION 1110 727 # define SSL_R_TLS_HEARTBEAT_PEER_DOESNT_ACCEPT 365728 # define SSL_R_TLS_HEARTBEAT_PENDING 366729 295 # define SSL_R_TLS_ILLEGAL_EXPORTER_LABEL 367 730 296 # define SSL_R_TLS_INVALID_ECPOINTFORMAT_LIST 157 … … 738 304 # define SSL_R_UNEXPECTED_CCS_MESSAGE 262 739 305 # define SSL_R_UNEXPECTED_END_OF_EARLY_DATA 178 306 # define SSL_R_UNEXPECTED_EOF_WHILE_READING 294 740 307 # define SSL_R_UNEXPECTED_MESSAGE 244 741 308 # define SSL_R_UNEXPECTED_RECORD 245 -
trunk/src/libs/openssl-3.0.1/include/openssl/stack.h
r91772 r94082 1 1 /* 2 * Copyright 1995-20 17The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_STACK_H 11 # define HEADER_STACK_H 10 #ifndef OPENSSL_STACK_H 11 # define OPENSSL_STACK_H 12 # pragma once 13 14 # include <openssl/macros.h> 15 # ifndef OPENSSL_NO_DEPRECATED_3_0 16 # define HEADER_STACK_H 17 # endif 12 18 13 19 #ifdef __cplusplus … … 40 46 int OPENSSL_sk_find(OPENSSL_STACK *st, const void *data); 41 47 int OPENSSL_sk_find_ex(OPENSSL_STACK *st, const void *data); 48 int OPENSSL_sk_find_all(OPENSSL_STACK *st, const void *data, int *pnum); 42 49 int OPENSSL_sk_push(OPENSSL_STACK *st, const void *data); 43 50 int OPENSSL_sk_unshift(OPENSSL_STACK *st, const void *data); … … 51 58 int OPENSSL_sk_is_sorted(const OPENSSL_STACK *st); 52 59 53 # if OPENSSL_API_COMPAT < 0x10100000L60 # ifndef OPENSSL_NO_DEPRECATED_1_1_0 54 61 # define _STACK OPENSSL_STACK 55 62 # define sk_num OPENSSL_sk_num -
trunk/src/libs/openssl-3.0.1/include/openssl/store.h
r91772 r94082 1 1 /* 2 * Copyright 2016-20 19The OpenSSL Project Authors. All Rights Reserved.3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use2 * Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved. 3 * 4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_OSSL_STORE_H 11 # define HEADER_OSSL_STORE_H 10 #ifndef OPENSSL_STORE_H 11 # define OPENSSL_STORE_H 12 # pragma once 13 14 # include <openssl/macros.h> 15 # ifndef OPENSSL_NO_DEPRECATED_3_0 16 # define HEADER_OSSL_STORE_H 17 # endif 12 18 13 19 # include <stdarg.h> 14 # include <openssl/ ossl_typ.h>20 # include <openssl/types.h> 15 21 # include <openssl/pem.h> 16 22 # include <openssl/storeerr.h> … … 47 53 * through. 48 54 */ 49 OSSL_STORE_CTX *OSSL_STORE_open(const char *uri, const UI_METHOD *ui_method, 50 void *ui_data, 51 OSSL_STORE_post_process_info_fn post_process, 52 void *post_process_data); 55 OSSL_STORE_CTX * 56 OSSL_STORE_open(const char *uri, const UI_METHOD *ui_method, void *ui_data, 57 OSSL_STORE_post_process_info_fn post_process, 58 void *post_process_data); 59 OSSL_STORE_CTX * 60 OSSL_STORE_open_ex(const char *uri, OSSL_LIB_CTX *libctx, const char *propq, 61 const UI_METHOD *ui_method, void *ui_data, 62 const OSSL_PARAM params[], 63 OSSL_STORE_post_process_info_fn post_process, 64 void *post_process_data); 53 65 54 66 /* … … 58 70 * Each command takes different arguments. 59 71 */ 60 int OSSL_STORE_ctrl(OSSL_STORE_CTX *ctx, int cmd, ... /* args */); 61 int OSSL_STORE_vctrl(OSSL_STORE_CTX *ctx, int cmd, va_list args); 72 # ifndef OPENSSL_NO_DEPRECATED_3_0 73 OSSL_DEPRECATEDIN_3_0 int OSSL_STORE_ctrl(OSSL_STORE_CTX *ctx, int cmd, 74 ... /* args */); 75 OSSL_DEPRECATEDIN_3_0 int OSSL_STORE_vctrl(OSSL_STORE_CTX *ctx, int cmd, 76 va_list args); 77 # endif 78 79 # ifndef OPENSSL_NO_DEPRECATED_3_0 62 80 63 81 /* … … 68 86 /* Where custom commands start */ 69 87 # define OSSL_STORE_C_CUSTOM_START 100 88 89 # endif 70 90 71 91 /* … … 97 117 int OSSL_STORE_close(OSSL_STORE_CTX *ctx); 98 118 119 /* 120 * Attach to a BIO. This works like OSSL_STORE_open() except it takes a 121 * BIO instead of a uri, along with a scheme to use when reading. 122 * The given UI method will be used any time the loader needs extra input, 123 * for example when a password or pin is needed, and will be passed the 124 * same user data every time it's needed in this context. 125 * 126 * Returns a context reference which represents the channel to communicate 127 * through. 128 * 129 * Note that this function is considered unsafe, all depending on what the 130 * BIO actually reads. 131 */ 132 OSSL_STORE_CTX *OSSL_STORE_attach(BIO *bio, const char *scheme, 133 OSSL_LIB_CTX *libctx, const char *propq, 134 const UI_METHOD *ui_method, void *ui_data, 135 const OSSL_PARAM params[], 136 OSSL_STORE_post_process_info_fn post_process, 137 void *post_process_data); 99 138 100 139 /*- … … 110 149 # define OSSL_STORE_INFO_NAME 1 /* char * */ 111 150 # define OSSL_STORE_INFO_PARAMS 2 /* EVP_PKEY * */ 112 # define OSSL_STORE_INFO_PKEY 3 /* EVP_PKEY * */ 113 # define OSSL_STORE_INFO_CERT 4 /* X509 * */ 114 # define OSSL_STORE_INFO_CRL 5 /* X509_CRL * */ 151 # define OSSL_STORE_INFO_PUBKEY 3 /* EVP_PKEY * */ 152 # define OSSL_STORE_INFO_PKEY 4 /* EVP_PKEY * */ 153 # define OSSL_STORE_INFO_CERT 5 /* X509 * */ 154 # define OSSL_STORE_INFO_CRL 6 /* X509_CRL * */ 115 155 116 156 /* … … 121 161 * and will therefore be freed when the OSSL_STORE_INFO is freed. 122 162 */ 163 OSSL_STORE_INFO *OSSL_STORE_INFO_new(int type, void *data); 123 164 OSSL_STORE_INFO *OSSL_STORE_INFO_new_NAME(char *name); 124 165 int OSSL_STORE_INFO_set0_NAME_description(OSSL_STORE_INFO *info, char *desc); 125 166 OSSL_STORE_INFO *OSSL_STORE_INFO_new_PARAMS(EVP_PKEY *params); 167 OSSL_STORE_INFO *OSSL_STORE_INFO_new_PUBKEY(EVP_PKEY *pubkey); 126 168 OSSL_STORE_INFO *OSSL_STORE_INFO_new_PKEY(EVP_PKEY *pkey); 127 169 OSSL_STORE_INFO *OSSL_STORE_INFO_new_CERT(X509 *x509); … … 132 174 */ 133 175 int OSSL_STORE_INFO_get_type(const OSSL_STORE_INFO *info); 176 void *OSSL_STORE_INFO_get0_data(int type, const OSSL_STORE_INFO *info); 134 177 const char *OSSL_STORE_INFO_get0_NAME(const OSSL_STORE_INFO *info); 135 178 char *OSSL_STORE_INFO_get1_NAME(const OSSL_STORE_INFO *info); … … 138 181 EVP_PKEY *OSSL_STORE_INFO_get0_PARAMS(const OSSL_STORE_INFO *info); 139 182 EVP_PKEY *OSSL_STORE_INFO_get1_PARAMS(const OSSL_STORE_INFO *info); 183 EVP_PKEY *OSSL_STORE_INFO_get0_PUBKEY(const OSSL_STORE_INFO *info); 184 EVP_PKEY *OSSL_STORE_INFO_get1_PUBKEY(const OSSL_STORE_INFO *info); 140 185 EVP_PKEY *OSSL_STORE_INFO_get0_PKEY(const OSSL_STORE_INFO *info); 141 186 EVP_PKEY *OSSL_STORE_INFO_get1_PKEY(const OSSL_STORE_INFO *info); … … 186 231 /* Search term accessors */ 187 232 int OSSL_STORE_SEARCH_get_type(const OSSL_STORE_SEARCH *criterion); 188 X509_NAME *OSSL_STORE_SEARCH_get0_name( OSSL_STORE_SEARCH *criterion);233 X509_NAME *OSSL_STORE_SEARCH_get0_name(const OSSL_STORE_SEARCH *criterion); 189 234 const ASN1_INTEGER *OSSL_STORE_SEARCH_get0_serial(const OSSL_STORE_SEARCH 190 235 *criterion); … … 199 244 */ 200 245 int OSSL_STORE_expect(OSSL_STORE_CTX *ctx, int expected_type); 201 int OSSL_STORE_find(OSSL_STORE_CTX *ctx, OSSL_STORE_SEARCH *search); 202 246 int OSSL_STORE_find(OSSL_STORE_CTX *ctx, const OSSL_STORE_SEARCH *search); 247 248 249 /*- 250 * Function to fetch a loader and extract data from it 251 * --------------------------------------------------- 252 */ 253 254 typedef struct ossl_store_loader_st OSSL_STORE_LOADER; 255 256 OSSL_STORE_LOADER *OSSL_STORE_LOADER_fetch(OSSL_LIB_CTX *libctx, 257 const char *scheme, 258 const char *properties); 259 int OSSL_STORE_LOADER_up_ref(OSSL_STORE_LOADER *loader); 260 void OSSL_STORE_LOADER_free(OSSL_STORE_LOADER *loader); 261 const OSSL_PROVIDER *OSSL_STORE_LOADER_get0_provider(const OSSL_STORE_LOADER * 262 loader); 263 const char *OSSL_STORE_LOADER_get0_properties(const OSSL_STORE_LOADER *loader); 264 const char *OSSL_STORE_LOADER_get0_description(const OSSL_STORE_LOADER *loader); 265 int OSSL_STORE_LOADER_is_a(const OSSL_STORE_LOADER *loader, 266 const char *scheme); 267 void OSSL_STORE_LOADER_do_all_provided(OSSL_LIB_CTX *libctx, 268 void (*fn)(OSSL_STORE_LOADER *loader, 269 void *arg), 270 void *arg); 271 int OSSL_STORE_LOADER_names_do_all(const OSSL_STORE_LOADER *loader, 272 void (*fn)(const char *name, void *data), 273 void *data); 203 274 204 275 /*- … … 210 281 */ 211 282 212 typedef struct ossl_store_loader_st OSSL_STORE_LOADER; 213 OSSL_STORE_LOADER *OSSL_STORE_LOADER_new(ENGINE *e, const char *scheme); 214 const ENGINE *OSSL_STORE_LOADER_get0_engine(const OSSL_STORE_LOADER *loader); 215 const char *OSSL_STORE_LOADER_get0_scheme(const OSSL_STORE_LOADER *loader); 283 # ifndef OPENSSL_NO_DEPRECATED_3_0 284 216 285 /* struct ossl_store_loader_ctx_st is defined differently by each loader */ 217 286 typedef struct ossl_store_loader_ctx_st OSSL_STORE_LOADER_CTX; 218 typedef OSSL_STORE_LOADER_CTX *(*OSSL_STORE_open_fn)(const OSSL_STORE_LOADER 219 *loader, 220 const char *uri, 221 const UI_METHOD *ui_method, 222 void *ui_data); 287 typedef OSSL_STORE_LOADER_CTX *(*OSSL_STORE_open_fn) 288 (const OSSL_STORE_LOADER *loader, const char *uri, 289 const UI_METHOD *ui_method, void *ui_data); 290 typedef OSSL_STORE_LOADER_CTX *(*OSSL_STORE_open_ex_fn) 291 (const OSSL_STORE_LOADER *loader, 292 const char *uri, OSSL_LIB_CTX *libctx, const char *propq, 293 const UI_METHOD *ui_method, void *ui_data); 294 295 typedef OSSL_STORE_LOADER_CTX *(*OSSL_STORE_attach_fn) 296 (const OSSL_STORE_LOADER *loader, BIO *bio, 297 OSSL_LIB_CTX *libctx, const char *propq, 298 const UI_METHOD *ui_method, void *ui_data); 299 typedef int (*OSSL_STORE_ctrl_fn) 300 (OSSL_STORE_LOADER_CTX *ctx, int cmd, va_list args); 301 typedef int (*OSSL_STORE_expect_fn) 302 (OSSL_STORE_LOADER_CTX *ctx, int expected); 303 typedef int (*OSSL_STORE_find_fn) 304 (OSSL_STORE_LOADER_CTX *ctx, const OSSL_STORE_SEARCH *criteria); 305 typedef OSSL_STORE_INFO *(*OSSL_STORE_load_fn) 306 (OSSL_STORE_LOADER_CTX *ctx, const UI_METHOD *ui_method, void *ui_data); 307 typedef int (*OSSL_STORE_eof_fn)(OSSL_STORE_LOADER_CTX *ctx); 308 typedef int (*OSSL_STORE_error_fn)(OSSL_STORE_LOADER_CTX *ctx); 309 typedef int (*OSSL_STORE_close_fn)(OSSL_STORE_LOADER_CTX *ctx); 310 311 # endif 312 # ifndef OPENSSL_NO_DEPRECATED_3_0 313 OSSL_DEPRECATEDIN_3_0 314 OSSL_STORE_LOADER *OSSL_STORE_LOADER_new(ENGINE *e, const char *scheme); 315 OSSL_DEPRECATEDIN_3_0 223 316 int OSSL_STORE_LOADER_set_open(OSSL_STORE_LOADER *loader, 224 317 OSSL_STORE_open_fn open_function); 225 typedef int (*OSSL_STORE_ctrl_fn)(OSSL_STORE_LOADER_CTX *ctx, int cmd, 226 va_list args); 318 OSSL_DEPRECATEDIN_3_0 319 int OSSL_STORE_LOADER_set_open_ex(OSSL_STORE_LOADER *loader, 320 OSSL_STORE_open_ex_fn open_ex_function); 321 OSSL_DEPRECATEDIN_3_0 322 int OSSL_STORE_LOADER_set_attach(OSSL_STORE_LOADER *loader, 323 OSSL_STORE_attach_fn attach_function); 324 OSSL_DEPRECATEDIN_3_0 227 325 int OSSL_STORE_LOADER_set_ctrl(OSSL_STORE_LOADER *loader, 228 326 OSSL_STORE_ctrl_fn ctrl_function); 229 typedef int (*OSSL_STORE_expect_fn)(OSSL_STORE_LOADER_CTX *ctx, int expected); 327 OSSL_DEPRECATEDIN_3_0 230 328 int OSSL_STORE_LOADER_set_expect(OSSL_STORE_LOADER *loader, 231 329 OSSL_STORE_expect_fn expect_function); 232 typedef int (*OSSL_STORE_find_fn)(OSSL_STORE_LOADER_CTX *ctx, 233 OSSL_STORE_SEARCH *criteria); 330 OSSL_DEPRECATEDIN_3_0 234 331 int OSSL_STORE_LOADER_set_find(OSSL_STORE_LOADER *loader, 235 332 OSSL_STORE_find_fn find_function); 236 typedef OSSL_STORE_INFO *(*OSSL_STORE_load_fn)(OSSL_STORE_LOADER_CTX *ctx, 237 const UI_METHOD *ui_method, 238 void *ui_data); 333 OSSL_DEPRECATEDIN_3_0 239 334 int OSSL_STORE_LOADER_set_load(OSSL_STORE_LOADER *loader, 240 335 OSSL_STORE_load_fn load_function); 241 typedef int (*OSSL_STORE_eof_fn)(OSSL_STORE_LOADER_CTX *ctx); 336 OSSL_DEPRECATEDIN_3_0 242 337 int OSSL_STORE_LOADER_set_eof(OSSL_STORE_LOADER *loader, 243 338 OSSL_STORE_eof_fn eof_function); 244 typedef int (*OSSL_STORE_error_fn)(OSSL_STORE_LOADER_CTX *ctx); 339 OSSL_DEPRECATEDIN_3_0 245 340 int OSSL_STORE_LOADER_set_error(OSSL_STORE_LOADER *loader, 246 341 OSSL_STORE_error_fn error_function); 247 typedef int (*OSSL_STORE_close_fn)(OSSL_STORE_LOADER_CTX *ctx); 342 OSSL_DEPRECATEDIN_3_0 248 343 int OSSL_STORE_LOADER_set_close(OSSL_STORE_LOADER *loader, 249 344 OSSL_STORE_close_fn close_function); 250 void OSSL_STORE_LOADER_free(OSSL_STORE_LOADER *loader); 251 345 OSSL_DEPRECATEDIN_3_0 346 const ENGINE *OSSL_STORE_LOADER_get0_engine(const OSSL_STORE_LOADER *loader); 347 OSSL_DEPRECATEDIN_3_0 348 const char * OSSL_STORE_LOADER_get0_scheme(const OSSL_STORE_LOADER *loader); 349 OSSL_DEPRECATEDIN_3_0 252 350 int OSSL_STORE_register_loader(OSSL_STORE_LOADER *loader); 351 OSSL_DEPRECATEDIN_3_0 253 352 OSSL_STORE_LOADER *OSSL_STORE_unregister_loader(const char *scheme); 353 # endif 254 354 255 355 /*- … … 257 357 * ------------------------------- 258 358 */ 259 int OSSL_STORE_do_all_loaders(void (*do_function) (const OSSL_STORE_LOADER 260 *loader, void *do_arg), 359 # ifndef OPENSSL_NO_DEPRECATED_3_0 360 OSSL_DEPRECATEDIN_3_0 361 int OSSL_STORE_do_all_loaders(void (*do_function)(const OSSL_STORE_LOADER *loader, 362 void *do_arg), 261 363 void *do_arg); 364 # endif 262 365 263 366 # ifdef __cplusplus -
trunk/src/libs/openssl-3.0.1/include/openssl/storeerr.h
r91772 r94082 1 1 /* 2 2 * Generated by util/mkerr.pl DO NOT EDIT 3 * Copyright 1995-20 19The OpenSSL Project Authors. All Rights Reserved.3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 4 * 5 * Licensed under the OpenSSL license(the "License"). You may not use5 * Licensed under the Apache License 2.0 (the "License"). You may not use 6 6 * this file except in compliance with the License. You can obtain a copy 7 7 * in the file LICENSE in the source distribution or at … … 9 9 */ 10 10 11 #ifndef HEADER_OSSL_STOREERR_H 12 # define HEADER_OSSL_STOREERR_H 11 #ifndef OPENSSL_STOREERR_H 12 # define OPENSSL_STOREERR_H 13 # pragma once 13 14 14 # i fndef HEADER_SYMHACKS_H15 # 16 # endif15 # include <openssl/opensslconf.h> 16 # include <openssl/symhacks.h> 17 # include <openssl/cryptoerr_legacy.h> 17 18 18 # ifdef __cplusplus19 extern "C"20 # endif21 int ERR_load_OSSL_STORE_strings(void);22 19 23 /*24 * OSSL_STORE function codes.25 */26 # define OSSL_STORE_F_FILE_CTRL 12927 # define OSSL_STORE_F_FILE_FIND 13828 # define OSSL_STORE_F_FILE_GET_PASS 11829 # define OSSL_STORE_F_FILE_LOAD 11930 # define OSSL_STORE_F_FILE_LOAD_TRY_DECODE 12431 # define OSSL_STORE_F_FILE_NAME_TO_URI 12632 # define OSSL_STORE_F_FILE_OPEN 12033 # define OSSL_STORE_F_OSSL_STORE_ATTACH_PEM_BIO 12734 # define OSSL_STORE_F_OSSL_STORE_EXPECT 13035 # define OSSL_STORE_F_OSSL_STORE_FILE_ATTACH_PEM_BIO_INT 12836 # define OSSL_STORE_F_OSSL_STORE_FIND 13137 # define OSSL_STORE_F_OSSL_STORE_GET0_LOADER_INT 10038 # define OSSL_STORE_F_OSSL_STORE_INFO_GET1_CERT 10139 # define OSSL_STORE_F_OSSL_STORE_INFO_GET1_CRL 10240 # define OSSL_STORE_F_OSSL_STORE_INFO_GET1_NAME 10341 # define OSSL_STORE_F_OSSL_STORE_INFO_GET1_NAME_DESCRIPTION 13542 # define OSSL_STORE_F_OSSL_STORE_INFO_GET1_PARAMS 10443 # define OSSL_STORE_F_OSSL_STORE_INFO_GET1_PKEY 10544 # define OSSL_STORE_F_OSSL_STORE_INFO_NEW_CERT 10645 # define OSSL_STORE_F_OSSL_STORE_INFO_NEW_CRL 10746 # define OSSL_STORE_F_OSSL_STORE_INFO_NEW_EMBEDDED 12347 # define OSSL_STORE_F_OSSL_STORE_INFO_NEW_NAME 10948 # define OSSL_STORE_F_OSSL_STORE_INFO_NEW_PARAMS 11049 # define OSSL_STORE_F_OSSL_STORE_INFO_NEW_PKEY 11150 # define OSSL_STORE_F_OSSL_STORE_INFO_SET0_NAME_DESCRIPTION 13451 # define OSSL_STORE_F_OSSL_STORE_INIT_ONCE 11252 # define OSSL_STORE_F_OSSL_STORE_LOADER_NEW 11353 # define OSSL_STORE_F_OSSL_STORE_OPEN 11454 # define OSSL_STORE_F_OSSL_STORE_OPEN_INT 11555 # define OSSL_STORE_F_OSSL_STORE_REGISTER_LOADER_INT 11756 # define OSSL_STORE_F_OSSL_STORE_SEARCH_BY_ALIAS 13257 # define OSSL_STORE_F_OSSL_STORE_SEARCH_BY_ISSUER_SERIAL 13358 # define OSSL_STORE_F_OSSL_STORE_SEARCH_BY_KEY_FINGERPRINT 13659 # define OSSL_STORE_F_OSSL_STORE_SEARCH_BY_NAME 13760 # define OSSL_STORE_F_OSSL_STORE_UNREGISTER_LOADER_INT 11661 # define OSSL_STORE_F_TRY_DECODE_PARAMS 12162 # define OSSL_STORE_F_TRY_DECODE_PKCS12 12263 # define OSSL_STORE_F_TRY_DECODE_PKCS8ENCRYPTED 12564 20 65 21 /* … … 76 32 # define OSSL_STORE_R_NOT_A_CERTIFICATE 100 77 33 # define OSSL_STORE_R_NOT_A_CRL 101 78 # define OSSL_STORE_R_NOT_A_KEY 10279 34 # define OSSL_STORE_R_NOT_A_NAME 103 35 # define OSSL_STORE_R_NOT_A_PRIVATE_KEY 102 36 # define OSSL_STORE_R_NOT_A_PUBLIC_KEY 122 80 37 # define OSSL_STORE_R_NOT_PARAMETERS 104 38 # define OSSL_STORE_R_NO_LOADERS_FOUND 123 81 39 # define OSSL_STORE_R_PASSPHRASE_CALLBACK_ERROR 114 82 40 # define OSSL_STORE_R_PATH_MUST_BE_ABSOLUTE 108 -
trunk/src/libs/openssl-3.0.1/include/openssl/symhacks.h
r91772 r94082 1 1 /* 2 * Copyright 1999-20 18The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 1999-2021 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_SYMHACKS_H 11 # define HEADER_SYMHACKS_H 10 #ifndef OPENSSL_SYMHACKS_H 11 # define OPENSSL_SYMHACKS_H 12 # pragma once 13 14 # include <openssl/macros.h> 15 # ifndef OPENSSL_NO_DEPRECATED_3_0 16 # define HEADER_SYMHACKS_H 17 # endif 12 18 13 19 # include <openssl/e_os2.h> … … 29 35 # define i2d_ECPKPARAMETERS i2d_UC_ECPKPARAMETERS 30 36 31 /* This one clashes with CMS_data_create */32 # undef cms_Data_create33 # define cms_Data_create priv_cms_Data_create34 35 37 # endif 36 38 -
trunk/src/libs/openssl-3.0.1/include/openssl/tls1.h
r91772 r94082 1 1 /* 2 * Copyright 1995-20 19The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 3 3 * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved 4 4 * Copyright 2005 Nokia. All rights reserved. 5 5 * 6 * Licensed under the OpenSSL license(the "License"). You may not use6 * Licensed under the Apache License 2.0 (the "License"). You may not use 7 7 * this file except in compliance with the License. You can obtain a copy 8 8 * in the file LICENSE in the source distribution or at … … 10 10 */ 11 11 12 #ifndef HEADER_TLS1_H 13 # define HEADER_TLS1_H 12 #ifndef OPENSSL_TLS1_H 13 # define OPENSSL_TLS1_H 14 # pragma once 15 16 # include <openssl/macros.h> 17 # ifndef OPENSSL_NO_DEPRECATED_3_0 18 # define HEADER_TLS1_H 19 # endif 14 20 15 21 # include <openssl/buffer.h> 16 22 # include <openssl/x509.h> 23 # include <openssl/prov_ssl.h> 17 24 18 25 #ifdef __cplusplus … … 25 32 # endif 26 33 27 # define TLS1_VERSION 0x0301 28 # define TLS1_1_VERSION 0x0302 29 # define TLS1_2_VERSION 0x0303 30 # define TLS1_3_VERSION 0x0304 31 # define TLS_MAX_VERSION TLS1_3_VERSION 34 /* TLS*_VERSION constants are defined in prov_ssl.h */ 35 # ifndef OPENSSL_NO_DEPRECATED_3_0 36 # define TLS_MAX_VERSION TLS1_3_VERSION 37 # endif 32 38 33 39 /* Special value for method supporting multiple versions */ … … 108 114 # define TLSEXT_TYPE_use_srtp 14 109 115 110 /* ExtensionType value from RFC5620 */111 # define TLSEXT_TYPE_heartbeat 15112 113 116 /* ExtensionType value from RFC7301 */ 114 117 # define TLSEXT_TYPE_application_layer_protocol_negotiation 16 … … 323 326 SSL_CTX_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE,0,NULL) 324 327 325 # define SSL_CTX_set_tlsext_ticket_key_cb(ssl, cb) \ 328 # ifndef OPENSSL_NO_DEPRECATED_3_0 329 # define SSL_CTX_set_tlsext_ticket_key_cb(ssl, cb) \ 326 330 SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB,\ 327 331 (void (*)(void))cb) 328 329 # ifndef OPENSSL_NO_HEARTBEATS330 # define SSL_DTLSEXT_HB_ENABLED 0x01331 # define SSL_DTLSEXT_HB_DONT_SEND_REQUESTS 0x02332 # define SSL_DTLSEXT_HB_DONT_RECV_REQUESTS 0x04333 # define SSL_get_dtlsext_heartbeat_pending(ssl) \334 SSL_ctrl(ssl,SSL_CTRL_GET_DTLS_EXT_HEARTBEAT_PENDING,0,NULL)335 # define SSL_set_dtlsext_heartbeat_no_requests(ssl, arg) \336 SSL_ctrl(ssl,SSL_CTRL_SET_DTLS_EXT_HEARTBEAT_NO_REQUESTS,arg,NULL)337 338 # if OPENSSL_API_COMPAT < 0x10100000L339 # define SSL_CTRL_TLS_EXT_SEND_HEARTBEAT \340 SSL_CTRL_DTLS_EXT_SEND_HEARTBEAT341 # define SSL_CTRL_GET_TLS_EXT_HEARTBEAT_PENDING \342 SSL_CTRL_GET_DTLS_EXT_HEARTBEAT_PENDING343 # define SSL_CTRL_SET_TLS_EXT_HEARTBEAT_NO_REQUESTS \344 SSL_CTRL_SET_DTLS_EXT_HEARTBEAT_NO_REQUESTS345 # define SSL_TLSEXT_HB_ENABLED \346 SSL_DTLSEXT_HB_ENABLED347 # define SSL_TLSEXT_HB_DONT_SEND_REQUESTS \348 SSL_DTLSEXT_HB_DONT_SEND_REQUESTS349 # define SSL_TLSEXT_HB_DONT_RECV_REQUESTS \350 SSL_DTLSEXT_HB_DONT_RECV_REQUESTS351 # define SSL_get_tlsext_heartbeat_pending(ssl) \352 SSL_get_dtlsext_heartbeat_pending(ssl)353 # define SSL_set_tlsext_heartbeat_no_requests(ssl, arg) \354 SSL_set_dtlsext_heartbeat_no_requests(ssl,arg)355 # endif356 332 # endif 333 int SSL_CTX_set_tlsext_ticket_key_evp_cb 334 (SSL_CTX *ctx, int (*fp)(SSL *, unsigned char *, unsigned char *, 335 EVP_CIPHER_CTX *, EVP_MAC_CTX *, int)); 357 336 358 337 /* PSK ciphersuites from 4279 */ … … 1136 1115 # define TLS_CT_ECDSA_FIXED_ECDH 66 1137 1116 # define TLS_CT_GOST01_SIGN 22 1138 # define TLS_CT_GOST12_SIGN 238 1139 # define TLS_CT_GOST12_512_SIGN 239 1117 # define TLS_CT_GOST12_IANA_SIGN 67 1118 # define TLS_CT_GOST12_IANA_512_SIGN 68 1119 # define TLS_CT_GOST12_LEGACY_SIGN 238 1120 # define TLS_CT_GOST12_LEGACY_512_SIGN 239 1121 1122 # ifndef OPENSSL_NO_DEPRECATED_3_0 1123 # define TLS_CT_GOST12_SIGN TLS_CT_GOST12_LEGACY_SIGN 1124 # define TLS_CT_GOST12_512_SIGN TLS_CT_GOST12_LEGACY_512_SIGN 1125 # endif 1140 1126 1141 1127 /* … … 1143 1129 * comment there) 1144 1130 */ 1145 # define TLS_CT_NUMBER 1 01131 # define TLS_CT_NUMBER 12 1146 1132 1147 1133 # if defined(SSL3_CT_NUMBER) -
trunk/src/libs/openssl-3.0.1/include/openssl/ts.h
r91772 r94082 1 1 /* 2 * Copyright 2006-20 18The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 2006-2021 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_TS_H 11 # define HEADER_TS_H 10 #ifndef OPENSSL_TS_H 11 # define OPENSSL_TS_H 12 # pragma once 13 14 # include <openssl/macros.h> 15 # ifndef OPENSSL_NO_DEPRECATED_3_0 16 # define HEADER_TS_H 17 # endif 12 18 13 19 # include <openssl/opensslconf.h> … … 24 30 # include <openssl/dh.h> 25 31 # include <openssl/tserr.h> 32 # include <openssl/ess.h> 26 33 # ifdef __cplusplus 27 34 extern "C" { … … 56 63 57 64 typedef struct TS_status_info_st TS_STATUS_INFO; 58 typedef struct ESS_issuer_serial ESS_ISSUER_SERIAL;59 typedef struct ESS_cert_id ESS_CERT_ID;60 typedef struct ESS_signing_cert ESS_SIGNING_CERT;61 62 DEFINE_STACK_OF(ESS_CERT_ID)63 64 typedef struct ESS_cert_id_v2_st ESS_CERT_ID_V2;65 typedef struct ESS_signing_cert_v2_st ESS_SIGNING_CERT_V2;66 67 DEFINE_STACK_OF(ESS_CERT_ID_V2)68 65 69 66 typedef struct TS_resp_st TS_RESP; 70 67 71 TS_REQ *TS_REQ_new(void); 72 void TS_REQ_free(TS_REQ *a); 73 int i2d_TS_REQ(const TS_REQ *a, unsigned char **pp); 74 TS_REQ *d2i_TS_REQ(TS_REQ **a, const unsigned char **pp, long length); 75 76 TS_REQ *TS_REQ_dup(TS_REQ *a); 68 DECLARE_ASN1_ALLOC_FUNCTIONS(TS_REQ) 69 DECLARE_ASN1_ENCODE_FUNCTIONS_only(TS_REQ, TS_REQ) 70 DECLARE_ASN1_DUP_FUNCTION(TS_REQ) 77 71 78 72 #ifndef OPENSSL_NO_STDIO 79 73 TS_REQ *d2i_TS_REQ_fp(FILE *fp, TS_REQ **a); 80 int i2d_TS_REQ_fp(FILE *fp, TS_REQ *a);74 int i2d_TS_REQ_fp(FILE *fp, const TS_REQ *a); 81 75 #endif 82 76 TS_REQ *d2i_TS_REQ_bio(BIO *fp, TS_REQ **a); 83 int i2d_TS_REQ_bio(BIO *fp, TS_REQ *a); 84 85 TS_MSG_IMPRINT *TS_MSG_IMPRINT_new(void); 86 void TS_MSG_IMPRINT_free(TS_MSG_IMPRINT *a); 87 int i2d_TS_MSG_IMPRINT(const TS_MSG_IMPRINT *a, unsigned char **pp); 88 TS_MSG_IMPRINT *d2i_TS_MSG_IMPRINT(TS_MSG_IMPRINT **a, 89 const unsigned char **pp, long length); 90 91 TS_MSG_IMPRINT *TS_MSG_IMPRINT_dup(TS_MSG_IMPRINT *a); 77 int i2d_TS_REQ_bio(BIO *fp, const TS_REQ *a); 78 79 DECLARE_ASN1_ALLOC_FUNCTIONS(TS_MSG_IMPRINT) 80 DECLARE_ASN1_ENCODE_FUNCTIONS_only(TS_MSG_IMPRINT, TS_MSG_IMPRINT) 81 DECLARE_ASN1_DUP_FUNCTION(TS_MSG_IMPRINT) 92 82 93 83 #ifndef OPENSSL_NO_STDIO 94 84 TS_MSG_IMPRINT *d2i_TS_MSG_IMPRINT_fp(FILE *fp, TS_MSG_IMPRINT **a); 95 int i2d_TS_MSG_IMPRINT_fp(FILE *fp, TS_MSG_IMPRINT *a);85 int i2d_TS_MSG_IMPRINT_fp(FILE *fp, const TS_MSG_IMPRINT *a); 96 86 #endif 97 87 TS_MSG_IMPRINT *d2i_TS_MSG_IMPRINT_bio(BIO *bio, TS_MSG_IMPRINT **a); 98 int i2d_TS_MSG_IMPRINT_bio(BIO *bio, TS_MSG_IMPRINT *a); 99 100 TS_RESP *TS_RESP_new(void); 101 void TS_RESP_free(TS_RESP *a); 102 int i2d_TS_RESP(const TS_RESP *a, unsigned char **pp); 103 TS_RESP *d2i_TS_RESP(TS_RESP **a, const unsigned char **pp, long length); 104 TS_TST_INFO *PKCS7_to_TS_TST_INFO(PKCS7 *token); 105 TS_RESP *TS_RESP_dup(TS_RESP *a); 88 int i2d_TS_MSG_IMPRINT_bio(BIO *bio, const TS_MSG_IMPRINT *a); 89 90 DECLARE_ASN1_ALLOC_FUNCTIONS(TS_RESP) 91 DECLARE_ASN1_ENCODE_FUNCTIONS_only(TS_RESP, TS_RESP) 92 DECLARE_ASN1_DUP_FUNCTION(TS_RESP) 106 93 107 94 #ifndef OPENSSL_NO_STDIO 108 95 TS_RESP *d2i_TS_RESP_fp(FILE *fp, TS_RESP **a); 109 int i2d_TS_RESP_fp(FILE *fp, TS_RESP *a);96 int i2d_TS_RESP_fp(FILE *fp, const TS_RESP *a); 110 97 #endif 111 98 TS_RESP *d2i_TS_RESP_bio(BIO *bio, TS_RESP **a); 112 int i2d_TS_RESP_bio(BIO *bio, TS_RESP *a); 113 114 TS_STATUS_INFO *TS_STATUS_INFO_new(void); 115 void TS_STATUS_INFO_free(TS_STATUS_INFO *a); 116 int i2d_TS_STATUS_INFO(const TS_STATUS_INFO *a, unsigned char **pp); 117 TS_STATUS_INFO *d2i_TS_STATUS_INFO(TS_STATUS_INFO **a, 118 const unsigned char **pp, long length); 119 TS_STATUS_INFO *TS_STATUS_INFO_dup(TS_STATUS_INFO *a); 120 121 TS_TST_INFO *TS_TST_INFO_new(void); 122 void TS_TST_INFO_free(TS_TST_INFO *a); 123 int i2d_TS_TST_INFO(const TS_TST_INFO *a, unsigned char **pp); 124 TS_TST_INFO *d2i_TS_TST_INFO(TS_TST_INFO **a, const unsigned char **pp, 125 long length); 126 TS_TST_INFO *TS_TST_INFO_dup(TS_TST_INFO *a); 99 int i2d_TS_RESP_bio(BIO *bio, const TS_RESP *a); 100 101 DECLARE_ASN1_ALLOC_FUNCTIONS(TS_STATUS_INFO) 102 DECLARE_ASN1_ENCODE_FUNCTIONS_only(TS_STATUS_INFO, TS_STATUS_INFO) 103 DECLARE_ASN1_DUP_FUNCTION(TS_STATUS_INFO) 104 105 DECLARE_ASN1_ALLOC_FUNCTIONS(TS_TST_INFO) 106 DECLARE_ASN1_ENCODE_FUNCTIONS_only(TS_TST_INFO, TS_TST_INFO) 107 DECLARE_ASN1_DUP_FUNCTION(TS_TST_INFO) 108 TS_TST_INFO *PKCS7_to_TS_TST_INFO(PKCS7 *token); 127 109 128 110 #ifndef OPENSSL_NO_STDIO 129 111 TS_TST_INFO *d2i_TS_TST_INFO_fp(FILE *fp, TS_TST_INFO **a); 130 int i2d_TS_TST_INFO_fp(FILE *fp, TS_TST_INFO *a);112 int i2d_TS_TST_INFO_fp(FILE *fp, const TS_TST_INFO *a); 131 113 #endif 132 114 TS_TST_INFO *d2i_TS_TST_INFO_bio(BIO *bio, TS_TST_INFO **a); 133 int i2d_TS_TST_INFO_bio(BIO *bio, TS_TST_INFO *a); 134 135 TS_ACCURACY *TS_ACCURACY_new(void); 136 void TS_ACCURACY_free(TS_ACCURACY *a); 137 int i2d_TS_ACCURACY(const TS_ACCURACY *a, unsigned char **pp); 138 TS_ACCURACY *d2i_TS_ACCURACY(TS_ACCURACY **a, const unsigned char **pp, 139 long length); 140 TS_ACCURACY *TS_ACCURACY_dup(TS_ACCURACY *a); 141 142 ESS_ISSUER_SERIAL *ESS_ISSUER_SERIAL_new(void); 143 void ESS_ISSUER_SERIAL_free(ESS_ISSUER_SERIAL *a); 144 int i2d_ESS_ISSUER_SERIAL(const ESS_ISSUER_SERIAL *a, unsigned char **pp); 145 ESS_ISSUER_SERIAL *d2i_ESS_ISSUER_SERIAL(ESS_ISSUER_SERIAL **a, 146 const unsigned char **pp, 147 long length); 148 ESS_ISSUER_SERIAL *ESS_ISSUER_SERIAL_dup(ESS_ISSUER_SERIAL *a); 149 150 ESS_CERT_ID *ESS_CERT_ID_new(void); 151 void ESS_CERT_ID_free(ESS_CERT_ID *a); 152 int i2d_ESS_CERT_ID(const ESS_CERT_ID *a, unsigned char **pp); 153 ESS_CERT_ID *d2i_ESS_CERT_ID(ESS_CERT_ID **a, const unsigned char **pp, 154 long length); 155 ESS_CERT_ID *ESS_CERT_ID_dup(ESS_CERT_ID *a); 156 157 ESS_SIGNING_CERT *ESS_SIGNING_CERT_new(void); 158 void ESS_SIGNING_CERT_free(ESS_SIGNING_CERT *a); 159 int i2d_ESS_SIGNING_CERT(const ESS_SIGNING_CERT *a, unsigned char **pp); 160 ESS_SIGNING_CERT *d2i_ESS_SIGNING_CERT(ESS_SIGNING_CERT **a, 161 const unsigned char **pp, long length); 162 ESS_SIGNING_CERT *ESS_SIGNING_CERT_dup(ESS_SIGNING_CERT *a); 163 164 ESS_CERT_ID_V2 *ESS_CERT_ID_V2_new(void); 165 void ESS_CERT_ID_V2_free(ESS_CERT_ID_V2 *a); 166 int i2d_ESS_CERT_ID_V2(const ESS_CERT_ID_V2 *a, unsigned char **pp); 167 ESS_CERT_ID_V2 *d2i_ESS_CERT_ID_V2(ESS_CERT_ID_V2 **a, 168 const unsigned char **pp, long length); 169 ESS_CERT_ID_V2 *ESS_CERT_ID_V2_dup(ESS_CERT_ID_V2 *a); 170 171 ESS_SIGNING_CERT_V2 *ESS_SIGNING_CERT_V2_new(void); 172 void ESS_SIGNING_CERT_V2_free(ESS_SIGNING_CERT_V2 *a); 173 int i2d_ESS_SIGNING_CERT_V2(const ESS_SIGNING_CERT_V2 *a, unsigned char **pp); 174 ESS_SIGNING_CERT_V2 *d2i_ESS_SIGNING_CERT_V2(ESS_SIGNING_CERT_V2 **a, 175 const unsigned char **pp, 176 long length); 177 ESS_SIGNING_CERT_V2 *ESS_SIGNING_CERT_V2_dup(ESS_SIGNING_CERT_V2 *a); 115 int i2d_TS_TST_INFO_bio(BIO *bio, const TS_TST_INFO *a); 116 117 DECLARE_ASN1_ALLOC_FUNCTIONS(TS_ACCURACY) 118 DECLARE_ASN1_ENCODE_FUNCTIONS_only(TS_ACCURACY, TS_ACCURACY) 119 DECLARE_ASN1_DUP_FUNCTION(TS_ACCURACY) 178 120 179 121 int TS_REQ_set_version(TS_REQ *a, long version); … … 323 265 typedef struct TS_resp_ctx TS_RESP_CTX; 324 266 325 DEFINE_STACK_OF_CONST(EVP_MD)326 327 267 /* Creates a response context that can be used for generating responses. */ 328 268 TS_RESP_CTX *TS_RESP_CTX_new(void); 269 TS_RESP_CTX *TS_RESP_CTX_new_ex(OSSL_LIB_CTX *libctx, const char *propq); 329 270 void TS_RESP_CTX_free(TS_RESP_CTX *ctx); 330 271 … … 480 421 unsigned char *hexstr, long len); 481 422 X509_STORE *TS_VERIFY_CTX_set_store(TS_VERIFY_CTX *ctx, X509_STORE *s); 482 STACK_OF(X509) *TS_VERIFY_CTS_set_certs(TS_VERIFY_CTX *ctx, STACK_OF(X509) *certs); 423 # ifndef OPENSSL_NO_DEPRECATED_3_0 424 # define TS_VERIFY_CTS_set_certs(ctx, cert) TS_VERIFY_CTX_set_certs(ctx,cert) 425 # endif 426 STACK_OF(X509) *TS_VERIFY_CTX_set_certs(TS_VERIFY_CTX *ctx, STACK_OF(X509) *certs); 483 427 484 428 /*- … … 544 488 int TS_CONF_set_digests(CONF *conf, const char *section, TS_RESP_CTX *ctx); 545 489 int TS_CONF_set_accuracy(CONF *conf, const char *section, TS_RESP_CTX *ctx); 546 int TS_CONF_set_clock_precision_digits( CONF *conf, const char *section,490 int TS_CONF_set_clock_precision_digits(const CONF *conf, const char *section, 547 491 TS_RESP_CTX *ctx); 548 492 int TS_CONF_set_ordering(CONF *conf, const char *section, TS_RESP_CTX *ctx); -
trunk/src/libs/openssl-3.0.1/include/openssl/tserr.h
r91772 r94082 1 1 /* 2 2 * Generated by util/mkerr.pl DO NOT EDIT 3 * Copyright 1995-20 19The OpenSSL Project Authors. All Rights Reserved.3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 4 * 5 * Licensed under the OpenSSL license(the "License"). You may not use5 * Licensed under the Apache License 2.0 (the "License"). You may not use 6 6 * this file except in compliance with the License. You can obtain a copy 7 7 * in the file LICENSE in the source distribution or at … … 9 9 */ 10 10 11 #ifndef HEADER_TSERR_H 12 # define HEADER_TSERR_H 13 14 # ifndef HEADER_SYMHACKS_H 15 # include <openssl/symhacks.h> 16 # endif 11 #ifndef OPENSSL_TSERR_H 12 # define OPENSSL_TSERR_H 13 # pragma once 17 14 18 15 # include <openssl/opensslconf.h> 16 # include <openssl/symhacks.h> 17 # include <openssl/cryptoerr_legacy.h> 18 19 19 20 20 # ifndef OPENSSL_NO_TS 21 21 22 # ifdef __cplusplus23 extern "C"24 # endif25 int ERR_load_TS_strings(void);26 27 /*28 * TS function codes.29 */30 # define TS_F_DEF_SERIAL_CB 11031 # define TS_F_DEF_TIME_CB 11132 # define TS_F_ESS_ADD_SIGNING_CERT 11233 # define TS_F_ESS_ADD_SIGNING_CERT_V2 14734 # define TS_F_ESS_CERT_ID_NEW_INIT 11335 # define TS_F_ESS_CERT_ID_V2_NEW_INIT 15636 # define TS_F_ESS_SIGNING_CERT_NEW_INIT 11437 # define TS_F_ESS_SIGNING_CERT_V2_NEW_INIT 15738 # define TS_F_INT_TS_RESP_VERIFY_TOKEN 14939 # define TS_F_PKCS7_TO_TS_TST_INFO 14840 # define TS_F_TS_ACCURACY_SET_MICROS 11541 # define TS_F_TS_ACCURACY_SET_MILLIS 11642 # define TS_F_TS_ACCURACY_SET_SECONDS 11743 # define TS_F_TS_CHECK_IMPRINTS 10044 # define TS_F_TS_CHECK_NONCES 10145 # define TS_F_TS_CHECK_POLICY 10246 # define TS_F_TS_CHECK_SIGNING_CERTS 10347 # define TS_F_TS_CHECK_STATUS_INFO 10448 # define TS_F_TS_COMPUTE_IMPRINT 14549 # define TS_F_TS_CONF_INVALID 15150 # define TS_F_TS_CONF_LOAD_CERT 15351 # define TS_F_TS_CONF_LOAD_CERTS 15452 # define TS_F_TS_CONF_LOAD_KEY 15553 # define TS_F_TS_CONF_LOOKUP_FAIL 15254 # define TS_F_TS_CONF_SET_DEFAULT_ENGINE 14655 # define TS_F_TS_GET_STATUS_TEXT 10556 # define TS_F_TS_MSG_IMPRINT_SET_ALGO 11857 # define TS_F_TS_REQ_SET_MSG_IMPRINT 11958 # define TS_F_TS_REQ_SET_NONCE 12059 # define TS_F_TS_REQ_SET_POLICY_ID 12160 # define TS_F_TS_RESP_CREATE_RESPONSE 12261 # define TS_F_TS_RESP_CREATE_TST_INFO 12362 # define TS_F_TS_RESP_CTX_ADD_FAILURE_INFO 12463 # define TS_F_TS_RESP_CTX_ADD_MD 12564 # define TS_F_TS_RESP_CTX_ADD_POLICY 12665 # define TS_F_TS_RESP_CTX_NEW 12766 # define TS_F_TS_RESP_CTX_SET_ACCURACY 12867 # define TS_F_TS_RESP_CTX_SET_CERTS 12968 # define TS_F_TS_RESP_CTX_SET_DEF_POLICY 13069 # define TS_F_TS_RESP_CTX_SET_SIGNER_CERT 13170 # define TS_F_TS_RESP_CTX_SET_STATUS_INFO 13271 # define TS_F_TS_RESP_GET_POLICY 13372 # define TS_F_TS_RESP_SET_GENTIME_WITH_PRECISION 13473 # define TS_F_TS_RESP_SET_STATUS_INFO 13574 # define TS_F_TS_RESP_SET_TST_INFO 15075 # define TS_F_TS_RESP_SIGN 13676 # define TS_F_TS_RESP_VERIFY_SIGNATURE 10677 # define TS_F_TS_TST_INFO_SET_ACCURACY 13778 # define TS_F_TS_TST_INFO_SET_MSG_IMPRINT 13879 # define TS_F_TS_TST_INFO_SET_NONCE 13980 # define TS_F_TS_TST_INFO_SET_POLICY_ID 14081 # define TS_F_TS_TST_INFO_SET_SERIAL 14182 # define TS_F_TS_TST_INFO_SET_TIME 14283 # define TS_F_TS_TST_INFO_SET_TSA 14384 # define TS_F_TS_VERIFY 10885 # define TS_F_TS_VERIFY_CERT 10986 # define TS_F_TS_VERIFY_CTX_NEW 14487 22 88 23 /* -
trunk/src/libs/openssl-3.0.1/include/openssl/txt_db.h
r91772 r94082 2 2 * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_TXT_DB_H 11 # define HEADER_TXT_DB_H 10 #ifndef OPENSSL_TXT_DB_H 11 # define OPENSSL_TXT_DB_H 12 # pragma once 13 14 # include <openssl/macros.h> 15 # ifndef OPENSSL_NO_DEPRECATED_3_0 16 # define HEADER_TXT_DB_H 17 # endif 12 18 13 19 # include <openssl/opensslconf.h> -
trunk/src/libs/openssl-3.0.1/include/openssl/uierr.h
r91772 r94082 1 1 /* 2 2 * Generated by util/mkerr.pl DO NOT EDIT 3 * Copyright 1995-20 19The OpenSSL Project Authors. All Rights Reserved.3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 4 * 5 * Licensed under the OpenSSL license(the "License"). You may not use5 * Licensed under the Apache License 2.0 (the "License"). You may not use 6 6 * this file except in compliance with the License. You can obtain a copy 7 7 * in the file LICENSE in the source distribution or at … … 9 9 */ 10 10 11 #ifndef HEADER_UIERR_H 12 # define HEADER_UIERR_H 11 #ifndef OPENSSL_UIERR_H 12 # define OPENSSL_UIERR_H 13 # pragma once 13 14 14 # i fndef HEADER_SYMHACKS_H15 # 16 # endif15 # include <openssl/opensslconf.h> 16 # include <openssl/symhacks.h> 17 # include <openssl/cryptoerr_legacy.h> 17 18 18 # ifdef __cplusplus19 extern "C"20 # endif21 int ERR_load_UI_strings(void);22 19 23 /*24 * UI function codes.25 */26 # define UI_F_CLOSE_CONSOLE 11527 # define UI_F_ECHO_CONSOLE 11628 # define UI_F_GENERAL_ALLOCATE_BOOLEAN 10829 # define UI_F_GENERAL_ALLOCATE_PROMPT 10930 # define UI_F_NOECHO_CONSOLE 11731 # define UI_F_OPEN_CONSOLE 11432 # define UI_F_UI_CONSTRUCT_PROMPT 12133 # define UI_F_UI_CREATE_METHOD 11234 # define UI_F_UI_CTRL 11135 # define UI_F_UI_DUP_ERROR_STRING 10136 # define UI_F_UI_DUP_INFO_STRING 10237 # define UI_F_UI_DUP_INPUT_BOOLEAN 11038 # define UI_F_UI_DUP_INPUT_STRING 10339 # define UI_F_UI_DUP_USER_DATA 11840 # define UI_F_UI_DUP_VERIFY_STRING 10641 # define UI_F_UI_GET0_RESULT 10742 # define UI_F_UI_GET_RESULT_LENGTH 11943 # define UI_F_UI_NEW_METHOD 10444 # define UI_F_UI_PROCESS 11345 # define UI_F_UI_SET_RESULT 10546 # define UI_F_UI_SET_RESULT_EX 12047 20 48 21 /* -
trunk/src/libs/openssl-3.0.1/include/openssl/whrlpool.h
r91772 r94082 1 1 /* 2 * Copyright 2005-20 16The OpenSSL Project Authors. All Rights Reserved.2 * Copyright 2005-2020 The OpenSSL Project Authors. All Rights Reserved. 3 3 * 4 * Licensed under the OpenSSL license(the "License"). You may not use4 * Licensed under the Apache License 2.0 (the "License"). You may not use 5 5 * this file except in compliance with the License. You can obtain a copy 6 6 * in the file LICENSE in the source distribution or at … … 8 8 */ 9 9 10 #ifndef HEADER_WHRLPOOL_H 11 # define HEADER_WHRLPOOL_H 10 #ifndef OPENSSL_WHRLPOOL_H 11 # define OPENSSL_WHRLPOOL_H 12 # pragma once 12 13 13 #include <openssl/opensslconf.h> 14 # include <openssl/macros.h> 15 # ifndef OPENSSL_NO_DEPRECATED_3_0 16 # define HEADER_WHRLPOOL_H 17 # endif 18 19 # include <openssl/opensslconf.h> 14 20 15 21 # ifndef OPENSSL_NO_WHIRLPOOL 16 # include <openssl/e_os2.h>17 # include <stddef.h>18 # ifdef __cplusplus22 # include <openssl/e_os2.h> 23 # include <stddef.h> 24 # ifdef __cplusplus 19 25 extern "C" { 20 # endif26 # endif 21 27 22 # define WHIRLPOOL_DIGEST_LENGTH (512/8) 23 # define WHIRLPOOL_BBLOCK 512 24 # define WHIRLPOOL_COUNTER (256/8) 28 # define WHIRLPOOL_DIGEST_LENGTH (512/8) 29 30 # if !defined(OPENSSL_NO_DEPRECATED_3_0) 31 32 # define WHIRLPOOL_BBLOCK 512 33 # define WHIRLPOOL_COUNTER (256/8) 25 34 26 35 typedef struct { … … 34 43 size_t bitlen[WHIRLPOOL_COUNTER / sizeof(size_t)]; 35 44 } WHIRLPOOL_CTX; 45 # endif 46 # ifndef OPENSSL_NO_DEPRECATED_3_0 47 OSSL_DEPRECATEDIN_3_0 int WHIRLPOOL_Init(WHIRLPOOL_CTX *c); 48 OSSL_DEPRECATEDIN_3_0 int WHIRLPOOL_Update(WHIRLPOOL_CTX *c, 49 const void *inp, size_t bytes); 50 OSSL_DEPRECATEDIN_3_0 void WHIRLPOOL_BitUpdate(WHIRLPOOL_CTX *c, 51 const void *inp, size_t bits); 52 OSSL_DEPRECATEDIN_3_0 int WHIRLPOOL_Final(unsigned char *md, WHIRLPOOL_CTX *c); 53 OSSL_DEPRECATEDIN_3_0 unsigned char *WHIRLPOOL(const void *inp, size_t bytes, 54 unsigned char *md); 55 # endif 36 56 37 int WHIRLPOOL_Init(WHIRLPOOL_CTX *c); 38 int WHIRLPOOL_Update(WHIRLPOOL_CTX *c, const void *inp, size_t bytes); 39 void WHIRLPOOL_BitUpdate(WHIRLPOOL_CTX *c, const void *inp, size_t bits); 40 int WHIRLPOOL_Final(unsigned char *md, WHIRLPOOL_CTX *c); 41 unsigned char *WHIRLPOOL(const void *inp, size_t bytes, unsigned char *md); 42 43 # ifdef __cplusplus 57 # ifdef __cplusplus 44 58 } 45 # endif59 # endif 46 60 # endif 47 61 -
trunk/src/libs/openssl-3.0.1/include/openssl/x509err.h
r91772 r94082 1 1 /* 2 2 * Generated by util/mkerr.pl DO NOT EDIT 3 * Copyright 1995-202 0The OpenSSL Project Authors. All Rights Reserved.3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 4 * 5 * Licensed under the OpenSSL license(the "License"). You may not use5 * Licensed under the Apache License 2.0 (the "License"). You may not use 6 6 * this file except in compliance with the License. You can obtain a copy 7 7 * in the file LICENSE in the source distribution or at … … 9 9 */ 10 10 11 #ifndef HEADER_X509ERR_H 12 # define HEADER_X509ERR_H 11 #ifndef OPENSSL_X509ERR_H 12 # define OPENSSL_X509ERR_H 13 # pragma once 13 14 15 # include <openssl/opensslconf.h> 14 16 # include <openssl/symhacks.h> 17 # include <openssl/cryptoerr_legacy.h> 15 18 16 # ifdef __cplusplus17 extern "C"18 # endif19 int ERR_load_X509_strings(void);20 19 21 /*22 * X509 function codes.23 */24 # define X509_F_ADD_CERT_DIR 10025 # define X509_F_BUILD_CHAIN 10626 # define X509_F_BY_FILE_CTRL 10127 # define X509_F_CHECK_NAME_CONSTRAINTS 14928 # define X509_F_CHECK_POLICY 14529 # define X509_F_DANE_I2D 10730 # define X509_F_DIR_CTRL 10231 # define X509_F_GET_CERT_BY_SUBJECT 10332 # define X509_F_I2D_X509_AUX 15133 # define X509_F_LOOKUP_CERTS_SK 15234 # define X509_F_NETSCAPE_SPKI_B64_DECODE 12935 # define X509_F_NETSCAPE_SPKI_B64_ENCODE 13036 # define X509_F_NEW_DIR 15337 # define X509_F_X509AT_ADD1_ATTR 13538 # define X509_F_X509V3_ADD_EXT 10439 # define X509_F_X509_ATTRIBUTE_CREATE_BY_NID 13640 # define X509_F_X509_ATTRIBUTE_CREATE_BY_OBJ 13741 # define X509_F_X509_ATTRIBUTE_CREATE_BY_TXT 14042 # define X509_F_X509_ATTRIBUTE_GET0_DATA 13943 # define X509_F_X509_ATTRIBUTE_SET1_DATA 13844 # define X509_F_X509_CHECK_PRIVATE_KEY 12845 # define X509_F_X509_CRL_DIFF 10546 # define X509_F_X509_CRL_METHOD_NEW 15447 # define X509_F_X509_CRL_PRINT_FP 14748 # define X509_F_X509_EXTENSION_CREATE_BY_NID 10849 # define X509_F_X509_EXTENSION_CREATE_BY_OBJ 10950 # define X509_F_X509_GET_PUBKEY_PARAMETERS 11051 # define X509_F_X509_LOAD_CERT_CRL_FILE 13252 # define X509_F_X509_LOAD_CERT_FILE 11153 # define X509_F_X509_LOAD_CRL_FILE 11254 # define X509_F_X509_LOOKUP_METH_NEW 16055 # define X509_F_X509_LOOKUP_NEW 15556 # define X509_F_X509_NAME_ADD_ENTRY 11357 # define X509_F_X509_NAME_CANON 15658 # define X509_F_X509_NAME_ENTRY_CREATE_BY_NID 11459 # define X509_F_X509_NAME_ENTRY_CREATE_BY_TXT 13160 # define X509_F_X509_NAME_ENTRY_SET_OBJECT 11561 # define X509_F_X509_NAME_ONELINE 11662 # define X509_F_X509_NAME_PRINT 11763 # define X509_F_X509_OBJECT_NEW 15064 # define X509_F_X509_PRINT_EX_FP 11865 # define X509_F_X509_PUBKEY_DECODE 14866 # define X509_F_X509_PUBKEY_GET 16167 # define X509_F_X509_PUBKEY_GET0 11968 # define X509_F_X509_PUBKEY_SET 12069 # define X509_F_X509_REQ_CHECK_PRIVATE_KEY 14470 # define X509_F_X509_REQ_PRINT_EX 12171 # define X509_F_X509_REQ_PRINT_FP 12272 # define X509_F_X509_REQ_TO_X509 12373 # define X509_F_X509_STORE_ADD_CERT 12474 # define X509_F_X509_STORE_ADD_CRL 12575 # define X509_F_X509_STORE_ADD_LOOKUP 15776 # define X509_F_X509_STORE_CTX_GET1_ISSUER 14677 # define X509_F_X509_STORE_CTX_INIT 14378 # define X509_F_X509_STORE_CTX_NEW 14279 # define X509_F_X509_STORE_CTX_PURPOSE_INHERIT 13480 # define X509_F_X509_STORE_NEW 15881 # define X509_F_X509_TO_X509_REQ 12682 # define X509_F_X509_TRUST_ADD 13383 # define X509_F_X509_TRUST_SET 14184 # define X509_F_X509_VERIFY_CERT 12785 # define X509_F_X509_VERIFY_PARAM_NEW 15986 20 87 21 /* … … 93 27 # define X509_R_BASE64_DECODE_ERROR 118 94 28 # define X509_R_CANT_CHECK_DH_KEY 114 29 # define X509_R_CERTIFICATE_VERIFICATION_FAILED 139 95 30 # define X509_R_CERT_ALREADY_IN_HASH_TABLE 101 96 31 # define X509_R_CRL_ALREADY_DELTA 127 97 32 # define X509_R_CRL_VERIFY_FAILURE 131 33 # define X509_R_ERROR_GETTING_MD_BY_NID 141 34 # define X509_R_ERROR_USING_SIGINF_SET 142 98 35 # define X509_R_IDP_MISMATCH 128 99 36 # define X509_R_INVALID_ATTRIBUTES 138 100 37 # define X509_R_INVALID_DIRECTORY 113 38 # define X509_R_INVALID_DISTPOINT 143 101 39 # define X509_R_INVALID_FIELD_NAME 119 102 40 # define X509_R_INVALID_TRUST 123 … … 122 60 # define X509_R_UNKNOWN_NID 109 123 61 # define X509_R_UNKNOWN_PURPOSE_ID 121 62 # define X509_R_UNKNOWN_SIGID_ALGS 144 124 63 # define X509_R_UNKNOWN_TRUST_ID 120 125 64 # define X509_R_UNSUPPORTED_ALGORITHM 111 -
trunk/src/libs/openssl-3.0.1/include/openssl/x509v3err.h
r91772 r94082 3 3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. 4 4 * 5 * Licensed under the OpenSSL license(the "License"). You may not use5 * Licensed under the Apache License 2.0 (the "License"). You may not use 6 6 * this file except in compliance with the License. You can obtain a copy 7 7 * in the file LICENSE in the source distribution or at … … 9 9 */ 10 10 11 #ifndef HEADER_X509V3ERR_H 12 # define HEADER_X509V3ERR_H 11 #ifndef OPENSSL_X509V3ERR_H 12 # define OPENSSL_X509V3ERR_H 13 # pragma once 13 14 14 # i fndef HEADER_SYMHACKS_H15 # 16 # endif15 # include <openssl/opensslconf.h> 16 # include <openssl/symhacks.h> 17 # include <openssl/cryptoerr_legacy.h> 17 18 18 # ifdef __cplusplus19 extern "C"20 # endif21 int ERR_load_X509V3_strings(void);22 19 23 /*24 * X509V3 function codes.25 */26 # define X509V3_F_A2I_GENERAL_NAME 16427 # define X509V3_F_ADDR_VALIDATE_PATH_INTERNAL 16628 # define X509V3_F_ASIDENTIFIERCHOICE_CANONIZE 16129 # define X509V3_F_ASIDENTIFIERCHOICE_IS_CANONICAL 16230 # define X509V3_F_BIGNUM_TO_STRING 16731 # define X509V3_F_COPY_EMAIL 12232 # define X509V3_F_COPY_ISSUER 12333 # define X509V3_F_DO_DIRNAME 14434 # define X509V3_F_DO_EXT_I2D 13535 # define X509V3_F_DO_EXT_NCONF 15136 # define X509V3_F_GNAMES_FROM_SECTNAME 15637 # define X509V3_F_I2S_ASN1_ENUMERATED 12138 # define X509V3_F_I2S_ASN1_IA5STRING 14939 # define X509V3_F_I2S_ASN1_INTEGER 12040 # define X509V3_F_I2V_AUTHORITY_INFO_ACCESS 13841 # define X509V3_F_I2V_AUTHORITY_KEYID 17342 # define X509V3_F_LEVEL_ADD_NODE 16843 # define X509V3_F_NOTICE_SECTION 13244 # define X509V3_F_NREF_NOS 13345 # define X509V3_F_POLICY_CACHE_CREATE 16946 # define X509V3_F_POLICY_CACHE_NEW 17047 # define X509V3_F_POLICY_DATA_NEW 17148 # define X509V3_F_POLICY_SECTION 13149 # define X509V3_F_PROCESS_PCI_VALUE 15050 # define X509V3_F_R2I_CERTPOL 13051 # define X509V3_F_R2I_PCI 15552 # define X509V3_F_S2I_ASN1_IA5STRING 10053 # define X509V3_F_S2I_ASN1_INTEGER 10854 # define X509V3_F_S2I_ASN1_OCTET_STRING 11255 # define X509V3_F_S2I_SKEY_ID 11556 # define X509V3_F_SET_DIST_POINT_NAME 15857 # define X509V3_F_SXNET_ADD_ID_ASC 12558 # define X509V3_F_SXNET_ADD_ID_INTEGER 12659 # define X509V3_F_SXNET_ADD_ID_ULONG 12760 # define X509V3_F_SXNET_GET_ID_ASC 12861 # define X509V3_F_SXNET_GET_ID_ULONG 12962 # define X509V3_F_TREE_INIT 17263 # define X509V3_F_V2I_ASIDENTIFIERS 16364 # define X509V3_F_V2I_ASN1_BIT_STRING 10165 # define X509V3_F_V2I_AUTHORITY_INFO_ACCESS 13966 # define X509V3_F_V2I_AUTHORITY_KEYID 11967 # define X509V3_F_V2I_BASIC_CONSTRAINTS 10268 # define X509V3_F_V2I_CRLD 13469 # define X509V3_F_V2I_EXTENDED_KEY_USAGE 10370 # define X509V3_F_V2I_GENERAL_NAMES 11871 # define X509V3_F_V2I_GENERAL_NAME_EX 11772 # define X509V3_F_V2I_IDP 15773 # define X509V3_F_V2I_IPADDRBLOCKS 15974 # define X509V3_F_V2I_ISSUER_ALT 15375 # define X509V3_F_V2I_NAME_CONSTRAINTS 14776 # define X509V3_F_V2I_POLICY_CONSTRAINTS 14677 # define X509V3_F_V2I_POLICY_MAPPINGS 14578 # define X509V3_F_V2I_SUBJECT_ALT 15479 # define X509V3_F_V2I_TLS_FEATURE 16580 # define X509V3_F_V3_GENERIC_EXTENSION 11681 # define X509V3_F_X509V3_ADD1_I2D 14082 # define X509V3_F_X509V3_ADD_LEN_VALUE 17483 # define X509V3_F_X509V3_ADD_VALUE 10584 # define X509V3_F_X509V3_EXT_ADD 10485 # define X509V3_F_X509V3_EXT_ADD_ALIAS 10686 # define X509V3_F_X509V3_EXT_I2D 13687 # define X509V3_F_X509V3_EXT_NCONF 15288 # define X509V3_F_X509V3_GET_SECTION 14289 # define X509V3_F_X509V3_GET_STRING 14390 # define X509V3_F_X509V3_GET_VALUE_BOOL 11091 # define X509V3_F_X509V3_PARSE_LIST 10992 # define X509V3_F_X509_PURPOSE_ADD 13793 # define X509V3_F_X509_PURPOSE_SET 14194 20 95 21 /* … … 103 29 # define X509V3_R_DISTPOINT_ALREADY_SET 160 104 30 # define X509V3_R_DUPLICATE_ZONE_ID 133 31 # define X509V3_R_EMPTY_KEY_USAGE 169 105 32 # define X509V3_R_ERROR_CONVERTING_ZONE 131 106 33 # define X509V3_R_ERROR_CREATING_EXTENSION 144 … … 117 44 # define X509V3_R_INVALID_ASRANGE 163 118 45 # define X509V3_R_INVALID_BOOLEAN_STRING 104 46 # define X509V3_R_INVALID_CERTIFICATE 158 47 # define X509V3_R_INVALID_EMPTY_NAME 108 119 48 # define X509V3_R_INVALID_EXTENSION_STRING 105 120 49 # define X509V3_R_INVALID_INHERITANCE 165 … … 123 52 # define X509V3_R_INVALID_NAME 106 124 53 # define X509V3_R_INVALID_NULL_ARGUMENT 107 125 # define X509V3_R_INVALID_NULL_NAME 108126 54 # define X509V3_R_INVALID_NULL_VALUE 109 127 55 # define X509V3_R_INVALID_NUMBER 140 … … 138 66 # define X509V3_R_MISSING_VALUE 124 139 67 # define X509V3_R_NEED_ORGANIZATION_AND_NUMBERS 142 68 # define X509V3_R_NEGATIVE_PATHLEN 168 140 69 # define X509V3_R_NO_CONFIG_DATABASE 136 141 70 # define X509V3_R_NO_ISSUER_CERTIFICATE 121
Note:
See TracChangeset
for help on using the changeset viewer.