VirtualBox

Ignore:
Timestamp:
Mar 3, 2022 7:17:34 PM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
150325
Message:

libs/openssl-3.0.1: started applying and adjusting our OpenSSL changes to 3.0.1. bugref:10128

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  
        1212/vendor/openssl/1.1.1c:131722-131725
        1313/vendor/openssl/1.1.1k:145841-145843
         14/vendor/openssl/3.0.1:150323-150324
         15/vendor/openssl/current:147554-150322
  • trunk/src/libs/openssl-3.0.1/include/openssl/__DECC_INCLUDE_EPILOGUE.H

    r91772 r94082  
    22 * Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * 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  
    22 * Copyright 2016-2020 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
  • trunk/src/libs/openssl-3.0.1/include/openssl/aes.h

    r91772 r94082  
    11/*
    2  * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 2002-2020 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    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
    1218
    1319# include <openssl/opensslconf.h>
     
    1824# endif
    1925
    20 # define AES_ENCRYPT     1
    21 # define AES_DECRYPT     0
     26# define AES_BLOCK_SIZE 16
    2227
    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
    2935
    3036/* This should be a hidden type, but EVP requires that the size be known */
    3137struct aes_key_st {
    32 # ifdef AES_LONG
     38#  ifdef AES_LONG
    3339    unsigned long rd_key[4 * (AES_MAXNR + 1)];
    34 # else
     40#  else
    3541    unsigned int rd_key[4 * (AES_MAXNR + 1)];
    36 # endif
     42#  endif
    3743    int rounds;
    3844};
    3945typedef struct aes_key_st AES_KEY;
    4046
    41 const char *AES_options(void);
    42 
     47# endif
     48# ifndef OPENSSL_NO_DEPRECATED_3_0
     49OSSL_DEPRECATEDIN_3_0 const char *AES_options(void);
     50OSSL_DEPRECATEDIN_3_0
    4351int AES_set_encrypt_key(const unsigned char *userKey, const int bits,
    4452                        AES_KEY *key);
     53OSSL_DEPRECATEDIN_3_0
    4554int AES_set_decrypt_key(const unsigned char *userKey, const int bits,
    4655                        AES_KEY *key);
    47 
     56OSSL_DEPRECATEDIN_3_0
    4857void AES_encrypt(const unsigned char *in, unsigned char *out,
    4958                 const AES_KEY *key);
     59OSSL_DEPRECATEDIN_3_0
    5060void AES_decrypt(const unsigned char *in, unsigned char *out,
    5161                 const AES_KEY *key);
    52 
     62OSSL_DEPRECATEDIN_3_0
    5363void AES_ecb_encrypt(const unsigned char *in, unsigned char *out,
    5464                     const AES_KEY *key, const int enc);
     65OSSL_DEPRECATEDIN_3_0
    5566void AES_cbc_encrypt(const unsigned char *in, unsigned char *out,
    5667                     size_t length, const AES_KEY *key,
    5768                     unsigned char *ivec, const int enc);
     69OSSL_DEPRECATEDIN_3_0
    5870void AES_cfb128_encrypt(const unsigned char *in, unsigned char *out,
    5971                        size_t length, const AES_KEY *key,
    6072                        unsigned char *ivec, int *num, const int enc);
     73OSSL_DEPRECATEDIN_3_0
    6174void AES_cfb1_encrypt(const unsigned char *in, unsigned char *out,
    6275                      size_t length, const AES_KEY *key,
    6376                      unsigned char *ivec, int *num, const int enc);
     77OSSL_DEPRECATEDIN_3_0
    6478void AES_cfb8_encrypt(const unsigned char *in, unsigned char *out,
    6579                      size_t length, const AES_KEY *key,
    6680                      unsigned char *ivec, int *num, const int enc);
     81OSSL_DEPRECATEDIN_3_0
    6782void AES_ofb128_encrypt(const unsigned char *in, unsigned char *out,
    6883                        size_t length, const AES_KEY *key,
    6984                        unsigned char *ivec, int *num);
     85
    7086/* NB: the IV is _two_ blocks long */
     87OSSL_DEPRECATEDIN_3_0
    7188void AES_ige_encrypt(const unsigned char *in, unsigned char *out,
    7289                     size_t length, const AES_KEY *key,
    7390                     unsigned char *ivec, const int enc);
    7491/* NB: the IV is _four_ blocks long */
     92OSSL_DEPRECATEDIN_3_0
    7593void 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);
     96OSSL_DEPRECATEDIN_3_0
    8097int 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);
     100OSSL_DEPRECATEDIN_3_0
    83101int 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
    86105
    87106
  • trunk/src/libs/openssl-3.0.1/include/openssl/asn1_mac.h

    r91772 r94082  
    22 * Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
  • trunk/src/libs/openssl-3.0.1/include/openssl/asn1err.h

    r91772 r94082  
    11/*
    22 * Generated by util/mkerr.pl DO NOT EDIT
    3  * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
     3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    44 *
    5  * Licensed under the OpenSSL license (the "License").  You may not use
     5 * Licensed under the Apache License 2.0 (the "License").  You may not use
    66 * this file except in compliance with the License.  You can obtain a copy
    77 * in the file LICENSE in the source distribution or at
     
    99 */
    1010
    11 #ifndef HEADER_ASN1ERR_H
    12 # define HEADER_ASN1ERR_H
     11#ifndef OPENSSL_ASN1ERR_H
     12# define OPENSSL_ASN1ERR_H
     13# pragma once
    1314
     15# include <openssl/opensslconf.h>
    1416# include <openssl/symhacks.h>
     17# include <openssl/cryptoerr_legacy.h>
    1518
    16 # ifdef  __cplusplus
    17 extern "C"
    18 # endif
    19 int ERR_load_ASN1_strings(void);
    2019
    21 /*
    22  * ASN1 function codes.
    23  */
    24 # define ASN1_F_A2D_ASN1_OBJECT                           100
    25 # define ASN1_F_A2I_ASN1_INTEGER                          102
    26 # define ASN1_F_A2I_ASN1_STRING                           103
    27 # define ASN1_F_APPEND_EXP                                176
    28 # define ASN1_F_ASN1_BIO_INIT                             113
    29 # define ASN1_F_ASN1_BIT_STRING_SET_BIT                   183
    30 # define ASN1_F_ASN1_CB                                   177
    31 # define ASN1_F_ASN1_CHECK_TLEN                           104
    32 # define ASN1_F_ASN1_COLLECT                              106
    33 # define ASN1_F_ASN1_D2I_EX_PRIMITIVE                     108
    34 # define ASN1_F_ASN1_D2I_FP                               109
    35 # define ASN1_F_ASN1_D2I_READ_BIO                         107
    36 # define ASN1_F_ASN1_DIGEST                               184
    37 # define ASN1_F_ASN1_DO_ADB                               110
    38 # define ASN1_F_ASN1_DO_LOCK                              233
    39 # define ASN1_F_ASN1_DUP                                  111
    40 # define ASN1_F_ASN1_ENC_SAVE                             115
    41 # define ASN1_F_ASN1_EX_C2I                               204
    42 # define ASN1_F_ASN1_FIND_END                             190
    43 # define ASN1_F_ASN1_GENERALIZEDTIME_ADJ                  216
    44 # define ASN1_F_ASN1_GENERATE_V3                          178
    45 # define ASN1_F_ASN1_GET_INT64                            224
    46 # define ASN1_F_ASN1_GET_OBJECT                           114
    47 # define ASN1_F_ASN1_GET_UINT64                           225
    48 # define ASN1_F_ASN1_I2D_BIO                              116
    49 # define ASN1_F_ASN1_I2D_FP                               117
    50 # define ASN1_F_ASN1_ITEM_D2I_FP                          206
    51 # define ASN1_F_ASN1_ITEM_DUP                             191
    52 # define ASN1_F_ASN1_ITEM_EMBED_D2I                       120
    53 # define ASN1_F_ASN1_ITEM_EMBED_NEW                       121
    54 # define ASN1_F_ASN1_ITEM_EX_I2D                          144
    55 # define ASN1_F_ASN1_ITEM_FLAGS_I2D                       118
    56 # define ASN1_F_ASN1_ITEM_I2D_BIO                         192
    57 # define ASN1_F_ASN1_ITEM_I2D_FP                          193
    58 # define ASN1_F_ASN1_ITEM_PACK                            198
    59 # define ASN1_F_ASN1_ITEM_SIGN                            195
    60 # define ASN1_F_ASN1_ITEM_SIGN_CTX                        220
    61 # define ASN1_F_ASN1_ITEM_UNPACK                          199
    62 # define ASN1_F_ASN1_ITEM_VERIFY                          197
    63 # define ASN1_F_ASN1_MBSTRING_NCOPY                       122
    64 # define ASN1_F_ASN1_OBJECT_NEW                           123
    65 # define ASN1_F_ASN1_OUTPUT_DATA                          214
    66 # define ASN1_F_ASN1_PCTX_NEW                             205
    67 # define ASN1_F_ASN1_PRIMITIVE_NEW                        119
    68 # define ASN1_F_ASN1_SCTX_NEW                             221
    69 # define ASN1_F_ASN1_SIGN                                 128
    70 # define ASN1_F_ASN1_STR2TYPE                             179
    71 # define ASN1_F_ASN1_STRING_GET_INT64                     227
    72 # define ASN1_F_ASN1_STRING_GET_UINT64                    230
    73 # define ASN1_F_ASN1_STRING_SET                           186
    74 # define ASN1_F_ASN1_STRING_TABLE_ADD                     129
    75 # define ASN1_F_ASN1_STRING_TO_BN                         228
    76 # define ASN1_F_ASN1_STRING_TYPE_NEW                      130
    77 # define ASN1_F_ASN1_TEMPLATE_EX_D2I                      132
    78 # define ASN1_F_ASN1_TEMPLATE_NEW                         133
    79 # define ASN1_F_ASN1_TEMPLATE_NOEXP_D2I                   131
    80 # define ASN1_F_ASN1_TIME_ADJ                             217
    81 # define ASN1_F_ASN1_TYPE_GET_INT_OCTETSTRING             134
    82 # define ASN1_F_ASN1_TYPE_GET_OCTETSTRING                 135
    83 # define ASN1_F_ASN1_UTCTIME_ADJ                          218
    84 # define ASN1_F_ASN1_VERIFY                               137
    85 # define ASN1_F_B64_READ_ASN1                             209
    86 # define ASN1_F_B64_WRITE_ASN1                            210
    87 # define ASN1_F_BIO_NEW_NDEF                              208
    88 # define ASN1_F_BITSTR_CB                                 180
    89 # define ASN1_F_BN_TO_ASN1_STRING                         229
    90 # define ASN1_F_C2I_ASN1_BIT_STRING                       189
    91 # define ASN1_F_C2I_ASN1_INTEGER                          194
    92 # define ASN1_F_C2I_ASN1_OBJECT                           196
    93 # define ASN1_F_C2I_IBUF                                  226
    94 # define ASN1_F_C2I_UINT64_INT                            101
    95 # define ASN1_F_COLLECT_DATA                              140
    96 # define ASN1_F_D2I_ASN1_OBJECT                           147
    97 # define ASN1_F_D2I_ASN1_UINTEGER                         150
    98 # define ASN1_F_D2I_AUTOPRIVATEKEY                        207
    99 # define ASN1_F_D2I_PRIVATEKEY                            154
    100 # define ASN1_F_D2I_PUBLICKEY                             155
    101 # define ASN1_F_DO_BUF                                    142
    102 # define ASN1_F_DO_CREATE                                 124
    103 # define ASN1_F_DO_DUMP                                   125
    104 # define ASN1_F_DO_TCREATE                                222
    105 # define ASN1_F_I2A_ASN1_OBJECT                           126
    106 # define ASN1_F_I2D_ASN1_BIO_STREAM                       211
    107 # define ASN1_F_I2D_ASN1_OBJECT                           143
    108 # define ASN1_F_I2D_DSA_PUBKEY                            161
    109 # define ASN1_F_I2D_EC_PUBKEY                             181
    110 # define ASN1_F_I2D_PRIVATEKEY                            163
    111 # define ASN1_F_I2D_PUBLICKEY                             164
    112 # define ASN1_F_I2D_RSA_PUBKEY                            165
    113 # define ASN1_F_LONG_C2I                                  166
    114 # define ASN1_F_NDEF_PREFIX                               127
    115 # define ASN1_F_NDEF_SUFFIX                               136
    116 # define ASN1_F_OID_MODULE_INIT                           174
    117 # define ASN1_F_PARSE_TAGGING                             182
    118 # define ASN1_F_PKCS5_PBE2_SET_IV                         167
    119 # define ASN1_F_PKCS5_PBE2_SET_SCRYPT                     231
    120 # define ASN1_F_PKCS5_PBE_SET                             202
    121 # define ASN1_F_PKCS5_PBE_SET0_ALGOR                      215
    122 # define ASN1_F_PKCS5_PBKDF2_SET                          219
    123 # define ASN1_F_PKCS5_SCRYPT_SET                          232
    124 # define ASN1_F_SMIME_READ_ASN1                           212
    125 # define ASN1_F_SMIME_TEXT                                213
    126 # define ASN1_F_STABLE_GET                                138
    127 # define ASN1_F_STBL_MODULE_INIT                          223
    128 # define ASN1_F_UINT32_C2I                                105
    129 # define ASN1_F_UINT32_NEW                                139
    130 # define ASN1_F_UINT64_C2I                                112
    131 # define ASN1_F_UINT64_NEW                                141
    132 # define ASN1_F_X509_CRL_ADD0_REVOKED                     169
    133 # define ASN1_F_X509_INFO_NEW                             170
    134 # define ASN1_F_X509_NAME_ENCODE                          203
    135 # define ASN1_F_X509_NAME_EX_D2I                          158
    136 # define ASN1_F_X509_NAME_EX_NEW                          171
    137 # define ASN1_F_X509_PKEY_NEW                             173
    13820
    13921/*
     
    20082# define ASN1_R_INVALID_UTF8STRING                        134
    20183# define ASN1_R_INVALID_VALUE                             219
     84# define ASN1_R_LENGTH_TOO_LONG                           231
    20285# define ASN1_R_LIST_ERROR                                188
    20386# define ASN1_R_MIME_NO_CONTENT_TYPE                      206
     
    240123# define ASN1_R_UNEXPECTED_EOC                            159
    241124# define ASN1_R_UNIVERSALSTRING_IS_WRONG_LENGTH           215
     125# define ASN1_R_UNKNOWN_DIGEST                            229
    242126# define ASN1_R_UNKNOWN_FORMAT                            160
    243127# define ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM          161
  • trunk/src/libs/openssl-3.0.1/include/openssl/async.h

    r91772 r94082  
    22 * Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    1010#include <stdlib.h>
    1111
    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
    1420
    1521#if defined(_WIN32)
     
    3238typedef struct async_job_st ASYNC_JOB;
    3339typedef struct async_wait_ctx_st ASYNC_WAIT_CTX;
     40typedef int (*ASYNC_callback_fn)(void *arg);
    3441
    3542#define ASYNC_ERR      0
     
    3744#define ASYNC_PAUSE    2
    3845#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
    3951
    4052int ASYNC_init_thread(size_t max_size, size_t init_size);
     
    5365int ASYNC_WAIT_CTX_get_all_fds(ASYNC_WAIT_CTX *ctx, OSSL_ASYNC_FD *fd,
    5466                               size_t *numfds);
     67int ASYNC_WAIT_CTX_get_callback(ASYNC_WAIT_CTX *ctx,
     68                                ASYNC_callback_fn *callback,
     69                                void **callback_arg);
     70int ASYNC_WAIT_CTX_set_callback(ASYNC_WAIT_CTX *ctx,
     71                                ASYNC_callback_fn callback,
     72                                void *callback_arg);
     73int ASYNC_WAIT_CTX_set_status(ASYNC_WAIT_CTX *ctx, int status);
     74int ASYNC_WAIT_CTX_get_status(ASYNC_WAIT_CTX *ctx);
    5575int ASYNC_WAIT_CTX_get_changed_fds(ASYNC_WAIT_CTX *ctx, OSSL_ASYNC_FD *addfd,
    5676                                   size_t *numaddfds, OSSL_ASYNC_FD *delfd,
  • trunk/src/libs/openssl-3.0.1/include/openssl/asyncerr.h

    r91772 r94082  
    11/*
    22 * Generated by util/mkerr.pl DO NOT EDIT
    3  * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
     3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    44 *
    5  * Licensed under the OpenSSL license (the "License").  You may not use
     5 * Licensed under the Apache License 2.0 (the "License").  You may not use
    66 * this file except in compliance with the License.  You can obtain a copy
    77 * in the file LICENSE in the source distribution or at
     
    99 */
    1010
    11 #ifndef HEADER_ASYNCERR_H
    12 # define HEADER_ASYNCERR_H
     11#ifndef OPENSSL_ASYNCERR_H
     12# define OPENSSL_ASYNCERR_H
     13# pragma once
    1314
    14 # ifndef HEADER_SYMHACKS_H
    15 #  include <openssl/symhacks.h>
    16 # endif
     15# include <openssl/opensslconf.h>
     16# include <openssl/symhacks.h>
     17# include <openssl/cryptoerr_legacy.h>
    1718
    18 # ifdef  __cplusplus
    19 extern "C"
    20 # endif
    21 int ERR_load_ASYNC_strings(void);
    2219
    23 /*
    24  * ASYNC function codes.
    25  */
    26 # define ASYNC_F_ASYNC_CTX_NEW                            100
    27 # define ASYNC_F_ASYNC_INIT_THREAD                        101
    28 # define ASYNC_F_ASYNC_JOB_NEW                            102
    29 # define ASYNC_F_ASYNC_PAUSE_JOB                          103
    30 # define ASYNC_F_ASYNC_START_FUNC                         104
    31 # define ASYNC_F_ASYNC_START_JOB                          105
    32 # define ASYNC_F_ASYNC_WAIT_CTX_SET_WAIT_FD               106
    3320
    3421/*
  • trunk/src/libs/openssl-3.0.1/include/openssl/bioerr.h

    r91772 r94082  
    11/*
    22 * Generated by util/mkerr.pl DO NOT EDIT
    3  * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
     3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    44 *
    5  * Licensed under the OpenSSL license (the "License").  You may not use
     5 * Licensed under the Apache License 2.0 (the "License").  You may not use
    66 * this file except in compliance with the License.  You can obtain a copy
    77 * in the file LICENSE in the source distribution or at
     
    99 */
    1010
    11 #ifndef HEADER_BIOERR_H
    12 # define HEADER_BIOERR_H
     11#ifndef OPENSSL_BIOERR_H
     12# define OPENSSL_BIOERR_H
     13# pragma once
    1314
    14 # ifndef HEADER_SYMHACKS_H
    15 #  include <openssl/symhacks.h>
    16 # endif
     15# include <openssl/opensslconf.h>
     16# include <openssl/symhacks.h>
     17# include <openssl/cryptoerr_legacy.h>
    1718
    18 # ifdef  __cplusplus
    19 extern "C"
    20 # endif
    21 int ERR_load_BIO_strings(void);
    2219
    23 /*
    24  * BIO function codes.
    25  */
    26 # define BIO_F_ACPT_STATE                                 100
    27 # define BIO_F_ADDRINFO_WRAP                              148
    28 # define BIO_F_ADDR_STRINGS                               134
    29 # define BIO_F_BIO_ACCEPT                                 101
    30 # define BIO_F_BIO_ACCEPT_EX                              137
    31 # define BIO_F_BIO_ACCEPT_NEW                             152
    32 # define BIO_F_BIO_ADDR_NEW                               144
    33 # define BIO_F_BIO_BIND                                   147
    34 # define BIO_F_BIO_CALLBACK_CTRL                          131
    35 # define BIO_F_BIO_CONNECT                                138
    36 # define BIO_F_BIO_CONNECT_NEW                            153
    37 # define BIO_F_BIO_CTRL                                   103
    38 # define BIO_F_BIO_GETS                                   104
    39 # define BIO_F_BIO_GET_HOST_IP                            106
    40 # define BIO_F_BIO_GET_NEW_INDEX                          102
    41 # define BIO_F_BIO_GET_PORT                               107
    42 # define BIO_F_BIO_LISTEN                                 139
    43 # define BIO_F_BIO_LOOKUP                                 135
    44 # define BIO_F_BIO_LOOKUP_EX                              143
    45 # define BIO_F_BIO_MAKE_PAIR                              121
    46 # define BIO_F_BIO_METH_NEW                               146
    47 # define BIO_F_BIO_NEW                                    108
    48 # define BIO_F_BIO_NEW_DGRAM_SCTP                         145
    49 # define BIO_F_BIO_NEW_FILE                               109
    50 # define BIO_F_BIO_NEW_MEM_BUF                            126
    51 # define BIO_F_BIO_NREAD                                  123
    52 # define BIO_F_BIO_NREAD0                                 124
    53 # define BIO_F_BIO_NWRITE                                 125
    54 # define BIO_F_BIO_NWRITE0                                122
    55 # define BIO_F_BIO_PARSE_HOSTSERV                         136
    56 # define BIO_F_BIO_PUTS                                   110
    57 # define BIO_F_BIO_READ                                   111
    58 # define BIO_F_BIO_READ_EX                                105
    59 # define BIO_F_BIO_READ_INTERN                            120
    60 # define BIO_F_BIO_SOCKET                                 140
    61 # define BIO_F_BIO_SOCKET_NBIO                            142
    62 # define BIO_F_BIO_SOCK_INFO                              141
    63 # define BIO_F_BIO_SOCK_INIT                              112
    64 # define BIO_F_BIO_WRITE                                  113
    65 # define BIO_F_BIO_WRITE_EX                               119
    66 # define BIO_F_BIO_WRITE_INTERN                           128
    67 # define BIO_F_BUFFER_CTRL                                114
    68 # define BIO_F_CONN_CTRL                                  127
    69 # define BIO_F_CONN_STATE                                 115
    70 # define BIO_F_DGRAM_SCTP_NEW                             149
    71 # define BIO_F_DGRAM_SCTP_READ                            132
    72 # define BIO_F_DGRAM_SCTP_WRITE                           133
    73 # define BIO_F_DOAPR_OUTCH                                150
    74 # define BIO_F_FILE_CTRL                                  116
    75 # define BIO_F_FILE_READ                                  130
    76 # define BIO_F_LINEBUFFER_CTRL                            129
    77 # define BIO_F_LINEBUFFER_NEW                             151
    78 # define BIO_F_MEM_WRITE                                  117
    79 # define BIO_F_NBIOF_NEW                                  154
    80 # define BIO_F_SLG_WRITE                                  155
    81 # define BIO_F_SSL_NEW                                    118
    8220
    8321/*
     
    9028# define BIO_R_BROKEN_PIPE                                124
    9129# define BIO_R_CONNECT_ERROR                              103
     30# define BIO_R_CONNECT_TIMEOUT                            147
    9231# define BIO_R_GETHOSTBYNAME_ADDR_IS_NOT_AF_INET          107
    9332# define BIO_R_GETSOCKNAME_ERROR                          132
     
    10645# define BIO_R_NO_PORT_DEFINED                            113
    10746# 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
    10950# define BIO_R_UNABLE_TO_BIND_SOCKET                      117
    11051# define BIO_R_UNABLE_TO_CREATE_SOCKET                    118
  • trunk/src/libs/openssl-3.0.1/include/openssl/blowfish.h

    r91772 r94082  
    11/*
    2  * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    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
    1218
    1319# include <openssl/opensslconf.h>
     
    1925# endif
    2026
    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
    2333
    2434/*-
     
    2737 * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    2838 */
    29 # define BF_LONG unsigned int
     39#  define BF_LONG unsigned int
    3040
    31 # define BF_ROUNDS       16
    32 # define BF_BLOCK        8
     41#  define BF_ROUNDS       16
    3342
    3443typedef struct bf_key_st {
     
    3746} BF_KEY;
    3847
    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
     50OSSL_DEPRECATEDIN_3_0 void BF_set_key(BF_KEY *key, int len,
     51                                      const unsigned char *data);
     52OSSL_DEPRECATEDIN_3_0 void BF_encrypt(BF_LONG *data, const BF_KEY *key);
     53OSSL_DEPRECATEDIN_3_0 void BF_decrypt(BF_LONG *data, const BF_KEY *key);
     54OSSL_DEPRECATEDIN_3_0 void BF_ecb_encrypt(const unsigned char *in,
     55                                          unsigned char *out, const BF_KEY *key,
     56                                          int enc);
     57OSSL_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);
     61OSSL_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);
     66OSSL_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);
     70OSSL_DEPRECATEDIN_3_0 const char *BF_options(void);
     71# endif
    5572
    5673# ifdef  __cplusplus
  • trunk/src/libs/openssl-3.0.1/include/openssl/bn.h

    r91772 r94082  
    11/*
    2  * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    33 * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
    44 *
    5  * Licensed under the OpenSSL license (the "License").  You may not use
     5 * Licensed under the Apache License 2.0 (the "License").  You may not use
    66 * this file except in compliance with the License.  You can obtain a copy
    77 * in the file LICENSE in the source distribution or at
     
    99 */
    1010
    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
    1319
    1420# include <openssl/e_os2.h>
     
    1723# endif
    1824# include <openssl/opensslconf.h>
    19 # include <openssl/ossl_typ.h>
     25# include <openssl/types.h>
    2026# include <openssl/crypto.h>
    2127# include <openssl/bnerr.h>
     
    6268# define BN_FLG_SECURE           0x08
    6369
    64 # if OPENSSL_API_COMPAT < 0x00908000L
     70# ifndef OPENSSL_NO_DEPRECATED_0_9_8
    6571/* deprecated name for the flag */
    6672#  define BN_FLG_EXP_CONSTTIME BN_FLG_CONSTTIME
     
    104110void *BN_GENCB_get_arg(BN_GENCB *cb);
    105111
    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 */
    108115
    109116/*
     
    170177 */
    171178
    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
    180188
    181189# define BN_num_bytes(a) ((BN_num_bits(a)+7)/8)
     
    191199void BN_zero_ex(BIGNUM *a);
    192200
    193 # if OPENSSL_API_COMPAT >= 0x00908000L
     201# if OPENSSL_API_LEVEL > 908
    194202#  define BN_zero(a)      BN_zero_ex(a)
    195203# else
     
    199207const BIGNUM *BN_value_one(void);
    200208char *BN_options(void);
     209BN_CTX *BN_CTX_new_ex(OSSL_LIB_CTX *ctx);
    201210BN_CTX *BN_CTX_new(void);
     211BN_CTX *BN_CTX_secure_new_ex(OSSL_LIB_CTX *ctx);
    202212BN_CTX *BN_CTX_secure_new(void);
    203213void BN_CTX_free(BN_CTX *c);
     
    205215BIGNUM *BN_CTX_get(BN_CTX *ctx);
    206216void BN_CTX_end(BN_CTX *ctx);
     217int BN_rand_ex(BIGNUM *rnd, int bits, int top, int bottom,
     218               unsigned int strength, BN_CTX *ctx);
    207219int BN_rand(BIGNUM *rnd, int bits, int top, int bottom);
     220int BN_priv_rand_ex(BIGNUM *rnd, int bits, int top, int bottom,
     221                    unsigned int strength, BN_CTX *ctx);
    208222int BN_priv_rand(BIGNUM *rnd, int bits, int top, int bottom);
     223int BN_rand_range_ex(BIGNUM *r, const BIGNUM *range, unsigned int strength,
     224                     BN_CTX *ctx);
    209225int BN_rand_range(BIGNUM *rnd, const BIGNUM *range);
     226int BN_priv_rand_range_ex(BIGNUM *r, const BIGNUM *range,
     227                          unsigned int strength, BN_CTX *ctx);
    210228int BN_priv_rand_range(BIGNUM *rnd, const BIGNUM *range);
     229# ifndef OPENSSL_NO_DEPRECATED_3_0
     230OSSL_DEPRECATEDIN_3_0
    211231int BN_pseudo_rand(BIGNUM *rnd, int bits, int top, int bottom);
     232OSSL_DEPRECATEDIN_3_0
    212233int BN_pseudo_rand_range(BIGNUM *rnd, const BIGNUM *range);
     234# endif
    213235int BN_num_bits(const BIGNUM *a);
    214236int BN_num_bits_word(BN_ULONG l);
     
    224246BIGNUM *BN_lebin2bn(const unsigned char *s, int len, BIGNUM *ret);
    225247int BN_bn2lebinpad(const BIGNUM *a, unsigned char *to, int tolen);
     248BIGNUM *BN_native2bn(const unsigned char *s, int len, BIGNUM *ret);
     249int BN_bn2nativepad(const BIGNUM *a, unsigned char *to, int tolen);
    226250BIGNUM *BN_mpi2bn(const unsigned char *s, int len, BIGNUM *ret);
    227251int BN_bn2mpi(const BIGNUM *a, unsigned char *to);
     
    293317int BN_mod_exp_simple(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
    294318                      const BIGNUM *m, BN_CTX *ctx);
     319int 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);
    295324
    296325int BN_mask_bits(BIGNUM *a, int n);
     
    324353
    325354/* 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
     356OSSL_DEPRECATEDIN_0_9_8
     357BIGNUM *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);
     361OSSL_DEPRECATEDIN_0_9_8
     362int BN_is_prime(const BIGNUM *p, int nchecks,
     363                void (*callback) (int, int, void *),
     364                BN_CTX *ctx, void *cb_arg);
     365OSSL_DEPRECATEDIN_0_9_8
     366int 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
     372OSSL_DEPRECATEDIN_3_0
     373int BN_is_prime_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx, BN_GENCB *cb);
     374OSSL_DEPRECATEDIN_3_0
     375int BN_is_prime_fasttest_ex(const BIGNUM *p, int nchecks, BN_CTX *ctx,
     376                            int do_trial_division, BN_GENCB *cb);
     377# endif
    342378/* Newer versions */
     379int BN_generate_prime_ex2(BIGNUM *ret, int bits, int safe,
     380                          const BIGNUM *add, const BIGNUM *rem, BN_GENCB *cb,
     381                          BN_CTX *ctx);
    343382int BN_generate_prime_ex(BIGNUM *ret, int bits, int safe, const BIGNUM *add,
    344383                         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 
     384int BN_check_prime(const BIGNUM *p, BN_CTX *ctx, BN_GENCB *cb);
     385
     386# ifndef OPENSSL_NO_DEPRECATED_3_0
     387OSSL_DEPRECATEDIN_3_0
    349388int BN_X931_generate_Xpq(BIGNUM *Xp, BIGNUM *Xq, int nbits, BN_CTX *ctx);
    350389
     390OSSL_DEPRECATEDIN_3_0
    351391int BN_X931_derive_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2,
    352392                            const BIGNUM *Xp, const BIGNUM *Xp1,
    353393                            const BIGNUM *Xp2, const BIGNUM *e, BN_CTX *ctx,
    354394                            BN_GENCB *cb);
     395OSSL_DEPRECATEDIN_3_0
    355396int BN_X931_generate_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2, BIGNUM *Xp1,
    356397                              BIGNUM *Xp2, const BIGNUM *Xp, const BIGNUM *e,
    357398                              BN_CTX *ctx, BN_GENCB *cb);
     399# endif
    358400
    359401BN_MONT_CTX *BN_MONT_CTX_new(void);
     
    399441                                                         BN_MONT_CTX *m_ctx),
    400442                                      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
     444OSSL_DEPRECATEDIN_0_9_8
     445void BN_set_params(int mul, int high, int low, int mont);
     446OSSL_DEPRECATEDIN_0_9_8
     447int BN_get_params(int which); /* 0, mul, 1 high, 2 low, 3 mont */
     448# endif
    405449
    406450BN_RECP_CTX *BN_RECP_CTX_new(void);
     
    520564BIGNUM *BN_get_rfc3526_prime_8192(BIGNUM *bn);
    521565
    522 # if OPENSSL_API_COMPAT < 0x10100000L
    523 define get_rfc2409_prime_768 BN_get_rfc2409_prime_768
    524 define get_rfc2409_prime_1024 BN_get_rfc2409_prime_1024
    525 define get_rfc3526_prime_1536 BN_get_rfc3526_prime_1536
    526 define get_rfc3526_prime_2048 BN_get_rfc3526_prime_2048
    527 define get_rfc3526_prime_3072 BN_get_rfc3526_prime_3072
    528 define get_rfc3526_prime_4096 BN_get_rfc3526_prime_4096
    529 define get_rfc3526_prime_6144 BN_get_rfc3526_prime_6144
    530 define get_rfc3526_prime_8192 BN_get_rfc3526_prime_8192
    531 # endif
     566#  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
    532576
    533577int BN_bntest_rand(BIGNUM *rnd, int bits, int top, int bottom);
  • trunk/src/libs/openssl-3.0.1/include/openssl/bnerr.h

    r91772 r94082  
    11/*
    22 * Generated by util/mkerr.pl DO NOT EDIT
    3  * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
     3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    44 *
    5  * Licensed under the OpenSSL license (the "License").  You may not use
     5 * Licensed under the Apache License 2.0 (the "License").  You may not use
    66 * this file except in compliance with the License.  You can obtain a copy
    77 * in the file LICENSE in the source distribution or at
     
    99 */
    1010
    11 #ifndef HEADER_BNERR_H
    12 # define HEADER_BNERR_H
     11#ifndef OPENSSL_BNERR_H
     12# define OPENSSL_BNERR_H
     13# pragma once
    1314
    14 # ifndef HEADER_SYMHACKS_H
    15 #  include <openssl/symhacks.h>
    16 # endif
     15# include <openssl/opensslconf.h>
     16# include <openssl/symhacks.h>
     17# include <openssl/cryptoerr_legacy.h>
    1718
    18 # ifdef  __cplusplus
    19 extern "C"
    20 # endif
    21 int ERR_load_BN_strings(void);
    2219
    23 /*
    24  * BN function codes.
    25  */
    26 # define BN_F_BNRAND                                      127
    27 # define BN_F_BNRAND_RANGE                                138
    28 # define BN_F_BN_BLINDING_CONVERT_EX                      100
    29 # define BN_F_BN_BLINDING_CREATE_PARAM                    128
    30 # define BN_F_BN_BLINDING_INVERT_EX                       101
    31 # define BN_F_BN_BLINDING_NEW                             102
    32 # define BN_F_BN_BLINDING_UPDATE                          103
    33 # define BN_F_BN_BN2DEC                                   104
    34 # define BN_F_BN_BN2HEX                                   105
    35 # define BN_F_BN_COMPUTE_WNAF                             142
    36 # define BN_F_BN_CTX_GET                                  116
    37 # define BN_F_BN_CTX_NEW                                  106
    38 # define BN_F_BN_CTX_START                                129
    39 # define BN_F_BN_DIV                                      107
    40 # define BN_F_BN_DIV_RECP                                 130
    41 # define BN_F_BN_EXP                                      123
    42 # define BN_F_BN_EXPAND_INTERNAL                          120
    43 # define BN_F_BN_GENCB_NEW                                143
    44 # define BN_F_BN_GENERATE_DSA_NONCE                       140
    45 # define BN_F_BN_GENERATE_PRIME_EX                        141
    46 # define BN_F_BN_GF2M_MOD                                 131
    47 # define BN_F_BN_GF2M_MOD_EXP                             132
    48 # define BN_F_BN_GF2M_MOD_MUL                             133
    49 # define BN_F_BN_GF2M_MOD_SOLVE_QUAD                      134
    50 # define BN_F_BN_GF2M_MOD_SOLVE_QUAD_ARR                  135
    51 # define BN_F_BN_GF2M_MOD_SQR                             136
    52 # define BN_F_BN_GF2M_MOD_SQRT                            137
    53 # define BN_F_BN_LSHIFT                                   145
    54 # define BN_F_BN_MOD_EXP2_MONT                            118
    55 # define BN_F_BN_MOD_EXP_MONT                             109
    56 # define BN_F_BN_MOD_EXP_MONT_CONSTTIME                   124
    57 # define BN_F_BN_MOD_EXP_MONT_WORD                        117
    58 # define BN_F_BN_MOD_EXP_RECP                             125
    59 # define BN_F_BN_MOD_EXP_SIMPLE                           126
    60 # define BN_F_BN_MOD_INVERSE                              110
    61 # define BN_F_BN_MOD_INVERSE_NO_BRANCH                    139
    62 # define BN_F_BN_MOD_LSHIFT_QUICK                         119
    63 # define BN_F_BN_MOD_SQRT                                 121
    64 # define BN_F_BN_MONT_CTX_NEW                             149
    65 # define BN_F_BN_MPI2BN                                   112
    66 # define BN_F_BN_NEW                                      113
    67 # define BN_F_BN_POOL_GET                                 147
    68 # define BN_F_BN_RAND                                     114
    69 # define BN_F_BN_RAND_RANGE                               122
    70 # define BN_F_BN_RECP_CTX_NEW                             150
    71 # define BN_F_BN_RSHIFT                                   146
    72 # define BN_F_BN_SET_WORDS                                144
    73 # define BN_F_BN_STACK_PUSH                               148
    74 # define BN_F_BN_USUB                                     115
    7520
    7621/*
     
    9338# define BN_R_NO_INVERSE                                  108
    9439# define BN_R_NO_SOLUTION                                 116
     40# define BN_R_NO_SUITABLE_DIGEST                          120
    9541# define BN_R_PRIVATE_KEY_TOO_LARGE                       117
    9642# define BN_R_P_IS_NOT_PRIME                              112
  • trunk/src/libs/openssl-3.0.1/include/openssl/buffer.h

    r91772 r94082  
    22 * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    10 #ifndef HEADER_BUFFER_H
    11 # define HEADER_BUFFER_H
     10#ifndef OPENSSL_BUFFER_H
     11# define OPENSSL_BUFFER_H
     12# pragma once
    1213
    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
    1521#  include <openssl/crypto.h>
    1622# endif
     
    2531# include <sys/types.h>
    2632
    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
    3741
    3842struct buf_mem_st {
  • trunk/src/libs/openssl-3.0.1/include/openssl/buffererr.h

    r91772 r94082  
    11/*
    22 * Generated by util/mkerr.pl DO NOT EDIT
    3  * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
     3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    44 *
    5  * Licensed under the OpenSSL license (the "License").  You may not use
     5 * Licensed under the Apache License 2.0 (the "License").  You may not use
    66 * this file except in compliance with the License.  You can obtain a copy
    77 * in the file LICENSE in the source distribution or at
     
    99 */
    1010
    11 #ifndef HEADER_BUFERR_H
    12 # define HEADER_BUFERR_H
     11#ifndef OPENSSL_BUFFERERR_H
     12# define OPENSSL_BUFFERERR_H
     13# pragma once
    1314
    14 # ifndef HEADER_SYMHACKS_H
    15 #  include <openssl/symhacks.h>
    16 # endif
     15# include <openssl/opensslconf.h>
     16# include <openssl/symhacks.h>
     17# include <openssl/cryptoerr_legacy.h>
    1718
    18 # ifdef  __cplusplus
    19 extern "C"
    20 # endif
    21 int ERR_load_BUF_strings(void);
    2219
    23 /*
    24  * BUF function codes.
    25  */
    26 # define BUF_F_BUF_MEM_GROW                               100
    27 # define BUF_F_BUF_MEM_GROW_CLEAN                         105
    28 # define BUF_F_BUF_MEM_NEW                                101
    2920
    3021/*
  • trunk/src/libs/openssl-3.0.1/include/openssl/camellia.h

    r91772 r94082  
    11/*
    2  * Copyright 2006-2016 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 2006-2020 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    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
    1218
    1319# include <openssl/opensslconf.h>
     
    1925#endif
    2026
    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
    2333
    2434/*
     
    2939/* This should be a hidden type, but EVP requires that the size be known */
    3040
    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)
    3443
    3544typedef unsigned int KEY_TABLE_TYPE[CAMELLIA_TABLE_WORD_LEN]; /* to match
     
    4554typedef struct camellia_key_st CAMELLIA_KEY;
    4655
    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
     58OSSL_DEPRECATEDIN_3_0 int Camellia_set_key(const unsigned char *userKey,
     59                                           const int bits,
     60                                           CAMELLIA_KEY *key);
     61OSSL_DEPRECATEDIN_3_0 void Camellia_encrypt(const unsigned char *in,
     62                                            unsigned char *out,
     63                                            const CAMELLIA_KEY *key);
     64OSSL_DEPRECATEDIN_3_0 void Camellia_decrypt(const unsigned char *in,
     65                                            unsigned char *out,
     66                                            const CAMELLIA_KEY *key);
     67OSSL_DEPRECATEDIN_3_0 void Camellia_ecb_encrypt(const unsigned char *in,
     68                                                unsigned char *out,
     69                                                const CAMELLIA_KEY *key,
     70                                                const int enc);
     71OSSL_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);
     77OSSL_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);
     84OSSL_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);
     91OSSL_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);
     98OSSL_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);
     104OSSL_DEPRECATEDIN_3_0
    72105void Camellia_ctr128_encrypt(const unsigned char *in, unsigned char *out,
    73106                             size_t length, const CAMELLIA_KEY *key,
     
    75108                             unsigned char ecount_buf[CAMELLIA_BLOCK_SIZE],
    76109                             unsigned int *num);
     110# endif
    77111
    78112# ifdef  __cplusplus
  • trunk/src/libs/openssl-3.0.1/include/openssl/cast.h

    r91772 r94082  
    11/*
    2  * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    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
    1218
    1319# include <openssl/opensslconf.h>
     
    1824# endif
    1925
    20 # define CAST_ENCRYPT    1
    21 # define CAST_DECRYPT    0
    22 
    23 # define CAST_LONG unsigned int
    24 
    2526# define CAST_BLOCK      8
    2627# 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
    2735
    2836typedef struct cast_key_st {
     
    3139} CAST_KEY;
    3240
     41# endif /* OPENSSL_NO_DEPRECATED_3_0 */
     42# ifndef OPENSSL_NO_DEPRECATED_3_0
     43OSSL_DEPRECATEDIN_3_0
    3344void CAST_set_key(CAST_KEY *key, int len, const unsigned char *data);
     45OSSL_DEPRECATEDIN_3_0
    3446void CAST_ecb_encrypt(const unsigned char *in, unsigned char *out,
    3547                      const CAST_KEY *key, int enc);
     48OSSL_DEPRECATEDIN_3_0
    3649void CAST_encrypt(CAST_LONG *data, const CAST_KEY *key);
     50OSSL_DEPRECATEDIN_3_0
    3751void CAST_decrypt(CAST_LONG *data, const CAST_KEY *key);
     52OSSL_DEPRECATEDIN_3_0
    3853void CAST_cbc_encrypt(const unsigned char *in, unsigned char *out,
    3954                      long length, const CAST_KEY *ks, unsigned char *iv,
    4055                      int enc);
     56OSSL_DEPRECATEDIN_3_0
    4157void CAST_cfb64_encrypt(const unsigned char *in, unsigned char *out,
    4258                        long length, const CAST_KEY *schedule,
    4359                        unsigned char *ivec, int *num, int enc);
     60OSSL_DEPRECATEDIN_3_0
    4461void CAST_ofb64_encrypt(const unsigned char *in, unsigned char *out,
    4562                        long length, const CAST_KEY *schedule,
    4663                        unsigned char *ivec, int *num);
     64# endif
    4765
    4866# ifdef  __cplusplus
  • trunk/src/libs/openssl-3.0.1/include/openssl/cmac.h

    r91772 r94082  
    11/*
    2  * Copyright 2010-2016 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 2010-2020 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    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
    1218
    1319# ifndef OPENSSL_NO_CMAC
    1420
    15 #ifdef __cplusplus
     21#  ifdef __cplusplus
    1622extern "C" {
    17 #endif
     23#  endif
    1824
    19 # include <openssl/evp.h>
     25#  include <openssl/evp.h>
    2026
     27#  ifndef OPENSSL_NO_DEPRECATED_3_0
    2128/* Opaque */
    2229typedef struct CMAC_CTX_st CMAC_CTX;
     30#  endif
     31#  ifndef OPENSSL_NO_DEPRECATED_3_0
     32OSSL_DEPRECATEDIN_3_0 CMAC_CTX *CMAC_CTX_new(void);
     33OSSL_DEPRECATEDIN_3_0 void CMAC_CTX_cleanup(CMAC_CTX *ctx);
     34OSSL_DEPRECATEDIN_3_0 void CMAC_CTX_free(CMAC_CTX *ctx);
     35OSSL_DEPRECATEDIN_3_0 EVP_CIPHER_CTX *CMAC_CTX_get0_cipher_ctx(CMAC_CTX *ctx);
     36OSSL_DEPRECATEDIN_3_0 int CMAC_CTX_copy(CMAC_CTX *out, const CMAC_CTX *in);
     37OSSL_DEPRECATEDIN_3_0 int CMAC_Init(CMAC_CTX *ctx,
     38                                    const void *key, size_t keylen,
     39                                    const EVP_CIPHER *cipher, ENGINE *impl);
     40OSSL_DEPRECATEDIN_3_0 int CMAC_Update(CMAC_CTX *ctx,
     41                                      const void *data, size_t dlen);
     42OSSL_DEPRECATEDIN_3_0 int CMAC_Final(CMAC_CTX *ctx,
     43                                     unsigned char *out, size_t *poutlen);
     44OSSL_DEPRECATEDIN_3_0 int CMAC_resume(CMAC_CTX *ctx);
     45#  endif
    2346
    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
    3748}
    38 #endif
     49#  endif
    3950
    4051# endif
  • trunk/src/libs/openssl-3.0.1/include/openssl/cmserr.h

    r91772 r94082  
    11/*
    22 * Generated by util/mkerr.pl DO NOT EDIT
    3  * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
     3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    44 *
    5  * Licensed under the OpenSSL license (the "License").  You may not use
     5 * Licensed under the Apache License 2.0 (the "License").  You may not use
    66 * this file except in compliance with the License.  You can obtain a copy
    77 * in the file LICENSE in the source distribution or at
     
    99 */
    1010
    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
    1714
    1815# include <openssl/opensslconf.h>
     16# include <openssl/symhacks.h>
     17# include <openssl/cryptoerr_legacy.h>
     18
    1919
    2020# ifndef OPENSSL_NO_CMS
    2121
    22 #  ifdef  __cplusplus
    23 extern "C"
    24 #  endif
    25 int ERR_load_CMS_strings(void);
    26 
    27 /*
    28  * CMS function codes.
    29  */
    30 #  define CMS_F_CHECK_CONTENT                              99
    31 #  define CMS_F_CMS_ADD0_CERT                              164
    32 #  define CMS_F_CMS_ADD0_RECIPIENT_KEY                     100
    33 #  define CMS_F_CMS_ADD0_RECIPIENT_PASSWORD                165
    34 #  define CMS_F_CMS_ADD1_RECEIPTREQUEST                    158
    35 #  define CMS_F_CMS_ADD1_RECIPIENT_CERT                    101
    36 #  define CMS_F_CMS_ADD1_SIGNER                            102
    37 #  define CMS_F_CMS_ADD1_SIGNINGTIME                       103
    38 #  define CMS_F_CMS_COMPRESS                               104
    39 #  define CMS_F_CMS_COMPRESSEDDATA_CREATE                  105
    40 #  define CMS_F_CMS_COMPRESSEDDATA_INIT_BIO                106
    41 #  define CMS_F_CMS_COPY_CONTENT                           107
    42 #  define CMS_F_CMS_COPY_MESSAGEDIGEST                     108
    43 #  define CMS_F_CMS_DATA                                   109
    44 #  define CMS_F_CMS_DATAFINAL                              110
    45 #  define CMS_F_CMS_DATAINIT                               111
    46 #  define CMS_F_CMS_DECRYPT                                112
    47 #  define CMS_F_CMS_DECRYPT_SET1_KEY                       113
    48 #  define CMS_F_CMS_DECRYPT_SET1_PASSWORD                  166
    49 #  define CMS_F_CMS_DECRYPT_SET1_PKEY                      114
    50 #  define CMS_F_CMS_DIGESTALGORITHM_FIND_CTX               115
    51 #  define CMS_F_CMS_DIGESTALGORITHM_INIT_BIO               116
    52 #  define CMS_F_CMS_DIGESTEDDATA_DO_FINAL                  117
    53 #  define CMS_F_CMS_DIGEST_VERIFY                          118
    54 #  define CMS_F_CMS_ENCODE_RECEIPT                         161
    55 #  define CMS_F_CMS_ENCRYPT                                119
    56 #  define CMS_F_CMS_ENCRYPTEDCONTENT_INIT                  179
    57 #  define CMS_F_CMS_ENCRYPTEDCONTENT_INIT_BIO              120
    58 #  define CMS_F_CMS_ENCRYPTEDDATA_DECRYPT                  121
    59 #  define CMS_F_CMS_ENCRYPTEDDATA_ENCRYPT                  122
    60 #  define CMS_F_CMS_ENCRYPTEDDATA_SET1_KEY                 123
    61 #  define CMS_F_CMS_ENVELOPEDDATA_CREATE                   124
    62 #  define CMS_F_CMS_ENVELOPEDDATA_INIT_BIO                 125
    63 #  define CMS_F_CMS_ENVELOPED_DATA_INIT                    126
    64 #  define CMS_F_CMS_ENV_ASN1_CTRL                          171
    65 #  define CMS_F_CMS_FINAL                                  127
    66 #  define CMS_F_CMS_GET0_CERTIFICATE_CHOICES               128
    67 #  define CMS_F_CMS_GET0_CONTENT                           129
    68 #  define CMS_F_CMS_GET0_ECONTENT_TYPE                     130
    69 #  define CMS_F_CMS_GET0_ENVELOPED                         131
    70 #  define CMS_F_CMS_GET0_REVOCATION_CHOICES                132
    71 #  define CMS_F_CMS_GET0_SIGNED                            133
    72 #  define CMS_F_CMS_MSGSIGDIGEST_ADD1                      162
    73 #  define CMS_F_CMS_RECEIPTREQUEST_CREATE0                 159
    74 #  define CMS_F_CMS_RECEIPT_VERIFY                         160
    75 #  define CMS_F_CMS_RECIPIENTINFO_DECRYPT                  134
    76 #  define CMS_F_CMS_RECIPIENTINFO_ENCRYPT                  169
    77 #  define CMS_F_CMS_RECIPIENTINFO_KARI_ENCRYPT             178
    78 #  define CMS_F_CMS_RECIPIENTINFO_KARI_GET0_ALG            175
    79 #  define CMS_F_CMS_RECIPIENTINFO_KARI_GET0_ORIG_ID        173
    80 #  define CMS_F_CMS_RECIPIENTINFO_KARI_GET0_REKS           172
    81 #  define CMS_F_CMS_RECIPIENTINFO_KARI_ORIG_ID_CMP         174
    82 #  define CMS_F_CMS_RECIPIENTINFO_KEKRI_DECRYPT            135
    83 #  define CMS_F_CMS_RECIPIENTINFO_KEKRI_ENCRYPT            136
    84 #  define CMS_F_CMS_RECIPIENTINFO_KEKRI_GET0_ID            137
    85 #  define CMS_F_CMS_RECIPIENTINFO_KEKRI_ID_CMP             138
    86 #  define CMS_F_CMS_RECIPIENTINFO_KTRI_CERT_CMP            139
    87 #  define CMS_F_CMS_RECIPIENTINFO_KTRI_DECRYPT             140
    88 #  define CMS_F_CMS_RECIPIENTINFO_KTRI_ENCRYPT             141
    89 #  define CMS_F_CMS_RECIPIENTINFO_KTRI_GET0_ALGS           142
    90 #  define CMS_F_CMS_RECIPIENTINFO_KTRI_GET0_SIGNER_ID      143
    91 #  define CMS_F_CMS_RECIPIENTINFO_PWRI_CRYPT               167
    92 #  define CMS_F_CMS_RECIPIENTINFO_SET0_KEY                 144
    93 #  define CMS_F_CMS_RECIPIENTINFO_SET0_PASSWORD            168
    94 #  define CMS_F_CMS_RECIPIENTINFO_SET0_PKEY                145
    95 #  define CMS_F_CMS_SD_ASN1_CTRL                           170
    96 #  define CMS_F_CMS_SET1_IAS                               176
    97 #  define CMS_F_CMS_SET1_KEYID                             177
    98 #  define CMS_F_CMS_SET1_SIGNERIDENTIFIER                  146
    99 #  define CMS_F_CMS_SET_DETACHED                           147
    100 #  define CMS_F_CMS_SIGN                                   148
    101 #  define CMS_F_CMS_SIGNED_DATA_INIT                       149
    102 #  define CMS_F_CMS_SIGNERINFO_CONTENT_SIGN                150
    103 #  define CMS_F_CMS_SIGNERINFO_SIGN                        151
    104 #  define CMS_F_CMS_SIGNERINFO_VERIFY                      152
    105 #  define CMS_F_CMS_SIGNERINFO_VERIFY_CERT                 153
    106 #  define CMS_F_CMS_SIGNERINFO_VERIFY_CONTENT              154
    107 #  define CMS_F_CMS_SIGN_RECEIPT                           163
    108 #  define CMS_F_CMS_SI_CHECK_ATTRIBUTES                    183
    109 #  define CMS_F_CMS_STREAM                                 155
    110 #  define CMS_F_CMS_UNCOMPRESS                             156
    111 #  define CMS_F_CMS_VERIFY                                 157
    112 #  define CMS_F_KEK_UNWRAP_KEY                             180
    11322
    11423/*
     
    12029#  define CMS_R_CERTIFICATE_HAS_NO_KEYID                   160
    12130#  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
    12233#  define CMS_R_CIPHER_INITIALISATION_ERROR                101
    12334#  define CMS_R_CIPHER_PARAMETER_INITIALISATION_ERROR      102
     
    13344#  define CMS_R_CTRL_ERROR                                 110
    13445#  define CMS_R_CTRL_FAILURE                               111
     46#  define CMS_R_DECODE_ERROR                               187
    13547#  define CMS_R_DECRYPT_ERROR                              112
    13648#  define CMS_R_ERROR_GETTING_PUBLIC_KEY                   113
     
    13850#  define CMS_R_ERROR_SETTING_KEY                          115
    13951#  define CMS_R_ERROR_SETTING_RECIPIENTINFO                116
     52#  define CMS_R_ESS_SIGNING_CERTID_MISMATCH_ERROR          183
    14053#  define CMS_R_INVALID_ENCRYPTED_KEY_LENGTH               117
    14154#  define CMS_R_INVALID_KEY_ENCRYPTION_PARAMETER           176
    14255#  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
    14359#  define CMS_R_MD_BIO_INIT_ERROR                          119
    14460#  define CMS_R_MESSAGEDIGEST_ATTRIBUTE_WRONG_LENGTH       120
     
    17187#  define CMS_R_NO_RECEIPT_REQUEST                         168
    17288#  define CMS_R_NO_SIGNERS                                 135
     89#  define CMS_R_PEER_KEY_ERROR                             188
    17390#  define CMS_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE     136
    17491#  define CMS_R_RECEIPT_DECODE_ERROR                       169
    17592#  define CMS_R_RECIPIENT_ERROR                            137
     93#  define CMS_R_SHARED_INFO_ERROR                          189
    17694#  define CMS_R_SIGNER_CERTIFICATE_NOT_FOUND               138
    17795#  define CMS_R_SIGNFINAL_ERROR                            139
     
    189107#  define CMS_R_UNSUPPORTED_COMPRESSION_ALGORITHM          151
    190108#  define CMS_R_UNSUPPORTED_CONTENT_TYPE                   152
     109#  define CMS_R_UNSUPPORTED_ENCRYPTION_TYPE                192
    191110#  define CMS_R_UNSUPPORTED_KEK_ALGORITHM                  153
    192111#  define CMS_R_UNSUPPORTED_KEY_ENCRYPTION_ALGORITHM       179
     112#  define CMS_R_UNSUPPORTED_LABEL_SOURCE                   193
    193113#  define CMS_R_UNSUPPORTED_RECIPIENTINFO_TYPE             155
    194114#  define CMS_R_UNSUPPORTED_RECIPIENT_TYPE                 154
  • trunk/src/libs/openssl-3.0.1/include/openssl/comp.h

    r91772 r94082  
    22 * Copyright 2015-2018 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    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
    1218
    1319# include <openssl/opensslconf.h>
     
    3642COMP_METHOD *COMP_zlib(void);
    3743
    38 #if OPENSSL_API_COMPAT < 0x10100000L
    39 #define COMP_zlib_cleanup() while(0) continue
     44#ifndef OPENSSL_NO_DEPRECATED_1_1_0
     45# define COMP_zlib_cleanup() while(0) continue
    4046#endif
    4147
    42 # ifdef HEADER_BIO_H
     48# ifdef OPENSSL_BIO_H
    4349#  ifdef ZLIB
    4450const BIO_METHOD *BIO_f_zlib(void);
  • trunk/src/libs/openssl-3.0.1/include/openssl/comperr.h

    r91772 r94082  
    11/*
    22 * Generated by util/mkerr.pl DO NOT EDIT
    3  * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
     3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    44 *
    5  * Licensed under the OpenSSL license (the "License").  You may not use
     5 * Licensed under the Apache License 2.0 (the "License").  You may not use
    66 * this file except in compliance with the License.  You can obtain a copy
    77 * in the file LICENSE in the source distribution or at
     
    99 */
    1010
    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
    1714
    1815# include <openssl/opensslconf.h>
     16# include <openssl/symhacks.h>
     17# include <openssl/cryptoerr_legacy.h>
     18
    1919
    2020# ifndef OPENSSL_NO_COMP
    2121
    22 #  ifdef  __cplusplus
    23 extern "C"
    24 #  endif
    25 int ERR_load_COMP_strings(void);
    26 
    27 /*
    28  * COMP function codes.
    29  */
    30 #  define COMP_F_BIO_ZLIB_FLUSH                            99
    31 #  define COMP_F_BIO_ZLIB_NEW                              100
    32 #  define COMP_F_BIO_ZLIB_READ                             101
    33 #  define COMP_F_BIO_ZLIB_WRITE                            102
    34 #  define COMP_F_COMP_CTX_NEW                              103
    3522
    3623/*
  • trunk/src/libs/openssl-3.0.1/include/openssl/conf_api.h

    r91772 r94082  
    22 * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    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
    1218
    1319# include <openssl/lhash.h>
  • trunk/src/libs/openssl-3.0.1/include/openssl/conferr.h

    r91772 r94082  
    11/*
    22 * Generated by util/mkerr.pl DO NOT EDIT
    3  * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
     3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    44 *
    5  * Licensed under the OpenSSL license (the "License").  You may not use
     5 * Licensed under the Apache License 2.0 (the "License").  You may not use
    66 * this file except in compliance with the License.  You can obtain a copy
    77 * in the file LICENSE in the source distribution or at
     
    99 */
    1010
    11 #ifndef HEADER_CONFERR_H
    12 # define HEADER_CONFERR_H
     11#ifndef OPENSSL_CONFERR_H
     12# define OPENSSL_CONFERR_H
     13# pragma once
    1314
    14 # ifndef HEADER_SYMHACKS_H
    15 #  include <openssl/symhacks.h>
    16 # endif
     15# include <openssl/opensslconf.h>
     16# include <openssl/symhacks.h>
     17# include <openssl/cryptoerr_legacy.h>
    1718
    18 # ifdef  __cplusplus
    19 extern "C"
    20 # endif
    21 int ERR_load_CONF_strings(void);
    2219
    23 /*
    24  * CONF function codes.
    25  */
    26 # define CONF_F_CONF_DUMP_FP                              104
    27 # define CONF_F_CONF_LOAD                                 100
    28 # define CONF_F_CONF_LOAD_FP                              103
    29 # define CONF_F_CONF_PARSE_LIST                           119
    30 # define CONF_F_DEF_LOAD                                  120
    31 # define CONF_F_DEF_LOAD_BIO                              121
    32 # define CONF_F_GET_NEXT_FILE                             107
    33 # define CONF_F_MODULE_ADD                                122
    34 # define CONF_F_MODULE_INIT                               115
    35 # define CONF_F_MODULE_LOAD_DSO                           117
    36 # define CONF_F_MODULE_RUN                                118
    37 # define CONF_F_NCONF_DUMP_BIO                            105
    38 # define CONF_F_NCONF_DUMP_FP                             106
    39 # define CONF_F_NCONF_GET_NUMBER_E                        112
    40 # define CONF_F_NCONF_GET_SECTION                         108
    41 # define CONF_F_NCONF_GET_STRING                          109
    42 # define CONF_F_NCONF_LOAD                                113
    43 # define CONF_F_NCONF_LOAD_BIO                            110
    44 # define CONF_F_NCONF_LOAD_FP                             114
    45 # define CONF_F_NCONF_NEW                                 111
    46 # define CONF_F_PROCESS_INCLUDE                           116
    47 # define CONF_F_SSL_MODULE_INIT                           123
    48 # define CONF_F_STR_COPY                                  101
    4920
    5021/*
     
    5223 */
    5324# define CONF_R_ERROR_LOADING_DSO                         110
     25# define CONF_R_INVALID_PRAGMA                            122
    5426# define CONF_R_LIST_CANNOT_BE_NULL                       115
     27# define CONF_R_MANDATORY_BRACES_IN_VARIABLE_EXPANSION    123
    5528# define CONF_R_MISSING_CLOSE_SQUARE_BRACKET              100
    5629# define CONF_R_MISSING_EQUAL_SIGN                        101
     
    6437# define CONF_R_NO_VALUE                                  108
    6538# define CONF_R_NUMBER_TOO_LARGE                          121
     39# define CONF_R_OPENSSL_CONF_REFERENCES_MISSING_SECTION   124
    6640# define CONF_R_RECURSIVE_DIRECTORY_INCLUDE               111
     41# define CONF_R_RELATIVE_PATH                             125
    6742# define CONF_R_SSL_COMMAND_SECTION_EMPTY                 117
    6843# define CONF_R_SSL_COMMAND_SECTION_NOT_FOUND             118
  • trunk/src/libs/openssl-3.0.1/include/openssl/cryptoerr.h

    r91772 r94082  
    11/*
    22 * Generated by util/mkerr.pl DO NOT EDIT
    3  * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
     3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    44 *
    5  * Licensed under the OpenSSL license (the "License").  You may not use
     5 * Licensed under the Apache License 2.0 (the "License").  You may not use
    66 * this file except in compliance with the License.  You can obtain a copy
    77 * in the file LICENSE in the source distribution or at
     
    99 */
    1010
    11 #ifndef HEADER_CRYPTOERR_H
    12 # define HEADER_CRYPTOERR_H
     11#ifndef OPENSSL_CRYPTOERR_H
     12# define OPENSSL_CRYPTOERR_H
     13# pragma once
    1314
    14 # ifndef HEADER_SYMHACKS_H
    15 #  include <openssl/symhacks.h>
    16 # endif
     15# include <openssl/opensslconf.h>
     16# include <openssl/symhacks.h>
     17# include <openssl/cryptoerr_legacy.h>
    1718
    18 # ifdef  __cplusplus
    19 extern "C"
    20 # endif
    21 int ERR_load_CRYPTO_strings(void);
    2219
    23 /*
    24  * CRYPTO function codes.
    25  */
    26 # define CRYPTO_F_CMAC_CTX_NEW                            120
    27 # define CRYPTO_F_CRYPTO_DUP_EX_DATA                      110
    28 # define CRYPTO_F_CRYPTO_FREE_EX_DATA                     111
    29 # define CRYPTO_F_CRYPTO_GET_EX_NEW_INDEX                 100
    30 # define CRYPTO_F_CRYPTO_MEMDUP                           115
    31 # define CRYPTO_F_CRYPTO_NEW_EX_DATA                      112
    32 # define CRYPTO_F_CRYPTO_OCB128_COPY_CTX                  121
    33 # define CRYPTO_F_CRYPTO_OCB128_INIT                      122
    34 # define CRYPTO_F_CRYPTO_SET_EX_DATA                      102
    35 # define CRYPTO_F_FIPS_MODE_SET                           109
    36 # define CRYPTO_F_GET_AND_LOCK                            113
    37 # define CRYPTO_F_OPENSSL_ATEXIT                          114
    38 # define CRYPTO_F_OPENSSL_BUF2HEXSTR                      117
    39 # define CRYPTO_F_OPENSSL_FOPEN                           119
    40 # define CRYPTO_F_OPENSSL_HEXSTR2BUF                      118
    41 # define CRYPTO_F_OPENSSL_INIT_CRYPTO                     116
    42 # define CRYPTO_F_OPENSSL_LH_NEW                          126
    43 # define CRYPTO_F_OPENSSL_SK_DEEP_COPY                    127
    44 # define CRYPTO_F_OPENSSL_SK_DUP                          128
    45 # define CRYPTO_F_PKEY_HMAC_INIT                          123
    46 # define CRYPTO_F_PKEY_POLY1305_INIT                      124
    47 # define CRYPTO_F_PKEY_SIPHASH_INIT                       125
    48 # define CRYPTO_F_SK_RESERVE                              129
    4920
    5021/*
    5122 * CRYPTO reason codes.
    5223 */
    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
    5427# 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
    5534# 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
    5645
    5746#endif
  • trunk/src/libs/openssl-3.0.1/include/openssl/cterr.h

    r91772 r94082  
    11/*
    22 * Generated by util/mkerr.pl DO NOT EDIT
    3  * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
     3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    44 *
    5  * Licensed under the OpenSSL license (the "License").  You may not use
     5 * Licensed under the Apache License 2.0 (the "License").  You may not use
    66 * this file except in compliance with the License.  You can obtain a copy
    77 * in the file LICENSE in the source distribution or at
     
    99 */
    1010
    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
    1714
    1815# include <openssl/opensslconf.h>
     16# include <openssl/symhacks.h>
     17# include <openssl/cryptoerr_legacy.h>
     18
    1919
    2020# ifndef OPENSSL_NO_CT
    2121
    22 #  ifdef  __cplusplus
    23 extern "C"
    24 #  endif
    25 int ERR_load_CT_strings(void);
    26 
    27 /*
    28  * CT function codes.
    29  */
    30 #  define CT_F_CTLOG_NEW                                   117
    31 #  define CT_F_CTLOG_NEW_FROM_BASE64                       118
    32 #  define CT_F_CTLOG_NEW_FROM_CONF                         119
    33 #  define CT_F_CTLOG_STORE_LOAD_CTX_NEW                    122
    34 #  define CT_F_CTLOG_STORE_LOAD_FILE                       123
    35 #  define CT_F_CTLOG_STORE_LOAD_LOG                        130
    36 #  define CT_F_CTLOG_STORE_NEW                             131
    37 #  define CT_F_CT_BASE64_DECODE                            124
    38 #  define CT_F_CT_POLICY_EVAL_CTX_NEW                      133
    39 #  define CT_F_CT_V1_LOG_ID_FROM_PKEY                      125
    40 #  define CT_F_I2O_SCT                                     107
    41 #  define CT_F_I2O_SCT_LIST                                108
    42 #  define CT_F_I2O_SCT_SIGNATURE                           109
    43 #  define CT_F_O2I_SCT                                     110
    44 #  define CT_F_O2I_SCT_LIST                                111
    45 #  define CT_F_O2I_SCT_SIGNATURE                           112
    46 #  define CT_F_SCT_CTX_NEW                                 126
    47 #  define CT_F_SCT_CTX_VERIFY                              128
    48 #  define CT_F_SCT_NEW                                     100
    49 #  define CT_F_SCT_NEW_FROM_BASE64                         127
    50 #  define CT_F_SCT_SET0_LOG_ID                             101
    51 #  define CT_F_SCT_SET1_EXTENSIONS                         114
    52 #  define CT_F_SCT_SET1_LOG_ID                             115
    53 #  define CT_F_SCT_SET1_SIGNATURE                          116
    54 #  define CT_F_SCT_SET_LOG_ENTRY_TYPE                      102
    55 #  define CT_F_SCT_SET_SIGNATURE_NID                       103
    56 #  define CT_F_SCT_SET_VERSION                             104
    5722
    5823/*
  • trunk/src/libs/openssl-3.0.1/include/openssl/des.h

    r91772 r94082  
    11/*
    2  * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    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
    1218
    1319# include <openssl/opensslconf.h>
    1420
    1521# ifndef OPENSSL_NO_DES
    16 # ifdef  __cplusplus
     22#  ifdef  __cplusplus
    1723extern "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
    2128typedef unsigned int DES_LONG;
    2229
    23 # ifdef OPENSSL_BUILD_SHLIBCRYPTO
    24 undef OPENSSL_EXTERN
    25 define OPENSSL_EXTERN OPENSSL_EXPORT
    26 # endif
     30#   ifdef OPENSSL_BUILD_SHLIBCRYPTO
     31  undef OPENSSL_EXTERN
     32  define OPENSSL_EXTERN OPENSSL_EXPORT
     33#   endif
    2734
    2835typedef unsigned char DES_cblock[8];
     
    4350} DES_key_schedule;
    4451
    45 # define DES_KEY_SZ      (sizeof(DES_cblock))
    46 # define DES_SCHEDULE_SZ (sizeof(DES_key_schedule))
    47 
    48 # define DES_ENCRYPT     1
    49 # define DES_DECRYPT     0
    50 
    51 # define DES_CBC_MODE    0
    52 # define DES_PCBC_MODE   1
    53 
    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) \
    5562        DES_ecb3_encrypt((i),(o),(k1),(k2),(k1),(e))
    5663
    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) \
    5865        DES_ede3_cbc_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(e))
    5966
    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) \
    6168        DES_ede3_cfb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n),(e))
    6269
    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) \
    6471        DES_ede3_ofb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n))
    6572
    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
     76OSSL_DEPRECATEDIN_3_0 const char *DES_options(void);
     77OSSL_DEPRECATEDIN_3_0
    7078void DES_ecb3_encrypt(const_DES_cblock *input, DES_cblock *output,
    7179                      DES_key_schedule *ks1, DES_key_schedule *ks2,
    7280                      DES_key_schedule *ks3, int enc);
     81OSSL_DEPRECATEDIN_3_0
    7382DES_LONG DES_cbc_cksum(const unsigned char *input, DES_cblock *output,
    7483                       long length, DES_key_schedule *schedule,
    7584                       const_DES_cblock *ivec);
     85#  endif
    7686/* DES_cbc_encrypt does not update the IV!  Use DES_ncbc_encrypt instead. */
     87#  ifndef OPENSSL_NO_DEPRECATED_3_0
     88OSSL_DEPRECATEDIN_3_0
    7789void 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);
     92OSSL_DEPRECATEDIN_3_0
    8093void 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);
     96OSSL_DEPRECATEDIN_3_0
    8397void 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);
     100OSSL_DEPRECATEDIN_3_0
    87101void 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);
     104OSSL_DEPRECATEDIN_3_0
    90105void DES_ecb_encrypt(const_DES_cblock *input, DES_cblock *output,
    91106                     DES_key_schedule *ks, int enc);
     107#  endif
    92108
    93109/*
     
    101117 * encryption, zero if decryption.
    102118 */
     119#  ifndef OPENSSL_NO_DEPRECATED_3_0
     120OSSL_DEPRECATEDIN_3_0
    103121void DES_encrypt1(DES_LONG *data, DES_key_schedule *ks, int enc);
     122#  endif
    104123
    105124/*
     
    111130 * DES_encrypt1() DES_encrypt1() except faster :-).
    112131 */
     132#  ifndef OPENSSL_NO_DEPRECATED_3_0
     133OSSL_DEPRECATEDIN_3_0
    113134void 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);
     135OSSL_DEPRECATEDIN_3_0
     136void DES_encrypt3(DES_LONG *data, DES_key_schedule *ks1, DES_key_schedule *ks2,
     137                  DES_key_schedule *ks3);
     138OSSL_DEPRECATEDIN_3_0
     139void DES_decrypt3(DES_LONG *data, DES_key_schedule *ks1, DES_key_schedule *ks2,
     140                  DES_key_schedule *ks3);
     141OSSL_DEPRECATEDIN_3_0
    119142void 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);
     146OSSL_DEPRECATEDIN_3_0
    123147void DES_ede3_cfb64_encrypt(const unsigned char *in, unsigned char *out,
    124148                            long length, DES_key_schedule *ks1,
    125149                            DES_key_schedule *ks2, DES_key_schedule *ks3,
    126150                            DES_cblock *ivec, int *num, int enc);
     151OSSL_DEPRECATEDIN_3_0
    127152void DES_ede3_cfb_encrypt(const unsigned char *in, unsigned char *out,
    128153                          int numbits, long length, DES_key_schedule *ks1,
    129154                          DES_key_schedule *ks2, DES_key_schedule *ks3,
    130155                          DES_cblock *ivec, int enc);
     156OSSL_DEPRECATEDIN_3_0
    131157void DES_ede3_ofb64_encrypt(const unsigned char *in, unsigned char *out,
    132158                            long length, DES_key_schedule *ks1,
    133159                            DES_key_schedule *ks2, DES_key_schedule *ks3,
    134160                            DES_cblock *ivec, int *num);
     161OSSL_DEPRECATEDIN_3_0
    135162char *DES_fcrypt(const char *buf, const char *salt, char *ret);
     163OSSL_DEPRECATEDIN_3_0
    136164char *DES_crypt(const char *buf, const char *salt);
     165OSSL_DEPRECATEDIN_3_0
    137166void 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);
     168OSSL_DEPRECATEDIN_3_0
    140169void DES_pcbc_encrypt(const unsigned char *input, unsigned char *output,
    141170                      long length, DES_key_schedule *schedule,
    142171                      DES_cblock *ivec, int enc);
     172OSSL_DEPRECATEDIN_3_0
    143173DES_LONG DES_quad_cksum(const unsigned char *input, DES_cblock output[],
    144174                        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);
     175OSSL_DEPRECATEDIN_3_0 int DES_random_key(DES_cblock *ret);
     176OSSL_DEPRECATEDIN_3_0 void DES_set_odd_parity(DES_cblock *key);
     177OSSL_DEPRECATEDIN_3_0 int DES_check_key_parity(const_DES_cblock *key);
     178OSSL_DEPRECATEDIN_3_0 int DES_is_weak_key(const_DES_cblock *key);
     179#  endif
    149180/*
    150181 * 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
     185OSSL_DEPRECATEDIN_3_0
    154186int DES_set_key(const_DES_cblock *key, DES_key_schedule *schedule);
     187OSSL_DEPRECATEDIN_3_0
    155188int DES_key_sched(const_DES_cblock *key, DES_key_schedule *schedule);
     189OSSL_DEPRECATEDIN_3_0
    156190int DES_set_key_checked(const_DES_cblock *key, DES_key_schedule *schedule);
     191OSSL_DEPRECATEDIN_3_0
    157192void DES_set_key_unchecked(const_DES_cblock *key, DES_key_schedule *schedule);
    158 void DES_string_to_key(const char *str, DES_cblock *key);
     193OSSL_DEPRECATEDIN_3_0 void DES_string_to_key(const char *str, DES_cblock *key);
     194OSSL_DEPRECATEDIN_3_0
    159195void DES_string_to_2keys(const char *str, DES_cblock *key1, DES_cblock *key2);
     196OSSL_DEPRECATEDIN_3_0
    160197void DES_cfb64_encrypt(const unsigned char *in, unsigned char *out,
    161198                       long length, DES_key_schedule *schedule,
    162199                       DES_cblock *ivec, int *num, int enc);
     200OSSL_DEPRECATEDIN_3_0
    163201void DES_ofb64_encrypt(const unsigned char *in, unsigned char *out,
    164202                       long length, DES_key_schedule *schedule,
    165203                       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
    170207}
     208#  endif
    171209# endif
    172 # endif
    173210
    174211#endif
  • trunk/src/libs/openssl-3.0.1/include/openssl/dh.h

    r91772 r94082  
    11/*
    2  * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    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
    1218
    1319# 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>
    2421
    2522# ifdef  __cplusplus
     
    2724# endif
    2825
    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
     34int EVP_PKEY_CTX_set_dh_paramgen_type(EVP_PKEY_CTX *ctx, int typ);
     35int EVP_PKEY_CTX_set_dh_paramgen_gindex(EVP_PKEY_CTX *ctx, int gindex);
     36int EVP_PKEY_CTX_set_dh_paramgen_seed(EVP_PKEY_CTX *ctx,
     37                                      const unsigned char *seed,
     38                                      size_t seedlen);
     39int EVP_PKEY_CTX_set_dh_paramgen_prime_len(EVP_PKEY_CTX *ctx, int pbits);
     40int EVP_PKEY_CTX_set_dh_paramgen_subprime_len(EVP_PKEY_CTX *ctx, int qlen);
     41int EVP_PKEY_CTX_set_dh_paramgen_generator(EVP_PKEY_CTX *ctx, int gen);
     42int EVP_PKEY_CTX_set_dh_nid(EVP_PKEY_CTX *ctx, int nid);
     43int EVP_PKEY_CTX_set_dh_rfc5114(EVP_PKEY_CTX *ctx, int gen);
     44int EVP_PKEY_CTX_set_dhx_rfc5114(EVP_PKEY_CTX *ctx, int gen);
     45int EVP_PKEY_CTX_set_dh_pad(EVP_PKEY_CTX *ctx, int pad);
     46
     47int EVP_PKEY_CTX_set_dh_kdf_type(EVP_PKEY_CTX *ctx, int kdf);
     48int EVP_PKEY_CTX_get_dh_kdf_type(EVP_PKEY_CTX *ctx);
     49int EVP_PKEY_CTX_set0_dh_kdf_oid(EVP_PKEY_CTX *ctx, ASN1_OBJECT *oid);
     50int EVP_PKEY_CTX_get0_dh_kdf_oid(EVP_PKEY_CTX *ctx, ASN1_OBJECT **oid);
     51int EVP_PKEY_CTX_set_dh_kdf_md(EVP_PKEY_CTX *ctx, const EVP_MD *md);
     52int EVP_PKEY_CTX_get_dh_kdf_md(EVP_PKEY_CTX *ctx, const EVP_MD **md);
     53int EVP_PKEY_CTX_set_dh_kdf_outlen(EVP_PKEY_CTX *ctx, int len);
     54int EVP_PKEY_CTX_get_dh_kdf_outlen(EVP_PKEY_CTX *ctx, int *len);
     55int EVP_PKEY_CTX_set0_dh_kdf_ukm(EVP_PKEY_CTX *ctx, unsigned char *ukm, int len);
     56# ifndef OPENSSL_NO_DEPRECATED_3_0
     57OSSL_DEPRECATEDIN_3_0
     58int EVP_PKEY_CTX_get0_dh_kdf_ukm(EVP_PKEY_CTX *ctx, unsigned char **ukm);
     59#endif
    31160
    31261# define EVP_PKEY_CTRL_DH_PARAMGEN_PRIME_LEN     (EVP_PKEY_ALG_CTRL + 1)
     
    32978/* KDF types */
    33079# define EVP_PKEY_DH_KDF_NONE                            1
    331 # ifndef OPENSSL_NO_CMS
    33280# 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
     133DECLARE_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
     190DECLARE_ASN1_DUP_FUNCTION_name_attr(OSSL_DEPRECATEDIN_3_0, DH, DHparams)
     191
     192OSSL_DEPRECATEDIN_3_0 const DH_METHOD *DH_OpenSSL(void);
     193
     194OSSL_DEPRECATEDIN_3_0 void DH_set_default_method(const DH_METHOD *meth);
     195OSSL_DEPRECATEDIN_3_0 const DH_METHOD *DH_get_default_method(void);
     196OSSL_DEPRECATEDIN_3_0 int DH_set_method(DH *dh, const DH_METHOD *meth);
     197OSSL_DEPRECATEDIN_3_0 DH *DH_new_method(ENGINE *engine);
     198
     199OSSL_DEPRECATEDIN_3_0 DH *DH_new(void);
     200OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh);
     201OSSL_DEPRECATEDIN_3_0 int DH_up_ref(DH *dh);
     202OSSL_DEPRECATEDIN_3_0 int DH_bits(const DH *dh);
     203OSSL_DEPRECATEDIN_3_0 int DH_size(const DH *dh);
     204OSSL_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
     209OSSL_DEPRECATEDIN_3_0 int DH_set_ex_data(DH *d, int idx, void *arg);
     210OSSL_DEPRECATEDIN_3_0 void *DH_get_ex_data(const DH *d, int idx);
     211
     212OSSL_DEPRECATEDIN_3_0 int DH_generate_parameters_ex(DH *dh, int prime_len,
     213                                                    int generator,
     214                                                    BN_GENCB *cb);
     215
     216OSSL_DEPRECATEDIN_3_0 int DH_check_params_ex(const DH *dh);
     217OSSL_DEPRECATEDIN_3_0 int DH_check_ex(const DH *dh);
     218OSSL_DEPRECATEDIN_3_0 int DH_check_pub_key_ex(const DH *dh, const BIGNUM *pub_key);
     219OSSL_DEPRECATEDIN_3_0 int DH_check_params(const DH *dh, int *ret);
     220OSSL_DEPRECATEDIN_3_0 int DH_check(const DH *dh, int *codes);
     221OSSL_DEPRECATEDIN_3_0 int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key,
     222                                           int *codes);
     223OSSL_DEPRECATEDIN_3_0 int DH_generate_key(DH *dh);
     224OSSL_DEPRECATEDIN_3_0 int DH_compute_key(unsigned char *key,
     225                                         const BIGNUM *pub_key, DH *dh);
     226OSSL_DEPRECATEDIN_3_0 int DH_compute_key_padded(unsigned char *key,
     227                                                const BIGNUM *pub_key, DH *dh);
     228
     229DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(OSSL_DEPRECATEDIN_3_0, DH, DHparams)
     230DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(OSSL_DEPRECATEDIN_3_0, DH, DHxparams)
     231
     232#   ifndef OPENSSL_NO_STDIO
     233OSSL_DEPRECATEDIN_3_0 int DHparams_print_fp(FILE *fp, const DH *x);
     234#   endif
     235OSSL_DEPRECATEDIN_3_0 int DHparams_print(BIO *bp, const DH *x);
     236
     237/* RFC 5114 parameters */
     238OSSL_DEPRECATEDIN_3_0 DH *DH_get_1024_160(void);
     239OSSL_DEPRECATEDIN_3_0 DH *DH_get_2048_224(void);
     240OSSL_DEPRECATEDIN_3_0 DH *DH_get_2048_256(void);
     241
     242/* Named parameters, currently RFC7919 and RFC3526 */
     243OSSL_DEPRECATEDIN_3_0 DH *DH_new_by_nid(int nid);
     244OSSL_DEPRECATEDIN_3_0 int DH_get_nid(const DH *dh);
     245
     246/* RFC2631 KDF */
     247OSSL_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
     253OSSL_DEPRECATEDIN_3_0 void DH_get0_pqg(const DH *dh, const BIGNUM **p,
     254                                       const BIGNUM **q, const BIGNUM **g);
     255OSSL_DEPRECATEDIN_3_0 int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g);
     256OSSL_DEPRECATEDIN_3_0 void DH_get0_key(const DH *dh, const BIGNUM **pub_key,
     257                                       const BIGNUM **priv_key);
     258OSSL_DEPRECATEDIN_3_0 int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key);
     259OSSL_DEPRECATEDIN_3_0 const BIGNUM *DH_get0_p(const DH *dh);
     260OSSL_DEPRECATEDIN_3_0 const BIGNUM *DH_get0_q(const DH *dh);
     261OSSL_DEPRECATEDIN_3_0 const BIGNUM *DH_get0_g(const DH *dh);
     262OSSL_DEPRECATEDIN_3_0 const BIGNUM *DH_get0_priv_key(const DH *dh);
     263OSSL_DEPRECATEDIN_3_0 const BIGNUM *DH_get0_pub_key(const DH *dh);
     264OSSL_DEPRECATEDIN_3_0 void DH_clear_flags(DH *dh, int flags);
     265OSSL_DEPRECATEDIN_3_0 int DH_test_flags(const DH *dh, int flags);
     266OSSL_DEPRECATEDIN_3_0 void DH_set_flags(DH *dh, int flags);
     267OSSL_DEPRECATEDIN_3_0 ENGINE *DH_get0_engine(DH *d);
     268OSSL_DEPRECATEDIN_3_0 long DH_get_length(const DH *dh);
     269OSSL_DEPRECATEDIN_3_0 int DH_set_length(DH *dh, long length);
     270
     271OSSL_DEPRECATEDIN_3_0 DH_METHOD *DH_meth_new(const char *name, int flags);
     272OSSL_DEPRECATEDIN_3_0 void DH_meth_free(DH_METHOD *dhm);
     273OSSL_DEPRECATEDIN_3_0 DH_METHOD *DH_meth_dup(const DH_METHOD *dhm);
     274OSSL_DEPRECATEDIN_3_0 const char *DH_meth_get0_name(const DH_METHOD *dhm);
     275OSSL_DEPRECATEDIN_3_0 int DH_meth_set1_name(DH_METHOD *dhm, const char *name);
     276OSSL_DEPRECATEDIN_3_0 int DH_meth_get_flags(const DH_METHOD *dhm);
     277OSSL_DEPRECATEDIN_3_0 int DH_meth_set_flags(DH_METHOD *dhm, int flags);
     278OSSL_DEPRECATEDIN_3_0 void *DH_meth_get0_app_data(const DH_METHOD *dhm);
     279OSSL_DEPRECATEDIN_3_0 int DH_meth_set0_app_data(DH_METHOD *dhm, void *app_data);
     280OSSL_DEPRECATEDIN_3_0 int (*DH_meth_get_generate_key(const DH_METHOD *dhm)) (DH *);
     281OSSL_DEPRECATEDIN_3_0 int DH_meth_set_generate_key(DH_METHOD *dhm,
     282                                                   int (*generate_key) (DH *));
     283OSSL_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);
     287OSSL_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));
     292OSSL_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 *);
     298OSSL_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 *));
     304OSSL_DEPRECATEDIN_3_0 int (*DH_meth_get_init(const DH_METHOD *dhm))(DH *);
     305OSSL_DEPRECATEDIN_3_0 int DH_meth_set_init(DH_METHOD *dhm, int (*init)(DH *));
     306OSSL_DEPRECATEDIN_3_0 int (*DH_meth_get_finish(const DH_METHOD *dhm)) (DH *);
     307OSSL_DEPRECATEDIN_3_0 int DH_meth_set_finish(DH_METHOD *dhm, int (*finish) (DH *));
     308OSSL_DEPRECATEDIN_3_0 int (*DH_meth_get_generate_params(const DH_METHOD *dhm))
     309                                                        (DH *, int, int,
     310                                                         BN_GENCB *);
     311OSSL_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
     318OSSL_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
    333324# endif
    334 
    335 
    336 #  ifdef  __cplusplus
     325# ifdef  __cplusplus
    337326}
    338 #  endif
    339327# endif
    340328#endif
  • trunk/src/libs/openssl-3.0.1/include/openssl/dherr.h

    r91772 r94082  
    11/*
    22 * Generated by util/mkerr.pl DO NOT EDIT
    3  * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
     3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    44 *
    5  * Licensed under the OpenSSL license (the "License").  You may not use
     5 * Licensed under the Apache License 2.0 (the "License").  You may not use
    66 * this file except in compliance with the License.  You can obtain a copy
    77 * in the file LICENSE in the source distribution or at
     
    99 */
    1010
    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
    1714
    1815# include <openssl/opensslconf.h>
     16# include <openssl/symhacks.h>
     17# include <openssl/cryptoerr_legacy.h>
     18
    1919
    2020# ifndef OPENSSL_NO_DH
    2121
    22 #  ifdef  __cplusplus
    23 extern "C"
    24 #  endif
    25 int ERR_load_DH_strings(void);
    26 
    27 /*
    28  * DH function codes.
    29  */
    30 #  define DH_F_COMPUTE_KEY                                 102
    31 #  define DH_F_DHPARAMS_PRINT_FP                           101
    32 #  define DH_F_DH_BUILTIN_GENPARAMS                        106
    33 #  define DH_F_DH_CHECK_EX                                 121
    34 #  define DH_F_DH_CHECK_PARAMS_EX                          122
    35 #  define DH_F_DH_CHECK_PUB_KEY_EX                         123
    36 #  define DH_F_DH_CMS_DECRYPT                              114
    37 #  define DH_F_DH_CMS_SET_PEERKEY                          115
    38 #  define DH_F_DH_CMS_SET_SHARED_INFO                      116
    39 #  define DH_F_DH_METH_DUP                                 117
    40 #  define DH_F_DH_METH_NEW                                 118
    41 #  define DH_F_DH_METH_SET1_NAME                           119
    42 #  define DH_F_DH_NEW_BY_NID                               104
    43 #  define DH_F_DH_NEW_METHOD                               105
    44 #  define DH_F_DH_PARAM_DECODE                             107
    45 #  define DH_F_DH_PKEY_PUBLIC_CHECK                        124
    46 #  define DH_F_DH_PRIV_DECODE                              110
    47 #  define DH_F_DH_PRIV_ENCODE                              111
    48 #  define DH_F_DH_PUB_DECODE                               108
    49 #  define DH_F_DH_PUB_ENCODE                               109
    50 #  define DH_F_DO_DH_PRINT                                 100
    51 #  define DH_F_GENERATE_KEY                                103
    52 #  define DH_F_PKEY_DH_CTRL_STR                            120
    53 #  define DH_F_PKEY_DH_DERIVE                              112
    54 #  define DH_F_PKEY_DH_INIT                                125
    55 #  define DH_F_PKEY_DH_KEYGEN                              113
    5622
    5723/*
    5824 * DH reason codes.
    5925 */
     26#  define DH_R_BAD_FFC_PARAMETERS                          127
    6027#  define DH_R_BAD_GENERATOR                               101
    6128#  define DH_R_BN_DECODE_ERROR                             109
     
    7340#  define DH_R_INVALID_PARAMETER_NID                       114
    7441#  define DH_R_INVALID_PUBKEY                              102
     42#  define DH_R_INVALID_SECRET                              128
    7543#  define DH_R_KDF_PARAMETER_ERROR                         112
    7644#  define DH_R_KEYS_NOT_SET                                108
    7745#  define DH_R_MISSING_PUBKEY                              125
    7846#  define DH_R_MODULUS_TOO_LARGE                           103
     47#  define DH_R_MODULUS_TOO_SMALL                           126
    7948#  define DH_R_NOT_SUITABLE_GENERATOR                      120
    8049#  define DH_R_NO_PARAMETERS_SET                           107
  • trunk/src/libs/openssl-3.0.1/include/openssl/dsa.h

    r91772 r94082  
    11/*
    2  * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    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
    1218
    1319# include <openssl/opensslconf.h>
    14 
    15 # ifndef OPENSSL_NO_DSA
     20# include <openssl/types.h>
     21
    1622# ifdef  __cplusplus
    1723extern "C" {
    1824# 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
     28int EVP_PKEY_CTX_set_dsa_paramgen_bits(EVP_PKEY_CTX *ctx, int nbits);
     29int EVP_PKEY_CTX_set_dsa_paramgen_q_bits(EVP_PKEY_CTX *ctx, int qbits);
     30int EVP_PKEY_CTX_set_dsa_paramgen_md_props(EVP_PKEY_CTX *ctx,
     31                                           const char *md_name,
     32                                           const char *md_properties);
     33int EVP_PKEY_CTX_set_dsa_paramgen_gindex(EVP_PKEY_CTX *ctx, int gindex);
     34int EVP_PKEY_CTX_set_dsa_paramgen_type(EVP_PKEY_CTX *ctx, const char *name);
     35int EVP_PKEY_CTX_set_dsa_paramgen_seed(EVP_PKEY_CTX *ctx,
     36                                       const unsigned char *seed,
     37                                       size_t seedlen);
     38int 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
     61typedef struct DSA_SIG_st DSA_SIG;
     62DSA_SIG *DSA_SIG_new(void);
     63void DSA_SIG_free(DSA_SIG *a);
     64DECLARE_ASN1_ENCODE_FUNCTIONS_only(DSA_SIG, DSA_SIG)
     65void DSA_SIG_get0(const DSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps);
     66int DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s);
     67
     68
     69#  ifndef OPENSSL_NO_DEPRECATED_1_1_0
    3770/*
    3871 * Does nothing. Previously this switched off constant time behaviour.
    3972 */
    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
    4278
    4379/*
     
    4884 */
    4985
    50 # define DSA_FLAG_FIPS_METHOD                    0x0400
     86#   define DSA_FLAG_FIPS_METHOD                    0x0400
    5187
    5288/*
     
    5692 */
    5793
    58 # define DSA_FLAG_NON_FIPS_ALLOW                 0x0400
    59 # define DSA_FLAG_FIPS_CHECKED                   0x0800
     94#   define DSA_FLAG_NON_FIPS_ALLOW                 0x0400
     95#   define DSA_FLAG_FIPS_CHECKED                   0x0800
    6096
    6197/* Already defined in ossl_typ.h */
     
    6399/* typedef struct dsa_method DSA_METHOD; */
    64100
    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
     112DECLARE_ASN1_DUP_FUNCTION_name_attr(OSSL_DEPRECATEDIN_3_0, DSA, DSAparams)
     113OSSL_DEPRECATEDIN_3_0 DSA_SIG *DSA_do_sign(const unsigned char *dgst, int dlen,
     114                                           DSA *dsa);
     115OSSL_DEPRECATEDIN_3_0 int DSA_do_verify(const unsigned char *dgst, int dgst_len,
     116                                        DSA_SIG *sig, DSA *dsa);
     117
     118OSSL_DEPRECATEDIN_3_0 const DSA_METHOD *DSA_OpenSSL(void);
     119
     120OSSL_DEPRECATEDIN_3_0 void DSA_set_default_method(const DSA_METHOD *);
     121OSSL_DEPRECATEDIN_3_0 const DSA_METHOD *DSA_get_default_method(void);
     122OSSL_DEPRECATEDIN_3_0 int DSA_set_method(DSA *dsa, const DSA_METHOD *);
     123OSSL_DEPRECATEDIN_3_0 const DSA_METHOD *DSA_get_method(DSA *d);
     124
     125OSSL_DEPRECATEDIN_3_0 DSA *DSA_new(void);
     126OSSL_DEPRECATEDIN_3_0 DSA *DSA_new_method(ENGINE *engine);
     127OSSL_DEPRECATEDIN_3_0 void DSA_free(DSA *r);
    96128/* "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);
     129OSSL_DEPRECATEDIN_3_0 int DSA_up_ref(DSA *r);
     130OSSL_DEPRECATEDIN_3_0 int DSA_size(const DSA *);
     131OSSL_DEPRECATEDIN_3_0 int DSA_bits(const DSA *d);
     132OSSL_DEPRECATEDIN_3_0 int DSA_security_bits(const DSA *d);
    101133        /* 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 
     134OSSL_DEPRECATEDIN_3_0 int DSA_sign_setup(DSA *dsa, BN_CTX *ctx_in,
     135                                         BIGNUM **kinvp, BIGNUM **rp);
     136OSSL_DEPRECATEDIN_3_0 int DSA_sign(int type, const unsigned char *dgst,
     137                                   int dlen, unsigned char *sig,
     138                                   unsigned int *siglen, DSA *dsa);
     139OSSL_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)
     145OSSL_DEPRECATEDIN_3_0 int DSA_set_ex_data(DSA *d, int idx, void *arg);
     146OSSL_DEPRECATEDIN_3_0 void *DSA_get_ex_data(const DSA *d, int idx);
     147
     148DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(OSSL_DEPRECATEDIN_3_0,
     149                                        DSA, DSAPublicKey)
     150DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(OSSL_DEPRECATEDIN_3_0,
     151                                        DSA, DSAPrivateKey)
     152DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(OSSL_DEPRECATEDIN_3_0,
     153                                        DSA, DSAparams)
     154#  endif
     155
     156#  ifndef OPENSSL_NO_DEPRECATED_0_9_8
    116157/* 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 
     158OSSL_DEPRECATEDIN_0_9_8
     159DSA *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
    126166/* 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
     167OSSL_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
     174OSSL_DEPRECATEDIN_3_0 int DSA_generate_key(DSA *a);
     175
     176OSSL_DEPRECATEDIN_3_0 int DSAparams_print(BIO *bp, const DSA *x);
     177OSSL_DEPRECATEDIN_3_0 int DSA_print(BIO *bp, const DSA *x, int off);
     178#   ifndef OPENSSL_NO_STDIO
     179OSSL_DEPRECATEDIN_3_0 int DSAparams_print_fp(FILE *fp, const DSA *x);
     180OSSL_DEPRECATEDIN_3_0 int DSA_print_fp(FILE *bp, const DSA *x, int off);
     181#   endif
     182
     183#   define DSS_prime_checks 64
    145184/*
    146185 * Primality test according to FIPS PUB 186-4, Appendix C.3. Since we only
     
    149188 * DSA key.
    150189 */
    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_DH
     190#   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
    155194/*
    156195 * Convert DSA structure (key or just parameters) into DH structure (be
    157196 * careful to avoid small subgroup attacks when using this!)
    158197 */
    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))
     198OSSL_DEPRECATEDIN_3_0 DH *DSA_dup_DH(const DSA *r);
     199#   endif
     200
     201OSSL_DEPRECATEDIN_3_0 void DSA_get0_pqg(const DSA *d, const BIGNUM **p,
     202                                        const BIGNUM **q, const BIGNUM **g);
     203OSSL_DEPRECATEDIN_3_0 int DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g);
     204OSSL_DEPRECATEDIN_3_0 void DSA_get0_key(const DSA *d, const BIGNUM **pub_key,
     205                                        const BIGNUM **priv_key);
     206OSSL_DEPRECATEDIN_3_0 int DSA_set0_key(DSA *d, BIGNUM *pub_key,
     207                                       BIGNUM *priv_key);
     208OSSL_DEPRECATEDIN_3_0 const BIGNUM *DSA_get0_p(const DSA *d);
     209OSSL_DEPRECATEDIN_3_0 const BIGNUM *DSA_get0_q(const DSA *d);
     210OSSL_DEPRECATEDIN_3_0 const BIGNUM *DSA_get0_g(const DSA *d);
     211OSSL_DEPRECATEDIN_3_0 const BIGNUM *DSA_get0_pub_key(const DSA *d);
     212OSSL_DEPRECATEDIN_3_0 const BIGNUM *DSA_get0_priv_key(const DSA *d);
     213OSSL_DEPRECATEDIN_3_0 void DSA_clear_flags(DSA *d, int flags);
     214OSSL_DEPRECATEDIN_3_0 int DSA_test_flags(const DSA *d, int flags);
     215OSSL_DEPRECATEDIN_3_0 void DSA_set_flags(DSA *d, int flags);
     216OSSL_DEPRECATEDIN_3_0 ENGINE *DSA_get0_engine(DSA *d);
     217
     218OSSL_DEPRECATEDIN_3_0 DSA_METHOD *DSA_meth_new(const char *name, int flags);
     219OSSL_DEPRECATEDIN_3_0 void DSA_meth_free(DSA_METHOD *dsam);
     220OSSL_DEPRECATEDIN_3_0 DSA_METHOD *DSA_meth_dup(const DSA_METHOD *dsam);
     221OSSL_DEPRECATEDIN_3_0 const char *DSA_meth_get0_name(const DSA_METHOD *dsam);
     222OSSL_DEPRECATEDIN_3_0 int DSA_meth_set1_name(DSA_METHOD *dsam,
     223                                             const char *name);
     224OSSL_DEPRECATEDIN_3_0 int DSA_meth_get_flags(const DSA_METHOD *dsam);
     225OSSL_DEPRECATEDIN_3_0 int DSA_meth_set_flags(DSA_METHOD *dsam, int flags);
     226OSSL_DEPRECATEDIN_3_0 void *DSA_meth_get0_app_data(const DSA_METHOD *dsam);
     227OSSL_DEPRECATEDIN_3_0 int DSA_meth_set0_app_data(DSA_METHOD *dsam,
     228                                                 void *app_data);
     229OSSL_DEPRECATEDIN_3_0 DSA_SIG *(*DSA_meth_get_sign(const DSA_METHOD *dsam))
    202230        (const unsigned char *, int, DSA *);
    203 int DSA_meth_set_sign(DSA_METHOD *dsam,
     231OSSL_DEPRECATEDIN_3_0 int DSA_meth_set_sign(DSA_METHOD *dsam,
    204232                       DSA_SIG *(*sign) (const unsigned char *, int, DSA *));
    205 int (*DSA_meth_get_sign_setup(const DSA_METHOD *dsam))
     233OSSL_DEPRECATEDIN_3_0 int (*DSA_meth_get_sign_setup(const DSA_METHOD *dsam))
    206234        (DSA *, BN_CTX *, BIGNUM **, BIGNUM **);
    207 int DSA_meth_set_sign_setup(DSA_METHOD *dsam,
     235OSSL_DEPRECATEDIN_3_0 int DSA_meth_set_sign_setup(DSA_METHOD *dsam,
    208236        int (*sign_setup) (DSA *, BN_CTX *, BIGNUM **, BIGNUM **));
    209 int (*DSA_meth_get_verify(const DSA_METHOD *dsam))
     237OSSL_DEPRECATEDIN_3_0 int (*DSA_meth_get_verify(const DSA_METHOD *dsam))
    210238        (const unsigned char *, int, DSA_SIG *, DSA *);
    211 int DSA_meth_set_verify(DSA_METHOD *dsam,
     239OSSL_DEPRECATEDIN_3_0 int DSA_meth_set_verify(DSA_METHOD *dsam,
    212240    int (*verify) (const unsigned char *, int, DSA_SIG *, DSA *));
    213 int (*DSA_meth_get_mod_exp(const DSA_METHOD *dsam))
     241OSSL_DEPRECATEDIN_3_0 int (*DSA_meth_get_mod_exp(const DSA_METHOD *dsam))
    214242        (DSA *, BIGNUM *, const BIGNUM *, const BIGNUM *, const BIGNUM *,
    215243         const BIGNUM *, const BIGNUM *, BN_CTX *, BN_MONT_CTX *);
    216 int DSA_meth_set_mod_exp(DSA_METHOD *dsam,
     244OSSL_DEPRECATEDIN_3_0 int DSA_meth_set_mod_exp(DSA_METHOD *dsam,
    217245    int (*mod_exp) (DSA *, BIGNUM *, const BIGNUM *, const BIGNUM *,
    218246                    const BIGNUM *, const BIGNUM *, const BIGNUM *, BN_CTX *,
    219247                    BN_MONT_CTX *));
    220 int (*DSA_meth_get_bn_mod_exp(const DSA_METHOD *dsam))
     248OSSL_DEPRECATEDIN_3_0 int (*DSA_meth_get_bn_mod_exp(const DSA_METHOD *dsam))
    221249    (DSA *, BIGNUM *, const BIGNUM *, const BIGNUM *, const BIGNUM *,
    222250     BN_CTX *, BN_MONT_CTX *);
    223 int DSA_meth_set_bn_mod_exp(DSA_METHOD *dsam,
     251OSSL_DEPRECATEDIN_3_0 int DSA_meth_set_bn_mod_exp(DSA_METHOD *dsam,
    224252    int (*bn_mod_exp) (DSA *, BIGNUM *, const BIGNUM *, const BIGNUM *,
    225253                       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))
     254OSSL_DEPRECATEDIN_3_0 int (*DSA_meth_get_init(const DSA_METHOD *dsam))(DSA *);
     255OSSL_DEPRECATEDIN_3_0 int DSA_meth_set_init(DSA_METHOD *dsam,
     256                                            int (*init)(DSA *));
     257OSSL_DEPRECATEDIN_3_0 int (*DSA_meth_get_finish(const DSA_METHOD *dsam))(DSA *);
     258OSSL_DEPRECATEDIN_3_0 int DSA_meth_set_finish(DSA_METHOD *dsam,
     259                                              int (*finish)(DSA *));
     260OSSL_DEPRECATEDIN_3_0 int (*DSA_meth_get_paramgen(const DSA_METHOD *dsam))
    231261        (DSA *, int, const unsigned char *, int, int *, unsigned long *,
    232262         BN_GENCB *);
    233 int DSA_meth_set_paramgen(DSA_METHOD *dsam,
     263OSSL_DEPRECATEDIN_3_0 int DSA_meth_set_paramgen(DSA_METHOD *dsam,
    234264        int (*paramgen) (DSA *, int, const unsigned char *, int, int *,
    235265                         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
     266OSSL_DEPRECATEDIN_3_0 int (*DSA_meth_get_keygen(const DSA_METHOD *dsam))(DSA *);
     267OSSL_DEPRECATEDIN_3_0 int DSA_meth_set_keygen(DSA_METHOD *dsam,
     268                                              int (*keygen) (DSA *));
     269
     270#  endif
     271# endif
     272# ifdef  __cplusplus
    241273}
    242 #  endif
    243274# endif
    244275#endif
  • trunk/src/libs/openssl-3.0.1/include/openssl/dsaerr.h

    r91772 r94082  
    11/*
    22 * Generated by util/mkerr.pl DO NOT EDIT
    3  * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
     3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    44 *
    5  * Licensed under the OpenSSL license (the "License").  You may not use
     5 * Licensed under the Apache License 2.0 (the "License").  You may not use
    66 * this file except in compliance with the License.  You can obtain a copy
    77 * in the file LICENSE in the source distribution or at
     
    99 */
    1010
    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
    1714
    1815# include <openssl/opensslconf.h>
     16# include <openssl/symhacks.h>
     17# include <openssl/cryptoerr_legacy.h>
     18
    1919
    2020# ifndef OPENSSL_NO_DSA
    2121
    22 #  ifdef  __cplusplus
    23 extern "C"
    24 #  endif
    25 int ERR_load_DSA_strings(void);
    26 
    27 /*
    28  * DSA function codes.
    29  */
    30 #  define DSA_F_DSAPARAMS_PRINT                            100
    31 #  define DSA_F_DSAPARAMS_PRINT_FP                         101
    32 #  define DSA_F_DSA_BUILTIN_PARAMGEN                       125
    33 #  define DSA_F_DSA_BUILTIN_PARAMGEN2                      126
    34 #  define DSA_F_DSA_DO_SIGN                                112
    35 #  define DSA_F_DSA_DO_VERIFY                              113
    36 #  define DSA_F_DSA_METH_DUP                               127
    37 #  define DSA_F_DSA_METH_NEW                               128
    38 #  define DSA_F_DSA_METH_SET1_NAME                         129
    39 #  define DSA_F_DSA_NEW_METHOD                             103
    40 #  define DSA_F_DSA_PARAM_DECODE                           119
    41 #  define DSA_F_DSA_PRINT_FP                               105
    42 #  define DSA_F_DSA_PRIV_DECODE                            115
    43 #  define DSA_F_DSA_PRIV_ENCODE                            116
    44 #  define DSA_F_DSA_PUB_DECODE                             117
    45 #  define DSA_F_DSA_PUB_ENCODE                             118
    46 #  define DSA_F_DSA_SIGN                                   106
    47 #  define DSA_F_DSA_SIGN_SETUP                             107
    48 #  define DSA_F_DSA_SIG_NEW                                102
    49 #  define DSA_F_OLD_DSA_PRIV_DECODE                        122
    50 #  define DSA_F_PKEY_DSA_CTRL                              120
    51 #  define DSA_F_PKEY_DSA_CTRL_STR                          104
    52 #  define DSA_F_PKEY_DSA_KEYGEN                            121
    5322
    5423/*
    5524 * DSA reason codes.
    5625 */
     26#  define DSA_R_BAD_FFC_PARAMETERS                         114
    5727#  define DSA_R_BAD_Q_VALUE                                102
    5828#  define DSA_R_BN_DECODE_ERROR                            108
     
    6636#  define DSA_R_NO_PARAMETERS_SET                          107
    6737#  define DSA_R_PARAMETER_ENCODING_ERROR                   105
     38#  define DSA_R_P_NOT_PRIME                                115
    6839#  define DSA_R_Q_NOT_PRIME                                113
    6940#  define DSA_R_SEED_LEN_SMALL                             110
  • trunk/src/libs/openssl-3.0.1/include/openssl/dtls1.h

    r91772 r94082  
    11/*
    2  * Copyright 2005-2018 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 2005-2021 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    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>
    1220
    1321#ifdef  __cplusplus
     
    1523#endif
    1624
    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
    2132# define DTLS1_VERSION_MAJOR             0xFE
    22 
    23 # define DTLS1_BAD_VER                   0x0100
    2433
    2534/* Special value for method supporting multiple versions */
     
    2736
    2837/* 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
    3440
    3541# define DTLS1_RT_HEADER_LENGTH                  13
     
    4450# define DTLS1_AL_HEADER_LENGTH                   2
    4551
    46 /* Timeout multipliers */
    47 # define DTLS1_TMO_READ_COUNT                      2
    48 # define DTLS1_TMO_WRITE_COUNT                     2
    49 
    5052# define DTLS1_TMO_ALERT_COUNT                     12
    5153
  • trunk/src/libs/openssl-3.0.1/include/openssl/e_os2.h

    r91772 r94082  
    22 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    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
    1218
    1319# include <openssl/opensslconf.h>
     
    97103
    98104/* ------------------------------- OpenVMS -------------------------------- */
    99 # if defined(__VMS) || defined(VMS) || defined(OPENSSL_SYS_VMS)
     105# if defined(__VMS) || defined(VMS)
    100106#  if !defined(OPENSSL_SYS_VMS)
    101107#   undef OPENSSL_SYS_UNIX
    102 endif
    103 define OPENSSL_SYS_VMS
     108 define OPENSSL_SYS_VMS
     109endif
    104110#  if defined(__DECC)
    105111#   define OPENSSL_SYS_VMS_DECC
     
    133139# endif
    134140
     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
    135156/**
    136157 * That's it for OS-specific stuff
    137158 *****************************************************************************/
    138 
    139 /* Specials for I/O an exit */
    140 # ifdef OPENSSL_SYS_MSDOS
    141 #  define OPENSSL_UNISTD_IO <io.h>
    142 #  define OPENSSL_DECLARE_EXIT extern void exit(int);
    143 # else
    144 #  define OPENSSL_UNISTD_IO OPENSSL_UNISTD
    145 #  define OPENSSL_DECLARE_EXIT  /* declared in unistd.h */
    146 # endif
    147159
    148160/*-
     
    173185# endif
    174186
    175 /*-
    176  * Macros to allow global variables to be reached through function calls when
    177  * required (if a shared library version requires it, for example.
    178  * The way it's done allows definitions like this:
    179  *
    180  *      // in foobar.c
    181  *      OPENSSL_IMPLEMENT_GLOBAL(int,foobar,0)
    182  *      // in foobar.h
    183  *      OPENSSL_DECLARE_GLOBAL(int,foobar);
    184  *      #define foobar OPENSSL_GLOBAL_REF(foobar)
    185  */
    186 # ifdef OPENSSL_EXPORT_VAR_AS_FUNCTION
    187 #  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 # else
    193 #  define OPENSSL_IMPLEMENT_GLOBAL(type,name,value) type _shadow_##name=value;
    194 #  define OPENSSL_DECLARE_GLOBAL(type,name) OPENSSL_EXPORT type _shadow_##name
    195 #  define OPENSSL_GLOBAL_REF(name) _shadow_##name
    196 # endif
    197 
    198187# ifdef _WIN32
    199188#  ifdef _WIN64
     
    222211# endif
    223212
    224 # ifdef DEBUG_UNUSED
     213# if defined(UNUSEDRESULT_DEBUG)
    225214#  define __owur __attribute__((__warn_unused_result__))
    226215# else
     
    229218
    230219/* Standard integer types */
     220# define OPENSSL_NO_INTTYPES_H
     221# define OPENSSL_NO_STDINT_H
    231222# if defined(OPENSSL_SYS_UEFI)
    232223typedef INT8 int8_t;
     
    242233     defined(OPENSSL_SYS_VMS) || defined (__OpenBSD__)
    243234#  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
    244238# elif defined(_MSC_VER) && _MSC_VER<1600
    245239/*
     
    261255#  include <stdint.h>
    262256#  endif
     257#  undef OPENSSL_NO_STDINT_H
     258# endif
     259# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L && \
     260    defined(INTMAX_MAX) && defined(UINTMAX_MAX)
     261typedef intmax_t ossl_intmax_t;
     262typedef uintmax_t ossl_uintmax_t;
     263# else
     264/* Fall back to the largest we know we require and can handle */
     265typedef int64_t ossl_intmax_t;
     266typedef uint64_t ossl_uintmax_t;
    263267# endif
    264268
  • trunk/src/libs/openssl-3.0.1/include/openssl/ebcdic.h

    r91772 r94082  
    22 * Copyright 1999-2016 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    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
    1218
    1319# include <stdlib.h>
  • trunk/src/libs/openssl-3.0.1/include/openssl/ec.h

    r91772 r94082  
    11/*
    2  * Copyright 2002-2020 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 2002-2021 The OpenSSL Project Authors. All Rights Reserved.
    33 * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
    44 *
    5  * Licensed under the OpenSSL license (the "License").  You may not use
     5 * Licensed under the Apache License 2.0 (the "License").  You may not use
    66 * this file except in compliance with the License.  You can obtain a copy
    77 * in the file LICENSE in the source distribution or at
     
    99 */
    1010
    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
    1319
    1420# 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
    2323# ifdef  __cplusplus
    2424extern "C" {
    2525# endif
    2626
    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
     31int EVP_PKEY_CTX_set_ec_paramgen_curve_nid(EVP_PKEY_CTX *ctx, int nid);
     32int EVP_PKEY_CTX_set_ec_param_enc(EVP_PKEY_CTX *ctx, int param_enc);
     33int EVP_PKEY_CTX_set_ecdh_cofactor_mode(EVP_PKEY_CTX *ctx, int cofactor_mode);
     34int EVP_PKEY_CTX_get_ecdh_cofactor_mode(EVP_PKEY_CTX *ctx);
     35
     36int EVP_PKEY_CTX_set_ecdh_kdf_type(EVP_PKEY_CTX *ctx, int kdf);
     37int EVP_PKEY_CTX_get_ecdh_kdf_type(EVP_PKEY_CTX *ctx);
     38
     39int EVP_PKEY_CTX_set_ecdh_kdf_md(EVP_PKEY_CTX *ctx, const EVP_MD *md);
     40int EVP_PKEY_CTX_get_ecdh_kdf_md(EVP_PKEY_CTX *ctx, const EVP_MD **md);
     41
     42int EVP_PKEY_CTX_set_ecdh_kdf_outlen(EVP_PKEY_CTX *ctx, int len);
     43int EVP_PKEY_CTX_get_ecdh_kdf_outlen(EVP_PKEY_CTX *ctx, int *len);
     44
     45int EVP_PKEY_CTX_set0_ecdh_kdf_ukm(EVP_PKEY_CTX *ctx, unsigned char *ukm,
     46                                   int len);
     47# ifndef OPENSSL_NO_DEPRECATED_3_0
     48OSSL_DEPRECATEDIN_3_0
     49int EVP_PKEY_CTX_get0_ecdh_kdf_ukm(EVP_PKEY_CTX *ctx, unsigned char **ukm);
    2950# 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
    3073
    3174/** Enum for the point conversion form as defined in X9.62 (ECDSA)
     
    4285} point_conversion_form_t;
    4386
     87const 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
    44103typedef struct ec_method_st EC_METHOD;
     104#  endif
    45105typedef struct ec_group_st EC_GROUP;
    46106typedef struct ec_point_st EC_POINT;
     
    52112/********************************************************************/
    53113
     114#  ifndef OPENSSL_NO_DEPRECATED_3_0
    54115/** Returns the basic GFp ec methods which provides the basis for the
    55116 *  optimized methods.
    56117 *  \return  EC_METHOD object
    57118 */
    58 const EC_METHOD *EC_GFp_simple_method(void);
     119OSSL_DEPRECATEDIN_3_0 const EC_METHOD *EC_GFp_simple_method(void);
    59120
    60121/** Returns GFp methods using montgomery multiplication.
    61122 *  \return  EC_METHOD object
    62123 */
    63 const EC_METHOD *EC_GFp_mont_method(void);
     124OSSL_DEPRECATEDIN_3_0 const EC_METHOD *EC_GFp_mont_method(void);
    64125
    65126/** Returns GFp methods using optimized methods for NIST recommended curves
    66127 *  \return  EC_METHOD object
    67128 */
    68 const EC_METHOD *EC_GFp_nist_method(void);
    69 
    70 # ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
     129OSSL_DEPRECATEDIN_3_0 const EC_METHOD *EC_GFp_nist_method(void);
     130
     131#   ifndef OPENSSL_NO_EC_NISTP_64_GCC_128
    71132/** Returns 64-bit optimized methods for nistp224
    72133 *  \return  EC_METHOD object
    73134 */
    74 const EC_METHOD *EC_GFp_nistp224_method(void);
     135OSSL_DEPRECATEDIN_3_0 const EC_METHOD *EC_GFp_nistp224_method(void);
    75136
    76137/** Returns 64-bit optimized methods for nistp256
    77138 *  \return  EC_METHOD object
    78139 */
    79 const EC_METHOD *EC_GFp_nistp256_method(void);
     140OSSL_DEPRECATEDIN_3_0 const EC_METHOD *EC_GFp_nistp256_method(void);
    80141
    81142/** Returns 64-bit optimized methods for nistp521
    82143 *  \return  EC_METHOD object
    83144 */
    84 const EC_METHOD *EC_GFp_nistp521_method(void);
    85 # endif
    86 
    87 # ifndef OPENSSL_NO_EC2M
     145OSSL_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
    88149/********************************************************************/
    89150/*           EC_METHOD for curves over GF(2^m)                      */
     
    93154 *  \return  EC_METHOD object
    94155 */
    95 const EC_METHOD *EC_GF2m_simple_method(void);
    96 
    97 # endif
     156OSSL_DEPRECATEDIN_3_0 const EC_METHOD *EC_GF2m_simple_method(void);
     157
     158#   endif
    98159
    99160/********************************************************************/
     
    101162/********************************************************************/
    102163
    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
    105167 *  \return  newly created EC_GROUP object or NULL in case of an error.
    106168 */
    107 EC_GROUP *EC_GROUP_new(const EC_METHOD *meth);
     169OSSL_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 */
     174OSSL_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 */
     180OSSL_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 */
     186OSSL_DEPRECATEDIN_3_0 int EC_METHOD_get_field_type(const EC_METHOD *meth);
     187#  endif /* OPENSSL_NO_DEPRECATED_3_0 */
    108188
    109189/** Frees a EC_GROUP object
     
    111191 */
    112192void EC_GROUP_free(EC_GROUP *group);
    113 
    114 /** Clears and frees a EC_GROUP object
    115  *  \param  group  EC_GROUP object to be cleared and freed.
    116  */
    117 void EC_GROUP_clear_free(EC_GROUP *group);
    118193
    119194/** Copies EC_GROUP objects. Note: both EC_GROUPs must use the same EC_METHOD.
     
    124199int EC_GROUP_copy(EC_GROUP *dst, const EC_GROUP *src);
    125200
    126 /** Creates a new EC_GROUP object and copies the copies the content
     201/** Creates a new EC_GROUP object and copies the content
    127202 *  form src to the newly created EC_KEY object
    128203 *  \param  src  source EC_GROUP object
     
    130205 */
    131206EC_GROUP *EC_GROUP_dup(const EC_GROUP *src);
    132 
    133 /** Returns the EC_METHOD of the EC_GROUP object.
    134  *  \param  group  EC_GROUP object
    135  *  \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 object
    141  *  \return NID of the underlying field type OID.
    142  */
    143 int EC_METHOD_get_field_type(const EC_METHOD *meth);
    144207
    145208/** Sets the generator and its order/cofactor of a EC_GROUP object.
     
    213276int EC_GROUP_get_curve_name(const EC_GROUP *group);
    214277
     278/** Gets the field of an EC_GROUP
     279 *  \param  group  EC_GROUP object
     280 *  \return the group field
     281 */
     282const 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 */
     288int EC_GROUP_get_field_type(const EC_GROUP *group);
     289
    215290void EC_GROUP_set_asn1_flag(EC_GROUP *group, int flag);
    216291int EC_GROUP_get_asn1_flag(const EC_GROUP *group);
     
    224299size_t EC_GROUP_set_seed(EC_GROUP *, const unsigned char *, size_t len);
    225300
    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)
    227302 *  or y^2 + x*y = x^3 + a*x^2 + b (for GF2m)
    228303 *  \param  group  EC_GROUP object
     
    250325                       BN_CTX *ctx);
    251326
     327#  ifndef OPENSSL_NO_DEPRECATED_3_0
    252328/** Sets the parameters of an ec curve. Synonym for EC_GROUP_set_curve
    253329 *  \param  group  EC_GROUP object
     
    259335 *  \return 1 on success and 0 if an error occurred
    260336 */
    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))
     337OSSL_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);
    264342
    265343/** Gets the parameters of an ec curve. Synonym for EC_GROUP_get_curve
     
    272350 *  \return 1 on success and 0 if an error occurred
    273351 */
    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
     352OSSL_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
    279358/** Sets the parameter of an ec curve. Synonym for EC_GROUP_set_curve
    280359 *  \param  group  EC_GROUP object
     
    286365 *  \return 1 on success and 0 if an error occurred
    287366 */
    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))
     367OSSL_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);
    291372
    292373/** Gets the parameters of an ec curve. Synonym for EC_GROUP_get_curve
     
    299380 *  \return 1 on success and 0 if an error occurred
    300381 */
    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
     382OSSL_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
    305389/** Returns the number of bits needed to represent a field element
    306390 *  \param  group  EC_GROUP object
     
    346430EC_GROUP *EC_GROUP_new_curve_GFp(const BIGNUM *p, const BIGNUM *a,
    347431                                 const BIGNUM *b, BN_CTX *ctx);
    348 # ifndef OPENSSL_NO_EC2M
     432#  ifndef OPENSSL_NO_EC2M
    349433/** Creates a new EC_GROUP object with the specified parameters defined
    350434 *  over GF2m (defined by the equation y^2 + x*y = x^3 + a*x^2 + b)
     
    357441EC_GROUP *EC_GROUP_new_curve_GF2m(const BIGNUM *p, const BIGNUM *a,
    358442                                  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 */
     455EC_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 */
     467EC_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
    363475 *  \return newly created EC_GROUP object with specified curve or NULL
    364476 *          if an error occurred
     
    417529const char *EC_curve_nid2nist(int nid);
    418530int EC_curve_nist2nid(const char *name);
     531int EC_GROUP_check_named_curve(const EC_GROUP *group, int nist_only,
     532                               BN_CTX *ctx);
    419533
    420534/********************************************************************/
     
    453567EC_POINT *EC_POINT_dup(const EC_POINT *src, const EC_GROUP *group);
    454568
     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 */
     574int EC_POINT_set_to_infinity(const EC_GROUP *group, EC_POINT *point);
     575
     576#  ifndef OPENSSL_NO_DEPRECATED_3_0
    455577/** Returns the EC_METHOD used in EC_POINT object
    456578 *  \param  point  EC_POINT object
    457579 *  \return the EC_METHOD used
    458580 */
    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);
     581OSSL_DEPRECATEDIN_3_0 const EC_METHOD *EC_POINT_method_of(const EC_POINT *point);
    467582
    468583/** Sets the jacobian projective coordinates of a EC_POINT over GFp
     
    475590 *  \return 1 on success and 0 if an error occurred
    476591 */
    477 int EC_POINT_set_Jprojective_coordinates_GFp(const EC_GROUP *group,
    478                                              EC_POINT *p, const BIGNUM *x,
    479                                              const BIGNUM *y, const BIGNUM *z,
    480                                              BN_CTX *ctx);
     592OSSL_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);
    481596
    482597/** Gets the jacobian projective coordinates of a EC_POINT over GFp
     
    489604 *  \return 1 on success and 0 if an error occurred
    490605 */
    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);
     606OSSL_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 */
    495610
    496611/** Sets the affine coordinates of an EC_POINT
     
    517632                                    BIGNUM *x, BIGNUM *y, BN_CTX *ctx);
    518633
     634#  ifndef OPENSSL_NO_DEPRECATED_3_0
    519635/** Sets the affine coordinates of an EC_POINT. A synonym of
    520636 *  EC_POINT_set_affine_coordinates
     
    526642 *  \return 1 on success and 0 if an error occurred
    527643 */
    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))
     644OSSL_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);
    533647
    534648/** Gets the affine coordinates of an EC_POINT. A synonym of
     
    541655 *  \return 1 on success and 0 if an error occurred
    542656 */
    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))
     657OSSL_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 */
    548661
    549662/** Sets the x9.62 compressed coordinates of a EC_POINT
     
    559672                                        BN_CTX *ctx);
    560673
     674#  ifndef OPENSSL_NO_DEPRECATED_3_0
    561675/** Sets the x9.62 compressed coordinates of a EC_POINT. A synonym of
    562676 *  EC_POINT_set_compressed_coordinates
     
    568682 *  \return 1 on success and 0 if an error occurred
    569683 */
    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
     684OSSL_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
    576688/** Sets the affine coordinates of an EC_POINT. A synonym of
    577689 *  EC_POINT_set_affine_coordinates
     
    583695 *  \return 1 on success and 0 if an error occurred
    584696 */
    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))
     697OSSL_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);
    590700
    591701/** Gets the affine coordinates of an EC_POINT. A synonym of
     
    598708 *  \return 1 on success and 0 if an error occurred
    599709 */
    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))
     710OSSL_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);
    605713
    606714/** Sets the x9.62 compressed coordinates of a EC_POINT. A synonym of
     
    613721 *  \return 1 on success and 0 if an error occurred
    614722 */
    615 DEPRECATEDIN_1_2_0(int EC_POINT_set_compressed_coordinates_GF2m(const EC_GROUP *group,
    616                                                                 EC_POINT *p,
    617                                                                 const BIGNUM *x,
    618                                                                 int y_bit,
    619                                                                 BN_CTX *ctx))
    620 # endif
     723OSSL_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
    621729/** Encodes a EC_POINT object to a octet string
    622730 *  \param  group  underlying EC_GROUP object
     
    657765
    658766/* 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
     768OSSL_DEPRECATEDIN_3_0 BIGNUM *EC_POINT_point2bn(const EC_GROUP *,
     769                                                const EC_POINT *,
     770                                                point_conversion_form_t form,
     771                                                BIGNUM *, BN_CTX *);
     772OSSL_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
    663777char *EC_POINT_point2hex(const EC_GROUP *, const EC_POINT *,
    664778                         point_conversion_form_t form, BN_CTX *);
     
    725839                 BN_CTX *ctx);
    726840
    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
     842OSSL_DEPRECATEDIN_3_0 int EC_POINT_make_affine(const EC_GROUP *group,
     843                                               EC_POINT *point, BN_CTX *ctx);
     844OSSL_DEPRECATEDIN_3_0 int EC_POINTs_make_affine(const EC_GROUP *group, size_t num,
     845                                                EC_POINT *points[], BN_CTX *ctx);
    730846
    731847/** Computes r = generator * n + sum_{i=0}^{num-1} p[i] * m[i]
     
    739855 *  \return 1 on success and 0 if an error occurred
    740856 */
    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);
     857OSSL_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 */
    744862
    745863/** Computes r = generator * n + q * m
     
    755873                 const EC_POINT *q, const BIGNUM *m, BN_CTX *ctx);
    756874
     875#  ifndef OPENSSL_NO_DEPRECATED_3_0
    757876/** Stores multiples of generator for faster point multiplication
    758877 *  \param  group  EC_GROUP object
     
    760879 *  \return 1 on success and 0 if an error occurred
    761880 */
    762 int EC_GROUP_precompute_mult(EC_GROUP *group, BN_CTX *ctx);
     881OSSL_DEPRECATEDIN_3_0 int EC_GROUP_precompute_mult(EC_GROUP *group, BN_CTX *ctx);
    763882
    764883/** Reports whether a precomputation has been done
     
    766885 *  \return 1 if a pre-computation has been done and 0 otherwise
    767886 */
    768 int EC_GROUP_have_precompute_mult(const EC_GROUP *group);
     887OSSL_DEPRECATEDIN_3_0 int EC_GROUP_have_precompute_mult(const EC_GROUP *group);
     888#  endif /* OPENSSL_NO_DEPRECATED_3_0 */
    769889
    770890/********************************************************************/
     
    782902 */
    783903int EC_GROUP_get_basis_type(const EC_GROUP *);
    784 # ifndef OPENSSL_NO_EC2M
     904#  ifndef OPENSSL_NO_EC2M
    785905int EC_GROUP_get_trinomial_basis(const EC_GROUP *, unsigned int *k);
    786906int EC_GROUP_get_pentanomial_basis(const EC_GROUP *, unsigned int *k1,
    787907                                   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
    792909
    793910EC_GROUP *d2i_ECPKParameters(EC_GROUP **, const unsigned char **in, long len);
    794911int i2d_ECPKParameters(const EC_GROUP *, unsigned char **out);
    795912
    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
     924OSSL_DEPRECATEDIN_3_0 int ECPKParameters_print(BIO *bp, const EC_GROUP *x,
     925                                               int off);
     926#   ifndef OPENSSL_NO_STDIO
     927OSSL_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 */
    807931
    808932/********************************************************************/
     
    811935
    812936/* some values for the encoding_flag */
    813 # define EC_PKEY_NO_PARAMETERS   0x001
    814 # define EC_PKEY_NO_PUBKEY       0x002
     937#  define EC_PKEY_NO_PARAMETERS   0x001
     938#  define EC_PKEY_NO_PUBKEY       0x002
    815939
    816940/* 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.
    822957 *  \return EC_KEY object or NULL if an error occurred.
    823958 */
    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
     959OSSL_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 */
     966OSSL_DEPRECATEDIN_3_0 EC_KEY *EC_KEY_new(void);
     967
     968OSSL_DEPRECATEDIN_3_0 int EC_KEY_get_flags(const EC_KEY *key);
     969
     970OSSL_DEPRECATEDIN_3_0 void EC_KEY_set_flags(EC_KEY *key, int flags);
     971
     972OSSL_DEPRECATEDIN_3_0 void EC_KEY_clear_flags(EC_KEY *key, int flags);
     973
     974OSSL_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
    835978 *  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 */
     985OSSL_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.
    836993 *  \param  nid  NID of the named curve.
    837994 *  \return EC_KEY object or NULL if an error occurred.
    838995 */
    839 EC_KEY *EC_KEY_new_by_curve_name(int nid);
     996OSSL_DEPRECATEDIN_3_0 EC_KEY *EC_KEY_new_by_curve_name(int nid);
    840997
    841998/** Frees a EC_KEY object.
    842999 *  \param  key  EC_KEY object to be freed.
    8431000 */
    844 void EC_KEY_free(EC_KEY *key);
     1001OSSL_DEPRECATEDIN_3_0 void EC_KEY_free(EC_KEY *key);
    8451002
    8461003/** Copies a EC_KEY object.
     
    8491006 *  \return dst or NULL if an error occurred.
    8501007 */
    851 EC_KEY *EC_KEY_copy(EC_KEY *dst, const EC_KEY *src);
     1008OSSL_DEPRECATEDIN_3_0 EC_KEY *EC_KEY_copy(EC_KEY *dst, const EC_KEY *src);
    8521009
    8531010/** Creates a new EC_KEY object and copies the content from src to it.
     
    8551012 *  \return newly created EC_KEY object or NULL if an error occurred.
    8561013 */
    857 EC_KEY *EC_KEY_dup(const EC_KEY *src);
     1014OSSL_DEPRECATEDIN_3_0 EC_KEY *EC_KEY_dup(const EC_KEY *src);
    8581015
    8591016/** Increases the internal reference count of a EC_KEY object.
     
    8611018 *  \return 1 on success and 0 if an error occurred.
    8621019 */
    863 int EC_KEY_up_ref(EC_KEY *key);
     1020OSSL_DEPRECATEDIN_3_0 int EC_KEY_up_ref(EC_KEY *key);
    8641021
    8651022/** Returns the ENGINE object of a EC_KEY object
     
    8671024 *  \return the ENGINE object (possibly NULL).
    8681025 */
    869 ENGINE *EC_KEY_get0_engine(const EC_KEY *eckey);
     1026OSSL_DEPRECATEDIN_3_0 ENGINE *EC_KEY_get0_engine(const EC_KEY *eckey);
    8701027
    8711028/** Returns the EC_GROUP object of a EC_KEY object
     
    8731030 *  \return the EC_GROUP object (possibly NULL).
    8741031 */
    875 const EC_GROUP *EC_KEY_get0_group(const EC_KEY *key);
     1032OSSL_DEPRECATEDIN_3_0 const EC_GROUP *EC_KEY_get0_group(const EC_KEY *key);
    8761033
    8771034/** Sets the EC_GROUP of a EC_KEY object.
     
    8811038 *  \return 1 on success and 0 if an error occurred.
    8821039 */
    883 int EC_KEY_set_group(EC_KEY *key, const EC_GROUP *group);
     1040OSSL_DEPRECATEDIN_3_0 int EC_KEY_set_group(EC_KEY *key, const EC_GROUP *group);
    8841041
    8851042/** Returns the private key of a EC_KEY object.
     
    8871044 *  \return a BIGNUM with the private key (possibly NULL).
    8881045 */
    889 const BIGNUM *EC_KEY_get0_private_key(const EC_KEY *key);
     1046OSSL_DEPRECATEDIN_3_0 const BIGNUM *EC_KEY_get0_private_key(const EC_KEY *key);
    8901047
    8911048/** Sets the private key of a EC_KEY object.
     
    8951052 *  \return 1 on success and 0 if an error occurred.
    8961053 */
    897 int EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *prv);
     1054OSSL_DEPRECATEDIN_3_0 int EC_KEY_set_private_key(EC_KEY *key, const BIGNUM *prv);
    8981055
    8991056/** Returns the public key of a EC_KEY object.
     
    9011058 *  \return a EC_POINT object with the public key (possibly NULL)
    9021059 */
    903 const EC_POINT *EC_KEY_get0_public_key(const EC_KEY *key);
     1060OSSL_DEPRECATEDIN_3_0 const EC_POINT *EC_KEY_get0_public_key(const EC_KEY *key);
    9041061
    9051062/** Sets the public key of a EC_KEY object.
     
    9091066 *  \return 1 on success and 0 if an error occurred.
    9101067 */
    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) \
     1068OSSL_DEPRECATEDIN_3_0 int EC_KEY_set_public_key(EC_KEY *key, const EC_POINT *pub);
     1069
     1070OSSL_DEPRECATEDIN_3_0 unsigned EC_KEY_get_enc_flags(const EC_KEY *key);
     1071OSSL_DEPRECATEDIN_3_0 void EC_KEY_set_enc_flags(EC_KEY *eckey, unsigned int flags);
     1072OSSL_DEPRECATEDIN_3_0 point_conversion_form_t EC_KEY_get_conv_form(const EC_KEY *key);
     1073OSSL_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) \
    9191078    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
     1081OSSL_DEPRECATEDIN_3_0 int EC_KEY_set_ex_data(EC_KEY *key, int idx, void *arg);
     1082OSSL_DEPRECATEDIN_3_0 void *EC_KEY_get_ex_data(const EC_KEY *key, int idx);
    9221083
    9231084/* wrapper functions for the underlying EC_GROUP object */
    924 void EC_KEY_set_asn1_flag(EC_KEY *eckey, int asn1_flag);
     1085OSSL_DEPRECATEDIN_3_0 void EC_KEY_set_asn1_flag(EC_KEY *eckey, int asn1_flag);
    9251086
    9261087/** Creates a table of pre-computed multiples of the generator to
     
    9301091 *  \return 1 on success and 0 if an error occurred.
    9311092 */
    932 int EC_KEY_precompute_mult(EC_KEY *key, BN_CTX *ctx);
     1093OSSL_DEPRECATEDIN_3_0 int EC_KEY_precompute_mult(EC_KEY *key, BN_CTX *ctx);
    9331094
    9341095/** Creates a new ec private (and optional a new public) key.
     
    9361097 *  \return 1 on success and 0 if an error occurred.
    9371098 */
    938 int EC_KEY_generate_key(EC_KEY *key);
     1099OSSL_DEPRECATEDIN_3_0 int EC_KEY_generate_key(EC_KEY *key);
    9391100
    9401101/** Verifies that a private and/or public key is valid.
     
    9421103 *  \return 1 on success and 0 otherwise.
    9431104 */
    944 int EC_KEY_check_key(const EC_KEY *key);
     1105OSSL_DEPRECATEDIN_3_0 int EC_KEY_check_key(const EC_KEY *key);
    9451106
    9461107/** Indicates if an EC_KEY can be used for signing.
     
    9481109 *  \return 1 if can can sign and 0 otherwise.
    9491110 */
    950 int EC_KEY_can_sign(const EC_KEY *eckey);
     1111OSSL_DEPRECATEDIN_3_0 int EC_KEY_can_sign(const EC_KEY *eckey);
    9511112
    9521113/** Sets a public key from affine coordinates performing
     
    9571118 *  \return 1 on success and 0 otherwise.
    9581119 */
    959 int EC_KEY_set_public_key_affine_coordinates(EC_KEY *key, BIGNUM *x,
    960                                              BIGNUM *y);
     1120OSSL_DEPRECATEDIN_3_0 int EC_KEY_set_public_key_affine_coordinates(EC_KEY *key,
     1121                                                                   BIGNUM *x,
     1122                                                                   BIGNUM *y);
    9611123
    9621124/** Encodes an EC_KEY public key to an allocated octet string
     
    9671129 *  \return the length of the encoded octet string or 0 if an error occurred
    9681130 */
    969 size_t EC_KEY_key2buf(const EC_KEY *key, point_conversion_form_t form,
    970                       unsigned char **pbuf, BN_CTX *ctx);
     1131OSSL_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);
    9711134
    9721135/** Decodes a EC_KEY public key from a octet string
     
    9781141 */
    9791142
    980 int EC_KEY_oct2key(EC_KEY *key, const unsigned char *buf, size_t len,
    981                    BN_CTX *ctx);
     1143OSSL_DEPRECATEDIN_3_0 int EC_KEY_oct2key(EC_KEY *key, const unsigned char *buf,
     1144                                         size_t len, BN_CTX *ctx);
    9821145
    9831146/** Decodes an EC_KEY private key from an octet string
     
    9881151 */
    9891152
    990 int EC_KEY_oct2priv(EC_KEY *key, const unsigned char *buf, size_t len);
     1153OSSL_DEPRECATEDIN_3_0 int EC_KEY_oct2priv(EC_KEY *key, const unsigned char *buf,
     1154                                          size_t len);
    9911155
    9921156/** Encodes a EC_KEY private key to an octet string
     
    9981162 */
    9991163
    1000 size_t EC_KEY_priv2oct(const EC_KEY *key, unsigned char *buf, size_t len);
     1164OSSL_DEPRECATEDIN_3_0 size_t EC_KEY_priv2oct(const EC_KEY *key,
     1165                                             unsigned char *buf, size_t len);
    10011166
    10021167/** Encodes an EC_KEY private key to an allocated octet string
     
    10051170 *  \return the length of the encoded octet string or 0 if an error occurred
    10061171 */
    1007 size_t EC_KEY_priv2buf(const EC_KEY *eckey, unsigned char **pbuf);
     1172OSSL_DEPRECATEDIN_3_0 size_t EC_KEY_priv2buf(const EC_KEY *eckey,
     1173                                             unsigned char **pbuf);
    10081174
    10091175/********************************************************************/
     
    10171183 *  \return the decoded private key or NULL if an error occurred.
    10181184 */
    1019 EC_KEY *d2i_ECPrivateKey(EC_KEY **key, const unsigned char **in, long len);
     1185OSSL_DEPRECATEDIN_3_0 EC_KEY *d2i_ECPrivateKey(EC_KEY **key,
     1186                                               const unsigned char **in,
     1187                                               long len);
    10201188
    10211189/** Encodes a private key object and stores the result in a buffer.
     
    10251193 *  \return 1 on success and 0 if an error occurred.
    10261194 */
    1027 int i2d_ECPrivateKey(EC_KEY *key, unsigned char **out);
     1195OSSL_DEPRECATEDIN_3_0 int i2d_ECPrivateKey(const EC_KEY *key,
     1196                                           unsigned char **out);
    10281197
    10291198/********************************************************************/
     
    10381207 *          occurred.
    10391208 */
    1040 EC_KEY *d2i_ECParameters(EC_KEY **key, const unsigned char **in, long len);
     1209OSSL_DEPRECATEDIN_3_0 EC_KEY *d2i_ECParameters(EC_KEY **key,
     1210                                               const unsigned char **in,
     1211                                               long len);
    10411212
    10421213/** Encodes ec parameter and stores the result in a buffer.
     
    10461217 *  \return 1 on success and 0 if an error occurred.
    10471218 */
    1048 int i2d_ECParameters(EC_KEY *key, unsigned char **out);
     1219OSSL_DEPRECATEDIN_3_0 int i2d_ECParameters(const EC_KEY *key,
     1220                                           unsigned char **out);
    10491221
    10501222/********************************************************************/
     
    10531225/********************************************************************/
    10541226
    1055 /** Decodes a ec public key from a octet string.
     1227/** Decodes an ec public key from a octet string.
    10561228 *  \param  key  a pointer to a EC_KEY object which should be used
    10571229 *  \param  in   memory buffer with the encoded public key
     
    10601232 *          occurred.
    10611233 */
    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.
     1234OSSL_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.
    10651238 *  \param  key  the EC_KEY object with the public key
    10661239 *  \param  out  the buffer for the result (if NULL the function returns number
     
    10681241 *  \return 1 on success and 0 if an error occurred
    10691242 */
    1070 int i2o_ECPublicKey(const EC_KEY *key, unsigned char **out);
     1243OSSL_DEPRECATEDIN_3_0 int i2o_ECPublicKey(const EC_KEY *key, unsigned char **out);
    10711244
    10721245/** Prints out the ec parameters on human readable form.
     
    10751248 *  \return 1 on success and 0 if an error occurred
    10761249 */
    1077 int ECParameters_print(BIO *bp, const EC_KEY *key);
     1250OSSL_DEPRECATEDIN_3_0 int ECParameters_print(BIO *bp, const EC_KEY *key);
    10781251
    10791252/** Prints out the contents of a EC_KEY object
     
    10831256 *  \return 1 on success and 0 if an error occurred
    10841257 */
    1085 int EC_KEY_print(BIO *bp, const EC_KEY *key, int off);
    1086 
    1087 # ifndef OPENSSL_NO_STDIO
     1258OSSL_DEPRECATEDIN_3_0 int EC_KEY_print(BIO *bp, const EC_KEY *key, int off);
     1259
     1260#   ifndef OPENSSL_NO_STDIO
    10881261/** Prints out the ec parameters on human readable form.
    10891262 *  \param  fp   file descriptor to which the information is printed
     
    10911264 *  \return 1 on success and 0 if an error occurred
    10921265 */
    1093 int ECParameters_print_fp(FILE *fp, const EC_KEY *key);
     1266OSSL_DEPRECATEDIN_3_0 int ECParameters_print_fp(FILE *fp, const EC_KEY *key);
    10941267
    10951268/** Prints out the contents of a EC_KEY object
     
    10991272 *  \return 1 on success and 0 if an error occurred
    11001273 */
    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);
     1274OSSL_DEPRECATEDIN_3_0 int EC_KEY_print_fp(FILE *fp, const EC_KEY *key, int off);
     1275#   endif /* OPENSSL_NO_STDIO */
     1276
     1277OSSL_DEPRECATEDIN_3_0 const EC_KEY_METHOD *EC_KEY_OpenSSL(void);
     1278OSSL_DEPRECATEDIN_3_0 const EC_KEY_METHOD *EC_KEY_get_default_method(void);
     1279OSSL_DEPRECATEDIN_3_0 void EC_KEY_set_default_method(const EC_KEY_METHOD *meth);
     1280OSSL_DEPRECATEDIN_3_0 const EC_KEY_METHOD *EC_KEY_get_method(const EC_KEY *key);
     1281OSSL_DEPRECATEDIN_3_0 int EC_KEY_set_method(EC_KEY *key, const EC_KEY_METHOD *meth);
     1282OSSL_DEPRECATEDIN_3_0 EC_KEY *EC_KEY_new_method(ENGINE *engine);
    11111283
    11121284/** The old name for ecdh_KDF_X9_63
     
    11151287 *  This identifier is retained for backwards compatibility
    11161288 */
    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));
     1289OSSL_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
     1294OSSL_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 */
    11261301
    11271302typedef struct ECDSA_SIG_st ECDSA_SIG;
     
    11371312void ECDSA_SIG_free(ECDSA_SIG *sig);
    11381313
    1139 /** DER encode content of ECDSA_SIG object (note: this function modifies *pp
     1314/** i2d_ECDSA_SIG encodes content of ECDSA_SIG (note: this function modifies *pp
    11401315 *  (*pp += length of the DER encoded signature)).
    11411316 *  \param  sig  pointer to the ECDSA_SIG object
     
    11441319 *          on error
    11451320 */
    1146 int i2d_ECDSA_SIG(const ECDSA_SIG *sig, unsigned char **pp);
    1147 
    1148 /** Decodes a DER encoded ECDSA signature (note: this function changes *pp
     1321DECLARE_ASN1_ENCODE_FUNCTIONS_only(ECDSA_SIG, ECDSA_SIG)
     1322
     1323/** d2i_ECDSA_SIG decodes an ECDSA signature (note: this function modifies *pp
    11491324 *  (*pp += len)).
    11501325 *  \param  sig  pointer to ECDSA_SIG pointer (may be NULL)
     
    11531328 *  \return pointer to the decoded ECDSA_SIG structure (or NULL)
    11541329 */
    1155 ECDSA_SIG *d2i_ECDSA_SIG(ECDSA_SIG **sig, const unsigned char **pp, long len);
    11561330
    11571331/** Accessor for r and s fields of ECDSA_SIG
     
    11741348/** Setter for r and s fields of ECDSA_SIG
    11751349 *  \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
    11781352 */
    11791353int ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s);
    11801354
     1355#  ifndef OPENSSL_NO_DEPRECATED_3_0
    11811356/** Computes the ECDSA signature of the given hash value using
    11821357 *  the supplied private key and returns the created signature.
     
    11861361 *  \return pointer to a ECDSA_SIG structure or NULL if an error occurred
    11871362 */
    1188 ECDSA_SIG *ECDSA_do_sign(const unsigned char *dgst, int dgst_len,
    1189                          EC_KEY *eckey);
     1363OSSL_DEPRECATEDIN_3_0 ECDSA_SIG *ECDSA_do_sign(const unsigned char *dgst,
     1364                                               int dgst_len, EC_KEY *eckey);
    11901365
    11911366/** Computes ECDSA signature of a given hash value using the supplied
     
    11991374 *  \return pointer to a ECDSA_SIG structure or NULL if an error occurred
    12001375 */
    1201 ECDSA_SIG *ECDSA_do_sign_ex(const unsigned char *dgst, int dgstlen,
    1202                             const BIGNUM *kinv, const BIGNUM *rp,
    1203                             EC_KEY *eckey);
     1376OSSL_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);
    12041379
    12051380/** Verifies that the supplied signature is a valid ECDSA
     
    12121387 *          and -1 on error
    12131388 */
    1214 int ECDSA_do_verify(const unsigned char *dgst, int dgst_len,
    1215                     const ECDSA_SIG *sig, EC_KEY *eckey);
     1389OSSL_DEPRECATEDIN_3_0 int ECDSA_do_verify(const unsigned char *dgst, int dgst_len,
     1390                                          const ECDSA_SIG *sig, EC_KEY *eckey);
    12161391
    12171392/** Precompute parts of the signing operation
     
    12221397 *  \return 1 on success and 0 otherwise
    12231398 */
    1224 int ECDSA_sign_setup(EC_KEY *eckey, BN_CTX *ctx, BIGNUM **kinv, BIGNUM **rp);
     1399OSSL_DEPRECATEDIN_3_0 int ECDSA_sign_setup(EC_KEY *eckey, BN_CTX *ctx,
     1400                                           BIGNUM **kinv, BIGNUM **rp);
    12251401
    12261402/** Computes ECDSA signature of a given hash value using the supplied
     
    12341410 *  \return 1 on success and 0 otherwise
    12351411 */
    1236 int ECDSA_sign(int type, const unsigned char *dgst, int dgstlen,
    1237                unsigned char *sig, unsigned int *siglen, EC_KEY *eckey);
     1412OSSL_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);
    12381415
    12391416/** Computes ECDSA signature of a given hash value using the supplied
     
    12501427 *  \return 1 on success and 0 otherwise
    12511428 */
    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);
     1429OSSL_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);
    12551433
    12561434/** Verifies that the given signature is valid ECDSA signature
     
    12651443 *          and -1 on error
    12661444 */
    1267 int ECDSA_verify(int type, const unsigned char *dgst, int dgstlen,
    1268                  const unsigned char *sig, int siglen, EC_KEY *eckey);
     1445OSSL_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);
    12691448
    12701449/** Returns the maximum length of the DER encoded signature
     
    12721451 *  \return numbers of bytes required for the DER encoded signature
    12731452 */
    1274 int ECDSA_size(const EC_KEY *eckey);
     1453OSSL_DEPRECATEDIN_3_0 int ECDSA_size(const EC_KEY *eckey);
    12751454
    12761455/********************************************************************/
     
    12781457/********************************************************************/
    12791458
    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,
     1459OSSL_DEPRECATEDIN_3_0 EC_KEY_METHOD *EC_KEY_METHOD_new(const EC_KEY_METHOD *meth);
     1460OSSL_DEPRECATEDIN_3_0 void EC_KEY_METHOD_free(EC_KEY_METHOD *meth);
     1461OSSL_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
     1470OSSL_DEPRECATEDIN_3_0 void EC_KEY_METHOD_set_keygen(EC_KEY_METHOD *meth,
     1471                                                    int (*keygen)(EC_KEY *key));
     1472
     1473OSSL_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
     1478OSSL_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
     1493OSSL_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
     1503OSSL_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
     1512OSSL_DEPRECATEDIN_3_0 void EC_KEY_METHOD_get_keygen
     1513                      (const EC_KEY_METHOD *meth, int (**pkeygen)(EC_KEY *key));
     1514
     1515OSSL_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
     1522OSSL_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,
    13211532                                                int dgst_len,
    1322                                                 const ECDSA_SIG *sig,
     1533                                                const BIGNUM *in_kinv,
     1534                                                const BIGNUM *in_r,
    13231535                                                EC_KEY *eckey));
    13241536
    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)
     1537OSSL_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
    13751559#   endif
    13761560#  endif
     1561
    13771562# 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
    14781564}
    1479 #  endif
    14801565# endif
    14811566#endif
  • trunk/src/libs/openssl-3.0.1/include/openssl/ecdh.h

    r91772 r94082  
    22 * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
  • trunk/src/libs/openssl-3.0.1/include/openssl/ecdsa.h

    r91772 r94082  
    22 * Copyright 2002-2016 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
  • trunk/src/libs/openssl-3.0.1/include/openssl/ecerr.h

    r91772 r94082  
    11/*
    22 * Generated by util/mkerr.pl DO NOT EDIT
    3  * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
     3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    44 *
    5  * Licensed under the OpenSSL license (the "License").  You may not use
     5 * Licensed under the Apache License 2.0 (the "License").  You may not use
    66 * this file except in compliance with the License.  You can obtain a copy
    77 * in the file LICENSE in the source distribution or at
     
    99 */
    1010
    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
    1714
    1815# include <openssl/opensslconf.h>
     16# include <openssl/symhacks.h>
     17# include <openssl/cryptoerr_legacy.h>
     18
    1919
    2020# ifndef OPENSSL_NO_EC
    2121
    22 #  ifdef  __cplusplus
    23 extern "C"
    24 #  endif
    25 int ERR_load_EC_strings(void);
    26 
    27 /*
    28  * EC function codes.
    29  */
    30 #  define EC_F_BN_TO_FELEM                                 224
    31 #  define EC_F_D2I_ECPARAMETERS                            144
    32 #  define EC_F_D2I_ECPKPARAMETERS                          145
    33 #  define EC_F_D2I_ECPRIVATEKEY                            146
    34 #  define EC_F_DO_EC_KEY_PRINT                             221
    35 #  define EC_F_ECDH_CMS_DECRYPT                            238
    36 #  define EC_F_ECDH_CMS_SET_SHARED_INFO                    239
    37 #  define EC_F_ECDH_COMPUTE_KEY                            246
    38 #  define EC_F_ECDH_SIMPLE_COMPUTE_KEY                     257
    39 #  define EC_F_ECDSA_DO_SIGN_EX                            251
    40 #  define EC_F_ECDSA_DO_VERIFY                             252
    41 #  define EC_F_ECDSA_SIGN_EX                               254
    42 #  define EC_F_ECDSA_SIGN_SETUP                            248
    43 #  define EC_F_ECDSA_SIG_NEW                               265
    44 #  define EC_F_ECDSA_VERIFY                                253
    45 #  define EC_F_ECD_ITEM_VERIFY                             270
    46 #  define EC_F_ECKEY_PARAM2TYPE                            223
    47 #  define EC_F_ECKEY_PARAM_DECODE                          212
    48 #  define EC_F_ECKEY_PRIV_DECODE                           213
    49 #  define EC_F_ECKEY_PRIV_ENCODE                           214
    50 #  define EC_F_ECKEY_PUB_DECODE                            215
    51 #  define EC_F_ECKEY_PUB_ENCODE                            216
    52 #  define EC_F_ECKEY_TYPE2PARAM                            220
    53 #  define EC_F_ECPARAMETERS_PRINT                          147
    54 #  define EC_F_ECPARAMETERS_PRINT_FP                       148
    55 #  define EC_F_ECPKPARAMETERS_PRINT                        149
    56 #  define EC_F_ECPKPARAMETERS_PRINT_FP                     150
    57 #  define EC_F_ECP_NISTZ256_GET_AFFINE                     240
    58 #  define EC_F_ECP_NISTZ256_INV_MOD_ORD                    275
    59 #  define EC_F_ECP_NISTZ256_MULT_PRECOMPUTE                243
    60 #  define EC_F_ECP_NISTZ256_POINTS_MUL                     241
    61 #  define EC_F_ECP_NISTZ256_PRE_COMP_NEW                   244
    62 #  define EC_F_ECP_NISTZ256_WINDOWED_MUL                   242
    63 #  define EC_F_ECX_KEY_OP                                  266
    64 #  define EC_F_ECX_PRIV_ENCODE                             267
    65 #  define EC_F_ECX_PUB_ENCODE                              268
    66 #  define EC_F_EC_ASN1_GROUP2CURVE                         153
    67 #  define EC_F_EC_ASN1_GROUP2FIELDID                       154
    68 #  define EC_F_EC_GF2M_MONTGOMERY_POINT_MULTIPLY           208
    69 #  define EC_F_EC_GF2M_SIMPLE_FIELD_INV                    296
    70 #  define EC_F_EC_GF2M_SIMPLE_GROUP_CHECK_DISCRIMINANT     159
    71 #  define EC_F_EC_GF2M_SIMPLE_GROUP_SET_CURVE              195
    72 #  define EC_F_EC_GF2M_SIMPLE_LADDER_POST                  285
    73 #  define EC_F_EC_GF2M_SIMPLE_LADDER_PRE                   288
    74 #  define EC_F_EC_GF2M_SIMPLE_OCT2POINT                    160
    75 #  define EC_F_EC_GF2M_SIMPLE_POINT2OCT                    161
    76 #  define EC_F_EC_GF2M_SIMPLE_POINTS_MUL                   289
    77 #  define EC_F_EC_GF2M_SIMPLE_POINT_GET_AFFINE_COORDINATES 162
    78 #  define EC_F_EC_GF2M_SIMPLE_POINT_SET_AFFINE_COORDINATES 163
    79 #  define EC_F_EC_GF2M_SIMPLE_SET_COMPRESSED_COORDINATES   164
    80 #  define EC_F_EC_GFP_MONT_FIELD_DECODE                    133
    81 #  define EC_F_EC_GFP_MONT_FIELD_ENCODE                    134
    82 #  define EC_F_EC_GFP_MONT_FIELD_INV                       297
    83 #  define EC_F_EC_GFP_MONT_FIELD_MUL                       131
    84 #  define EC_F_EC_GFP_MONT_FIELD_SET_TO_ONE                209
    85 #  define EC_F_EC_GFP_MONT_FIELD_SQR                       132
    86 #  define EC_F_EC_GFP_MONT_GROUP_SET_CURVE                 189
    87 #  define EC_F_EC_GFP_NISTP224_GROUP_SET_CURVE             225
    88 #  define EC_F_EC_GFP_NISTP224_POINTS_MUL                  228
    89 #  define EC_F_EC_GFP_NISTP224_POINT_GET_AFFINE_COORDINATES 226
    90 #  define EC_F_EC_GFP_NISTP256_GROUP_SET_CURVE             230
    91 #  define EC_F_EC_GFP_NISTP256_POINTS_MUL                  231
    92 #  define EC_F_EC_GFP_NISTP256_POINT_GET_AFFINE_COORDINATES 232
    93 #  define EC_F_EC_GFP_NISTP521_GROUP_SET_CURVE             233
    94 #  define EC_F_EC_GFP_NISTP521_POINTS_MUL                  234
    95 #  define EC_F_EC_GFP_NISTP521_POINT_GET_AFFINE_COORDINATES 235
    96 #  define EC_F_EC_GFP_NIST_FIELD_MUL                       200
    97 #  define EC_F_EC_GFP_NIST_FIELD_SQR                       201
    98 #  define EC_F_EC_GFP_NIST_GROUP_SET_CURVE                 202
    99 #  define EC_F_EC_GFP_SIMPLE_BLIND_COORDINATES             287
    100 #  define EC_F_EC_GFP_SIMPLE_FIELD_INV                     298
    101 #  define EC_F_EC_GFP_SIMPLE_GROUP_CHECK_DISCRIMINANT      165
    102 #  define EC_F_EC_GFP_SIMPLE_GROUP_SET_CURVE               166
    103 #  define EC_F_EC_GFP_SIMPLE_MAKE_AFFINE                   102
    104 #  define EC_F_EC_GFP_SIMPLE_OCT2POINT                     103
    105 #  define EC_F_EC_GFP_SIMPLE_POINT2OCT                     104
    106 #  define EC_F_EC_GFP_SIMPLE_POINTS_MAKE_AFFINE            137
    107 #  define EC_F_EC_GFP_SIMPLE_POINT_GET_AFFINE_COORDINATES  167
    108 #  define EC_F_EC_GFP_SIMPLE_POINT_SET_AFFINE_COORDINATES  168
    109 #  define EC_F_EC_GFP_SIMPLE_SET_COMPRESSED_COORDINATES    169
    110 #  define EC_F_EC_GROUP_CHECK                              170
    111 #  define EC_F_EC_GROUP_CHECK_DISCRIMINANT                 171
    112 #  define EC_F_EC_GROUP_COPY                               106
    113 #  define EC_F_EC_GROUP_GET_CURVE                          291
    114 #  define EC_F_EC_GROUP_GET_CURVE_GF2M                     172
    115 #  define EC_F_EC_GROUP_GET_CURVE_GFP                      130
    116 #  define EC_F_EC_GROUP_GET_DEGREE                         173
    117 #  define EC_F_EC_GROUP_GET_ECPARAMETERS                   261
    118 #  define EC_F_EC_GROUP_GET_ECPKPARAMETERS                 262
    119 #  define EC_F_EC_GROUP_GET_PENTANOMIAL_BASIS              193
    120 #  define EC_F_EC_GROUP_GET_TRINOMIAL_BASIS                194
    121 #  define EC_F_EC_GROUP_NEW                                108
    122 #  define EC_F_EC_GROUP_NEW_BY_CURVE_NAME                  174
    123 #  define EC_F_EC_GROUP_NEW_FROM_DATA                      175
    124 #  define EC_F_EC_GROUP_NEW_FROM_ECPARAMETERS              263
    125 #  define EC_F_EC_GROUP_NEW_FROM_ECPKPARAMETERS            264
    126 #  define EC_F_EC_GROUP_SET_CURVE                          292
    127 #  define EC_F_EC_GROUP_SET_CURVE_GF2M                     176
    128 #  define EC_F_EC_GROUP_SET_CURVE_GFP                      109
    129 #  define EC_F_EC_GROUP_SET_GENERATOR                      111
    130 #  define EC_F_EC_GROUP_SET_SEED                           286
    131 #  define EC_F_EC_KEY_CHECK_KEY                            177
    132 #  define EC_F_EC_KEY_COPY                                 178
    133 #  define EC_F_EC_KEY_GENERATE_KEY                         179
    134 #  define EC_F_EC_KEY_NEW                                  182
    135 #  define EC_F_EC_KEY_NEW_METHOD                           245
    136 #  define EC_F_EC_KEY_OCT2PRIV                             255
    137 #  define EC_F_EC_KEY_PRINT                                180
    138 #  define EC_F_EC_KEY_PRINT_FP                             181
    139 #  define EC_F_EC_KEY_PRIV2BUF                             279
    140 #  define EC_F_EC_KEY_PRIV2OCT                             256
    141 #  define EC_F_EC_KEY_SET_PUBLIC_KEY_AFFINE_COORDINATES    229
    142 #  define EC_F_EC_KEY_SIMPLE_CHECK_KEY                     258
    143 #  define EC_F_EC_KEY_SIMPLE_OCT2PRIV                      259
    144 #  define EC_F_EC_KEY_SIMPLE_PRIV2OCT                      260
    145 #  define EC_F_EC_PKEY_CHECK                               273
    146 #  define EC_F_EC_PKEY_PARAM_CHECK                         274
    147 #  define EC_F_EC_POINTS_MAKE_AFFINE                       136
    148 #  define EC_F_EC_POINTS_MUL                               290
    149 #  define EC_F_EC_POINT_ADD                                112
    150 #  define EC_F_EC_POINT_BN2POINT                           280
    151 #  define EC_F_EC_POINT_CMP                                113
    152 #  define EC_F_EC_POINT_COPY                               114
    153 #  define EC_F_EC_POINT_DBL                                115
    154 #  define EC_F_EC_POINT_GET_AFFINE_COORDINATES             293
    155 #  define EC_F_EC_POINT_GET_AFFINE_COORDINATES_GF2M        183
    156 #  define EC_F_EC_POINT_GET_AFFINE_COORDINATES_GFP         116
    157 #  define EC_F_EC_POINT_GET_JPROJECTIVE_COORDINATES_GFP    117
    158 #  define EC_F_EC_POINT_INVERT                             210
    159 #  define EC_F_EC_POINT_IS_AT_INFINITY                     118
    160 #  define EC_F_EC_POINT_IS_ON_CURVE                        119
    161 #  define EC_F_EC_POINT_MAKE_AFFINE                        120
    162 #  define EC_F_EC_POINT_NEW                                121
    163 #  define EC_F_EC_POINT_OCT2POINT                          122
    164 #  define EC_F_EC_POINT_POINT2BUF                          281
    165 #  define EC_F_EC_POINT_POINT2OCT                          123
    166 #  define EC_F_EC_POINT_SET_AFFINE_COORDINATES             294
    167 #  define EC_F_EC_POINT_SET_AFFINE_COORDINATES_GF2M        185
    168 #  define EC_F_EC_POINT_SET_AFFINE_COORDINATES_GFP         124
    169 #  define EC_F_EC_POINT_SET_COMPRESSED_COORDINATES         295
    170 #  define EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GF2M    186
    171 #  define EC_F_EC_POINT_SET_COMPRESSED_COORDINATES_GFP     125
    172 #  define EC_F_EC_POINT_SET_JPROJECTIVE_COORDINATES_GFP    126
    173 #  define EC_F_EC_POINT_SET_TO_INFINITY                    127
    174 #  define EC_F_EC_PRE_COMP_NEW                             196
    175 #  define EC_F_EC_SCALAR_MUL_LADDER                        284
    176 #  define EC_F_EC_WNAF_MUL                                 187
    177 #  define EC_F_EC_WNAF_PRECOMPUTE_MULT                     188
    178 #  define EC_F_I2D_ECPARAMETERS                            190
    179 #  define EC_F_I2D_ECPKPARAMETERS                          191
    180 #  define EC_F_I2D_ECPRIVATEKEY                            192
    181 #  define EC_F_I2O_ECPUBLICKEY                             151
    182 #  define EC_F_NISTP224_PRE_COMP_NEW                       227
    183 #  define EC_F_NISTP256_PRE_COMP_NEW                       236
    184 #  define EC_F_NISTP521_PRE_COMP_NEW                       237
    185 #  define EC_F_O2I_ECPUBLICKEY                             152
    186 #  define EC_F_OLD_EC_PRIV_DECODE                          222
    187 #  define EC_F_OSSL_ECDH_COMPUTE_KEY                       247
    188 #  define EC_F_OSSL_ECDSA_SIGN_SIG                         249
    189 #  define EC_F_OSSL_ECDSA_VERIFY_SIG                       250
    190 #  define EC_F_PKEY_ECD_CTRL                               271
    191 #  define EC_F_PKEY_ECD_DIGESTSIGN                         272
    192 #  define EC_F_PKEY_ECD_DIGESTSIGN25519                    276
    193 #  define EC_F_PKEY_ECD_DIGESTSIGN448                      277
    194 #  define EC_F_PKEY_ECX_DERIVE                             269
    195 #  define EC_F_PKEY_EC_CTRL                                197
    196 #  define EC_F_PKEY_EC_CTRL_STR                            198
    197 #  define EC_F_PKEY_EC_DERIVE                              217
    198 #  define EC_F_PKEY_EC_INIT                                282
    199 #  define EC_F_PKEY_EC_KDF_DERIVE                          283
    200 #  define EC_F_PKEY_EC_KEYGEN                              199
    201 #  define EC_F_PKEY_EC_PARAMGEN                            219
    202 #  define EC_F_PKEY_EC_SIGN                                218
    203 #  define EC_F_VALIDATE_ECX_DERIVE                         278
    20422
    20523/*
     
    21331#  define EC_R_COORDINATES_OUT_OF_RANGE                    146
    21432#  define EC_R_CURVE_DOES_NOT_SUPPORT_ECDH                 160
     33#  define EC_R_CURVE_DOES_NOT_SUPPORT_ECDSA                170
    21534#  define EC_R_CURVE_DOES_NOT_SUPPORT_SIGNING              159
    216 #  define EC_R_D2I_ECPKPARAMETERS_FAILURE                  117
    21735#  define EC_R_DECODE_ERROR                                142
    21836#  define EC_R_DISCRIMINANT_IS_ZERO                        118
    21937#  define EC_R_EC_GROUP_NEW_BY_NAME_FAILURE                119
     38#  define EC_R_FAILED_MAKING_PUBLIC_KEY                    166
    22039#  define EC_R_FIELD_TOO_LARGE                             143
    22140#  define EC_R_GF2M_NOT_SUPPORTED                          147
     
    22342#  define EC_R_I2D_ECPKPARAMETERS_FAILURE                  121
    22443#  define EC_R_INCOMPATIBLE_OBJECTS                        101
     44#  define EC_R_INVALID_A                                   168
    22545#  define EC_R_INVALID_ARGUMENT                            112
     46#  define EC_R_INVALID_B                                   169
     47#  define EC_R_INVALID_COFACTOR                            171
    22648#  define EC_R_INVALID_COMPRESSED_POINT                    110
    22749#  define EC_R_INVALID_COMPRESSION_BIT                     109
     
    23254#  define EC_R_INVALID_FIELD                               103
    23355#  define EC_R_INVALID_FORM                                104
     56#  define EC_R_INVALID_GENERATOR                           173
    23457#  define EC_R_INVALID_GROUP_ORDER                         122
    23558#  define EC_R_INVALID_KEY                                 116
     59#  define EC_R_INVALID_LENGTH                              117
     60#  define EC_R_INVALID_NAMED_GROUP_CONVERSION              174
    23661#  define EC_R_INVALID_OUTPUT_LENGTH                       161
     62#  define EC_R_INVALID_P                                   172
    23763#  define EC_R_INVALID_PEER_KEY                            133
    23864#  define EC_R_INVALID_PENTANOMIAL_BASIS                   132
    23965#  define EC_R_INVALID_PRIVATE_KEY                         123
     66#  define EC_R_INVALID_SEED                                175
    24067#  define EC_R_INVALID_TRINOMIAL_BASIS                     137
    24168#  define EC_R_KDF_PARAMETER_ERROR                         148
     
    25683#  define EC_R_PASSED_NULL_PARAMETER                       134
    25784#  define EC_R_PEER_KEY_ERROR                              149
    258 #  define EC_R_PKPARAMETERS2GROUP_FAILURE                  127
    25985#  define EC_R_POINT_ARITHMETIC_FAILURE                    155
    26086#  define EC_R_POINT_AT_INFINITY                           106
  • trunk/src/libs/openssl-3.0.1/include/openssl/engine.h

    r91772 r94082  
    11/*
    2  * Copyright 2000-2018 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 2000-2020 The OpenSSL Project Authors. All Rights Reserved.
    33 * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
    44 *
    5  * Licensed under the OpenSSL license (the "License").  You may not use
     5 * Licensed under the Apache License 2.0 (the "License").  You may not use
    66 * this file except in compliance with the License.  You can obtain a copy
    77 * in the file LICENSE in the source distribution or at
     
    99 */
    1010
    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
    1319
    1420# include <openssl/opensslconf.h>
    1521
    1622# ifndef OPENSSL_NO_ENGINE
    17 # if OPENSSL_API_COMPAT < 0x10100000L
    18 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 # endif
    27 # include <openssl/ossl_typ.h>
    28 # include <openssl/symhacks.h>
    29 # include <openssl/x509.h>
    30 # include <openssl/engineerr.h>
    31 # ifdef  __cplusplus
     23#  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
    3238extern "C" {
    33 # endif
     39#  endif
    3440
    3541/*
     
    3743 * bitwise "OR"ing.
    3844 */
    39 # define ENGINE_METHOD_RSA               (unsigned int)0x0001
    40 # define ENGINE_METHOD_DSA               (unsigned int)0x0002
    41 # define ENGINE_METHOD_DH                (unsigned int)0x0004
    42 # define ENGINE_METHOD_RAND              (unsigned int)0x0008
    43 # define ENGINE_METHOD_CIPHERS           (unsigned int)0x0040
    44 # define ENGINE_METHOD_DIGESTS           (unsigned int)0x0080
    45 # define ENGINE_METHOD_PKEY_METHS        (unsigned int)0x0200
    46 # define ENGINE_METHOD_PKEY_ASN1_METHS   (unsigned int)0x0400
    47 # define ENGINE_METHOD_EC                (unsigned int)0x0800
     45#  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
    4854/* Obvious all-or-nothing cases. */
    49 # define ENGINE_METHOD_ALL               (unsigned int)0xFFFF
    50 # define ENGINE_METHOD_NONE              (unsigned int)0x0000
     55#  define ENGINE_METHOD_ALL               (unsigned int)0xFFFF
     56#  define ENGINE_METHOD_NONE              (unsigned int)0x0000
    5157
    5258/*
     
    5662 * initialise registered ENGINEs if they are not already initialised.
    5763 */
    58 # define ENGINE_TABLE_FLAG_NOINIT        (unsigned int)0x0001
     64#  define ENGINE_TABLE_FLAG_NOINIT        (unsigned int)0x0001
    5965
    6066/* ENGINE flags that can be set by ENGINE_set_flags(). */
     
    6874 * data.
    6975 */
    70 # define ENGINE_FLAGS_MANUAL_CMD_CTRL    (int)0x0002
     76#  define ENGINE_FLAGS_MANUAL_CMD_CTRL    (int)0x0002
    7177
    7278/*
     
    8086 * count.
    8187 */
    82 # define ENGINE_FLAGS_BY_ID_COPY         (int)0x0004
     88#  define ENGINE_FLAGS_BY_ID_COPY         (int)0x0004
    8389
    8490/*
     
    8894 */
    8995
    90 # define ENGINE_FLAGS_NO_REGISTER_ALL    (int)0x0008
     96#  define ENGINE_FLAGS_NO_REGISTER_ALL    (int)0x0008
    9197
    9298/*
     
    103109
    104110/* accepts a 'long' input value (3rd parameter to ENGINE_ctrl) */
    105 # define ENGINE_CMD_FLAG_NUMERIC         (unsigned int)0x0001
     111#  define ENGINE_CMD_FLAG_NUMERIC         (unsigned int)0x0001
    106112/*
    107113 * accepts string input (cast from 'void*' to 'const char *', 4th parameter
    108114 * to ENGINE_ctrl)
    109115 */
    110 # define ENGINE_CMD_FLAG_STRING          (unsigned int)0x0002
     116#  define ENGINE_CMD_FLAG_STRING          (unsigned int)0x0002
    111117/*
    112118 * Indicates that the control command takes *no* input. Ie. the control
    113119 * command is unparameterised.
    114120 */
    115 # define ENGINE_CMD_FLAG_NO_INPUT        (unsigned int)0x0004
     121#  define ENGINE_CMD_FLAG_NO_INPUT        (unsigned int)0x0004
    116122/*
    117123 * Indicates that the control command is internal. This control command won't
     
    119125 * function.
    120126 */
    121 # define ENGINE_CMD_FLAG_INTERNAL        (unsigned int)0x0008
     127#  define ENGINE_CMD_FLAG_INTERNAL        (unsigned int)0x0008
    122128
    123129/*
     
    138144 * error ENGINE_R_CTRL_COMMAND_NOT_IMPLEMENTED.
    139145 */
    140 # define ENGINE_CTRL_SET_LOGSTREAM               1
    141 # define ENGINE_CTRL_SET_PASSWORD_CALLBACK       2
    142 # define ENGINE_CTRL_HUP                         3/* Close and reinitialise
     146#  define ENGINE_CTRL_SET_LOGSTREAM               1
     147#  define ENGINE_CTRL_SET_PASSWORD_CALLBACK       2
     148#  define ENGINE_CTRL_HUP                         3/* Close and reinitialise
    143149                                                   * any handles/connections
    144150                                                   * etc. */
    145 # define ENGINE_CTRL_SET_USER_INTERFACE          4/* Alternative to callback */
    146 # define ENGINE_CTRL_SET_CALLBACK_DATA           5/* User-specific data, used
     151#  define ENGINE_CTRL_SET_USER_INTERFACE          4/* Alternative to callback */
     152#  define ENGINE_CTRL_SET_CALLBACK_DATA           5/* User-specific data, used
    147153                                                   * when calling the password
    148154                                                   * callback and the user
    149155                                                   * interface */
    150 # define ENGINE_CTRL_LOAD_CONFIGURATION          6/* Load a configuration,
     156#  define ENGINE_CTRL_LOAD_CONFIGURATION          6/* Load a configuration,
    151157                                                   * given a string that
    152158                                                   * represents a file name
    153159                                                   * or so */
    154 # define ENGINE_CTRL_LOAD_SECTION                7/* Load data from a given
     160#  define ENGINE_CTRL_LOAD_SECTION                7/* Load data from a given
    155161                                                   * section in the already
    156162                                                   * loaded configuration */
     
    176182 * engine's capabilities and doesn't want errors generated unnecessarily.
    177183 */
    178 # define ENGINE_CTRL_HAS_CTRL_FUNCTION           10
     184#  define ENGINE_CTRL_HAS_CTRL_FUNCTION           10
    179185/*
    180186 * Returns a positive command number for the first command supported by the
    181187 * engine. Returns zero if no ctrl commands are supported.
    182188 */
    183 # define ENGINE_CTRL_GET_FIRST_CMD_TYPE          11
     189#  define ENGINE_CTRL_GET_FIRST_CMD_TYPE          11
    184190/*
    185191 * The 'long' argument specifies a command implemented by the engine, and the
    186192 * return value is the next command supported, or zero if there are no more.
    187193 */
    188 # define ENGINE_CTRL_GET_NEXT_CMD_TYPE           12
     194#  define ENGINE_CTRL_GET_NEXT_CMD_TYPE           12
    189195/*
    190196 * The 'void*' argument is a command name (cast from 'const char *'), and the
    191197 * return value is the command that corresponds to it.
    192198 */
    193 # define ENGINE_CTRL_GET_CMD_FROM_NAME           13
     199#  define ENGINE_CTRL_GET_CMD_FROM_NAME           13
    194200/*
    195201 * The next two allow a command to be converted into its corresponding string
     
    200206 * command (WITH a trailing EOL).
    201207 */
    202 # define ENGINE_CTRL_GET_NAME_LEN_FROM_CMD       14
    203 # define ENGINE_CTRL_GET_NAME_FROM_CMD           15
     208#  define ENGINE_CTRL_GET_NAME_LEN_FROM_CMD       14
     209#  define ENGINE_CTRL_GET_NAME_FROM_CMD           15
    204210/* The next two are similar but give a "short description" of a command. */
    205 # define ENGINE_CTRL_GET_DESC_LEN_FROM_CMD       16
    206 # define ENGINE_CTRL_GET_DESC_FROM_CMD           17
     211#  define ENGINE_CTRL_GET_DESC_LEN_FROM_CMD       16
     212#  define ENGINE_CTRL_GET_DESC_FROM_CMD           17
    207213/*
    208214 * With this command, the return value is the OR'd combination of
     
    210216 * engine-specific ctrl command expects.
    211217 */
    212 # define ENGINE_CTRL_GET_CMD_FLAGS               18
     218#  define ENGINE_CTRL_GET_CMD_FLAGS               18
    213219
    214220/*
     
    216222 * commands from this value. (ie. ENGINE_CMD_BASE, ENGINE_CMD_BASE + 1, etc).
    217223 */
    218 # define ENGINE_CMD_BASE                         200
     224#  define ENGINE_CMD_BASE                         200
    219225
    220226/*
     
    227233
    228234/* Flags specific to the nCipher "chil" engine */
    229 # define ENGINE_CTRL_CHIL_SET_FORKCHECK          100
    230         /*
    231          * Depending on the value of the (long)i argument, this sets or
    232          * unsets the SimpleForkCheck flag in the CHIL API to enable or
    233          * disable checking and workarounds for applications that fork().
    234          */
    235 # define ENGINE_CTRL_CHIL_NO_LOCKING             101
    236         /*
    237          * This prevents the initialisation function from providing mutex
    238          * 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          */
    240246
    241247/*
     
    309315
    310316/* 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
     318OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_get_first(void);
     319OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_get_last(void);
     320#  endif
    313321/* 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
     323OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_get_next(ENGINE *e);
     324OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_get_prev(ENGINE *e);
     325#  endif
    316326/* Add another "ENGINE" type into the array. */
    317 int ENGINE_add(ENGINE *e);
     327#  ifndef OPENSSL_NO_DEPRECATED_3_0
     328OSSL_DEPRECATEDIN_3_0 int ENGINE_add(ENGINE *e);
     329#  endif
    318330/* Remove an existing "ENGINE" type from the array. */
    319 int ENGINE_remove(ENGINE *e);
     331#  ifndef OPENSSL_NO_DEPRECATED_3_0
     332OSSL_DEPRECATEDIN_3_0 int ENGINE_remove(ENGINE *e);
     333#  endif
    320334/* 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
     336OSSL_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
     358OSSL_DEPRECATEDIN_3_0 void ENGINE_load_builtin_engines(void);
     359#  endif
    342360
    343361/*
     
    345363 * "registry" handling.
    346364 */
    347 unsigned int ENGINE_get_table_flags(void);
    348 void ENGINE_set_table_flags(unsigned int flags);
     365#  ifndef OPENSSL_NO_DEPRECATED_3_0
     366OSSL_DEPRECATEDIN_3_0 unsigned int ENGINE_get_table_flags(void);
     367OSSL_DEPRECATEDIN_3_0 void ENGINE_set_table_flags(unsigned int flags);
     368#  endif
    349369
    350370/*- Manage registration of ENGINEs per "table". For each type, there are 3
     
    355375 * Cleanup is automatically registered from each table when required.
    356376 */
    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
     378OSSL_DEPRECATEDIN_3_0 int ENGINE_register_RSA(ENGINE *e);
     379OSSL_DEPRECATEDIN_3_0 void ENGINE_unregister_RSA(ENGINE *e);
     380OSSL_DEPRECATEDIN_3_0 void ENGINE_register_all_RSA(void);
     381OSSL_DEPRECATEDIN_3_0 int ENGINE_register_DSA(ENGINE *e);
     382OSSL_DEPRECATEDIN_3_0 void ENGINE_unregister_DSA(ENGINE *e);
     383OSSL_DEPRECATEDIN_3_0 void ENGINE_register_all_DSA(void);
     384OSSL_DEPRECATEDIN_3_0 int ENGINE_register_EC(ENGINE *e);
     385OSSL_DEPRECATEDIN_3_0 void ENGINE_unregister_EC(ENGINE *e);
     386OSSL_DEPRECATEDIN_3_0 void ENGINE_register_all_EC(void);
     387OSSL_DEPRECATEDIN_3_0 int ENGINE_register_DH(ENGINE *e);
     388OSSL_DEPRECATEDIN_3_0 void ENGINE_unregister_DH(ENGINE *e);
     389OSSL_DEPRECATEDIN_3_0 void ENGINE_register_all_DH(void);
     390OSSL_DEPRECATEDIN_3_0 int ENGINE_register_RAND(ENGINE *e);
     391OSSL_DEPRECATEDIN_3_0 void ENGINE_unregister_RAND(ENGINE *e);
     392OSSL_DEPRECATEDIN_3_0 void ENGINE_register_all_RAND(void);
     393OSSL_DEPRECATEDIN_3_0 int ENGINE_register_ciphers(ENGINE *e);
     394OSSL_DEPRECATEDIN_3_0 void ENGINE_unregister_ciphers(ENGINE *e);
     395OSSL_DEPRECATEDIN_3_0 void ENGINE_register_all_ciphers(void);
     396OSSL_DEPRECATEDIN_3_0 int ENGINE_register_digests(ENGINE *e);
     397OSSL_DEPRECATEDIN_3_0 void ENGINE_unregister_digests(ENGINE *e);
     398OSSL_DEPRECATEDIN_3_0 void ENGINE_register_all_digests(void);
     399OSSL_DEPRECATEDIN_3_0 int ENGINE_register_pkey_meths(ENGINE *e);
     400OSSL_DEPRECATEDIN_3_0 void ENGINE_unregister_pkey_meths(ENGINE *e);
     401OSSL_DEPRECATEDIN_3_0 void ENGINE_register_all_pkey_meths(void);
     402OSSL_DEPRECATEDIN_3_0 int ENGINE_register_pkey_asn1_meths(ENGINE *e);
     403OSSL_DEPRECATEDIN_3_0 void ENGINE_unregister_pkey_asn1_meths(ENGINE *e);
     404OSSL_DEPRECATEDIN_3_0 void ENGINE_register_all_pkey_asn1_meths(void);
     405#  endif
    393406
    394407/*
     
    398411 * more selective initialisation.
    399412 */
    400 int ENGINE_register_complete(ENGINE *e);
    401 int ENGINE_register_all_complete(void);
     413#  ifndef OPENSSL_NO_DEPRECATED_3_0
     414OSSL_DEPRECATEDIN_3_0 int ENGINE_register_complete(ENGINE *e);
     415OSSL_DEPRECATEDIN_3_0 int ENGINE_register_all_complete(void);
     416#  endif
    402417
    403418/*
     
    411426 * references in such situations.
    412427 */
    413 int ENGINE_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f) (void));
     428#  ifndef OPENSSL_NO_DEPRECATED_3_0
     429OSSL_DEPRECATEDIN_3_0 int ENGINE_ctrl(ENGINE *e, int cmd, long i, void *p,
     430                                      void (*f) (void));
     431#  endif
    414432
    415433/*
     
    419437 * ENGINE_ctrl_cmd_string(), only ENGINE_ctrl().
    420438 */
    421 int ENGINE_cmd_is_executable(ENGINE *e, int cmd);
     439#  ifndef OPENSSL_NO_DEPRECATED_3_0
     440OSSL_DEPRECATEDIN_3_0 int ENGINE_cmd_is_executable(ENGINE *e, int cmd);
     441#  endif
    422442
    423443/*
     
    427447 * on how to use the cmd_name and cmd_optional.
    428448 */
    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
     450OSSL_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
    431454
    432455/*
     
    452475 * same ENGINE-enabled devices, across applications.
    453476 */
     477#  ifndef OPENSSL_NO_DEPRECATED_3_0
     478OSSL_DEPRECATEDIN_3_0
    454479int ENGINE_ctrl_cmd_string(ENGINE *e, const char *cmd_name, const char *arg,
    455480                           int cmd_optional);
     481#  endif
    456482
    457483/*
     
    463489 * exposed and break binary compatibility!
    464490 */
    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
     492OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_new(void);
     493OSSL_DEPRECATEDIN_3_0 int ENGINE_free(ENGINE *e);
     494OSSL_DEPRECATEDIN_3_0 int ENGINE_up_ref(ENGINE *e);
     495OSSL_DEPRECATEDIN_3_0 int ENGINE_set_id(ENGINE *e, const char *id);
     496OSSL_DEPRECATEDIN_3_0 int ENGINE_set_name(ENGINE *e, const char *name);
     497OSSL_DEPRECATEDIN_3_0 int ENGINE_set_RSA(ENGINE *e, const RSA_METHOD *rsa_meth);
     498OSSL_DEPRECATEDIN_3_0 int ENGINE_set_DSA(ENGINE *e, const DSA_METHOD *dsa_meth);
     499OSSL_DEPRECATEDIN_3_0 int ENGINE_set_EC(ENGINE *e, const EC_KEY_METHOD *ecdsa_meth);
     500OSSL_DEPRECATEDIN_3_0 int ENGINE_set_DH(ENGINE *e, const DH_METHOD *dh_meth);
     501OSSL_DEPRECATEDIN_3_0 int ENGINE_set_RAND(ENGINE *e, const RAND_METHOD *rand_meth);
     502OSSL_DEPRECATEDIN_3_0
     503int ENGINE_set_destroy_function(ENGINE *e,ENGINE_GEN_INT_FUNC_PTR destroy_f);
     504OSSL_DEPRECATEDIN_3_0
    476505int ENGINE_set_init_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR init_f);
     506OSSL_DEPRECATEDIN_3_0
    477507int ENGINE_set_finish_function(ENGINE *e, ENGINE_GEN_INT_FUNC_PTR finish_f);
     508OSSL_DEPRECATEDIN_3_0
    478509int 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);
     510OSSL_DEPRECATEDIN_3_0
     511int ENGINE_set_load_privkey_function(ENGINE *e, ENGINE_LOAD_KEY_PTR loadpriv_f);
     512OSSL_DEPRECATEDIN_3_0
    481513int ENGINE_set_load_pubkey_function(ENGINE *e, ENGINE_LOAD_KEY_PTR loadpub_f);
     514OSSL_DEPRECATEDIN_3_0
    482515int 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);
     517OSSL_DEPRECATEDIN_3_0
    485518int ENGINE_set_ciphers(ENGINE *e, ENGINE_CIPHERS_PTR f);
     519OSSL_DEPRECATEDIN_3_0
    486520int ENGINE_set_digests(ENGINE *e, ENGINE_DIGESTS_PTR f);
     521OSSL_DEPRECATEDIN_3_0
    487522int ENGINE_set_pkey_meths(ENGINE *e, ENGINE_PKEY_METHS_PTR f);
     523OSSL_DEPRECATEDIN_3_0
    488524int 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);
     525OSSL_DEPRECATEDIN_3_0 int ENGINE_set_flags(ENGINE *e, int flags);
     526OSSL_DEPRECATEDIN_3_0 int ENGINE_set_cmd_defns(ENGINE *e,
     527                                               const ENGINE_CMD_DEFN *defns);
     528#  endif
    491529/* 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) \
    493531    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
     533OSSL_DEPRECATEDIN_3_0 int ENGINE_set_ex_data(ENGINE *e, int idx, void *arg);
     534OSSL_DEPRECATEDIN_3_0 void *ENGINE_get_ex_data(const ENGINE *e, int idx);
     535# endif
     536
     537#  ifndef OPENSSL_NO_DEPRECATED_1_1_0
    498538/*
    499539 * This function previously cleaned up anything that needs it. Auto-deinit will
    500540 * now take care of it so it is no longer required to call this function.
    501541 */
    502 # define ENGINE_cleanup() while(0) continue
    503 #endif
     542#   define ENGINE_cleanup() while(0) continue
     543#  endif
    504544
    505545/*
     
    509549 * obtained a structural reference may be problematic!
    510550 */
    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
     552OSSL_DEPRECATEDIN_3_0 const char *ENGINE_get_id(const ENGINE *e);
     553OSSL_DEPRECATEDIN_3_0 const char *ENGINE_get_name(const ENGINE *e);
     554OSSL_DEPRECATEDIN_3_0 const RSA_METHOD *ENGINE_get_RSA(const ENGINE *e);
     555OSSL_DEPRECATEDIN_3_0 const DSA_METHOD *ENGINE_get_DSA(const ENGINE *e);
     556OSSL_DEPRECATEDIN_3_0 const EC_KEY_METHOD *ENGINE_get_EC(const ENGINE *e);
     557OSSL_DEPRECATEDIN_3_0 const DH_METHOD *ENGINE_get_DH(const ENGINE *e);
     558OSSL_DEPRECATEDIN_3_0 const RAND_METHOD *ENGINE_get_RAND(const ENGINE *e);
     559OSSL_DEPRECATEDIN_3_0
    518560ENGINE_GEN_INT_FUNC_PTR ENGINE_get_destroy_function(const ENGINE *e);
     561OSSL_DEPRECATEDIN_3_0
    519562ENGINE_GEN_INT_FUNC_PTR ENGINE_get_init_function(const ENGINE *e);
     563OSSL_DEPRECATEDIN_3_0
    520564ENGINE_GEN_INT_FUNC_PTR ENGINE_get_finish_function(const ENGINE *e);
     565OSSL_DEPRECATEDIN_3_0
    521566ENGINE_CTRL_FUNC_PTR ENGINE_get_ctrl_function(const ENGINE *e);
     567OSSL_DEPRECATEDIN_3_0
    522568ENGINE_LOAD_KEY_PTR ENGINE_get_load_privkey_function(const ENGINE *e);
     569OSSL_DEPRECATEDIN_3_0
    523570ENGINE_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);
     571OSSL_DEPRECATEDIN_3_0
     572ENGINE_SSL_CLIENT_CERT_PTR ENGINE_get_ssl_client_cert_function(const ENGINE *e);
     573OSSL_DEPRECATEDIN_3_0
    526574ENGINE_CIPHERS_PTR ENGINE_get_ciphers(const ENGINE *e);
     575OSSL_DEPRECATEDIN_3_0
    527576ENGINE_DIGESTS_PTR ENGINE_get_digests(const ENGINE *e);
     577OSSL_DEPRECATEDIN_3_0
    528578ENGINE_PKEY_METHS_PTR ENGINE_get_pkey_meths(const ENGINE *e);
     579OSSL_DEPRECATEDIN_3_0
    529580ENGINE_PKEY_ASN1_METHS_PTR ENGINE_get_pkey_asn1_meths(const ENGINE *e);
     581OSSL_DEPRECATEDIN_3_0
    530582const EVP_CIPHER *ENGINE_get_cipher(ENGINE *e, int nid);
     583OSSL_DEPRECATEDIN_3_0
    531584const EVP_MD *ENGINE_get_digest(ENGINE *e, int nid);
     585OSSL_DEPRECATEDIN_3_0
    532586const EVP_PKEY_METHOD *ENGINE_get_pkey_meth(ENGINE *e, int nid);
     587OSSL_DEPRECATEDIN_3_0
    533588const EVP_PKEY_ASN1_METHOD *ENGINE_get_pkey_asn1_meth(ENGINE *e, int nid);
     589OSSL_DEPRECATEDIN_3_0
    534590const EVP_PKEY_ASN1_METHOD *ENGINE_get_pkey_asn1_meth_str(ENGINE *e,
    535591                                                          const char *str,
    536592                                                          int len);
     593OSSL_DEPRECATEDIN_3_0
    537594const EVP_PKEY_ASN1_METHOD *ENGINE_pkey_asn1_find_str(ENGINE **pe,
    538                                                       const char *str,
    539                                                       int len);
     595                                                      const char *str, int len);
     596OSSL_DEPRECATEDIN_3_0
    540597const ENGINE_CMD_DEFN *ENGINE_get_cmd_defns(const ENGINE *e);
    541 int ENGINE_get_flags(const ENGINE *e);
     598OSSL_DEPRECATEDIN_3_0 int ENGINE_get_flags(const ENGINE *e);
     599#  endif
    542600
    543601/*
     
    559617 * and cannot initialise.
    560618 */
    561 int ENGINE_init(ENGINE *e);
     619#  ifndef OPENSSL_NO_DEPRECATED_3_0
     620OSSL_DEPRECATEDIN_3_0 int ENGINE_init(ENGINE *e);
     621#  endif
    562622/*
    563623 * Free a functional reference to a engine type. This does not require a
     
    565625 * reference.
    566626 */
    567 int ENGINE_finish(ENGINE *e);
     627#  ifndef OPENSSL_NO_DEPRECATED_3_0
     628OSSL_DEPRECATEDIN_3_0 int ENGINE_finish(ENGINE *e);
     629#  endif
    568630
    569631/*
     
    572634 * whatever.
    573635 */
     636#  ifndef OPENSSL_NO_DEPRECATED_3_0
     637OSSL_DEPRECATEDIN_3_0
    574638EVP_PKEY *ENGINE_load_private_key(ENGINE *e, const char *key_id,
    575639                                  UI_METHOD *ui_method, void *callback_data);
     640OSSL_DEPRECATEDIN_3_0
    576641EVP_PKEY *ENGINE_load_public_key(ENGINE *e, const char *key_id,
    577642                                 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,
     643OSSL_DEPRECATEDIN_3_0
     644int 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,
    581647                                UI_METHOD *ui_method, void *callback_data);
     648#  endif
    582649
    583650/*
     
    587654 * discarded.
    588655 */
    589 ENGINE *ENGINE_get_default_RSA(void);
     656#  ifndef OPENSSL_NO_DEPRECATED_3_0
     657OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_get_default_RSA(void);
     658#  endif
    590659/* 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
     661OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_get_default_DSA(void);
     662OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_get_default_EC(void);
     663OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_get_default_DH(void);
     664OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_get_default_RAND(void);
     665#  endif
    595666/*
    596667 * These functions can be used to get a functional reference to perform
    597668 * ciphering or digesting corresponding to "nid".
    598669 */
    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
     671OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_get_cipher_engine(int nid);
     672OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_get_digest_engine(int nid);
     673OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_get_pkey_meth_engine(int nid);
     674OSSL_DEPRECATEDIN_3_0 ENGINE *ENGINE_get_pkey_asn1_meth_engine(int nid);
     675#  endif
    603676
    604677/*
     
    608681 * reference 'e'.
    609682 */
    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
     684OSSL_DEPRECATEDIN_3_0 int ENGINE_set_default_RSA(ENGINE *e);
     685OSSL_DEPRECATEDIN_3_0 int ENGINE_set_default_string(ENGINE *e,
     686                                                    const char *def_list);
     687#  endif
    612688/* 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
     690OSSL_DEPRECATEDIN_3_0 int ENGINE_set_default_DSA(ENGINE *e);
     691OSSL_DEPRECATEDIN_3_0 int ENGINE_set_default_EC(ENGINE *e);
     692OSSL_DEPRECATEDIN_3_0 int ENGINE_set_default_DH(ENGINE *e);
     693OSSL_DEPRECATEDIN_3_0 int ENGINE_set_default_RAND(ENGINE *e);
     694OSSL_DEPRECATEDIN_3_0 int ENGINE_set_default_ciphers(ENGINE *e);
     695OSSL_DEPRECATEDIN_3_0 int ENGINE_set_default_digests(ENGINE *e);
     696OSSL_DEPRECATEDIN_3_0 int ENGINE_set_default_pkey_meths(ENGINE *e);
     697OSSL_DEPRECATEDIN_3_0 int ENGINE_set_default_pkey_asn1_meths(ENGINE *e);
     698#  endif
    621699
    622700/*
     
    627705 * selective functions.
    628706 */
    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
     708OSSL_DEPRECATEDIN_3_0 int ENGINE_set_default(ENGINE *e, unsigned int flags);
     709OSSL_DEPRECATEDIN_3_0 void ENGINE_add_conf_module(void);
     710#  endif
    632711
    633712/* Deprecated functions ... */
     
    639718
    640719/* Binary/behaviour compatibility levels */
    641 # define OSSL_DYNAMIC_VERSION            (unsigned long)0x00030000
     720#  define OSSL_DYNAMIC_VERSION            (unsigned long)0x00030000
    642721/*
    643722 * Binary versions older than this are too old for us (whether we're a loader
    644723 * or a loadee)
    645724 */
    646 # define OSSL_DYNAMIC_OLDEST             (unsigned long)0x00030000
     725#  define OSSL_DYNAMIC_OLDEST             (unsigned long)0x00030000
    647726
    648727/*
     
    688767 */
    689768typedef unsigned long (*dynamic_v_check_fn) (unsigned long ossl_version);
    690 # define IMPLEMENT_DYNAMIC_CHECK_FN() \
     769#  define IMPLEMENT_DYNAMIC_CHECK_FN() \
    691770        OPENSSL_EXPORT unsigned long v_check(unsigned long v); \
    692771        OPENSSL_EXPORT unsigned long v_check(unsigned long v) { \
     
    714793typedef int (*dynamic_bind_engine) (ENGINE *e, const char *id,
    715794                                    const dynamic_fns *fns);
    716 # define IMPLEMENT_DYNAMIC_BIND_FN(fn) \
     795#  define IMPLEMENT_DYNAMIC_BIND_FN(fn) \
    717796        OPENSSL_EXPORT \
    718797        int bind_engine(ENGINE *e, const char *id, const dynamic_fns *fns); \
     
    740819void *ENGINE_get_static_state(void);
    741820
    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
     823OSSL_DEPRECATEDIN_1_1_0 void ENGINE_setup_bsd_cryptodev(void);
     824#   endif
     825#  endif
    745826
    746827
     
    748829}
    749830#  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  
    11/*
    22 * Generated by util/mkerr.pl DO NOT EDIT
    3  * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
     3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    44 *
    5  * Licensed under the OpenSSL license (the "License").  You may not use
     5 * Licensed under the Apache License 2.0 (the "License").  You may not use
    66 * this file except in compliance with the License.  You can obtain a copy
    77 * in the file LICENSE in the source distribution or at
     
    99 */
    1010
    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
    1714
    1815# include <openssl/opensslconf.h>
     16# include <openssl/symhacks.h>
     17# include <openssl/cryptoerr_legacy.h>
     18
    1919
    2020# ifndef OPENSSL_NO_ENGINE
    2121
    22 #  ifdef  __cplusplus
    23 extern "C"
    24 #  endif
    25 int ERR_load_ENGINE_strings(void);
    26 
    27 /*
    28  * ENGINE function codes.
    29  */
    30 #  define ENGINE_F_DIGEST_UPDATE                           198
    31 #  define ENGINE_F_DYNAMIC_CTRL                            180
    32 #  define ENGINE_F_DYNAMIC_GET_DATA_CTX                    181
    33 #  define ENGINE_F_DYNAMIC_LOAD                            182
    34 #  define ENGINE_F_DYNAMIC_SET_DATA_CTX                    183
    35 #  define ENGINE_F_ENGINE_ADD                              105
    36 #  define ENGINE_F_ENGINE_BY_ID                            106
    37 #  define ENGINE_F_ENGINE_CMD_IS_EXECUTABLE                170
    38 #  define ENGINE_F_ENGINE_CTRL                             142
    39 #  define ENGINE_F_ENGINE_CTRL_CMD                         178
    40 #  define ENGINE_F_ENGINE_CTRL_CMD_STRING                  171
    41 #  define ENGINE_F_ENGINE_FINISH                           107
    42 #  define ENGINE_F_ENGINE_GET_CIPHER                       185
    43 #  define ENGINE_F_ENGINE_GET_DIGEST                       186
    44 #  define ENGINE_F_ENGINE_GET_FIRST                        195
    45 #  define ENGINE_F_ENGINE_GET_LAST                         196
    46 #  define ENGINE_F_ENGINE_GET_NEXT                         115
    47 #  define ENGINE_F_ENGINE_GET_PKEY_ASN1_METH               193
    48 #  define ENGINE_F_ENGINE_GET_PKEY_METH                    192
    49 #  define ENGINE_F_ENGINE_GET_PREV                         116
    50 #  define ENGINE_F_ENGINE_INIT                             119
    51 #  define ENGINE_F_ENGINE_LIST_ADD                         120
    52 #  define ENGINE_F_ENGINE_LIST_REMOVE                      121
    53 #  define ENGINE_F_ENGINE_LOAD_PRIVATE_KEY                 150
    54 #  define ENGINE_F_ENGINE_LOAD_PUBLIC_KEY                  151
    55 #  define ENGINE_F_ENGINE_LOAD_SSL_CLIENT_CERT             194
    56 #  define ENGINE_F_ENGINE_NEW                              122
    57 #  define ENGINE_F_ENGINE_PKEY_ASN1_FIND_STR               197
    58 #  define ENGINE_F_ENGINE_REMOVE                           123
    59 #  define ENGINE_F_ENGINE_SET_DEFAULT_STRING               189
    60 #  define ENGINE_F_ENGINE_SET_ID                           129
    61 #  define ENGINE_F_ENGINE_SET_NAME                         130
    62 #  define ENGINE_F_ENGINE_TABLE_REGISTER                   184
    63 #  define ENGINE_F_ENGINE_UNLOCKED_FINISH                  191
    64 #  define ENGINE_F_ENGINE_UP_REF                           190
    65 #  define ENGINE_F_INT_CLEANUP_ITEM                        199
    66 #  define ENGINE_F_INT_CTRL_HELPER                         172
    67 #  define ENGINE_F_INT_ENGINE_CONFIGURE                    188
    68 #  define ENGINE_F_INT_ENGINE_MODULE_INIT                  187
    69 #  define ENGINE_F_OSSL_HMAC_INIT                          200
    7022
    7123/*
  • trunk/src/libs/openssl-3.0.1/include/openssl/evp.h

    r91772 r94082  
    11/*
    2  * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    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
    1224
    1325# 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>
    1529# include <openssl/symhacks.h>
    1630# include <openssl/bio.h>
    1731# include <openssl/evperr.h>
     32# include <openssl/params.h>
    1833
    1934#ifdef ___openssl_mangling_h___
     
    4762# include <openssl/objects.h>
    4863
    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
    5976
    6077# define EVP_PKEY_NONE   NID_undef
     
    8299# define EVP_PKEY_X448 NID_X448
    83100# 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 )
    84111
    85112#ifdef  __cplusplus
    86113extern "C" {
    87114#endif
     115
     116int EVP_set_default_properties(OSSL_LIB_CTX *libctx, const char *propq);
     117int EVP_default_properties_is_fips_enabled(OSSL_LIB_CTX *libctx);
     118int EVP_default_properties_enable_fips(OSSL_LIB_CTX *libctx, int enable);
    88119
    89120# define EVP_PKEY_MO_SIGN        0x0001
     
    93124
    94125# 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
     127OSSL_DEPRECATEDIN_3_0 EVP_MD *EVP_MD_meth_new(int md_type, int pkey_type);
     128OSSL_DEPRECATEDIN_3_0 EVP_MD *EVP_MD_meth_dup(const EVP_MD *md);
     129OSSL_DEPRECATEDIN_3_0 void EVP_MD_meth_free(EVP_MD *md);
     130OSSL_DEPRECATEDIN_3_0
    99131int EVP_MD_meth_set_input_blocksize(EVP_MD *md, int blocksize);
     132OSSL_DEPRECATEDIN_3_0
    100133int EVP_MD_meth_set_result_size(EVP_MD *md, int resultsize);
     134OSSL_DEPRECATEDIN_3_0
    101135int EVP_MD_meth_set_app_datasize(EVP_MD *md, int datasize);
     136OSSL_DEPRECATEDIN_3_0
    102137int EVP_MD_meth_set_flags(EVP_MD *md, unsigned long flags);
     138OSSL_DEPRECATEDIN_3_0
    103139int EVP_MD_meth_set_init(EVP_MD *md, int (*init)(EVP_MD_CTX *ctx));
     140OSSL_DEPRECATEDIN_3_0
    104141int EVP_MD_meth_set_update(EVP_MD *md, int (*update)(EVP_MD_CTX *ctx,
    105142                                                     const void *data,
    106143                                                     size_t count));
     144OSSL_DEPRECATEDIN_3_0
    107145int EVP_MD_meth_set_final(EVP_MD *md, int (*final)(EVP_MD_CTX *ctx,
    108146                                                   unsigned char *md));
     147OSSL_DEPRECATEDIN_3_0
    109148int EVP_MD_meth_set_copy(EVP_MD *md, int (*copy)(EVP_MD_CTX *to,
    110149                                                 const EVP_MD_CTX *from));
     150OSSL_DEPRECATEDIN_3_0
    111151int EVP_MD_meth_set_cleanup(EVP_MD *md, int (*cleanup)(EVP_MD_CTX *ctx));
     152OSSL_DEPRECATEDIN_3_0
    112153int EVP_MD_meth_set_ctrl(EVP_MD *md, int (*ctrl)(EVP_MD_CTX *ctx, int cmd,
    113154                                                 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);
     155OSSL_DEPRECATEDIN_3_0 int EVP_MD_meth_get_input_blocksize(const EVP_MD *md);
     156OSSL_DEPRECATEDIN_3_0 int EVP_MD_meth_get_result_size(const EVP_MD *md);
     157OSSL_DEPRECATEDIN_3_0 int EVP_MD_meth_get_app_datasize(const EVP_MD *md);
     158OSSL_DEPRECATEDIN_3_0 unsigned long EVP_MD_meth_get_flags(const EVP_MD *md);
     159OSSL_DEPRECATEDIN_3_0
    119160int (*EVP_MD_meth_get_init(const EVP_MD *md))(EVP_MD_CTX *ctx);
     161OSSL_DEPRECATEDIN_3_0
    120162int (*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);
     164OSSL_DEPRECATEDIN_3_0
    123165int (*EVP_MD_meth_get_final(const EVP_MD *md))(EVP_MD_CTX *ctx,
    124166                                               unsigned char *md);
     167OSSL_DEPRECATEDIN_3_0
    125168int (*EVP_MD_meth_get_copy(const EVP_MD *md))(EVP_MD_CTX *to,
    126169                                              const EVP_MD_CTX *from);
     170OSSL_DEPRECATEDIN_3_0
    127171int (*EVP_MD_meth_get_cleanup(const EVP_MD *md))(EVP_MD_CTX *ctx);
     172OSSL_DEPRECATEDIN_3_0
    128173int (*EVP_MD_meth_get_ctrl(const EVP_MD *md))(EVP_MD_CTX *ctx, int cmd,
    129174                                              int p1, void *p2);
    130 
     175#  endif
    131176/* digest can only handle a single block */
    132177#  define EVP_MD_FLAG_ONESHOT     0x0001
     
    159204#  define EVP_MD_CTRL_MICALG                      0x2
    160205#  define EVP_MD_CTRL_XOF_LEN                     0x3
     206#  define EVP_MD_CTRL_TLSTREE                     0x4
    161207
    162208/* Minimum Algorithm specific ctrl value */
     
    201247# define EVP_MD_CTX_FLAG_FINALISE        0x0200
    202248/* NOTE: 0x0400 is reserved for internal usage */
    203 
     249# ifndef OPENSSL_NO_DEPRECATED_3_0
     250OSSL_DEPRECATEDIN_3_0
    204251EVP_CIPHER *EVP_CIPHER_meth_new(int cipher_type, int block_size, int key_len);
     252OSSL_DEPRECATEDIN_3_0
    205253EVP_CIPHER *EVP_CIPHER_meth_dup(const EVP_CIPHER *cipher);
     254OSSL_DEPRECATEDIN_3_0
    206255void EVP_CIPHER_meth_free(EVP_CIPHER *cipher);
    207 
     256OSSL_DEPRECATEDIN_3_0
    208257int EVP_CIPHER_meth_set_iv_length(EVP_CIPHER *cipher, int iv_len);
     258OSSL_DEPRECATEDIN_3_0
    209259int EVP_CIPHER_meth_set_flags(EVP_CIPHER *cipher, unsigned long flags);
     260OSSL_DEPRECATEDIN_3_0
    210261int EVP_CIPHER_meth_set_impl_ctx_size(EVP_CIPHER *cipher, int ctx_size);
     262OSSL_DEPRECATEDIN_3_0
    211263int EVP_CIPHER_meth_set_init(EVP_CIPHER *cipher,
    212264                             int (*init) (EVP_CIPHER_CTX *ctx,
     
    214266                                          const unsigned char *iv,
    215267                                          int enc));
     268OSSL_DEPRECATEDIN_3_0
    216269int EVP_CIPHER_meth_set_do_cipher(EVP_CIPHER *cipher,
    217270                                  int (*do_cipher) (EVP_CIPHER_CTX *ctx,
     
    219272                                                    const unsigned char *in,
    220273                                                    size_t inl));
     274OSSL_DEPRECATEDIN_3_0
    221275int EVP_CIPHER_meth_set_cleanup(EVP_CIPHER *cipher,
    222276                                int (*cleanup) (EVP_CIPHER_CTX *));
     277OSSL_DEPRECATEDIN_3_0
    223278int EVP_CIPHER_meth_set_set_asn1_params(EVP_CIPHER *cipher,
    224279                                        int (*set_asn1_parameters) (EVP_CIPHER_CTX *,
    225280                                                                    ASN1_TYPE *));
     281OSSL_DEPRECATEDIN_3_0
    226282int EVP_CIPHER_meth_set_get_asn1_params(EVP_CIPHER *cipher,
    227283                                        int (*get_asn1_parameters) (EVP_CIPHER_CTX *,
    228284                                                                    ASN1_TYPE *));
     285OSSL_DEPRECATEDIN_3_0
    229286int EVP_CIPHER_meth_set_ctrl(EVP_CIPHER *cipher,
    230287                             int (*ctrl) (EVP_CIPHER_CTX *, int type,
    231288                                          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);
     289OSSL_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);
     294OSSL_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);
     299OSSL_DEPRECATEDIN_3_0 int
     300(*EVP_CIPHER_meth_get_cleanup(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *);
     301OSSL_DEPRECATEDIN_3_0 int
     302(*EVP_CIPHER_meth_get_set_asn1_params(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *,
     303                                                                 ASN1_TYPE *);
     304OSSL_DEPRECATEDIN_3_0 int
     305(*EVP_CIPHER_meth_get_get_asn1_params(const EVP_CIPHER *cipher))(EVP_CIPHER_CTX *,
     306                                                                 ASN1_TYPE *);
     307OSSL_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
    249311
    250312/* Values for cipher flags */
     
    263325# define         EVP_CIPH_WRAP_MODE              0x10002
    264326# define         EVP_CIPH_OCB_MODE               0x10003
     327# define         EVP_CIPH_SIV_MODE               0x10004
    265328# define         EVP_CIPH_MODE                   0xF0007
    266329/* Set if variable length cipher */
     
    282345/* Don't use standard iv length function */
    283346# 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 */
    286350/* Buffer length in bits not bytes: CFB1 mode only */
    287351# 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
    292357/*
    293358 * Cipher handles any and all padding logic as well as finalisation.
    294359 */
     360# define         EVP_CIPH_FLAG_CTS               0x4000
    295361# define         EVP_CIPH_FLAG_CUSTOM_CIPHER     0x100000
    296362# define         EVP_CIPH_FLAG_AEAD_CIPHER       0x200000
     
    298364/* Cipher can handle pipeline operations */
    299365# 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
    300373
    301374/*
     
    370443/* Set the input buffer lengths to use for a pipelined operation */
    371444# define         EVP_CTRL_SET_PIPELINE_INPUT_LENS        0x24
    372 
     445/* Get the IV length used by the cipher */
    373446# 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
    374456
    375457/* Padding modes */
     
    425507                              int en_de);
    426508
    427 # ifndef OPENSSL_NO_RSA
     509typedef 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
    428515#  define EVP_PKEY_assign_RSA(pkey,rsa) EVP_PKEY_assign((pkey),EVP_PKEY_RSA,\
    429                                         (char *)(rsa))
     516                                                         (rsa))
    430517# endif
    431518
    432519# ifndef OPENSSL_NO_DSA
    433520#  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
    445533# endif
    446534# 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))
    449537# endif
    450538
    451539# 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))
    454542# endif
    455543
     
    460548# define EVP_get_cipherbyobj(a) EVP_get_cipherbynid(OBJ_obj2nid(a))
    461549
    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 
     550int 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
     553const char *EVP_MD_get0_name(const EVP_MD *md);
     554# define EVP_MD_name EVP_MD_get0_name
     555const char *EVP_MD_get0_description(const EVP_MD *md);
     556int EVP_MD_is_a(const EVP_MD *md, const char *name);
     557int EVP_MD_names_do_all(const EVP_MD *md,
     558                        void (*fn)(const char *name, void *data),
     559                        void *data);
     560const OSSL_PROVIDER *EVP_MD_get0_provider(const EVP_MD *md);
     561int EVP_MD_get_pkey_type(const EVP_MD *md);
     562# define EVP_MD_pkey_type EVP_MD_get_pkey_type
     563int EVP_MD_get_size(const EVP_MD *md);
     564# define EVP_MD_size EVP_MD_get_size
     565int EVP_MD_get_block_size(const EVP_MD *md);
     566# define EVP_MD_block_size EVP_MD_get_block_size
     567unsigned long EVP_MD_get_flags(const EVP_MD *md);
     568# define EVP_MD_flags EVP_MD_get_flags
     569
     570const EVP_MD *EVP_MD_CTX_get0_md(const EVP_MD_CTX *ctx);
     571EVP_MD *EVP_MD_CTX_get1_md(EVP_MD_CTX *ctx);
     572# ifndef OPENSSL_NO_DEPRECATED_3_0
     573OSSL_DEPRECATEDIN_3_0
    470574const EVP_MD *EVP_MD_CTX_md(const EVP_MD_CTX *ctx);
     575OSSL_DEPRECATEDIN_3_0
    471576int (*EVP_MD_CTX_update_fn(EVP_MD_CTX *ctx))(EVP_MD_CTX *ctx,
    472577                                             const void *data, size_t count);
     578OSSL_DEPRECATEDIN_3_0
    473579void EVP_MD_CTX_set_update_fn(EVP_MD_CTX *ctx,
    474580                              int (*update) (EVP_MD_CTX *ctx,
    475581                                             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
     590EVP_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
    480592void 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);
     593void *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
     596int EVP_CIPHER_get_nid(const EVP_CIPHER *cipher);
     597# define EVP_CIPHER_nid EVP_CIPHER_get_nid
     598const char *EVP_CIPHER_get0_name(const EVP_CIPHER *cipher);
     599# define EVP_CIPHER_name EVP_CIPHER_get0_name
     600const char *EVP_CIPHER_get0_description(const EVP_CIPHER *cipher);
     601int EVP_CIPHER_is_a(const EVP_CIPHER *cipher, const char *name);
     602int EVP_CIPHER_names_do_all(const EVP_CIPHER *cipher,
     603                            void (*fn)(const char *name, void *data),
     604                            void *data);
     605const OSSL_PROVIDER *EVP_CIPHER_get0_provider(const EVP_CIPHER *cipher);
     606int 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
     609OSSL_DEPRECATEDIN_3_0
    486610int 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
     612int EVP_CIPHER_get_key_length(const EVP_CIPHER *cipher);
     613# define EVP_CIPHER_key_length EVP_CIPHER_get_key_length
     614int EVP_CIPHER_get_iv_length(const EVP_CIPHER *cipher);
     615# define EVP_CIPHER_iv_length EVP_CIPHER_get_iv_length
     616unsigned long EVP_CIPHER_get_flags(const EVP_CIPHER *cipher);
     617# define EVP_CIPHER_flags EVP_CIPHER_get_flags
     618int EVP_CIPHER_get_mode(const EVP_CIPHER *cipher);
     619# define EVP_CIPHER_mode EVP_CIPHER_get_mode
     620int EVP_CIPHER_get_type(const EVP_CIPHER *cipher);
     621# define EVP_CIPHER_type EVP_CIPHER_get_type
     622EVP_CIPHER *EVP_CIPHER_fetch(OSSL_LIB_CTX *ctx, const char *algorithm,
     623                             const char *properties);
     624int EVP_CIPHER_up_ref(EVP_CIPHER *cipher);
     625void EVP_CIPHER_free(EVP_CIPHER *cipher);
     626
     627const EVP_CIPHER *EVP_CIPHER_CTX_get0_cipher(const EVP_CIPHER_CTX *ctx);
     628EVP_CIPHER *EVP_CIPHER_CTX_get1_cipher(EVP_CIPHER_CTX *ctx);
     629int EVP_CIPHER_CTX_is_encrypting(const EVP_CIPHER_CTX *ctx);
     630# define EVP_CIPHER_CTX_encrypting EVP_CIPHER_CTX_is_encrypting
     631int EVP_CIPHER_CTX_get_nid(const EVP_CIPHER_CTX *ctx);
     632# define EVP_CIPHER_CTX_nid EVP_CIPHER_CTX_get_nid
     633int EVP_CIPHER_CTX_get_block_size(const EVP_CIPHER_CTX *ctx);
     634# define EVP_CIPHER_CTX_block_size EVP_CIPHER_CTX_get_block_size
     635int EVP_CIPHER_CTX_get_key_length(const EVP_CIPHER_CTX *ctx);
     636# define EVP_CIPHER_CTX_key_length EVP_CIPHER_CTX_get_key_length
     637int EVP_CIPHER_CTX_get_iv_length(const EVP_CIPHER_CTX *ctx);
     638# define EVP_CIPHER_CTX_iv_length EVP_CIPHER_CTX_get_iv_length
     639int 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
    492642const 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(const EVP_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);
     643OSSL_DEPRECATEDIN_3_0 const unsigned char *EVP_CIPHER_CTX_iv(const EVP_CIPHER_CTX *ctx);
     644OSSL_DEPRECATEDIN_3_0 const unsigned char *EVP_CIPHER_CTX_original_iv(const EVP_CIPHER_CTX *ctx);
     645OSSL_DEPRECATEDIN_3_0 unsigned char *EVP_CIPHER_CTX_iv_noconst(EVP_CIPHER_CTX *ctx);
     646# endif
     647int EVP_CIPHER_CTX_get_updated_iv(EVP_CIPHER_CTX *ctx, void *buf, size_t len);
     648int EVP_CIPHER_CTX_get_original_iv(EVP_CIPHER_CTX *ctx, void *buf, size_t len);
     649# ifndef OPENSSL_NO_DEPRECATED_3_0
     650OSSL_DEPRECATEDIN_3_0
    501651unsigned 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
     653int EVP_CIPHER_CTX_get_num(const EVP_CIPHER_CTX *ctx);
     654# define EVP_CIPHER_CTX_num EVP_CIPHER_CTX_get_num
     655int EVP_CIPHER_CTX_set_num(EVP_CIPHER_CTX *ctx, int num);
    504656int EVP_CIPHER_CTX_copy(EVP_CIPHER_CTX *out, const EVP_CIPHER_CTX *in);
    505657void *EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx);
     
    507659void *EVP_CIPHER_CTX_get_cipher_data(const EVP_CIPHER_CTX *ctx);
    508660void *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
    514669
    515670# define EVP_ENCODE_LENGTH(l)    ((((l)+2)/3*4)+((l)/48+1)*2+80)
     
    524679# define EVP_OpenUpdate(a,b,c,d,e)       EVP_DecryptUpdate(a,b,c,d,e)
    525680# 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)
    528681
    529682# ifdef CONST_STRICT
    530683void BIO_set_md(BIO *, const EVP_MD *md);
    531684# 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))
    539690# 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))
    542692
    543693/*__owur*/ int EVP_Cipher(EVP_CIPHER_CTX *c,
     
    554704        OBJ_NAME_remove(alias,OBJ_NAME_TYPE_MD_METH|OBJ_NAME_ALIAS);
    555705
     706int EVP_MD_get_params(const EVP_MD *digest, OSSL_PARAM params[]);
     707int EVP_MD_CTX_set_params(EVP_MD_CTX *ctx, const OSSL_PARAM params[]);
     708int EVP_MD_CTX_get_params(EVP_MD_CTX *ctx, OSSL_PARAM params[]);
     709const OSSL_PARAM *EVP_MD_gettable_params(const EVP_MD *digest);
     710const OSSL_PARAM *EVP_MD_settable_ctx_params(const EVP_MD *md);
     711const OSSL_PARAM *EVP_MD_gettable_ctx_params(const EVP_MD *md);
     712const OSSL_PARAM *EVP_MD_CTX_settable_params(EVP_MD_CTX *ctx);
     713const OSSL_PARAM *EVP_MD_CTX_gettable_params(EVP_MD_CTX *ctx);
    556714int EVP_MD_CTX_ctrl(EVP_MD_CTX *ctx, int cmd, int p1, void *p2);
    557715EVP_MD_CTX *EVP_MD_CTX_new(void);
     
    565723void EVP_MD_CTX_clear_flags(EVP_MD_CTX *ctx, int flags);
    566724int 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[]);
    567727__owur int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type,
    568728                                 ENGINE *impl);
     
    574734                          unsigned char *md, unsigned int *size,
    575735                          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);
    576739
    577740__owur int EVP_MD_CTX_copy(EVP_MD_CTX *out, const EVP_MD_CTX *in);
     
    582745                              size_t len);
    583746
     747__owur EVP_MD *EVP_MD_fetch(OSSL_LIB_CTX *ctx, const char *algorithm,
     748                            const char *properties);
     749
     750int EVP_MD_up_ref(EVP_MD *md);
     751void EVP_MD_free(EVP_MD *md);
     752
    584753int EVP_read_pw_string(char *buf, int length, const char *prompt, int verify);
    585754int EVP_read_pw_string_min(char *buf, int minlen, int maxlen,
     
    603772                                  const unsigned char *key,
    604773                                  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[]);
    605778/*__owur*/ int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
    606779                                 int *outl, const unsigned char *in, int inl);
     
    616789                                  const unsigned char *key,
    617790                                  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[]);
    618795/*__owur*/ int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
    619796                                 int *outl, const unsigned char *in, int inl);
     
    630807                                 const unsigned char *key,
    631808                                 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[]);
    632812__owur int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
    633813                            int *outl, const unsigned char *in, int inl);
     
    639819__owur int EVP_SignFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *s,
    640820                         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);
    641824
    642825__owur int EVP_DigestSign(EVP_MD_CTX *ctx, unsigned char *sigret,
     
    646829__owur int EVP_VerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sigbuf,
    647830                           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);
    648834
    649835__owur int EVP_DigestVerify(EVP_MD_CTX *ctx, const unsigned char *sigret,
     
    651837                            size_t tbslen);
    652838
     839int 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[]);
    653843/*__owur*/ int EVP_DigestSignInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
    654844                                  const EVP_MD *type, ENGINE *e,
    655845                                  EVP_PKEY *pkey);
     846int EVP_DigestSignUpdate(EVP_MD_CTX *ctx, const void *data, size_t dsize);
    656847__owur int EVP_DigestSignFinal(EVP_MD_CTX *ctx, unsigned char *sigret,
    657848                               size_t *siglen);
    658849
     850int 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[]);
    659854__owur int EVP_DigestVerifyInit(EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx,
    660855                                const EVP_MD *type, ENGINE *e,
    661856                                EVP_PKEY *pkey);
     857int EVP_DigestVerifyUpdate(EVP_MD_CTX *ctx, const void *data, size_t dsize);
    662858__owur int EVP_DigestVerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sig,
    663859                                 size_t siglen);
    664860
    665 # ifndef OPENSSL_NO_RSA
    666861__owur int EVP_OpenInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type,
    667862                        const unsigned char *ek, int ekl,
     
    673868                        EVP_PKEY **pubk, int npubk);
    674869__owur int EVP_SealFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
    675 # endif
    676870
    677871EVP_ENCODE_CTX *EVP_ENCODE_CTX_new(void);
    678872void EVP_ENCODE_CTX_free(EVP_ENCODE_CTX *ctx);
    679 int EVP_ENCODE_CTX_copy(EVP_ENCODE_CTX *dctx, EVP_ENCODE_CTX *sctx);
     873int EVP_ENCODE_CTX_copy(EVP_ENCODE_CTX *dctx, const EVP_ENCODE_CTX *sctx);
    680874int EVP_ENCODE_CTX_num(EVP_ENCODE_CTX *ctx);
    681875void EVP_EncodeInit(EVP_ENCODE_CTX *ctx);
     
    692886int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n);
    693887
    694 # if OPENSSL_API_COMPAT < 0x10100000L
     888# ifndef OPENSSL_NO_DEPRECATED_1_1_0
    695889#  define EVP_CIPHER_CTX_init(c)      EVP_CIPHER_CTX_reset(c)
    696890#  define EVP_CIPHER_CTX_cleanup(c)   EVP_CIPHER_CTX_reset(c)
     
    703897int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr);
    704898int EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key);
     899int EVP_CIPHER_get_params(EVP_CIPHER *cipher, OSSL_PARAM params[]);
     900int EVP_CIPHER_CTX_set_params(EVP_CIPHER_CTX *ctx, const OSSL_PARAM params[]);
     901int EVP_CIPHER_CTX_get_params(EVP_CIPHER_CTX *ctx, OSSL_PARAM params[]);
     902const OSSL_PARAM *EVP_CIPHER_gettable_params(const EVP_CIPHER *cipher);
     903const OSSL_PARAM *EVP_CIPHER_settable_ctx_params(const EVP_CIPHER *cipher);
     904const OSSL_PARAM *EVP_CIPHER_gettable_ctx_params(const EVP_CIPHER *cipher);
     905const OSSL_PARAM *EVP_CIPHER_CTX_settable_params(EVP_CIPHER_CTX *ctx);
     906const OSSL_PARAM *EVP_CIPHER_CTX_gettable_params(EVP_CIPHER_CTX *ctx);
    705907
    706908const BIO_METHOD *BIO_f_md(void);
     
    739941const EVP_MD *EVP_shake128(void);
    740942const EVP_MD *EVP_shake256(void);
     943
    741944# ifndef OPENSSL_NO_MDC2
    742945const EVP_MD *EVP_mdc2(void);
     
    9591162# endif
    9601163
    961 # if OPENSSL_API_COMPAT < 0x10100000L
     1164# ifndef OPENSSL_NO_DEPRECATED_1_1_0
    9621165#  define OPENSSL_add_all_algorithms_conf() \
    9631166    OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS \
     
    9941197                               (const EVP_CIPHER *ciph, const char *from,
    9951198                                const char *to, void *x), void *arg);
     1199void EVP_CIPHER_do_all_provided(OSSL_LIB_CTX *libctx,
     1200                                void (*fn)(EVP_CIPHER *cipher, void *arg),
     1201                                void *arg);
    9961202
    9971203void EVP_MD_do_all(void (*fn) (const EVP_MD *ciph,
     
    10011207                           (const EVP_MD *ciph, const char *from,
    10021208                            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);
     1209void 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
     1215EVP_MAC *EVP_MAC_fetch(OSSL_LIB_CTX *libctx, const char *algorithm,
     1216                       const char *properties);
     1217int EVP_MAC_up_ref(EVP_MAC *mac);
     1218void EVP_MAC_free(EVP_MAC *mac);
     1219const char *EVP_MAC_get0_name(const EVP_MAC *mac);
     1220const char *EVP_MAC_get0_description(const EVP_MAC *mac);
     1221int EVP_MAC_is_a(const EVP_MAC *mac, const char *name);
     1222const OSSL_PROVIDER *EVP_MAC_get0_provider(const EVP_MAC *mac);
     1223int EVP_MAC_get_params(EVP_MAC *mac, OSSL_PARAM params[]);
     1224
     1225EVP_MAC_CTX *EVP_MAC_CTX_new(EVP_MAC *mac);
     1226void EVP_MAC_CTX_free(EVP_MAC_CTX *ctx);
     1227EVP_MAC_CTX *EVP_MAC_CTX_dup(const EVP_MAC_CTX *src);
     1228EVP_MAC *EVP_MAC_CTX_get0_mac(EVP_MAC_CTX *ctx);
     1229int EVP_MAC_CTX_get_params(EVP_MAC_CTX *ctx, OSSL_PARAM params[]);
     1230int EVP_MAC_CTX_set_params(EVP_MAC_CTX *ctx, const OSSL_PARAM params[]);
     1231
     1232size_t EVP_MAC_CTX_get_mac_size(EVP_MAC_CTX *ctx);
     1233size_t EVP_MAC_CTX_get_block_size(EVP_MAC_CTX *ctx);
     1234unsigned 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);
     1239int EVP_MAC_init(EVP_MAC_CTX *ctx, const unsigned char *key, size_t keylen,
     1240                 const OSSL_PARAM params[]);
     1241int EVP_MAC_update(EVP_MAC_CTX *ctx, const unsigned char *data, size_t datalen);
     1242int EVP_MAC_final(EVP_MAC_CTX *ctx,
     1243                  unsigned char *out, size_t *outl, size_t outsize);
     1244int EVP_MAC_finalXOF(EVP_MAC_CTX *ctx, unsigned char *out, size_t outsize);
     1245const OSSL_PARAM *EVP_MAC_gettable_params(const EVP_MAC *mac);
     1246const OSSL_PARAM *EVP_MAC_gettable_ctx_params(const EVP_MAC *mac);
     1247const OSSL_PARAM *EVP_MAC_settable_ctx_params(const EVP_MAC *mac);
     1248const OSSL_PARAM *EVP_MAC_CTX_gettable_params(EVP_MAC_CTX *ctx);
     1249const OSSL_PARAM *EVP_MAC_CTX_settable_params(EVP_MAC_CTX *ctx);
     1250
     1251void EVP_MAC_do_all_provided(OSSL_LIB_CTX *libctx,
     1252                             void (*fn)(EVP_MAC *mac, void *arg),
     1253                             void *arg);
     1254int EVP_MAC_names_do_all(const EVP_MAC *mac,
     1255                         void (*fn)(const char *name, void *data),
     1256                         void *data);
     1257
     1258/* RAND stuff */
     1259EVP_RAND *EVP_RAND_fetch(OSSL_LIB_CTX *libctx, const char *algorithm,
     1260                         const char *properties);
     1261int EVP_RAND_up_ref(EVP_RAND *rand);
     1262void EVP_RAND_free(EVP_RAND *rand);
     1263const char *EVP_RAND_get0_name(const EVP_RAND *rand);
     1264const char *EVP_RAND_get0_description(const EVP_RAND *md);
     1265int EVP_RAND_is_a(const EVP_RAND *rand, const char *name);
     1266const OSSL_PROVIDER *EVP_RAND_get0_provider(const EVP_RAND *rand);
     1267int EVP_RAND_get_params(EVP_RAND *rand, OSSL_PARAM params[]);
     1268
     1269EVP_RAND_CTX *EVP_RAND_CTX_new(EVP_RAND *rand, EVP_RAND_CTX *parent);
     1270void EVP_RAND_CTX_free(EVP_RAND_CTX *ctx);
     1271EVP_RAND *EVP_RAND_CTX_get0_rand(EVP_RAND_CTX *ctx);
     1272int EVP_RAND_CTX_get_params(EVP_RAND_CTX *ctx, OSSL_PARAM params[]);
     1273int EVP_RAND_CTX_set_params(EVP_RAND_CTX *ctx, const OSSL_PARAM params[]);
     1274const OSSL_PARAM *EVP_RAND_gettable_params(const EVP_RAND *rand);
     1275const OSSL_PARAM *EVP_RAND_gettable_ctx_params(const EVP_RAND *rand);
     1276const OSSL_PARAM *EVP_RAND_settable_ctx_params(const EVP_RAND *rand);
     1277const OSSL_PARAM *EVP_RAND_CTX_gettable_params(EVP_RAND_CTX *ctx);
     1278const OSSL_PARAM *EVP_RAND_CTX_settable_params(EVP_RAND_CTX *ctx);
     1279
     1280void EVP_RAND_do_all_provided(OSSL_LIB_CTX *libctx,
     1281                              void (*fn)(EVP_RAND *rand, void *arg),
     1282                              void *arg);
     1283int 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[]);
     1291int 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);
     1296int 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
     1302int EVP_RAND_verify_zeroization(EVP_RAND_CTX *ctx);
     1303unsigned int EVP_RAND_get_strength(EVP_RAND_CTX *ctx);
     1304int 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
     1312OSSL_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);
     1316OSSL_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
     1320int EVP_PKEY_is_a(const EVP_PKEY *pkey, const char *name);
     1321int EVP_PKEY_type_names_do_all(const EVP_PKEY *pkey,
     1322                               void (*fn)(const char *name, void *data),
     1323                               void *data);
    10101324int 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);
     1325int EVP_PKEY_get_id(const EVP_PKEY *pkey);
     1326# define EVP_PKEY_id EVP_PKEY_get_id
     1327int EVP_PKEY_get_base_id(const EVP_PKEY *pkey);
     1328# define EVP_PKEY_base_id EVP_PKEY_get_base_id
     1329int EVP_PKEY_get_bits(const EVP_PKEY *pkey);
     1330# define EVP_PKEY_bits EVP_PKEY_get_bits
     1331int EVP_PKEY_get_security_bits(const EVP_PKEY *pkey);
     1332# define EVP_PKEY_security_bits EVP_PKEY_get_security_bits
     1333int EVP_PKEY_get_size(const EVP_PKEY *pkey);
     1334# define EVP_PKEY_size EVP_PKEY_get_size
     1335int EVP_PKEY_can_sign(const EVP_PKEY *pkey);
    10161336int EVP_PKEY_set_type(EVP_PKEY *pkey, int type);
    10171337int 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
     1338int EVP_PKEY_set_type_by_keymgmt(EVP_PKEY *pkey, EVP_KEYMGMT *keymgmt);
     1339# ifndef OPENSSL_NO_DEPRECATED_3_0
     1340#  ifndef OPENSSL_NO_ENGINE
     1341OSSL_DEPRECATEDIN_3_0
    10201342int EVP_PKEY_set1_engine(EVP_PKEY *pkey, ENGINE *e);
     1343OSSL_DEPRECATEDIN_3_0
    10211344ENGINE *EVP_PKEY_get0_engine(const EVP_PKEY *pkey);
    1022 # endif
     1345#  endif
     1346OSSL_DEPRECATEDIN_3_0
    10231347int EVP_PKEY_assign(EVP_PKEY *pkey, int type, void *key);
     1348OSSL_DEPRECATEDIN_3_0
    10241349void *EVP_PKEY_get0(const EVP_PKEY *pkey);
     1350OSSL_DEPRECATEDIN_3_0
    10251351const unsigned char *EVP_PKEY_get0_hmac(const EVP_PKEY *pkey, size_t *len);
    1026 # ifndef OPENSSL_NO_POLY1305
     1352#  ifndef OPENSSL_NO_POLY1305
     1353OSSL_DEPRECATEDIN_3_0
    10271354const 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
     1357OSSL_DEPRECATEDIN_3_0
    10301358const unsigned char *EVP_PKEY_get0_siphash(const EVP_PKEY *pkey, size_t *len);
    1031 # endif
    1032 
    1033 # ifndef OPENSSL_NO_RSA
     1359#  endif
     1360
    10341361struct rsa_st;
     1362OSSL_DEPRECATEDIN_3_0
    10351363int EVP_PKEY_set1_RSA(EVP_PKEY *pkey, struct rsa_st *key);
    1036 struct rsa_st *EVP_PKEY_get0_RSA(EVP_PKEY *pkey);
     1364OSSL_DEPRECATEDIN_3_0
     1365const struct rsa_st *EVP_PKEY_get0_RSA(const EVP_PKEY *pkey);
     1366OSSL_DEPRECATEDIN_3_0
    10371367struct rsa_st *EVP_PKEY_get1_RSA(EVP_PKEY *pkey);
    1038 # endif
    1039 # ifndef OPENSSL_NO_DSA
     1368
     1369#  ifndef OPENSSL_NO_DSA
    10401370struct dsa_st;
     1371OSSL_DEPRECATEDIN_3_0
    10411372int EVP_PKEY_set1_DSA(EVP_PKEY *pkey, struct dsa_st *key);
    1042 struct dsa_st *EVP_PKEY_get0_DSA(EVP_PKEY *pkey);
     1373OSSL_DEPRECATEDIN_3_0
     1374const struct dsa_st *EVP_PKEY_get0_DSA(const EVP_PKEY *pkey);
     1375OSSL_DEPRECATEDIN_3_0
    10431376struct dsa_st *EVP_PKEY_get1_DSA(EVP_PKEY *pkey);
    1044 # endif
    1045 # ifndef OPENSSL_NO_DH
     1377#  endif
     1378
     1379#  ifndef OPENSSL_NO_DH
    10461380struct 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
     1381OSSL_DEPRECATEDIN_3_0 int EVP_PKEY_set1_DH(EVP_PKEY *pkey, struct dh_st *key);
     1382OSSL_DEPRECATEDIN_3_0 const struct dh_st *EVP_PKEY_get0_DH(const EVP_PKEY *pkey);
     1383OSSL_DEPRECATEDIN_3_0 struct dh_st *EVP_PKEY_get1_DH(EVP_PKEY *pkey);
     1384#  endif
     1385
     1386#  ifndef OPENSSL_NO_EC
    10521387struct ec_key_st;
     1388OSSL_DEPRECATEDIN_3_0
    10531389int 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);
     1390OSSL_DEPRECATEDIN_3_0
     1391const struct ec_key_st *EVP_PKEY_get0_EC_KEY(const EVP_PKEY *pkey);
     1392OSSL_DEPRECATEDIN_3_0
    10551393struct ec_key_st *EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey);
    1056 # endif
     1394#  endif
     1395# endif /* OPENSSL_NO_DEPRECATED_3_0 */
    10571396
    10581397EVP_PKEY *EVP_PKEY_new(void);
    10591398int EVP_PKEY_up_ref(EVP_PKEY *pkey);
     1399EVP_PKEY *EVP_PKEY_dup(EVP_PKEY *pkey);
    10601400void EVP_PKEY_free(EVP_PKEY *pkey);
     1401const char *EVP_PKEY_get0_description(const EVP_PKEY *pkey);
     1402const OSSL_PROVIDER *EVP_PKEY_get0_provider(const EVP_PKEY *key);
    10611403
    10621404EVP_PKEY *d2i_PublicKey(int type, EVP_PKEY **a, const unsigned char **pp,
    10631405                        long length);
    1064 int i2d_PublicKey(EVP_PKEY *a, unsigned char **pp);
    1065 
     1406int i2d_PublicKey(const EVP_PKEY *a, unsigned char **pp);
     1407
     1408
     1409EVP_PKEY *d2i_PrivateKey_ex(int type, EVP_PKEY **a, const unsigned char **pp,
     1410                            long length, OSSL_LIB_CTX *libctx,
     1411                            const char *propq);
    10661412EVP_PKEY *d2i_PrivateKey(int type, EVP_PKEY **a, const unsigned char **pp,
    10671413                         long length);
     1414EVP_PKEY *d2i_AutoPrivateKey_ex(EVP_PKEY **a, const unsigned char **pp,
     1415                                long length, OSSL_LIB_CTX *libctx,
     1416                                const char *propq);
    10681417EVP_PKEY *d2i_AutoPrivateKey(EVP_PKEY **a, const unsigned char **pp,
    10691418                             long length);
    1070 int i2d_PrivateKey(EVP_PKEY *a, unsigned char **pp);
     1419int i2d_PrivateKey(const EVP_PKEY *a, unsigned char **pp);
     1420
     1421int i2d_KeyParams(const EVP_PKEY *a, unsigned char **pp);
     1422EVP_PKEY *d2i_KeyParams(int type, EVP_PKEY **a, const unsigned char **pp,
     1423                        long length);
     1424int i2d_KeyParams_bio(BIO *bp, const EVP_PKEY *pkey);
     1425EVP_PKEY *d2i_KeyParams_bio(int type, EVP_PKEY **a, BIO *in);
    10711426
    10721427int EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from);
    10731428int EVP_PKEY_missing_parameters(const EVP_PKEY *pkey);
    10741429int EVP_PKEY_save_parameters(EVP_PKEY *pkey, int mode);
     1430int EVP_PKEY_parameters_eq(const EVP_PKEY *a, const EVP_PKEY *b);
     1431int EVP_PKEY_eq(const EVP_PKEY *a, const EVP_PKEY *b);
     1432
     1433# ifndef OPENSSL_NO_DEPRECATED_3_0
     1434OSSL_DEPRECATEDIN_3_0
    10751435int EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b);
    1076 
     1436OSSL_DEPRECATEDIN_3_0
    10771437int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b);
     1438# endif
    10781439
    10791440int EVP_PKEY_print_public(BIO *out, const EVP_PKEY *pkey,
     
    10831444int EVP_PKEY_print_params(BIO *out, const EVP_PKEY *pkey,
    10841445                          int indent, ASN1_PCTX *pctx);
     1446# ifndef OPENSSL_NO_STDIO
     1447int EVP_PKEY_print_public_fp(FILE *fp, const EVP_PKEY *pkey,
     1448                             int indent, ASN1_PCTX *pctx);
     1449int EVP_PKEY_print_private_fp(FILE *fp, const EVP_PKEY *pkey,
     1450                              int indent, ASN1_PCTX *pctx);
     1451int EVP_PKEY_print_params_fp(FILE *fp, const EVP_PKEY *pkey,
     1452                             int indent, ASN1_PCTX *pctx);
     1453# endif
    10851454
    10861455int 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);
     1456int EVP_PKEY_get_default_digest_name(EVP_PKEY *pkey,
     1457                                     char *mdname, size_t mdname_sz);
     1458int 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
     1470int 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
     1482size_t EVP_PKEY_get1_encoded_public_key(EVP_PKEY *pkey, unsigned char **ppub);
    10931483
    10941484/* calls methods */
     
    11041494                       ASN1_TYPE *param, const EVP_CIPHER *cipher,
    11051495                       const EVP_MD *md, int en_de);
     1496int 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);
    11061500int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen,
    11071501                           const unsigned char *salt, int saltlen, int iter,
     
    11131507                          ASN1_TYPE *param, const EVP_CIPHER *cipher,
    11141508                          const EVP_MD *md, int en_de);
     1509int 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);
    11151513
    11161514#ifndef OPENSSL_NO_SCRYPT
     
    11191517                   uint64_t N, uint64_t r, uint64_t p, uint64_t maxmem,
    11201518                   unsigned char *key, size_t keylen);
     1519int 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);
    11211524
    11221525int PKCS5_v2_scrypt_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass,
    11231526                             int passlen, ASN1_TYPE *param,
    11241527                             const EVP_CIPHER *c, const EVP_MD *md, int en_de);
     1528int 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);
    11251532#endif
    11261533
     
    11291536int EVP_PBE_CipherInit(ASN1_OBJECT *pbe_obj, const char *pass, int passlen,
    11301537                       ASN1_TYPE *param, EVP_CIPHER_CTX *ctx, int en_de);
     1538
     1539int 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);
    11311542
    11321543/* PBE type */
     
    11451556int EVP_PBE_find(int type, int pbe_nid, int *pcnid, int *pmnid,
    11461557                 EVP_PBE_KEYGEN **pkeygen);
     1558int EVP_PBE_find_ex(int type, int pbe_nid, int *pcnid, int *pmnid,
     1559                    EVP_PBE_KEYGEN **pkeygen, EVP_PBE_KEYGEN_EX **pkeygen_ex);
    11471560void EVP_PBE_cleanup(void);
    11481561int EVP_PBE_get(int *ptype, int *ppbe_nid, size_t num);
     
    11611574# define ASN1_PKEY_CTRL_SET1_TLS_ENCPT   0x9
    11621575# define ASN1_PKEY_CTRL_GET1_TLS_ENCPT   0xa
     1576# define ASN1_PKEY_CTRL_CMS_IS_RI_TYPE_SUPPORTED 0xb
    11631577
    11641578int EVP_PKEY_asn1_get_count(void);
     
    11831597void EVP_PKEY_asn1_set_public(EVP_PKEY_ASN1_METHOD *ameth,
    11841598                              int (*pub_decode) (EVP_PKEY *pk,
    1185                                                  X509_PUBKEY *pub),
     1599                                                 const X509_PUBKEY *pub),
    11861600                              int (*pub_encode) (X509_PUBKEY *pub,
    11871601                                                 const EVP_PKEY *pk),
     
    12271641                            int (*item_verify) (EVP_MD_CTX *ctx,
    12281642                                                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,
    12321646                                                EVP_PKEY *pkey),
    12331647                            int (*item_sign) (EVP_MD_CTX *ctx,
    12341648                                              const ASN1_ITEM *it,
    1235                                               void *asn,
     1649                                              const void *data,
    12361650                                              X509_ALGOR *alg1,
    12371651                                              X509_ALGOR *alg2,
     
    12741688                                                                *pk));
    12751689
     1690int EVP_PKEY_CTX_get_signature_md(EVP_PKEY_CTX *ctx, const EVP_MD **md);
     1691int EVP_PKEY_CTX_set_signature_md(EVP_PKEY_CTX *ctx, const EVP_MD *md);
     1692
     1693int EVP_PKEY_CTX_set1_id(EVP_PKEY_CTX *ctx, const void *id, int len);
     1694int EVP_PKEY_CTX_get1_id(EVP_PKEY_CTX *ctx, void *id);
     1695int EVP_PKEY_CTX_get1_id_len(EVP_PKEY_CTX *ctx, size_t *id_len);
     1696
     1697int EVP_PKEY_CTX_set_kem_op(EVP_PKEY_CTX *ctx, const char *op);
     1698
     1699const char *EVP_PKEY_get0_type_name(const EVP_PKEY *key);
     1700
    12761701# define EVP_PKEY_OP_UNDEFINED           0
    12771702# define EVP_PKEY_OP_PARAMGEN            (1<<1)
    12781703# 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)
    12871715
    12881716# define EVP_PKEY_OP_TYPE_SIG    \
     
    12971725
    12981726# 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
     1730int EVP_PKEY_CTX_set_mac_key(EVP_PKEY_CTX *ctx, const unsigned char *key,
     1731                             int keylen);
    13121732
    13131733# define EVP_PKEY_CTRL_MD                1
    13141734# define EVP_PKEY_CTRL_PEER_KEY          2
    1315 
    1316 # define EVP_PKEY_CTRL_PKCS7_ENCRYPT     3
    1317 # define EVP_PKEY_CTRL_PKCS7_DECRYPT     4
    1318 
    1319 # define EVP_PKEY_CTRL_PKCS7_SIGN        5
    1320 
    13211735# define EVP_PKEY_CTRL_SET_MAC_KEY       6
    1322 
    13231736# define EVP_PKEY_CTRL_DIGESTINIT        7
    1324 
    13251737/* Used by GOST key encryption in TLS */
    13261738# 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
    13321747# define EVP_PKEY_CTRL_CIPHER            12
    1333 
    13341748# define EVP_PKEY_CTRL_GET_MD            13
    1335 
    13361749# 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
    13371753
    13381754# define EVP_PKEY_ALG_CTRL               0x1000
     
    13431759 */
    13441760# 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
     1762OSSL_DEPRECATEDIN_3_0 const EVP_PKEY_METHOD *EVP_PKEY_meth_find(int type);
     1763OSSL_DEPRECATEDIN_3_0 EVP_PKEY_METHOD *EVP_PKEY_meth_new(int id, int flags);
     1764OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_get0_info(int *ppkey_id, int *pflags,
     1765                                              const EVP_PKEY_METHOD *meth);
     1766OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_copy(EVP_PKEY_METHOD *dst,
     1767                                         const EVP_PKEY_METHOD *src);
     1768OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_free(EVP_PKEY_METHOD *pmeth);
     1769OSSL_DEPRECATEDIN_3_0 int EVP_PKEY_meth_add0(const EVP_PKEY_METHOD *pmeth);
     1770OSSL_DEPRECATEDIN_3_0 int EVP_PKEY_meth_remove(const EVP_PKEY_METHOD *pmeth);
     1771OSSL_DEPRECATEDIN_3_0 size_t EVP_PKEY_meth_get_count(void);
     1772OSSL_DEPRECATEDIN_3_0 const EVP_PKEY_METHOD *EVP_PKEY_meth_get0(size_t idx);
     1773# endif
     1774
     1775EVP_KEYMGMT *EVP_KEYMGMT_fetch(OSSL_LIB_CTX *ctx, const char *algorithm,
     1776                               const char *properties);
     1777int EVP_KEYMGMT_up_ref(EVP_KEYMGMT *keymgmt);
     1778void EVP_KEYMGMT_free(EVP_KEYMGMT *keymgmt);
     1779const OSSL_PROVIDER *EVP_KEYMGMT_get0_provider(const EVP_KEYMGMT *keymgmt);
     1780const char *EVP_KEYMGMT_get0_name(const EVP_KEYMGMT *keymgmt);
     1781const char *EVP_KEYMGMT_get0_description(const EVP_KEYMGMT *keymgmt);
     1782int EVP_KEYMGMT_is_a(const EVP_KEYMGMT *keymgmt, const char *name);
     1783void EVP_KEYMGMT_do_all_provided(OSSL_LIB_CTX *libctx,
     1784                                 void (*fn)(EVP_KEYMGMT *keymgmt, void *arg),
     1785                                 void *arg);
     1786int EVP_KEYMGMT_names_do_all(const EVP_KEYMGMT *keymgmt,
     1787                             void (*fn)(const char *name, void *data),
     1788                             void *data);
     1789const OSSL_PARAM *EVP_KEYMGMT_gettable_params(const EVP_KEYMGMT *keymgmt);
     1790const OSSL_PARAM *EVP_KEYMGMT_settable_params(const EVP_KEYMGMT *keymgmt);
     1791const OSSL_PARAM *EVP_KEYMGMT_gen_settable_params(const EVP_KEYMGMT *keymgmt);
    13561792
    13571793EVP_PKEY_CTX *EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e);
    13581794EVP_PKEY_CTX *EVP_PKEY_CTX_new_id(int id, ENGINE *e);
    1359 EVP_PKEY_CTX *EVP_PKEY_CTX_dup(EVP_PKEY_CTX *ctx);
     1795EVP_PKEY_CTX *EVP_PKEY_CTX_new_from_name(OSSL_LIB_CTX *libctx,
     1796                                         const char *name,
     1797                                         const char *propquery);
     1798EVP_PKEY_CTX *EVP_PKEY_CTX_new_from_pkey(OSSL_LIB_CTX *libctx,
     1799                                         EVP_PKEY *pkey, const char *propquery);
     1800EVP_PKEY_CTX *EVP_PKEY_CTX_dup(const EVP_PKEY_CTX *ctx);
    13601801void EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx);
    1361 
     1802int EVP_PKEY_CTX_is_a(EVP_PKEY_CTX *ctx, const char *keytype);
     1803
     1804int EVP_PKEY_CTX_get_params(EVP_PKEY_CTX *ctx, OSSL_PARAM *params);
     1805const OSSL_PARAM *EVP_PKEY_CTX_gettable_params(const EVP_PKEY_CTX *ctx);
     1806int EVP_PKEY_CTX_set_params(EVP_PKEY_CTX *ctx, const OSSL_PARAM *params);
     1807const OSSL_PARAM *EVP_PKEY_CTX_settable_params(const EVP_PKEY_CTX *ctx);
    13621808int EVP_PKEY_CTX_ctrl(EVP_PKEY_CTX *ctx, int keytype, int optype,
    13631809                      int cmd, int p1, void *p2);
     
    13771823EVP_PKEY *EVP_PKEY_new_mac_key(int type, ENGINE *e,
    13781824                               const unsigned char *key, int keylen);
     1825EVP_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);
    13791829EVP_PKEY *EVP_PKEY_new_raw_private_key(int type, ENGINE *e,
    13801830                                       const unsigned char *priv,
    13811831                                       size_t len);
     1832EVP_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);
    13821835EVP_PKEY *EVP_PKEY_new_raw_public_key(int type, ENGINE *e,
    13831836                                      const unsigned char *pub,
     
    13881841                                size_t *len);
    13891842
     1843# ifndef OPENSSL_NO_DEPRECATED_3_0
     1844OSSL_DEPRECATEDIN_3_0
    13901845EVP_PKEY *EVP_PKEY_new_CMAC_key(ENGINE *e, const unsigned char *priv,
    13911846                                size_t len, const EVP_CIPHER *cipher);
     1847# endif
    13921848
    13931849void EVP_PKEY_CTX_set_data(EVP_PKEY_CTX *ctx, void *data);
    1394 void *EVP_PKEY_CTX_get_data(EVP_PKEY_CTX *ctx);
     1850void *EVP_PKEY_CTX_get_data(const EVP_PKEY_CTX *ctx);
    13951851EVP_PKEY *EVP_PKEY_CTX_get0_pkey(EVP_PKEY_CTX *ctx);
    13961852
     
    14001856void *EVP_PKEY_CTX_get_app_data(EVP_PKEY_CTX *ctx);
    14011857
     1858void EVP_SIGNATURE_free(EVP_SIGNATURE *signature);
     1859int EVP_SIGNATURE_up_ref(EVP_SIGNATURE *signature);
     1860OSSL_PROVIDER *EVP_SIGNATURE_get0_provider(const EVP_SIGNATURE *signature);
     1861EVP_SIGNATURE *EVP_SIGNATURE_fetch(OSSL_LIB_CTX *ctx, const char *algorithm,
     1862                                   const char *properties);
     1863int EVP_SIGNATURE_is_a(const EVP_SIGNATURE *signature, const char *name);
     1864const char *EVP_SIGNATURE_get0_name(const EVP_SIGNATURE *signature);
     1865const char *EVP_SIGNATURE_get0_description(const EVP_SIGNATURE *signature);
     1866void EVP_SIGNATURE_do_all_provided(OSSL_LIB_CTX *libctx,
     1867                                   void (*fn)(EVP_SIGNATURE *signature,
     1868                                              void *data),
     1869                                   void *data);
     1870int EVP_SIGNATURE_names_do_all(const EVP_SIGNATURE *signature,
     1871                               void (*fn)(const char *name, void *data),
     1872                               void *data);
     1873const OSSL_PARAM *EVP_SIGNATURE_gettable_ctx_params(const EVP_SIGNATURE *sig);
     1874const OSSL_PARAM *EVP_SIGNATURE_settable_ctx_params(const EVP_SIGNATURE *sig);
     1875
     1876void EVP_ASYM_CIPHER_free(EVP_ASYM_CIPHER *cipher);
     1877int EVP_ASYM_CIPHER_up_ref(EVP_ASYM_CIPHER *cipher);
     1878OSSL_PROVIDER *EVP_ASYM_CIPHER_get0_provider(const EVP_ASYM_CIPHER *cipher);
     1879EVP_ASYM_CIPHER *EVP_ASYM_CIPHER_fetch(OSSL_LIB_CTX *ctx, const char *algorithm,
     1880                                       const char *properties);
     1881int EVP_ASYM_CIPHER_is_a(const EVP_ASYM_CIPHER *cipher, const char *name);
     1882const char *EVP_ASYM_CIPHER_get0_name(const EVP_ASYM_CIPHER *cipher);
     1883const char *EVP_ASYM_CIPHER_get0_description(const EVP_ASYM_CIPHER *cipher);
     1884void EVP_ASYM_CIPHER_do_all_provided(OSSL_LIB_CTX *libctx,
     1885                                     void (*fn)(EVP_ASYM_CIPHER *cipher,
     1886                                                void *arg),
     1887                                     void *arg);
     1888int EVP_ASYM_CIPHER_names_do_all(const EVP_ASYM_CIPHER *cipher,
     1889                                 void (*fn)(const char *name, void *data),
     1890                                 void *data);
     1891const OSSL_PARAM *EVP_ASYM_CIPHER_gettable_ctx_params(const EVP_ASYM_CIPHER *ciph);
     1892const OSSL_PARAM *EVP_ASYM_CIPHER_settable_ctx_params(const EVP_ASYM_CIPHER *ciph);
     1893
     1894void EVP_KEM_free(EVP_KEM *wrap);
     1895int EVP_KEM_up_ref(EVP_KEM *wrap);
     1896OSSL_PROVIDER *EVP_KEM_get0_provider(const EVP_KEM *wrap);
     1897EVP_KEM *EVP_KEM_fetch(OSSL_LIB_CTX *ctx, const char *algorithm,
     1898                       const char *properties);
     1899int EVP_KEM_is_a(const EVP_KEM *wrap, const char *name);
     1900const char *EVP_KEM_get0_name(const EVP_KEM *wrap);
     1901const char *EVP_KEM_get0_description(const EVP_KEM *wrap);
     1902void EVP_KEM_do_all_provided(OSSL_LIB_CTX *libctx,
     1903                             void (*fn)(EVP_KEM *wrap, void *arg), void *arg);
     1904int EVP_KEM_names_do_all(const EVP_KEM *wrap,
     1905                         void (*fn)(const char *name, void *data), void *data);
     1906const OSSL_PARAM *EVP_KEM_gettable_ctx_params(const EVP_KEM *kem);
     1907const OSSL_PARAM *EVP_KEM_settable_ctx_params(const EVP_KEM *kem);
     1908
    14021909int EVP_PKEY_sign_init(EVP_PKEY_CTX *ctx);
     1910int EVP_PKEY_sign_init_ex(EVP_PKEY_CTX *ctx, const OSSL_PARAM params[]);
    14031911int EVP_PKEY_sign(EVP_PKEY_CTX *ctx,
    14041912                  unsigned char *sig, size_t *siglen,
    14051913                  const unsigned char *tbs, size_t tbslen);
    14061914int EVP_PKEY_verify_init(EVP_PKEY_CTX *ctx);
     1915int EVP_PKEY_verify_init_ex(EVP_PKEY_CTX *ctx, const OSSL_PARAM params[]);
    14071916int EVP_PKEY_verify(EVP_PKEY_CTX *ctx,
    14081917                    const unsigned char *sig, size_t siglen,
    14091918                    const unsigned char *tbs, size_t tbslen);
    14101919int EVP_PKEY_verify_recover_init(EVP_PKEY_CTX *ctx);
     1920int EVP_PKEY_verify_recover_init_ex(EVP_PKEY_CTX *ctx,
     1921                                    const OSSL_PARAM params[]);
    14111922int EVP_PKEY_verify_recover(EVP_PKEY_CTX *ctx,
    14121923                            unsigned char *rout, size_t *routlen,
    14131924                            const unsigned char *sig, size_t siglen);
    14141925int EVP_PKEY_encrypt_init(EVP_PKEY_CTX *ctx);
     1926int EVP_PKEY_encrypt_init_ex(EVP_PKEY_CTX *ctx, const OSSL_PARAM params[]);
    14151927int EVP_PKEY_encrypt(EVP_PKEY_CTX *ctx,
    14161928                     unsigned char *out, size_t *outlen,
    14171929                     const unsigned char *in, size_t inlen);
    14181930int EVP_PKEY_decrypt_init(EVP_PKEY_CTX *ctx);
     1931int EVP_PKEY_decrypt_init_ex(EVP_PKEY_CTX *ctx, const OSSL_PARAM params[]);
    14191932int EVP_PKEY_decrypt(EVP_PKEY_CTX *ctx,
    14201933                     unsigned char *out, size_t *outlen,
     
    14221935
    14231936int EVP_PKEY_derive_init(EVP_PKEY_CTX *ctx);
     1937int EVP_PKEY_derive_init_ex(EVP_PKEY_CTX *ctx, const OSSL_PARAM params[]);
     1938int EVP_PKEY_derive_set_peer_ex(EVP_PKEY_CTX *ctx, EVP_PKEY *peer,
     1939                                int validate_peer);
    14241940int EVP_PKEY_derive_set_peer(EVP_PKEY_CTX *ctx, EVP_PKEY *peer);
    14251941int EVP_PKEY_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *keylen);
    14261942
     1943int EVP_PKEY_encapsulate_init(EVP_PKEY_CTX *ctx, const OSSL_PARAM params[]);
     1944int EVP_PKEY_encapsulate(EVP_PKEY_CTX *ctx,
     1945                         unsigned char *wrappedkey, size_t *wrappedkeylen,
     1946                         unsigned char *genkey, size_t *genkeylen);
     1947int EVP_PKEY_decapsulate_init(EVP_PKEY_CTX *ctx, const OSSL_PARAM params[]);
     1948int EVP_PKEY_decapsulate(EVP_PKEY_CTX *ctx,
     1949                         unsigned char *unwrapped, size_t *unwrappedlen,
     1950                         const unsigned char *wrapped, size_t wrappedlen);
     1951
    14271952typedef int EVP_PKEY_gen_cb(EVP_PKEY_CTX *ctx);
    14281953
     1954int EVP_PKEY_fromdata_init(EVP_PKEY_CTX *ctx);
     1955int EVP_PKEY_fromdata(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey, int selection,
     1956                      OSSL_PARAM param[]);
     1957const OSSL_PARAM *EVP_PKEY_fromdata_settable(EVP_PKEY_CTX *ctx, int selection);
     1958
     1959int EVP_PKEY_todata(const EVP_PKEY *pkey, int selection, OSSL_PARAM **params);
     1960int EVP_PKEY_export(const EVP_PKEY *pkey, int selection,
     1961                    OSSL_CALLBACK *export_cb, void *export_cbarg);
     1962
     1963const OSSL_PARAM *EVP_PKEY_gettable_params(const EVP_PKEY *pkey);
     1964int EVP_PKEY_get_params(const EVP_PKEY *pkey, OSSL_PARAM params[]);
     1965int EVP_PKEY_get_int_param(const EVP_PKEY *pkey, const char *key_name,
     1966                           int *out);
     1967int EVP_PKEY_get_size_t_param(const EVP_PKEY *pkey, const char *key_name,
     1968                              size_t *out);
     1969int EVP_PKEY_get_bn_param(const EVP_PKEY *pkey, const char *key_name,
     1970                          BIGNUM **bn);
     1971int 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);
     1973int 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
     1977const OSSL_PARAM *EVP_PKEY_settable_params(const EVP_PKEY *pkey);
     1978int EVP_PKEY_set_params(EVP_PKEY *pkey, OSSL_PARAM params[]);
     1979int EVP_PKEY_set_int_param(EVP_PKEY *pkey, const char *key_name, int in);
     1980int EVP_PKEY_set_size_t_param(EVP_PKEY *pkey, const char *key_name, size_t in);
     1981int EVP_PKEY_set_bn_param(EVP_PKEY *pkey, const char *key_name,
     1982                          const BIGNUM *bn);
     1983int EVP_PKEY_set_utf8_string_param(EVP_PKEY *pkey, const char *key_name,
     1984                                   const char *str);
     1985int EVP_PKEY_set_octet_string_param(EVP_PKEY *pkey, const char *key_name,
     1986                                    const unsigned char *buf, size_t bsize);
     1987
     1988int EVP_PKEY_get_ec_point_conv_form(const EVP_PKEY *pkey);
     1989int EVP_PKEY_get_field_type(const EVP_PKEY *pkey);
     1990
     1991EVP_PKEY *EVP_PKEY_Q_keygen(OSSL_LIB_CTX *libctx, const char *propq,
     1992                            const char *type, ...);
    14291993int EVP_PKEY_paramgen_init(EVP_PKEY_CTX *ctx);
    14301994int EVP_PKEY_paramgen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey);
    14311995int EVP_PKEY_keygen_init(EVP_PKEY_CTX *ctx);
    14321996int EVP_PKEY_keygen(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey);
     1997int EVP_PKEY_generate(EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey);
    14331998int EVP_PKEY_check(EVP_PKEY_CTX *ctx);
    14341999int EVP_PKEY_public_check(EVP_PKEY_CTX *ctx);
     2000int EVP_PKEY_public_check_quick(EVP_PKEY_CTX *ctx);
    14352001int EVP_PKEY_param_check(EVP_PKEY_CTX *ctx);
     2002int EVP_PKEY_param_check_quick(EVP_PKEY_CTX *ctx);
     2003int EVP_PKEY_private_check(EVP_PKEY_CTX *ctx);
     2004int 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)
     2008int EVP_PKEY_set_ex_data(EVP_PKEY *key, int idx, void *arg);
     2009void *EVP_PKEY_get_ex_data(const EVP_PKEY *key, int idx);
    14362010
    14372011void EVP_PKEY_CTX_set_cb(EVP_PKEY_CTX *ctx, EVP_PKEY_gen_cb *cb);
     
    14392013
    14402014int 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
     2016OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_set_init(EVP_PKEY_METHOD *pmeth,
     2017                                             int (*init) (EVP_PKEY_CTX *ctx));
     2018OSSL_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));
     2021OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_set_cleanup
     2022    (EVP_PKEY_METHOD *pmeth, void (*cleanup) (EVP_PKEY_CTX *ctx));
     2023OSSL_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));
     2026OSSL_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));
     2029OSSL_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));
     2033OSSL_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));
     2037OSSL_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));
     2042OSSL_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));
     2047OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_set_verifyctx
     2048    (EVP_PKEY_METHOD *pmeth, int (*verifyctx_init) (EVP_PKEY_CTX *ctx,
    14912049                                                    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));
     2052OSSL_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));
     2056OSSL_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));
     2060OSSL_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));
     2063OSSL_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));
     2067OSSL_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));
     2071OSSL_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));
     2076OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_set_check
     2077    (EVP_PKEY_METHOD *pmeth, int (*check) (EVP_PKEY *pkey));
     2078OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_set_public_check
     2079    (EVP_PKEY_METHOD *pmeth, int (*check) (EVP_PKEY *pkey));
     2080OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_set_param_check
     2081    (EVP_PKEY_METHOD *pmeth, int (*check) (EVP_PKEY *pkey));
     2082OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_set_digest_custom
     2083    (EVP_PKEY_METHOD *pmeth, int (*digest_custom) (EVP_PKEY_CTX *ctx,
    15032084                                                   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));
     2085OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_get_init
     2086    (const EVP_PKEY_METHOD *pmeth, int (**pinit) (EVP_PKEY_CTX *ctx));
     2087OSSL_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));
     2090OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_get_cleanup
     2091    (const EVP_PKEY_METHOD *pmeth, void (**pcleanup) (EVP_PKEY_CTX *ctx));
     2092OSSL_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));
     2095OSSL_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));
     2098OSSL_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));
     2102OSSL_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));
     2106OSSL_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));
     2112OSSL_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));
     2117OSSL_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));
     2122OSSL_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));
     2126OSSL_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));
     2130OSSL_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));
     2133OSSL_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));
     2138OSSL_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));
     2142OSSL_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));
     2147OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_get_check
     2148    (const EVP_PKEY_METHOD *pmeth, int (**pcheck) (EVP_PKEY *pkey));
     2149OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_get_public_check
     2150    (const EVP_PKEY_METHOD *pmeth, int (**pcheck) (EVP_PKEY *pkey));
     2151OSSL_DEPRECATEDIN_3_0 void EVP_PKEY_meth_get_param_check
     2152    (const EVP_PKEY_METHOD *pmeth, int (**pcheck) (EVP_PKEY *pkey));
     2153OSSL_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
     2158void EVP_KEYEXCH_free(EVP_KEYEXCH *exchange);
     2159int EVP_KEYEXCH_up_ref(EVP_KEYEXCH *exchange);
     2160EVP_KEYEXCH *EVP_KEYEXCH_fetch(OSSL_LIB_CTX *ctx, const char *algorithm,
     2161                               const char *properties);
     2162OSSL_PROVIDER *EVP_KEYEXCH_get0_provider(const EVP_KEYEXCH *exchange);
     2163int EVP_KEYEXCH_is_a(const EVP_KEYEXCH *keyexch, const char *name);
     2164const char *EVP_KEYEXCH_get0_name(const EVP_KEYEXCH *keyexch);
     2165const char *EVP_KEYEXCH_get0_description(const EVP_KEYEXCH *keyexch);
     2166void EVP_KEYEXCH_do_all_provided(OSSL_LIB_CTX *libctx,
     2167                                 void (*fn)(EVP_KEYEXCH *keyexch, void *data),
     2168                                 void *data);
     2169int EVP_KEYEXCH_names_do_all(const EVP_KEYEXCH *keyexch,
     2170                             void (*fn)(const char *name, void *data),
     2171                             void *data);
     2172const OSSL_PARAM *EVP_KEYEXCH_gettable_ctx_params(const EVP_KEYEXCH *keyexch);
     2173const OSSL_PARAM *EVP_KEYEXCH_settable_ctx_params(const EVP_KEYEXCH *keyexch);
     2174
    16792175void EVP_add_alg_module(void);
    16802176
     2177int EVP_PKEY_CTX_set_group_name(EVP_PKEY_CTX *ctx, const char *name);
     2178int EVP_PKEY_CTX_get_group_name(EVP_PKEY_CTX *ctx, char *name, size_t namelen);
     2179int EVP_PKEY_get_group_name(const EVP_PKEY *pkey, char *name, size_t name_sz,
     2180                            size_t *gname_len);
     2181
     2182OSSL_LIB_CTX *EVP_PKEY_CTX_get0_libctx(EVP_PKEY_CTX *ctx);
     2183const char *EVP_PKEY_CTX_get0_propq(const EVP_PKEY_CTX *ctx);
     2184const OSSL_PROVIDER *EVP_PKEY_CTX_get0_provider(const EVP_PKEY_CTX *ctx);
    16812185
    16822186# ifdef  __cplusplus
  • trunk/src/libs/openssl-3.0.1/include/openssl/evperr.h

    r91772 r94082  
    33 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    44 *
    5  * Licensed under the OpenSSL license (the "License").  You may not use
     5 * Licensed under the Apache License 2.0 (the "License").  You may not use
    66 * this file except in compliance with the License.  You can obtain a copy
    77 * in the file LICENSE in the source distribution or at
     
    99 */
    1010
    11 #ifndef HEADER_EVPERR_H
    12 # define HEADER_EVPERR_H
     11#ifndef OPENSSL_EVPERR_H
     12# define OPENSSL_EVPERR_H
     13# pragma once
    1314
     15# include <openssl/opensslconf.h>
    1416# include <openssl/symhacks.h>
     17# include <openssl/cryptoerr_legacy.h>
    1518
    16 # ifdef  __cplusplus
    17 extern "C"
    18 # endif
    19 int ERR_load_EVP_strings(void);
    2019
    21 /*
    22  * EVP function codes.
    23  */
    24 # define EVP_F_AESNI_INIT_KEY                             165
    25 # define EVP_F_AESNI_XTS_INIT_KEY                         207
    26 # define EVP_F_AES_GCM_CTRL                               196
    27 # define EVP_F_AES_INIT_KEY                               133
    28 # define EVP_F_AES_OCB_CIPHER                             169
    29 # define EVP_F_AES_T4_INIT_KEY                            178
    30 # define EVP_F_AES_T4_XTS_INIT_KEY                        208
    31 # define EVP_F_AES_WRAP_CIPHER                            170
    32 # define EVP_F_AES_XTS_INIT_KEY                           209
    33 # define EVP_F_ALG_MODULE_INIT                            177
    34 # define EVP_F_ARIA_CCM_INIT_KEY                          175
    35 # define EVP_F_ARIA_GCM_CTRL                              197
    36 # define EVP_F_ARIA_GCM_INIT_KEY                          176
    37 # define EVP_F_ARIA_INIT_KEY                              185
    38 # define EVP_F_B64_NEW                                    198
    39 # define EVP_F_CAMELLIA_INIT_KEY                          159
    40 # define EVP_F_CHACHA20_POLY1305_CTRL                     182
    41 # define EVP_F_CMLL_T4_INIT_KEY                           179
    42 # define EVP_F_DES_EDE3_WRAP_CIPHER                       171
    43 # define EVP_F_DO_SIGVER_INIT                             161
    44 # define EVP_F_ENC_NEW                                    199
    45 # define EVP_F_EVP_CIPHERINIT_EX                          123
    46 # define EVP_F_EVP_CIPHER_ASN1_TO_PARAM                   204
    47 # define EVP_F_EVP_CIPHER_CTX_COPY                        163
    48 # define EVP_F_EVP_CIPHER_CTX_CTRL                        124
    49 # define EVP_F_EVP_CIPHER_CTX_SET_KEY_LENGTH              122
    50 # define EVP_F_EVP_CIPHER_PARAM_TO_ASN1                   205
    51 # define EVP_F_EVP_DECRYPTFINAL_EX                        101
    52 # define EVP_F_EVP_DECRYPTUPDATE                          166
    53 # define EVP_F_EVP_DIGESTFINALXOF                         174
    54 # define EVP_F_EVP_DIGESTINIT_EX                          128
    55 # define EVP_F_EVP_ENCRYPTDECRYPTUPDATE                   219
    56 # define EVP_F_EVP_ENCRYPTFINAL_EX                        127
    57 # define EVP_F_EVP_ENCRYPTUPDATE                          167
    58 # define EVP_F_EVP_MD_CTX_COPY_EX                         110
    59 # define EVP_F_EVP_MD_SIZE                                162
    60 # define EVP_F_EVP_OPENINIT                               102
    61 # define EVP_F_EVP_PBE_ALG_ADD                            115
    62 # define EVP_F_EVP_PBE_ALG_ADD_TYPE                       160
    63 # define EVP_F_EVP_PBE_CIPHERINIT                         116
    64 # define EVP_F_EVP_PBE_SCRYPT                             181
    65 # define EVP_F_EVP_PKCS82PKEY                             111
    66 # define EVP_F_EVP_PKEY2PKCS8                             113
    67 # define EVP_F_EVP_PKEY_ASN1_ADD0                         188
    68 # define EVP_F_EVP_PKEY_CHECK                             186
    69 # define EVP_F_EVP_PKEY_COPY_PARAMETERS                   103
    70 # define EVP_F_EVP_PKEY_CTX_CTRL                          137
    71 # define EVP_F_EVP_PKEY_CTX_CTRL_STR                      150
    72 # define EVP_F_EVP_PKEY_CTX_DUP                           156
    73 # define EVP_F_EVP_PKEY_CTX_MD                            168
    74 # define EVP_F_EVP_PKEY_DECRYPT                           104
    75 # define EVP_F_EVP_PKEY_DECRYPT_INIT                      138
    76 # define EVP_F_EVP_PKEY_DECRYPT_OLD                       151
    77 # define EVP_F_EVP_PKEY_DERIVE                            153
    78 # define EVP_F_EVP_PKEY_DERIVE_INIT                       154
    79 # define EVP_F_EVP_PKEY_DERIVE_SET_PEER                   155
    80 # define EVP_F_EVP_PKEY_ENCRYPT                           105
    81 # define EVP_F_EVP_PKEY_ENCRYPT_INIT                      139
    82 # define EVP_F_EVP_PKEY_ENCRYPT_OLD                       152
    83 # define EVP_F_EVP_PKEY_GET0_DH                           119
    84 # define EVP_F_EVP_PKEY_GET0_DSA                          120
    85 # define EVP_F_EVP_PKEY_GET0_EC_KEY                       131
    86 # define EVP_F_EVP_PKEY_GET0_HMAC                         183
    87 # define EVP_F_EVP_PKEY_GET0_POLY1305                     184
    88 # define EVP_F_EVP_PKEY_GET0_RSA                          121
    89 # define EVP_F_EVP_PKEY_GET0_SIPHASH                      172
    90 # define EVP_F_EVP_PKEY_GET_RAW_PRIVATE_KEY               202
    91 # define EVP_F_EVP_PKEY_GET_RAW_PUBLIC_KEY                203
    92 # define EVP_F_EVP_PKEY_KEYGEN                            146
    93 # define EVP_F_EVP_PKEY_KEYGEN_INIT                       147
    94 # define EVP_F_EVP_PKEY_METH_ADD0                         194
    95 # define EVP_F_EVP_PKEY_METH_NEW                          195
    96 # define EVP_F_EVP_PKEY_NEW                               106
    97 # define EVP_F_EVP_PKEY_NEW_CMAC_KEY                      193
    98 # define EVP_F_EVP_PKEY_NEW_RAW_PRIVATE_KEY               191
    99 # define EVP_F_EVP_PKEY_NEW_RAW_PUBLIC_KEY                192
    100 # define EVP_F_EVP_PKEY_PARAMGEN                          148
    101 # define EVP_F_EVP_PKEY_PARAMGEN_INIT                     149
    102 # define EVP_F_EVP_PKEY_PARAM_CHECK                       189
    103 # define EVP_F_EVP_PKEY_PUBLIC_CHECK                      190
    104 # define EVP_F_EVP_PKEY_SET1_ENGINE                       187
    105 # define EVP_F_EVP_PKEY_SET_ALIAS_TYPE                    206
    106 # define EVP_F_EVP_PKEY_SIGN                              140
    107 # define EVP_F_EVP_PKEY_SIGN_INIT                         141
    108 # define EVP_F_EVP_PKEY_VERIFY                            142
    109 # define EVP_F_EVP_PKEY_VERIFY_INIT                       143
    110 # define EVP_F_EVP_PKEY_VERIFY_RECOVER                    144
    111 # define EVP_F_EVP_PKEY_VERIFY_RECOVER_INIT               145
    112 # define EVP_F_EVP_SIGNFINAL                              107
    113 # define EVP_F_EVP_VERIFYFINAL                            108
    114 # define EVP_F_INT_CTX_NEW                                157
    115 # define EVP_F_OK_NEW                                     200
    116 # define EVP_F_PKCS5_PBE_KEYIVGEN                         117
    117 # define EVP_F_PKCS5_V2_PBE_KEYIVGEN                      118
    118 # define EVP_F_PKCS5_V2_PBKDF2_KEYIVGEN                   164
    119 # define EVP_F_PKCS5_V2_SCRYPT_KEYIVGEN                   180
    120 # define EVP_F_PKEY_SET_TYPE                              158
    121 # define EVP_F_RC2_MAGIC_TO_METH                          109
    122 # define EVP_F_RC5_CTRL                                   125
    123 # define EVP_F_R_32_12_16_INIT_KEY                        242
    124 # define EVP_F_S390X_AES_GCM_CTRL                         201
    125 # define EVP_F_UPDATE                                     173
    12620
    12721/*
     
    13024# define EVP_R_AES_KEY_SETUP_FAILED                       143
    13125# define EVP_R_ARIA_KEY_SETUP_FAILED                      176
     26# define EVP_R_BAD_ALGORITHM_NAME                         200
    13227# define EVP_R_BAD_DECRYPT                                100
    13328# define EVP_R_BAD_KEY_LENGTH                             195
    13429# define EVP_R_BUFFER_TOO_SMALL                           155
     30# define EVP_R_CACHE_CONSTANTS_FAILED                     225
    13531# 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
    13635# define EVP_R_CIPHER_PARAMETER_ERROR                     122
    13736# define EVP_R_COMMAND_NOT_SUPPORTED                      147
     37# define EVP_R_CONFLICTING_ALGORITHM_NAME                 201
    13838# define EVP_R_COPY_ERROR                                 173
    13939# define EVP_R_CTRL_NOT_IMPLEMENTED                       132
     
    14141# define EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH          138
    14242# define EVP_R_DECODE_ERROR                               114
     43# define EVP_R_DEFAULT_QUERY_PARSE_ERROR                  210
    14344# define EVP_R_DIFFERENT_KEY_TYPES                        101
    14445# define EVP_R_DIFFERENT_PARAMETERS                       153
    14546# define EVP_R_ERROR_LOADING_SECTION                      165
    146 # define EVP_R_ERROR_SETTING_FIPS_MODE                    166
    14747# define EVP_R_EXPECTING_AN_HMAC_KEY                      174
    14848# define EVP_R_EXPECTING_AN_RSA_KEY                       127
    14949# define EVP_R_EXPECTING_A_DH_KEY                         128
    15050# define EVP_R_EXPECTING_A_DSA_KEY                        129
     51# define EVP_R_EXPECTING_A_ECX_KEY                        219
    15152# define EVP_R_EXPECTING_A_EC_KEY                         142
    15253# define EVP_R_EXPECTING_A_POLY1305_KEY                   164
    15354# 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
    15557# define EVP_R_GET_RAW_KEY_FAILED                         182
    15658# define EVP_R_ILLEGAL_SCRYPT_PARAMETERS                  171
     59# define EVP_R_INACCESSIBLE_DOMAIN_PARAMETERS             204
     60# define EVP_R_INACCESSIBLE_KEY                           203
    15761# define EVP_R_INITIALIZATION_ERROR                       134
    15862# define EVP_R_INPUT_NOT_INITIALIZED                      111
     63# define EVP_R_INVALID_CUSTOM_LENGTH                      185
    15964# define EVP_R_INVALID_DIGEST                             152
    160 # define EVP_R_INVALID_FIPS_MODE                          168
    16165# define EVP_R_INVALID_IV_LENGTH                          194
    16266# define EVP_R_INVALID_KEY                                163
    16367# define EVP_R_INVALID_KEY_LENGTH                         130
     68# define EVP_R_INVALID_LENGTH                             221
     69# define EVP_R_INVALID_NULL_ALGORITHM                     218
    16470# 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
    16677# define EVP_R_KEY_SETUP_FAILED                           180
     78# define EVP_R_LOCKING_NOT_SUPPORTED                      213
    16779# define EVP_R_MEMORY_LIMIT_EXCEEDED                      172
    16880# define EVP_R_MESSAGE_DIGEST_IS_NULL                     159
    16981# define EVP_R_METHOD_NOT_SUPPORTED                       144
    17082# define EVP_R_MISSING_PARAMETERS                         103
     83# define EVP_R_NOT_ABLE_TO_COPY_CTX                       190
    17184# define EVP_R_NOT_XOF_OR_INVALID_LENGTH                  178
    17285# define EVP_R_NO_CIPHER_SET                              131
    17386# define EVP_R_NO_DEFAULT_DIGEST                          158
    17487# 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
    17591# define EVP_R_NO_KEY_SET                                 154
    17692# define EVP_R_NO_OPERATION_SET                           149
     93# define EVP_R_NULL_MAC_PKEY_CTX                          208
    17794# define EVP_R_ONLY_ONESHOT_SUPPORTED                     177
     95# define EVP_R_OPERATION_NOT_INITIALIZED                  151
    17896# define EVP_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE   150
    179 # define EVP_R_OPERATON_NOT_INITIALIZED                   151
    180 # define EVP_R_OUTPUT_WOULD_OVERFLOW                      184
     97# define EVP_R_OUTPUT_WOULD_OVERFLOW                      202
     98# define EVP_R_PARAMETER_TOO_LARGE                        187
    18199# define EVP_R_PARTIALLY_OVERLAPPING                      162
    182100# define EVP_R_PBKDF2_ERROR                               181
     
    185103# define EVP_R_PRIVATE_KEY_ENCODE_ERROR                   146
    186104# 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
    187113# define EVP_R_UNKNOWN_CIPHER                             160
    188114# define EVP_R_UNKNOWN_DIGEST                             161
     115# define EVP_R_UNKNOWN_KEY_TYPE                           207
    189116# define EVP_R_UNKNOWN_OPTION                             169
    190117# define EVP_R_UNKNOWN_PBE_ALGORITHM                      121
     
    194121# define EVP_R_UNSUPPORTED_KEY_DERIVATION_FUNCTION        124
    195122# define EVP_R_UNSUPPORTED_KEY_SIZE                       108
     123# define EVP_R_UNSUPPORTED_KEY_TYPE                       224
    196124# define EVP_R_UNSUPPORTED_NUMBER_OF_ROUNDS               135
    197125# define EVP_R_UNSUPPORTED_PRF                            125
    198126# define EVP_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM          118
    199127# define EVP_R_UNSUPPORTED_SALT_TYPE                      126
     128# define EVP_R_UPDATE_ERROR                               189
    200129# define EVP_R_WRAP_MODE_NOT_ALLOWED                      170
    201130# 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
    203133
    204134#endif
  • trunk/src/libs/openssl-3.0.1/include/openssl/hmac.h

    r91772 r94082  
    11/*
    2  * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    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
    1218
    1319# include <openssl/opensslconf.h>
     
    1521# include <openssl/evp.h>
    1622
    17 # if OPENSSL_API_COMPAT < 0x10200000L
    18 #  define HMAC_MAX_MD_CBLOCK      128    /* Deprecated */
     23# ifndef OPENSSL_NO_DEPRECATED_3_0
     24#  define HMAC_MAX_MD_CBLOCK      200    /* Deprecated */
    1925# endif
    2026
    21 #ifdef  __cplusplus
     27# ifdef  __cplusplus
    2228extern "C" {
    23 #endif
     29# endif
    2430
    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
     32OSSL_DEPRECATEDIN_3_0 size_t HMAC_size(const HMAC_CTX *e);
     33OSSL_DEPRECATEDIN_3_0 HMAC_CTX *HMAC_CTX_new(void);
     34OSSL_DEPRECATEDIN_3_0 int HMAC_CTX_reset(HMAC_CTX *ctx);
     35OSSL_DEPRECATEDIN_3_0 void HMAC_CTX_free(HMAC_CTX *ctx);
     36# endif
     37# ifndef OPENSSL_NO_DEPRECATED_1_1_0
     38OSSL_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
     43OSSL_DEPRECATEDIN_3_0 int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len,
     44                                       const EVP_MD *md, ENGINE *impl);
     45OSSL_DEPRECATEDIN_3_0 int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data,
     46                                      size_t len);
     47OSSL_DEPRECATEDIN_3_0 int HMAC_Final(HMAC_CTX *ctx, unsigned char *md,
     48                                     unsigned int *len);
     49OSSL_DEPRECATEDIN_3_0 __owur int HMAC_CTX_copy(HMAC_CTX *dctx, HMAC_CTX *sctx);
     50OSSL_DEPRECATEDIN_3_0 void HMAC_CTX_set_flags(HMAC_CTX *ctx, unsigned long flags);
     51OSSL_DEPRECATEDIN_3_0 const EVP_MD *HMAC_CTX_get_md(const HMAC_CTX *ctx);
     52# endif
    2953
    30 DEPRECATEDIN_1_1_0(__owur int HMAC_Init(HMAC_CTX *ctx, const void *key, int len,
    31                      const EVP_MD *md))
     54unsigned 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);
    3257
    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
    4859}
    49 #endif
     60# endif
    5061
    5162#endif
  • trunk/src/libs/openssl-3.0.1/include/openssl/idea.h

    r91772 r94082  
    11/*
    2  * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    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
    1218
    1319# include <openssl/opensslconf.h>
    1420
    1521# ifndef OPENSSL_NO_IDEA
    16 # ifdef  __cplusplus
     22#  ifdef  __cplusplus
    1723extern "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
    1930
    2031typedef unsigned int IDEA_INT;
    2132
    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
    2735
    2836typedef struct idea_key_st {
    2937    IDEA_INT data[9][6];
    3038} IDEA_KEY_SCHEDULE;
     39#endif
     40#ifndef OPENSSL_NO_DEPRECATED_3_0
     41OSSL_DEPRECATEDIN_3_0 const char *IDEA_options(void);
     42OSSL_DEPRECATEDIN_3_0 void IDEA_ecb_encrypt(const unsigned char *in,
     43                                            unsigned char *out,
     44                                            IDEA_KEY_SCHEDULE *ks);
     45OSSL_DEPRECATEDIN_3_0 void IDEA_set_encrypt_key(const unsigned char *key,
     46                                                IDEA_KEY_SCHEDULE *ks);
     47OSSL_DEPRECATEDIN_3_0 void IDEA_set_decrypt_key(IDEA_KEY_SCHEDULE *ek,
     48                                                IDEA_KEY_SCHEDULE *dk);
     49OSSL_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);
     53OSSL_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);
     58OSSL_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);
     62OSSL_DEPRECATEDIN_3_0 void IDEA_encrypt(unsigned long *in,
     63                                        IDEA_KEY_SCHEDULE *ks);
     64#endif
    3165
    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
    4776
    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
    6078}
    61 # endif
     79#  endif
    6280# endif
    6381
  • trunk/src/libs/openssl-3.0.1/include/openssl/kdf.h

    r91772 r94082  
    11/*
    2  * Copyright 2016-2018 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 2016-2021 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    10 #ifndef HEADER_KDF_H
    11 # define HEADER_KDF_H
     10#ifndef OPENSSL_KDF_H
     11# define OPENSSL_KDF_H
     12# pragma once
    1213
    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
    1525extern "C" {
    16 #endif
     26# endif
     27
     28int EVP_KDF_up_ref(EVP_KDF *kdf);
     29void EVP_KDF_free(EVP_KDF *kdf);
     30EVP_KDF *EVP_KDF_fetch(OSSL_LIB_CTX *libctx, const char *algorithm,
     31                       const char *properties);
     32
     33EVP_KDF_CTX *EVP_KDF_CTX_new(EVP_KDF *kdf);
     34void EVP_KDF_CTX_free(EVP_KDF_CTX *ctx);
     35EVP_KDF_CTX *EVP_KDF_CTX_dup(const EVP_KDF_CTX *src);
     36const char *EVP_KDF_get0_description(const EVP_KDF *kdf);
     37int EVP_KDF_is_a(const EVP_KDF *kdf, const char *name);
     38const char *EVP_KDF_get0_name(const EVP_KDF *kdf);
     39const OSSL_PROVIDER *EVP_KDF_get0_provider(const EVP_KDF *kdf);
     40const EVP_KDF *EVP_KDF_CTX_kdf(EVP_KDF_CTX *ctx);
     41
     42void EVP_KDF_CTX_reset(EVP_KDF_CTX *ctx);
     43size_t EVP_KDF_CTX_get_kdf_size(EVP_KDF_CTX *ctx);
     44int EVP_KDF_derive(EVP_KDF_CTX *ctx, unsigned char *key, size_t keylen,
     45                   const OSSL_PARAM params[]);
     46int EVP_KDF_get_params(EVP_KDF *kdf, OSSL_PARAM params[]);
     47int EVP_KDF_CTX_get_params(EVP_KDF_CTX *ctx, OSSL_PARAM params[]);
     48int EVP_KDF_CTX_set_params(EVP_KDF_CTX *ctx, const OSSL_PARAM params[]);
     49const OSSL_PARAM *EVP_KDF_gettable_params(const EVP_KDF *kdf);
     50const OSSL_PARAM *EVP_KDF_gettable_ctx_params(const EVP_KDF *kdf);
     51const OSSL_PARAM *EVP_KDF_settable_ctx_params(const EVP_KDF *kdf);
     52const OSSL_PARAM *EVP_KDF_CTX_gettable_params(EVP_KDF_CTX *ctx);
     53const OSSL_PARAM *EVP_KDF_CTX_settable_params(EVP_KDF_CTX *ctx);
     54
     55void EVP_KDF_do_all_provided(OSSL_LIB_CTX *libctx,
     56                             void (*fn)(EVP_KDF *kdf, void *arg),
     57                             void *arg);
     58int 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. ****/
    1774
    1875# define EVP_PKEY_CTRL_TLS_MD                   (EVP_PKEY_ALG_CTRL)
     
    3188# define EVP_PKEY_CTRL_SCRYPT_MAXMEM_BYTES      (EVP_PKEY_ALG_CTRL + 13)
    3289
    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
    3696
    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))
     97int EVP_PKEY_CTX_set_tls1_prf_md(EVP_PKEY_CTX *ctx, const EVP_MD *md);
    4098
    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))
     99int EVP_PKEY_CTX_set1_tls1_prf_secret(EVP_PKEY_CTX *pctx,
     100                                      const unsigned char *sec, int seclen);
    44101
    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))
     102int EVP_PKEY_CTX_add1_tls1_prf_seed(EVP_PKEY_CTX *pctx,
     103                                    const unsigned char *seed, int seedlen);
    48104
    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))
     105int EVP_PKEY_CTX_set_hkdf_md(EVP_PKEY_CTX *ctx, const EVP_MD *md);
    52106
    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))
     107int EVP_PKEY_CTX_set1_hkdf_salt(EVP_PKEY_CTX *ctx,
     108                                const unsigned char *salt, int saltlen);
    56109
    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))
     110int EVP_PKEY_CTX_set1_hkdf_key(EVP_PKEY_CTX *ctx,
     111                               const unsigned char *key, int keylen);
    60112
    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))
     113int EVP_PKEY_CTX_add1_hkdf_info(EVP_PKEY_CTX *ctx,
     114                                const unsigned char *info, int infolen);
    64115
    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)
     116int 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
    68118
    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))
     119int EVP_PKEY_CTX_set1_pbe_pass(EVP_PKEY_CTX *ctx, const char *pass,
     120                               int passlen);
    72121
    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))
     122int EVP_PKEY_CTX_set1_scrypt_salt(EVP_PKEY_CTX *ctx,
     123                                  const unsigned char *salt, int saltlen);
    76124
    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)
     125int EVP_PKEY_CTX_set_scrypt_N(EVP_PKEY_CTX *ctx, uint64_t n);
    80126
    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)
     127int EVP_PKEY_CTX_set_scrypt_r(EVP_PKEY_CTX *ctx, uint64_t r);
    84128
    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)
     129int EVP_PKEY_CTX_set_scrypt_p(EVP_PKEY_CTX *ctx, uint64_t p);
    88130
    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)
     131int EVP_PKEY_CTX_set_scrypt_maxmem_bytes(EVP_PKEY_CTX *ctx,
     132                                         uint64_t maxmem_bytes);
    92133
    93134
    94 # ifdef  __cplusplus
     135# ifdef __cplusplus
    95136}
    96137# endif
  • trunk/src/libs/openssl-3.0.1/include/openssl/kdferr.h

    r91772 r94082  
    11/*
    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.
    43 *
    5  * 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
    65 * this file except in compliance with the License.  You can obtain a copy
    76 * in the file LICENSE in the source distribution or at
     
    98 */
    109
    11 #ifndef HEADER_KDFERR_H
    12 # define HEADER_KDFERR_H
     10#ifndef OPENSSL_KDFERR_H
     11# define OPENSSL_KDFERR_H
     12# pragma once
    1313
    14 # ifndef HEADER_SYMHACKS_H
    15 #  include <openssl/symhacks.h>
    16 # endif
     14#include <openssl/cryptoerr_legacy.h>
    1715
    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  
    11/*
    2  * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    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
    1218
    1319# include <openssl/opensslconf.h>
    1420
    1521# ifndef OPENSSL_NO_MD2
    16 # include <stddef.h>
    17 # ifdef  __cplusplus
     22#  include <stddef.h>
     23#  ifdef  __cplusplus
    1824extern "C" {
    19 # endif
     25#  endif
     26
     27#  define MD2_DIGEST_LENGTH       16
     28
     29#  if !defined(OPENSSL_NO_DEPRECATED_3_0)
    2030
    2131typedef unsigned char MD2_INT;
    2232
    23 # define MD2_DIGEST_LENGTH       16
    24 # define MD2_BLOCK               16
     33#   define MD2_BLOCK               16
    2534
    2635typedef struct MD2state_st {
     
    3039    MD2_INT state[MD2_BLOCK];
    3140} MD2_CTX;
     41#  endif
     42#  ifndef OPENSSL_NO_DEPRECATED_3_0
     43OSSL_DEPRECATEDIN_3_0 const char *MD2_options(void);
     44OSSL_DEPRECATEDIN_3_0 int MD2_Init(MD2_CTX *c);
     45OSSL_DEPRECATEDIN_3_0 int MD2_Update(MD2_CTX *c, const unsigned char *data,
     46                                     size_t len);
     47OSSL_DEPRECATEDIN_3_0 int MD2_Final(unsigned char *md, MD2_CTX *c);
     48OSSL_DEPRECATEDIN_3_0 unsigned char *MD2(const unsigned char *d, size_t n,
     49                                         unsigned char *md);
     50#  endif
    3251
    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
    4053}
     54#  endif
    4155# endif
    42 # endif
    43 
    4456#endif
  • trunk/src/libs/openssl-3.0.1/include/openssl/md4.h

    r91772 r94082  
    11/*
    2  * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    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
    1218
    1319# include <openssl/opensslconf.h>
    1420
    1521# ifndef OPENSSL_NO_MD4
    16 # include <openssl/e_os2.h>
    17 # include <stddef.h>
    18 # ifdef  __cplusplus
     22#  include <openssl/e_os2.h>
     23#  include <stddef.h>
     24#  ifdef  __cplusplus
    1925extern "C" {
    20 # endif
     26#   endif
     27
     28#  define MD4_DIGEST_LENGTH 16
     29
     30#  if !defined(OPENSSL_NO_DEPRECATED_3_0)
    2131
    2232/*-
     
    2535 * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    2636 */
    27 # define MD4_LONG unsigned int
     37#   define MD4_LONG unsigned int
    2838
    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)
    3241
    3342typedef struct MD4state_st {
     
    3746    unsigned int num;
    3847} MD4_CTX;
     48#  endif
     49#  ifndef OPENSSL_NO_DEPRECATED_3_0
     50OSSL_DEPRECATEDIN_3_0 int MD4_Init(MD4_CTX *c);
     51OSSL_DEPRECATEDIN_3_0 int MD4_Update(MD4_CTX *c, const void *data, size_t len);
     52OSSL_DEPRECATEDIN_3_0 int MD4_Final(unsigned char *md, MD4_CTX *c);
     53OSSL_DEPRECATEDIN_3_0 unsigned char *MD4(const unsigned char *d, size_t n,
     54                                         unsigned char *md);
     55OSSL_DEPRECATEDIN_3_0 void MD4_Transform(MD4_CTX *c, const unsigned char *b);
     56#  endif
    3957
    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
    4759}
    48 # endif
     60#  endif
    4961# endif
    5062
  • trunk/src/libs/openssl-3.0.1/include/openssl/md5.h

    r91772 r94082  
    11/*
    2  * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    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
    1218
    1319# include <openssl/opensslconf.h>
    1420
    1521# ifndef OPENSSL_NO_MD5
    16 # include <openssl/e_os2.h>
    17 # include <stddef.h>
    18 # ifdef  __cplusplus
     22#  include <openssl/e_os2.h>
     23#  include <stddef.h>
     24#  ifdef  __cplusplus
    1925extern "C" {
    20 # endif
     26#  endif
    2127
     28#  define MD5_DIGEST_LENGTH 16
     29
     30#  if !defined(OPENSSL_NO_DEPRECATED_3_0)
    2231/*
    2332 * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     
    2534 * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    2635 */
    27 # define MD5_LONG unsigned int
     36#   define MD5_LONG unsigned int
    2837
    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)
    3240
    3341typedef struct MD5state_st {
     
    3745    unsigned int num;
    3846} MD5_CTX;
     47#  endif
     48#  ifndef OPENSSL_NO_DEPRECATED_3_0
     49OSSL_DEPRECATEDIN_3_0 int MD5_Init(MD5_CTX *c);
     50OSSL_DEPRECATEDIN_3_0 int MD5_Update(MD5_CTX *c, const void *data, size_t len);
     51OSSL_DEPRECATEDIN_3_0 int MD5_Final(unsigned char *md, MD5_CTX *c);
     52OSSL_DEPRECATEDIN_3_0 unsigned char *MD5(const unsigned char *d, size_t n,
     53                                         unsigned char *md);
     54OSSL_DEPRECATEDIN_3_0 void MD5_Transform(MD5_CTX *c, const unsigned char *b);
     55#  endif
    3956
    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
    4658}
    47 # endif
     59#  endif
    4860# endif
    4961
  • trunk/src/libs/openssl-3.0.1/include/openssl/mdc2.h

    r91772 r94082  
    11/*
    2  * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    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
    1218
    1319# include <openssl/opensslconf.h>
    1420
    15 #ifndef OPENSSL_NO_MDC2
    16 # include <stdlib.h>
    17 # include <openssl/des.h>
    18 # ifdef  __cplusplus
     21# ifndef OPENSSL_NO_MDC2
     22#  include <stdlib.h>
     23#  include <openssl/des.h>
     24#  ifdef  __cplusplus
    1925extern "C" {
    20 # endif
     26#  endif
    2127
    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
    2433
    2534typedef struct mdc2_ctx_st {
     
    2736    unsigned char data[MDC2_BLOCK];
    2837    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 */
    3039} MDC2_CTX;
     40#  endif
     41#  ifndef OPENSSL_NO_DEPRECATED_3_0
     42OSSL_DEPRECATEDIN_3_0 int MDC2_Init(MDC2_CTX *c);
     43OSSL_DEPRECATEDIN_3_0 int MDC2_Update(MDC2_CTX *c, const unsigned char *data,
     44                                      size_t len);
     45OSSL_DEPRECATEDIN_3_0 int MDC2_Final(unsigned char *md, MDC2_CTX *c);
     46OSSL_DEPRECATEDIN_3_0 unsigned char *MDC2(const unsigned char *d, size_t n,
     47                                          unsigned char *md);
     48#  endif
    3149
    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
    3851}
    39 # endif
     52#  endif
    4053# endif
    4154
  • trunk/src/libs/openssl-3.0.1/include/openssl/modes.h

    r91772 r94082  
    22 * Copyright 2008-2016 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    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
    1218
    1319# include <stddef.h>
     20# include <openssl/types.h>
    1421
    1522# ifdef  __cplusplus
     
    2229                          size_t len, const void *key,
    2330                          unsigned char ivec[16], int enc);
     31
     32typedef void (*ecb128_f) (const unsigned char *in, unsigned char *out,
     33                          size_t len, const void *key,
     34                          int enc);
    2435
    2536typedef void (*ctr128_f) (const unsigned char *in, unsigned char *out,
  • trunk/src/libs/openssl-3.0.1/include/openssl/obj_mac.h

    r91772 r94082  
    44 *
    55 * Copyright 2000-2021 The OpenSSL Project Authors. All Rights Reserved.
    6  * Licensed under the OpenSSL license (the "License").  You may not use
     6 * Licensed under the Apache License 2.0 (the "License").  You may not use
    77 * this file except in compliance with the License.  You can obtain a copy
    88 * in the file LICENSE in the source distribution or at
     
    1010 */
    1111
     12#ifndef OPENSSL_OBJ_MAC_H
     13# define OPENSSL_OBJ_MAC_H
     14# pragma once
     15
    1216#define SN_undef                        "UNDEF"
    1317#define LN_undef                        "undefined"
     
    4549#define OBJ_identified_organization             OBJ_iso,3L
    4650
     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
    4756#define SN_hmac_md5             "HMAC-MD5"
    4857#define LN_hmac_md5             "hmac-md5"
     
    846855#define OBJ_id_smime_ct_authEnvelopedData               OBJ_id_smime_ct,23L
    847856
     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
    848865#define SN_id_ct_asciiTextWithCRLF              "id-ct-asciiTextWithCRLF"
    849866#define NID_id_ct_asciiTextWithCRLF             787
     
    853870#define NID_id_ct_xml           1060
    854871#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
    855888
    856889#define SN_id_smime_aa_receiptRequest           "id-smime-aa-receiptRequest"
     
    11801213#define OBJ_sm3WithRSAEncryption                OBJ_sm_scheme,504L
    11811214
     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
    11821220#define LN_hmacWithSHA224               "hmacWithSHA224"
    11831221#define NID_hmacWithSHA224              798
     
    13861424#define OBJ_id_qcs              OBJ_id_pkix,11L
    13871425
     1426#define SN_id_cp                "id-cp"
     1427#define NID_id_cp               1238
     1428#define OBJ_id_cp               OBJ_id_pkix,14L
     1429
    13881430#define SN_id_cct               "id-cct"
    13891431#define NID_id_cct              268
     
    15191561#define OBJ_tlsfeature          OBJ_id_pe,24L
    15201562
     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
    15211571#define SN_id_qt_cps            "id-qt-cps"
    15221572#define LN_id_qt_cps            "Policy Qualifier CPS"
     
    16381688#define OBJ_cmcRA               OBJ_id_kp,28L
    16391689
     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
    16401710#define SN_id_it_caProtEncCert          "id-it-caProtEncCert"
    16411711#define NID_id_it_caProtEncCert         298
     
    17011771#define NID_id_it_suppLangTags          784
    17021772#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
    17031785
    17041786#define SN_id_regCtrl           "id-regCtrl"
     
    18471929#define OBJ_id_on_permanentIdentifier           OBJ_id_on,3L
    18481930
     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
    18491951#define SN_id_pda_dateOfBirth           "id-pda-dateOfBirth"
    18501952#define NID_id_pda_dateOfBirth          348
     
    18941996#define NID_id_qcs_pkixQCSyntax_v1              359
    18951997#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
    18962006
    18972007#define SN_id_cct_crs           "id-cct-crs"
     
    19472057#define OBJ_caRepository                OBJ_id_ad,5L
    19482058
     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
    19492074#define OBJ_id_pkix_OCSP                OBJ_ad_OCSP
    19502075
     
    21142239#define OBJ_ripemd160WithRSA            1L,3L,36L,3L,3L,1L,2L
    21152240
     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
    21162251#define SN_blake2b512           "BLAKE2b512"
    21172252#define LN_blake2b512           "blake2b512"
    21182253#define NID_blake2b512          1056
    2119 #define OBJ_blake2b512          1L,3L,6L,1L,4L,1L,1722L,12L,2L,1L,16L
     2254#define OBJ_blake2b512          OBJ_blake2bmac,16L
    21202255
    21212256#define SN_blake2s256           "BLAKE2s256"
    21222257#define LN_blake2s256           "blake2s256"
    21232258#define NID_blake2s256          1057
    2124 #define OBJ_blake2s256          1L,3L,6L,1L,4L,1L,1722L,12L,2L,2L,8L
     2259#define OBJ_blake2s256          OBJ_blake2smac,8L
    21252260
    21262261#define SN_sxnet                "SXNetID"
     
    29723107#define OBJ_hmac_sha3_512               OBJ_nist_hashalgs,16L
    29733108
     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
    29743119#define OBJ_dsa_with_sha2               OBJ_nistAlgorithms,3L
    29753120
     
    42314376#define OBJ_id_tc26_cipher_gostr3412_2015_magma         OBJ_id_tc26_cipher,1L
    42324377
    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_ctracpkm                1174
    4235 #define OBJ_id_tc26_cipher_gostr3412_2015_magma_ctracpkm                OBJ_id_tc26_cipher_gostr3412_2015_magma,1L
    4236 
    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_omac           1175
    4239 #define OBJ_id_tc26_cipher_gostr3412_2015_magma_ctracpkm_omac           OBJ_id_tc26_cipher_gostr3412_2015_magma,2L
     4378#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
    42404385
    42414386#define SN_id_tc26_cipher_gostr3412_2015_kuznyechik             "id-tc26-cipher-gostr3412-2015-kuznyechik"
     
    42434388#define OBJ_id_tc26_cipher_gostr3412_2015_kuznyechik            OBJ_id_tc26_cipher,2L
    42444389
    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_ctracpkm           1177
    4247 #define OBJ_id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm           OBJ_id_tc26_cipher_gostr3412_2015_kuznyechik,1L
    4248 
    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_omac              1178
    4251 #define OBJ_id_tc26_cipher_gostr3412_2015_kuznyechik_ctracpkm_omac              OBJ_id_tc26_cipher_gostr3412_2015_kuznyechik,2L
     4390#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
    42524397
    42534398#define SN_id_tc26_agreement            "id-tc26-agreement"
     
    42714416#define OBJ_id_tc26_wrap_gostr3412_2015_magma           OBJ_id_tc26_wrap,1L
    42724417
    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_kexp15            1181
    4275 #define OBJ_id_tc26_wrap_gostr3412_2015_magma_kexp15            OBJ_id_tc26_wrap_gostr3412_2015_magma,1L
     4418#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
    42764421
    42774422#define SN_id_tc26_wrap_gostr3412_2015_kuznyechik               "id-tc26-wrap-gostr3412-2015-kuznyechik"
     
    42794424#define OBJ_id_tc26_wrap_gostr3412_2015_kuznyechik              OBJ_id_tc26_wrap,2L
    42804425
    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_kexp15               1183
    4283 #define OBJ_id_tc26_wrap_gostr3412_2015_kuznyechik_kexp15               OBJ_id_tc26_wrap_gostr3412_2015_kuznyechik,1L
     4426#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
    42844429
    42854430#define SN_id_tc26_constants            "id-tc26-constants"
     
    43714516#define OBJ_SNILS               OBJ_member_body,643L,100L,3L
    43724517
     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
    43734523#define SN_subjectSignTool              "subjectSignTool"
    43744524#define LN_subjectSignTool              "Signing Tool of Subject"
     
    43814531#define OBJ_issuerSignTool              OBJ_member_body,643L,100L,112L
    43824532
    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
    44004585
    44014586#define SN_magma_ecb            "magma-ecb"
     
    49715156#define NID_hkdf                1036
    49725157
     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
    49735174#define SN_id_pkinit            "id-pkinit"
    49745175#define NID_id_pkinit           1031
     
    50375238#define NID_kx_gost             1045
    50385239
     5240#define SN_kx_gost18            "KxGOST18"
     5241#define LN_kx_gost18            "kx-gost18"
     5242#define NID_kx_gost18           1218
     5243
    50395244#define SN_kx_any               "KxANY"
    50405245#define LN_kx_any               "kx-any"
     
    50995304#define SN_ffdhe8192            "ffdhe8192"
    51005305#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
    51015324
    51025325#define SN_ISO_UA               "ISO-UA"
     
    51975420#define NID_uacurve9            1169
    51985421#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  
    11/*
    2  * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    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
    1218
    1319# include <openssl/obj_mac.h>
     
    2127# define OBJ_NAME_TYPE_PKEY_METH         0x03
    2228# 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
    2432
    2533# define OBJ_NAME_ALIAS                  0x8000
     
    5664                            void *arg);
    5765
    58 ASN1_OBJECT *OBJ_dup(const ASN1_OBJECT *o);
     66DECLARE_ASN1_DUP_FUNCTION_name(ASN1_OBJECT, OBJ)
    5967ASN1_OBJECT *OBJ_nid2obj(int n);
    6068const char *OBJ_nid2ln(int n);
     
    156164int OBJ_add_object(const ASN1_OBJECT *obj);
    157165int OBJ_create(const char *oid, const char *sn, const char *ln);
    158 #if OPENSSL_API_COMPAT < 0x10100000L
     166#ifndef OPENSSL_NO_DEPRECATED_1_1_0
    159167# define OBJ_cleanup() while(0) continue
    160168#endif
  • trunk/src/libs/openssl-3.0.1/include/openssl/objectserr.h

    r91772 r94082  
    11/*
    22 * Generated by util/mkerr.pl DO NOT EDIT
    3  * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
     3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    44 *
    5  * Licensed under the OpenSSL license (the "License").  You may not use
     5 * Licensed under the Apache License 2.0 (the "License").  You may not use
    66 * this file except in compliance with the License.  You can obtain a copy
    77 * in the file LICENSE in the source distribution or at
     
    99 */
    1010
    11 #ifndef HEADER_OBJERR_H
    12 # define HEADER_OBJERR_H
     11#ifndef OPENSSL_OBJECTSERR_H
     12# define OPENSSL_OBJECTSERR_H
     13# pragma once
    1314
    14 # ifndef HEADER_SYMHACKS_H
    15 #  include <openssl/symhacks.h>
    16 # endif
     15# include <openssl/opensslconf.h>
     16# include <openssl/symhacks.h>
     17# include <openssl/cryptoerr_legacy.h>
    1718
    18 # ifdef  __cplusplus
    19 extern "C"
    20 # endif
    21 int ERR_load_OBJ_strings(void);
    2219
    23 /*
    24  * OBJ function codes.
    25  */
    26 # define OBJ_F_OBJ_ADD_OBJECT                             105
    27 # define OBJ_F_OBJ_ADD_SIGID                              107
    28 # define OBJ_F_OBJ_CREATE                                 100
    29 # define OBJ_F_OBJ_DUP                                    101
    30 # define OBJ_F_OBJ_NAME_NEW_INDEX                         106
    31 # define OBJ_F_OBJ_NID2LN                                 102
    32 # define OBJ_F_OBJ_NID2OBJ                                103
    33 # define OBJ_F_OBJ_NID2SN                                 104
    34 # define OBJ_F_OBJ_TXT2OBJ                                108
    3520
    3621/*
     
    3924# define OBJ_R_OID_EXISTS                                 102
    4025# define OBJ_R_UNKNOWN_NID                                101
     26# define OBJ_R_UNKNOWN_OBJECT_NAME                        103
    4127
    4228#endif
  • trunk/src/libs/openssl-3.0.1/include/openssl/ocsperr.h

    r91772 r94082  
    11/*
    22 * Generated by util/mkerr.pl DO NOT EDIT
    3  * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
     3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    44 *
    5  * Licensed under the OpenSSL license (the "License").  You may not use
     5 * Licensed under the Apache License 2.0 (the "License").  You may not use
    66 * this file except in compliance with the License.  You can obtain a copy
    77 * in the file LICENSE in the source distribution or at
     
    99 */
    1010
    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
    1714
    1815# include <openssl/opensslconf.h>
     16# include <openssl/symhacks.h>
     17# include <openssl/cryptoerr_legacy.h>
     18
    1919
    2020# ifndef OPENSSL_NO_OCSP
    2121
    22 #  ifdef  __cplusplus
    23 extern "C"
    24 #  endif
    25 int ERR_load_OCSP_strings(void);
    26 
    27 /*
    28  * OCSP function codes.
    29  */
    30 #  define OCSP_F_D2I_OCSP_NONCE                            102
    31 #  define OCSP_F_OCSP_BASIC_ADD1_STATUS                    103
    32 #  define OCSP_F_OCSP_BASIC_SIGN                           104
    33 #  define OCSP_F_OCSP_BASIC_SIGN_CTX                       119
    34 #  define OCSP_F_OCSP_BASIC_VERIFY                         105
    35 #  define OCSP_F_OCSP_CERT_ID_NEW                          101
    36 #  define OCSP_F_OCSP_CHECK_DELEGATED                      106
    37 #  define OCSP_F_OCSP_CHECK_IDS                            107
    38 #  define OCSP_F_OCSP_CHECK_ISSUER                         108
    39 #  define OCSP_F_OCSP_CHECK_VALIDITY                       115
    40 #  define OCSP_F_OCSP_MATCH_ISSUERID                       109
    41 #  define OCSP_F_OCSP_PARSE_URL                            114
    42 #  define OCSP_F_OCSP_REQUEST_SIGN                         110
    43 #  define OCSP_F_OCSP_REQUEST_VERIFY                       116
    44 #  define OCSP_F_OCSP_RESPONSE_GET1_BASIC                  111
    45 #  define OCSP_F_PARSE_HTTP_LINE1                          118
    4622
    4723/*
     
    5026#  define OCSP_R_CERTIFICATE_VERIFY_ERROR                  101
    5127#  define OCSP_R_DIGEST_ERR                                102
     28#  define OCSP_R_DIGEST_NAME_ERR                           106
     29#  define OCSP_R_DIGEST_SIZE_ERR                           107
    5230#  define OCSP_R_ERROR_IN_NEXTUPDATE_FIELD                 122
    5331#  define OCSP_R_ERROR_IN_THISUPDATE_FIELD                 123
    54 #  define OCSP_R_ERROR_PARSING_URL                         121
    5532#  define OCSP_R_MISSING_OCSPSIGNING_USAGE                 103
    5633#  define OCSP_R_NEXTUPDATE_BEFORE_THISUPDATE              124
     
    6441#  define OCSP_R_RESPONSE_CONTAINS_NO_REVOCATION_DATA      111
    6542#  define OCSP_R_ROOT_CA_NOT_TRUSTED                       112
    66 #  define OCSP_R_SERVER_RESPONSE_ERROR                     114
    67 #  define OCSP_R_SERVER_RESPONSE_PARSE_ERROR               115
    6843#  define OCSP_R_SIGNATURE_FAILURE                         117
    6944#  define OCSP_R_SIGNER_CERTIFICATE_NOT_FOUND              118
  • trunk/src/libs/openssl-3.0.1/include/openssl/opensslconf.h

    r91772 r94082  
    11/*
    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.
    43 *
    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
    85 * this file except in compliance with the License.  You can obtain a copy
    96 * in the file LICENSE in the source distribution or at
     
    118 */
    129
    13 #include <openssl/opensslv.h>
     10#ifndef OPENSSL_OPENSSLCONF_H
     11# define OPENSSL_OPENSSLCONF_H
     12# pragma once
    1413
    15 #ifdef  __cplusplus
    16 extern "C" {
    17 #endif
     14# include <openssl/configuration.h>
     15# include <openssl/macros.h>
    1816
    1917/* Mangle OpenSSL symbols to prevent clashes with other OpenSSL libraries
     
    2624#endif
    2725
    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  
    11/*
    2  * Copyright 2001-2018 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 2019 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    10 #ifndef HEADER_OPENSSL_TYPES_H
    11 # define HEADER_OPENSSL_TYPES_H
    12 
    13 #include <limits.h>
    14 
    15 #ifdef  __cplusplus
    16 extern "C" {
    17 #endif
    18 
    19 # include <openssl/e_os2.h>
    20 
    21 # ifdef NO_ASN1_TYPEDEFS
    22 #  define ASN1_INTEGER            ASN1_STRING
    23 #  define ASN1_ENUMERATED         ASN1_STRING
    24 #  define ASN1_BIT_STRING         ASN1_STRING
    25 #  define ASN1_OCTET_STRING       ASN1_STRING
    26 #  define ASN1_PRINTABLESTRING    ASN1_STRING
    27 #  define ASN1_T61STRING          ASN1_STRING
    28 #  define ASN1_IA5STRING          ASN1_STRING
    29 #  define ASN1_UTCTIME            ASN1_STRING
    30 #  define ASN1_GENERALIZEDTIME    ASN1_STRING
    31 #  define ASN1_TIME               ASN1_STRING
    32 #  define ASN1_GENERALSTRING      ASN1_STRING
    33 #  define ASN1_UNIVERSALSTRING    ASN1_STRING
    34 #  define ASN1_BMPSTRING          ASN1_STRING
    35 #  define ASN1_VISIBLESTRING      ASN1_STRING
    36 #  define ASN1_UTF8STRING         ASN1_STRING
    37 #  define ASN1_BOOLEAN            int
    38 #  define ASN1_NULL               int
    39 # else
    40 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 # endif
    59 
    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 _WIN32
    67 #  undef X509_NAME
    68 #  undef X509_EXTENSIONS
    69 #  undef PKCS7_ISSUER_AND_SERIAL
    70 #  undef PKCS7_SIGNER_INFO
    71 #  undef OCSP_REQUEST
    72 #  undef OCSP_RESPONSE
    73 # endif
    74 
    75 # ifdef BIGNUM
    76 #  undef BIGNUM
    77 # endif
    78 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 #else
    18410/*
    185  * Not long long, because the C-library can only be expected to provide
    186  * strtoll(), strtoull() at the same time as intmax_t and strtoimax(),
    187  * strtoumax().  Since we use these for parsing arguments, we need the
    188  * 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>.
    18915 */
    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  
    11/*
    2  * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    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
    1218
    1319# include <openssl/e_os2.h>
     
    6167 */
    6268
     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
    6397# ifdef OPENSSL_NO_STDIO
    6498
    6599#  define IMPLEMENT_PEM_read_fp(name, type, str, asn1) /**/
    66100#  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
    68104#  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
    70108# else
    71109
    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
    139173
    140174# define IMPLEMENT_PEM_write(name, type, str, asn1) \
     
    142176        IMPLEMENT_PEM_write_fp(name, type, str, asn1)
    143177
    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) \
    145180        IMPLEMENT_PEM_write_bio_const(name, type, str, asn1) \
    146181        IMPLEMENT_PEM_write_fp_const(name, type, str, asn1)
     182# endif
    147183
    148184# define IMPLEMENT_PEM_write_cb(name, type, str, asn1) \
     
    150186        IMPLEMENT_PEM_write_cb_fp(name, type, str, asn1)
    151187
    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) \
    153190        IMPLEMENT_PEM_write_cb_bio_const(name, type, str, asn1) \
    154191        IMPLEMENT_PEM_write_cb_fp_const(name, type, str, asn1)
     192# endif
    155193
    156194# define IMPLEMENT_PEM_read(name, type, str, asn1) \
     
    162200        IMPLEMENT_PEM_write(name, type, str, asn1)
    163201
    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) \
    165204        IMPLEMENT_PEM_read(name, type, str, asn1) \
    166205        IMPLEMENT_PEM_write_const(name, type, str, asn1)
     206# endif
    167207
    168208# define IMPLEMENT_PEM_rw_cb(name, type, str, asn1) \
     
    172212/* These are the same except they are for the declarations */
    173213
     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 */
    174219# if defined(OPENSSL_NO_STDIO)
    175220
    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
    180231# else
    181232
    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)
    210310# 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)
    222347# 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)
    228364# 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)
    232368
    233369int PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher);
     
    252388void *PEM_ASN1_read_bio(d2i_of_void *d2i, const char *name, BIO *bp, void **x,
    253389                        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,
     390int 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,
    256393                       pem_password_cb *cb, void *u);
    257394
    258395STACK_OF(X509_INFO) *PEM_X509_INFO_read_bio(BIO *bp, STACK_OF(X509_INFO) *sk,
    259396                                            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,
     397STACK_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
     402int PEM_X509_INFO_write_bio(BIO *bp, const X509_INFO *xi, EVP_CIPHER *enc,
     403                            const unsigned char *kstr, int klen,
    262404                            pem_password_cb *cd, void *u);
    263405
     
    270412                    pem_password_cb *cb, void *u);
    271413int 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);
    274417STACK_OF(X509_INFO) *PEM_X509_INFO_read(FILE *fp, STACK_OF(X509_INFO) *sk,
    275418                                        pem_password_cb *cb, void *u);
     419STACK_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);
    276422#endif
    277423
    278424int PEM_SignInit(EVP_MD_CTX *ctx, EVP_MD *type);
    279 int PEM_SignUpdate(EVP_MD_CTX *ctx, unsigned char *d, unsigned int cnt);
     425int PEM_SignUpdate(EVP_MD_CTX *ctx, const unsigned char *d, unsigned int cnt);
    280426int PEM_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret,
    281427                  unsigned int *siglen, EVP_PKEY *pkey);
     
    284430int PEM_def_callback(char *buf, int num, int rwflag, void *userdata);
    285431void PEM_proc_type(char *buf, int type);
    286 void PEM_dek_info(char *buf, const char *type, int len, char *str);
     432void PEM_dek_info(char *buf, const char *type, int len, const char *str);
    287433
    288434# include <openssl/symhacks.h>
     
    293439DECLARE_PEM_write(X509_REQ_NEW, X509_REQ)
    294440DECLARE_PEM_rw(X509_CRL, X509_CRL)
     441DECLARE_PEM_rw(X509_PUBKEY, X509_PUBKEY)
    295442DECLARE_PEM_rw(PKCS7, PKCS7)
    296443DECLARE_PEM_rw(NETSCAPE_CERT_SEQUENCE, NETSCAPE_CERT_SEQUENCE)
    297444DECLARE_PEM_rw(PKCS8, X509_SIG)
    298445DECLARE_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
     447DECLARE_PEM_rw_cb_attr(OSSL_DEPRECATEDIN_3_0, RSAPrivateKey, RSA)
     448DECLARE_PEM_rw_attr(OSSL_DEPRECATEDIN_3_0, RSAPublicKey, RSA)
     449DECLARE_PEM_rw_attr(OSSL_DEPRECATEDIN_3_0, RSA_PUBKEY, RSA)
     450# endif
     451# ifndef OPENSSL_NO_DEPRECATED_3_0
     452#  ifndef OPENSSL_NO_DSA
     453DECLARE_PEM_rw_cb_attr(OSSL_DEPRECATEDIN_3_0, DSAPrivateKey, DSA)
     454DECLARE_PEM_rw_attr(OSSL_DEPRECATEDIN_3_0, DSA_PUBKEY, DSA)
     455DECLARE_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
     461DECLARE_PEM_rw_attr(OSSL_DEPRECATEDIN_3_0, ECPKParameters, EC_GROUP)
     462DECLARE_PEM_rw_cb_attr(OSSL_DEPRECATEDIN_3_0, ECPrivateKey, EC_KEY)
     463DECLARE_PEM_rw_attr(OSSL_DEPRECATEDIN_3_0, EC_PUBKEY, EC_KEY)
     464#  endif
     465# endif
     466
    314467# 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
     469DECLARE_PEM_rw_attr(OSSL_DEPRECATEDIN_3_0, DHparams, DH)
     470DECLARE_PEM_write_attr(OSSL_DEPRECATEDIN_3_0, DHxparams, DH)
     471#  endif
     472# endif
     473DECLARE_PEM_rw_cb_ex(PrivateKey, EVP_PKEY)
     474DECLARE_PEM_rw_ex(PUBKEY, EVP_PKEY)
     475
     476int PEM_write_bio_PrivateKey_traditional(BIO *bp, const EVP_PKEY *x,
    322477                                         const EVP_CIPHER *enc,
    323                                          unsigned char *kstr, int klen,
     478                                         const unsigned char *kstr, int klen,
    324479                                         pem_password_cb *cb, void *u);
    325480
    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? */
     482int PEM_write_bio_PKCS8PrivateKey_nid(BIO *bp, const EVP_PKEY *x, int nid,
     483                                      const char *kstr, int klen,
    328484                                      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,
     485int PEM_write_bio_PKCS8PrivateKey(BIO *, const EVP_PKEY *, const EVP_CIPHER *,
     486                                  const char *kstr, int klen,
     487                                  pem_password_cb *cb, void *u);
     488int i2d_PKCS8PrivateKey_bio(BIO *bp, const EVP_PKEY *x, const EVP_CIPHER *enc,
     489                            const char *kstr, int klen,
    333490                            pem_password_cb *cb, void *u);
    334 int i2d_PKCS8PrivateKey_nid_bio(BIO *bp, EVP_PKEY *x, int nid,
    335                                 char *kstr, int klen,
     491int i2d_PKCS8PrivateKey_nid_bio(BIO *bp, const EVP_PKEY *x, int nid,
     492                                const char *kstr, int klen,
    336493                                pem_password_cb *cb, void *u);
    337494EVP_PKEY *d2i_PKCS8PrivateKey_bio(BIO *bp, EVP_PKEY **x, pem_password_cb *cb,
     
    339496
    340497# ifndef OPENSSL_NO_STDIO
    341 int i2d_PKCS8PrivateKey_fp(FILE *fp, EVP_PKEY *x, const EVP_CIPHER *enc,
    342                            char *kstr, int klen,
     498int i2d_PKCS8PrivateKey_fp(FILE *fp, const EVP_PKEY *x, const EVP_CIPHER *enc,
     499                           const char *kstr, int klen,
    343500                           pem_password_cb *cb, void *u);
    344 int i2d_PKCS8PrivateKey_nid_fp(FILE *fp, EVP_PKEY *x, int nid,
    345                                char *kstr, int klen,
     501int i2d_PKCS8PrivateKey_nid_fp(FILE *fp, const EVP_PKEY *x, int nid,
     502                               const char *kstr, int klen,
    346503                               pem_password_cb *cb, void *u);
    347 int PEM_write_PKCS8PrivateKey_nid(FILE *fp, EVP_PKEY *x, int nid,
    348                                   char *kstr, int klen,
     504int PEM_write_PKCS8PrivateKey_nid(FILE *fp, const EVP_PKEY *x, int nid,
     505                                  const char *kstr, int klen,
    349506                                  pem_password_cb *cb, void *u);
    350507
     
    352509                                 void *u);
    353510
    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
     511int 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
     515EVP_PKEY *PEM_read_bio_Parameters_ex(BIO *bp, EVP_PKEY **x,
     516                                     OSSL_LIB_CTX *libctx, const char *propq);
    358517EVP_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
     518int PEM_write_bio_Parameters(BIO *bp, const EVP_PKEY *x);
     519
    362520EVP_PKEY *b2i_PrivateKey(const unsigned char **in, long length);
    363521EVP_PKEY *b2i_PublicKey(const unsigned char **in, long length);
    364522EVP_PKEY *b2i_PrivateKey_bio(BIO *in);
    365523EVP_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
     524int i2b_PrivateKey_bio(BIO *out, const EVP_PKEY *pk);
     525int i2b_PublicKey_bio(BIO *out, const EVP_PKEY *pk);
    369526EVP_PKEY *b2i_PVK_bio(BIO *in, pem_password_cb *cb, void *u);
    370 int i2b_PVK_bio(BIO *out, EVP_PKEY *pk, int enclevel,
     527EVP_PKEY *b2i_PVK_bio_ex(BIO *in, pem_password_cb *cb, void *u,
     528                         OSSL_LIB_CTX *libctx, const char *propq);
     529int i2b_PVK_bio(BIO *out, const EVP_PKEY *pk, int enclevel,
    371530                pem_password_cb *cb, void *u);
    372 #  endif
    373 # endif
     531int 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);
    374534
    375535# ifdef  __cplusplus
  • trunk/src/libs/openssl-3.0.1/include/openssl/pem2.h

    r91772 r94082  
    22 * Copyright 1999-2018 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    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
    1218# include <openssl/pemerr.h>
    1319#endif
  • trunk/src/libs/openssl-3.0.1/include/openssl/pemerr.h

    r91772 r94082  
    11/*
    22 * Generated by util/mkerr.pl DO NOT EDIT
    3  * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
     3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    44 *
    5  * Licensed under the OpenSSL license (the "License").  You may not use
     5 * Licensed under the Apache License 2.0 (the "License").  You may not use
    66 * this file except in compliance with the License.  You can obtain a copy
    77 * in the file LICENSE in the source distribution or at
     
    99 */
    1010
    11 #ifndef HEADER_PEMERR_H
    12 # define HEADER_PEMERR_H
     11#ifndef OPENSSL_PEMERR_H
     12# define OPENSSL_PEMERR_H
     13# pragma once
    1314
    14 # ifndef HEADER_SYMHACKS_H
    15 #  include <openssl/symhacks.h>
    16 # endif
     15# include <openssl/opensslconf.h>
     16# include <openssl/symhacks.h>
     17# include <openssl/cryptoerr_legacy.h>
    1718
    18 # ifdef  __cplusplus
    19 extern "C"
    20 # endif
    21 int ERR_load_PEM_strings(void);
    2219
    23 /*
    24  * PEM function codes.
    25  */
    26 # define PEM_F_B2I_DSS                                    127
    27 # define PEM_F_B2I_PVK_BIO                                128
    28 # define PEM_F_B2I_RSA                                    129
    29 # define PEM_F_CHECK_BITLEN_DSA                           130
    30 # define PEM_F_CHECK_BITLEN_RSA                           131
    31 # define PEM_F_D2I_PKCS8PRIVATEKEY_BIO                    120
    32 # define PEM_F_D2I_PKCS8PRIVATEKEY_FP                     121
    33 # define PEM_F_DO_B2I                                     132
    34 # define PEM_F_DO_B2I_BIO                                 133
    35 # define PEM_F_DO_BLOB_HEADER                             134
    36 # define PEM_F_DO_I2B                                     146
    37 # define PEM_F_DO_PK8PKEY                                 126
    38 # define PEM_F_DO_PK8PKEY_FP                              125
    39 # define PEM_F_DO_PVK_BODY                                135
    40 # define PEM_F_DO_PVK_HEADER                              136
    41 # define PEM_F_GET_HEADER_AND_DATA                        143
    42 # define PEM_F_GET_NAME                                   144
    43 # define PEM_F_I2B_PVK                                    137
    44 # define PEM_F_I2B_PVK_BIO                                138
    45 # define PEM_F_LOAD_IV                                    101
    46 # define PEM_F_PEM_ASN1_READ                              102
    47 # define PEM_F_PEM_ASN1_READ_BIO                          103
    48 # define PEM_F_PEM_ASN1_WRITE                             104
    49 # define PEM_F_PEM_ASN1_WRITE_BIO                         105
    50 # define PEM_F_PEM_DEF_CALLBACK                           100
    51 # define PEM_F_PEM_DO_HEADER                              106
    52 # define PEM_F_PEM_GET_EVP_CIPHER_INFO                    107
    53 # define PEM_F_PEM_READ                                   108
    54 # define PEM_F_PEM_READ_BIO                               109
    55 # define PEM_F_PEM_READ_BIO_DHPARAMS                      141
    56 # define PEM_F_PEM_READ_BIO_EX                            145
    57 # define PEM_F_PEM_READ_BIO_PARAMETERS                    140
    58 # define PEM_F_PEM_READ_BIO_PRIVATEKEY                    123
    59 # define PEM_F_PEM_READ_DHPARAMS                          142
    60 # define PEM_F_PEM_READ_PRIVATEKEY                        124
    61 # define PEM_F_PEM_SIGNFINAL                              112
    62 # define PEM_F_PEM_WRITE                                  113
    63 # define PEM_F_PEM_WRITE_BIO                              114
    64 # define PEM_F_PEM_WRITE_BIO_PRIVATEKEY_TRADITIONAL       147
    65 # define PEM_F_PEM_WRITE_PRIVATEKEY                       139
    66 # define PEM_F_PEM_X509_INFO_READ                         115
    67 # define PEM_F_PEM_X509_INFO_READ_BIO                     116
    68 # define PEM_F_PEM_X509_INFO_WRITE_BIO                    117
    6920
    7021/*
     
    8132# define PEM_R_CIPHER_IS_NULL                             127
    8233# define PEM_R_ERROR_CONVERTING_PRIVATE_KEY               115
     34# define PEM_R_EXPECTING_DSS_KEY_BLOB                     131
    8335# define PEM_R_EXPECTING_PRIVATE_KEY_BLOB                 119
    8436# define PEM_R_EXPECTING_PUBLIC_KEY_BLOB                  120
     37# define PEM_R_EXPECTING_RSA_KEY_BLOB                     132
    8538# define PEM_R_HEADER_TOO_LONG                            128
    8639# define PEM_R_INCONSISTENT_HEADER                        121
  • trunk/src/libs/openssl-3.0.1/include/openssl/pkcs12err.h

    r91772 r94082  
    11/*
    22 * Generated by util/mkerr.pl DO NOT EDIT
    3  * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
     3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    44 *
    5  * Licensed under the OpenSSL license (the "License").  You may not use
     5 * Licensed under the Apache License 2.0 (the "License").  You may not use
    66 * this file except in compliance with the License.  You can obtain a copy
    77 * in the file LICENSE in the source distribution or at
     
    99 */
    1010
    11 #ifndef HEADER_PKCS12ERR_H
    12 # define HEADER_PKCS12ERR_H
     11#ifndef OPENSSL_PKCS12ERR_H
     12# define OPENSSL_PKCS12ERR_H
     13# pragma once
    1314
    14 # ifndef HEADER_SYMHACKS_H
    15 #  include <openssl/symhacks.h>
    16 # endif
     15# include <openssl/opensslconf.h>
     16# include <openssl/symhacks.h>
     17# include <openssl/cryptoerr_legacy.h>
    1718
    18 # ifdef  __cplusplus
    19 extern "C"
    20 # endif
    21 int ERR_load_PKCS12_strings(void);
    2219
    23 /*
    24  * PKCS12 function codes.
    25  */
    26 # define PKCS12_F_OPENSSL_ASC2UNI                         121
    27 # define PKCS12_F_OPENSSL_UNI2ASC                         124
    28 # define PKCS12_F_OPENSSL_UNI2UTF8                        127
    29 # define PKCS12_F_OPENSSL_UTF82UNI                        129
    30 # define PKCS12_F_PKCS12_CREATE                           105
    31 # define PKCS12_F_PKCS12_GEN_MAC                          107
    32 # define PKCS12_F_PKCS12_INIT                             109
    33 # define PKCS12_F_PKCS12_ITEM_DECRYPT_D2I                 106
    34 # define PKCS12_F_PKCS12_ITEM_I2D_ENCRYPT                 108
    35 # define PKCS12_F_PKCS12_ITEM_PACK_SAFEBAG                117
    36 # define PKCS12_F_PKCS12_KEY_GEN_ASC                      110
    37 # define PKCS12_F_PKCS12_KEY_GEN_UNI                      111
    38 # define PKCS12_F_PKCS12_KEY_GEN_UTF8                     116
    39 # define PKCS12_F_PKCS12_NEWPASS                          128
    40 # define PKCS12_F_PKCS12_PACK_P7DATA                      114
    41 # define PKCS12_F_PKCS12_PACK_P7ENCDATA                   115
    42 # define PKCS12_F_PKCS12_PARSE                            118
    43 # define PKCS12_F_PKCS12_PBE_CRYPT                        119
    44 # define PKCS12_F_PKCS12_PBE_KEYIVGEN                     120
    45 # define PKCS12_F_PKCS12_SAFEBAG_CREATE0_P8INF            112
    46 # define PKCS12_F_PKCS12_SAFEBAG_CREATE0_PKCS8            113
    47 # define PKCS12_F_PKCS12_SAFEBAG_CREATE_PKCS8_ENCRYPT     133
    48 # define PKCS12_F_PKCS12_SETUP_MAC                        122
    49 # define PKCS12_F_PKCS12_SET_MAC                          123
    50 # define PKCS12_F_PKCS12_UNPACK_AUTHSAFES                 130
    51 # define PKCS12_F_PKCS12_UNPACK_P7DATA                    131
    52 # define PKCS12_F_PKCS12_VERIFY_MAC                       126
    53 # define PKCS12_F_PKCS8_ENCRYPT                           125
    54 # define PKCS12_F_PKCS8_SET0_PBE                          132
    5520
    5621/*
     
    6530# define PKCS12_R_INVALID_NULL_ARGUMENT                   104
    6631# define PKCS12_R_INVALID_NULL_PKCS12_POINTER             105
     32# define PKCS12_R_INVALID_TYPE                            112
    6733# define PKCS12_R_IV_GEN_ERROR                            106
    6834# define PKCS12_R_KEY_GEN_ERROR                           107
     
    7339# define PKCS12_R_MAC_VERIFY_FAILURE                      113
    7440# define PKCS12_R_PARSE_ERROR                             114
    75 # define PKCS12_R_PKCS12_ALGOR_CIPHERINIT_ERROR           115
    7641# define PKCS12_R_PKCS12_CIPHERFINAL_ERROR                116
    77 # define PKCS12_R_PKCS12_PBE_CRYPT_ERROR                  117
    7842# define PKCS12_R_UNKNOWN_DIGEST_ALGORITHM                118
    7943# define PKCS12_R_UNSUPPORTED_PKCS12_MODE                 119
  • trunk/src/libs/openssl-3.0.1/include/openssl/pkcs7err.h

    r91772 r94082  
    11/*
    22 * Generated by util/mkerr.pl DO NOT EDIT
    3  * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
     3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    44 *
    5  * Licensed under the OpenSSL license (the "License").  You may not use
     5 * Licensed under the Apache License 2.0 (the "License").  You may not use
    66 * this file except in compliance with the License.  You can obtain a copy
    77 * in the file LICENSE in the source distribution or at
     
    99 */
    1010
    11 #ifndef HEADER_PKCS7ERR_H
    12 # define HEADER_PKCS7ERR_H
     11#ifndef OPENSSL_PKCS7ERR_H
     12# define OPENSSL_PKCS7ERR_H
     13# pragma once
    1314
    14 # ifndef HEADER_SYMHACKS_H
    15 #  include <openssl/symhacks.h>
    16 # endif
     15# include <openssl/opensslconf.h>
     16# include <openssl/symhacks.h>
     17# include <openssl/cryptoerr_legacy.h>
    1718
    18 # ifdef  __cplusplus
    19 extern "C"
    20 # endif
    21 int ERR_load_PKCS7_strings(void);
    2219
    23 /*
    24  * PKCS7 function codes.
    25  */
    26 # define PKCS7_F_DO_PKCS7_SIGNED_ATTRIB                   136
    27 # define PKCS7_F_PKCS7_ADD0_ATTRIB_SIGNING_TIME           135
    28 # define PKCS7_F_PKCS7_ADD_ATTRIB_SMIMECAP                118
    29 # define PKCS7_F_PKCS7_ADD_CERTIFICATE                    100
    30 # define PKCS7_F_PKCS7_ADD_CRL                            101
    31 # define PKCS7_F_PKCS7_ADD_RECIPIENT_INFO                 102
    32 # define PKCS7_F_PKCS7_ADD_SIGNATURE                      131
    33 # define PKCS7_F_PKCS7_ADD_SIGNER                         103
    34 # define PKCS7_F_PKCS7_BIO_ADD_DIGEST                     125
    35 # define PKCS7_F_PKCS7_COPY_EXISTING_DIGEST               138
    36 # define PKCS7_F_PKCS7_CTRL                               104
    37 # define PKCS7_F_PKCS7_DATADECODE                         112
    38 # define PKCS7_F_PKCS7_DATAFINAL                          128
    39 # define PKCS7_F_PKCS7_DATAINIT                           105
    40 # define PKCS7_F_PKCS7_DATAVERIFY                         107
    41 # define PKCS7_F_PKCS7_DECRYPT                            114
    42 # define PKCS7_F_PKCS7_DECRYPT_RINFO                      133
    43 # define PKCS7_F_PKCS7_ENCODE_RINFO                       132
    44 # define PKCS7_F_PKCS7_ENCRYPT                            115
    45 # define PKCS7_F_PKCS7_FINAL                              134
    46 # define PKCS7_F_PKCS7_FIND_DIGEST                        127
    47 # define PKCS7_F_PKCS7_GET0_SIGNERS                       124
    48 # define PKCS7_F_PKCS7_RECIP_INFO_SET                     130
    49 # define PKCS7_F_PKCS7_SET_CIPHER                         108
    50 # define PKCS7_F_PKCS7_SET_CONTENT                        109
    51 # define PKCS7_F_PKCS7_SET_DIGEST                         126
    52 # define PKCS7_F_PKCS7_SET_TYPE                           110
    53 # define PKCS7_F_PKCS7_SIGN                               116
    54 # define PKCS7_F_PKCS7_SIGNATUREVERIFY                    113
    55 # define PKCS7_F_PKCS7_SIGNER_INFO_SET                    129
    56 # define PKCS7_F_PKCS7_SIGNER_INFO_SIGN                   139
    57 # define PKCS7_F_PKCS7_SIGN_ADD_SIGNER                    137
    58 # define PKCS7_F_PKCS7_SIMPLE_SMIMECAP                    119
    59 # define PKCS7_F_PKCS7_VERIFY                             117
    6020
    6121/*
  • trunk/src/libs/openssl-3.0.1/include/openssl/rand.h

    r91772 r94082  
    11/*
    2  * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    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
    1218
    1319# include <stdlib.h>
    14 # include <openssl/ossl_typ.h>
     20# include <openssl/types.h>
    1521# include <openssl/e_os2.h>
    1622# include <openssl/randerr.h>
     23# include <openssl/evp.h>
    1724
    1825#ifdef  __cplusplus
     
    2027#endif
    2128
     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
    2240struct rand_meth_st {
    2341    int (*seed) (const void *buf, int num);
     
    2947};
    3048
    31 int RAND_set_rand_method(const RAND_METHOD *meth);
    32 const RAND_METHOD *RAND_get_rand_method(void);
    33 # ifndef OPENSSL_NO_ENGINE
    34 int RAND_set_rand_engine(ENGINE *engine);
    35 # endif
     49OSSL_DEPRECATEDIN_3_0 int RAND_set_rand_method(const RAND_METHOD *meth);
     50OSSL_DEPRECATEDIN_3_0 const RAND_METHOD *RAND_get_rand_method(void);
     51#  ifndef OPENSSL_NO_ENGINE
     52OSSL_DEPRECATEDIN_3_0 int RAND_set_rand_engine(ENGINE *engine);
     53#  endif
    3654
    37 RAND_METHOD *RAND_OpenSSL(void);
     55OSSL_DEPRECATEDIN_3_0 RAND_METHOD *RAND_OpenSSL(void);
     56# endif /* OPENSSL_NO_DEPRECATED_3_0 */
    3857
    39 # if OPENSSL_API_COMPAT < 0x10100000L
     58# ifndef OPENSSL_NO_DEPRECATED_1_1_0
    4059#   define RAND_cleanup() while(0) continue
    4160# endif
    4261int RAND_bytes(unsigned char *buf, int num);
    4362int 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 */
     68int 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 */
     75int 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
     79OSSL_DEPRECATEDIN_1_1_0 int RAND_pseudo_bytes(unsigned char *buf, int num);
     80# endif
     81
     82EVP_RAND_CTX *RAND_get0_primary(OSSL_LIB_CTX *ctx);
     83EVP_RAND_CTX *RAND_get0_public(OSSL_LIB_CTX *ctx);
     84EVP_RAND_CTX *RAND_get0_private(OSSL_LIB_CTX *ctx);
     85
     86int RAND_set_DRBG_type(OSSL_LIB_CTX *ctx, const char *drbg, const char *propq,
     87                       const char *cipher, const char *digest);
     88int RAND_set_seed_source_type(OSSL_LIB_CTX *ctx, const char *seed,
     89                              const char *propq);
    4590
    4691void RAND_seed(const void *buf, int num);
     
    4893
    4994# if defined(__ANDROID__) && defined(__NDK_FPABI__)
    50 __NDK_FPABI__   /* __attribute__((pcs("aapcs"))) on ARM */
     95__NDK_FPABI__   /* __attribute__((pcs("aapcs"))) on ARM */
    5196# endif
    5297void RAND_add(const void *buf, int num, double randomness);
     
    66111# if defined(_WIN32) && (defined(BASETYPES) || defined(_WINDEF_H))
    67112/* 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
     114OSSL_DEPRECATEDIN_1_1_0 void RAND_screen(void);
     115OSSL_DEPRECATEDIN_1_1_0 int RAND_event(UINT, WPARAM, LPARAM);
     116#  endif
    70117# endif
    71 
    72118
    73119#ifdef  __cplusplus
  • trunk/src/libs/openssl-3.0.1/include/openssl/randerr.h

    r91772 r94082  
    11/*
    22 * Generated by util/mkerr.pl DO NOT EDIT
    3  * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
     3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    44 *
    5  * Licensed under the OpenSSL license (the "License").  You may not use
     5 * Licensed under the Apache License 2.0 (the "License").  You may not use
    66 * this file except in compliance with the License.  You can obtain a copy
    77 * in the file LICENSE in the source distribution or at
     
    99 */
    1010
    11 #ifndef HEADER_RANDERR_H
    12 # define HEADER_RANDERR_H
     11#ifndef OPENSSL_RANDERR_H
     12# define OPENSSL_RANDERR_H
     13# pragma once
    1314
     15# include <openssl/opensslconf.h>
    1416# include <openssl/symhacks.h>
     17# include <openssl/cryptoerr_legacy.h>
    1518
    16 # ifdef  __cplusplus
    17 extern "C"
    18 # endif
    19 int ERR_load_RAND_strings(void);
    2019
    21 /*
    22  * RAND function codes.
    23  */
    24 # define RAND_F_DATA_COLLECT_METHOD                       127
    25 # define RAND_F_DRBG_BYTES                                101
    26 # define RAND_F_DRBG_GET_ENTROPY                          105
    27 # define RAND_F_DRBG_SETUP                                117
    28 # define RAND_F_GET_ENTROPY                               106
    29 # define RAND_F_RAND_BYTES                                100
    30 # define RAND_F_RAND_DRBG_ENABLE_LOCKING                  119
    31 # define RAND_F_RAND_DRBG_GENERATE                        107
    32 # define RAND_F_RAND_DRBG_GET_ENTROPY                     120
    33 # define RAND_F_RAND_DRBG_GET_NONCE                       123
    34 # define RAND_F_RAND_DRBG_INSTANTIATE                     108
    35 # define RAND_F_RAND_DRBG_NEW                             109
    36 # define RAND_F_RAND_DRBG_RESEED                          110
    37 # define RAND_F_RAND_DRBG_RESTART                         102
    38 # define RAND_F_RAND_DRBG_SET                             104
    39 # define RAND_F_RAND_DRBG_SET_DEFAULTS                    121
    40 # define RAND_F_RAND_DRBG_UNINSTANTIATE                   118
    41 # define RAND_F_RAND_LOAD_FILE                            111
    42 # define RAND_F_RAND_POOL_ACQUIRE_ENTROPY                 122
    43 # define RAND_F_RAND_POOL_ADD                             103
    44 # define RAND_F_RAND_POOL_ADD_BEGIN                       113
    45 # define RAND_F_RAND_POOL_ADD_END                         114
    46 # define RAND_F_RAND_POOL_ATTACH                          124
    47 # define RAND_F_RAND_POOL_BYTES_NEEDED                    115
    48 # define RAND_F_RAND_POOL_GROW                            125
    49 # define RAND_F_RAND_POOL_NEW                             116
    50 # define RAND_F_RAND_PSEUDO_BYTES                         126
    51 # define RAND_F_RAND_WRITE_FILE                           112
    5220
    5321/*
     
    7240# define RAND_R_FWRITE_ERROR                              123
    7341# define RAND_R_GENERATE_ERROR                            112
     42# define RAND_R_INSUFFICIENT_DRBG_STRENGTH                139
    7443# define RAND_R_INTERNAL_ERROR                            113
    7544# define RAND_R_IN_ERROR_STATE                            114
     
    8958# define RAND_R_TOO_LITTLE_NONCE_REQUESTED                135
    9059# 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
    9165# define RAND_R_UNSUPPORTED_DRBG_FLAGS                    132
    9266# define RAND_R_UNSUPPORTED_DRBG_TYPE                     120
  • trunk/src/libs/openssl-3.0.1/include/openssl/rc2.h

    r91772 r94082  
    11/*
    2  * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    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
    1218
    1319# include <openssl/opensslconf.h>
    1420
    1521# ifndef OPENSSL_NO_RC2
    16 # ifdef  __cplusplus
     22#  ifdef  __cplusplus
    1723extern "C" {
    18 # endif
     24#  endif
    1925
     26#  define RC2_BLOCK       8
     27#  define RC2_KEY_LENGTH  16
     28
     29#  ifndef OPENSSL_NO_DEPRECATED_3_0
    2030typedef unsigned int RC2_INT;
    2131
    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
    2734
    2835typedef struct rc2_key_st {
    2936    RC2_INT data[64];
    3037} RC2_KEY;
     38#  endif
     39#  ifndef OPENSSL_NO_DEPRECATED_3_0
     40OSSL_DEPRECATEDIN_3_0 void RC2_set_key(RC2_KEY *key, int len,
     41                                       const unsigned char *data, int bits);
     42OSSL_DEPRECATEDIN_3_0 void RC2_ecb_encrypt(const unsigned char *in,
     43                                           unsigned char *out, RC2_KEY *key,
     44                                           int enc);
     45OSSL_DEPRECATEDIN_3_0 void RC2_encrypt(unsigned long *data, RC2_KEY *key);
     46OSSL_DEPRECATEDIN_3_0 void RC2_decrypt(unsigned long *data, RC2_KEY *key);
     47OSSL_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);
     51OSSL_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);
     56OSSL_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
    3162
    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
    4764}
    48 # endif
     65#  endif
    4966# endif
    5067
  • trunk/src/libs/openssl-3.0.1/include/openssl/rc4.h

    r91772 r94082  
    11/*
    2  * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    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
    1218
    1319# include <openssl/opensslconf.h>
    1420
    1521# ifndef OPENSSL_NO_RC4
    16 # include <stddef.h>
    17 #ifdef  __cplusplus
     22#  include <stddef.h>
     23#  ifdef  __cplusplus
    1824extern "C" {
    19 #endif
     25#  endif
    2026
     27#  ifndef OPENSSL_NO_DEPRECATED_3_0
    2128typedef struct rc4_key_st {
    2229    RC4_INT x, y;
    2330    RC4_INT data[256];
    2431} RC4_KEY;
     32#  endif
     33#  ifndef OPENSSL_NO_DEPRECATED_3_0
     34OSSL_DEPRECATEDIN_3_0 const char *RC4_options(void);
     35OSSL_DEPRECATEDIN_3_0 void RC4_set_key(RC4_KEY *key, int len,
     36                                       const unsigned char *data);
     37OSSL_DEPRECATEDIN_3_0 void RC4(RC4_KEY *key, size_t len,
     38                               const unsigned char *indata,
     39                               unsigned char *outdata);
     40#  endif
    2541
    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
    3243}
    33 # endif
     44#  endif
    3445# endif
    3546
  • trunk/src/libs/openssl-3.0.1/include/openssl/rc5.h

    r91772 r94082  
    11/*
    2  * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    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
    1218
    1319# include <openssl/opensslconf.h>
    1420
    1521# ifndef OPENSSL_NO_RC5
    16 # ifdef  __cplusplus
     22#  ifdef  __cplusplus
    1723extern "C" {
    18 # endif
     24#  endif
    1925
    20 # define RC5_ENCRYPT     1
    21 # define RC5_DECRYPT     0
     26#  define RC5_32_BLOCK            8
     27#  define RC5_32_KEY_LENGTH       16/* This is a default, max is 255 */
    2228
    23 # define RC5_32_INT unsigned int
     29#  ifndef OPENSSL_NO_DEPRECATED_3_0
     30#   define RC5_ENCRYPT     1
     31#   define RC5_DECRYPT     0
    2432
    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
    2734
    2835/*
     
    3037 * most supported modes will be RC5-32/12/16 RC5-32/16/8
    3138 */
    32 # define RC5_8_ROUNDS    8
    33 # define RC5_12_ROUNDS   12
    34 # define RC5_16_ROUNDS   16
     39#   define RC5_8_ROUNDS    8
     40#   define RC5_12_ROUNDS   12
     41#   define RC5_16_ROUNDS   16
    3542
    3643typedef struct rc5_key_st {
     
    3946    RC5_32_INT data[2 * (RC5_16_ROUNDS + 1)];
    4047} RC5_32_KEY;
     48#  endif
     49#  ifndef OPENSSL_NO_DEPRECATED_3_0
     50OSSL_DEPRECATEDIN_3_0 int RC5_32_set_key(RC5_32_KEY *key, int len,
     51                                         const unsigned char *data,
     52                                         int rounds);
     53OSSL_DEPRECATEDIN_3_0 void RC5_32_ecb_encrypt(const unsigned char *in,
     54                                              unsigned char *out,
     55                                              RC5_32_KEY *key,
     56                                              int enc);
     57OSSL_DEPRECATEDIN_3_0 void RC5_32_encrypt(unsigned long *data, RC5_32_KEY *key);
     58OSSL_DEPRECATEDIN_3_0 void RC5_32_decrypt(unsigned long *data, RC5_32_KEY *key);
     59OSSL_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);
     63OSSL_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);
     68OSSL_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
    4173
    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
    5975}
    60 # endif
     76#  endif
    6177# endif
    6278
  • trunk/src/libs/openssl-3.0.1/include/openssl/ripemd.h

    r91772 r94082  
    11/*
    2  * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    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
    1218
    1319# include <openssl/opensslconf.h>
    1420
    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
    1928extern "C" {
    20 # endif
     29#  endif
     30#  if !defined(OPENSSL_NO_DEPRECATED_3_0)
    2131
    22 # define RIPEMD160_LONG unsigned int
     32#   define RIPEMD160_LONG unsigned int
    2333
    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)
    2736
    2837typedef struct RIPEMD160state_st {
     
    3241    unsigned int num;
    3342} RIPEMD160_CTX;
     43#  endif
     44#  ifndef OPENSSL_NO_DEPRECATED_3_0
     45OSSL_DEPRECATEDIN_3_0 int RIPEMD160_Init(RIPEMD160_CTX *c);
     46OSSL_DEPRECATEDIN_3_0 int RIPEMD160_Update(RIPEMD160_CTX *c, const void *data,
     47                                           size_t len);
     48OSSL_DEPRECATEDIN_3_0 int RIPEMD160_Final(unsigned char *md, RIPEMD160_CTX *c);
     49OSSL_DEPRECATEDIN_3_0 unsigned char *RIPEMD160(const unsigned char *d, size_t n,
     50                                               unsigned char *md);
     51OSSL_DEPRECATEDIN_3_0 void RIPEMD160_Transform(RIPEMD160_CTX *c,
     52                                               const unsigned char *b);
     53#  endif
    3454
    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
    4256}
     57#  endif
    4358# endif
    44 # endif
    45 
    46 
    4759#endif
  • trunk/src/libs/openssl-3.0.1/include/openssl/rsa.h

    r91772 r94082  
    11/*
    2  * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    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
    1218
    1319# include <openssl/opensslconf.h>
    1420
    15 # ifndef OPENSSL_NO_RSA
    1621# include <openssl/asn1.h>
    1722# include <openssl/bio.h>
    1823# include <openssl/crypto.h>
    19 # include <openssl/ossl_typ.h>
    20 # if OPENSSL_API_COMPAT < 0x10100000L
     24# include <openssl/types.h>
     25# ifndef OPENSSL_NO_DEPRECATED_1_1_0
    2126#  include <openssl/bn.h>
    2227# endif
    2328# include <openssl/rsaerr.h>
     29# include <openssl/safestack.h>
     30
    2431# ifdef  __cplusplus
    2532extern "C" {
    2633# endif
    2734
    28 /* The types RSA and RSA_METHOD are defined in ossl_typ.h */
    29 
    3035# ifndef OPENSSL_RSA_MAX_MODULUS_BITS
    3136#  define OPENSSL_RSA_MAX_MODULUS_BITS   16384
    3237# endif
    3338
    34 # define OPENSSL_RSA_FIPS_MIN_MODULUS_BITS 1024
    35 
    36 # ifndef OPENSSL_RSA_SMALL_MODULUS_BITS
    37 #  define OPENSSL_RSA_SMALL_MODULUS_BITS 3072
    38 # endif
    39 # ifndef OPENSSL_RSA_MAX_PUBEXP_BITS
    40 
    41 /* exponent limit enforced for "large" modulus only */
    42 #  define OPENSSL_RSA_MAX_PUBEXP_BITS    64
    43 # endif
    44 
    4539# define RSA_3   0x3L
    4640# define RSA_F4  0x10001L
    4741
     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
    4855/* 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
    6166/*
    6267 * This flag means the private key operations will be handled by rsa_mod_exp
     
    6570 * bn_mod_exp gets called when private key components are absent.
    6671 */
    67 # define RSA_FLAG_EXT_PKEY               0x0020
     72#  define RSA_FLAG_EXT_PKEY               0x0020
    6873
    6974/*
     
    7378 * but other engines might not need it
    7479 */
    75 # define RSA_FLAG_NO_BLINDING            0x0080
    76 # if OPENSSL_API_COMPAT < 0x10100000L
     80#  define RSA_FLAG_NO_BLINDING            0x0080
     81# endif /* OPENSSL_NO_DEPRECATED_3_0 */
    7782/*
    7883 * Does nothing. Previously this switched off constant time behaviour.
    7984 */
     85# ifndef OPENSSL_NO_DEPRECATED_1_1_0
    8086#  define RSA_FLAG_NO_CONSTTIME           0x0000
    8187# endif
    82 # if OPENSSL_API_COMPAT < 0x00908000L
    8388/* deprecated name for the flag*/
    8489/*
     
    9095 * be used for all exponents.
    9196 */
     97# ifndef OPENSSL_NO_DEPRECATED_0_9_8
    9298#  define RSA_FLAG_NO_EXP_CONSTTIME RSA_FLAG_NO_CONSTTIME
    9399# endif
    94100
    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
     119int EVP_PKEY_CTX_set_rsa_padding(EVP_PKEY_CTX *ctx, int pad_mode);
     120int EVP_PKEY_CTX_get_rsa_padding(EVP_PKEY_CTX *ctx, int *pad_mode);
     121
     122int EVP_PKEY_CTX_set_rsa_pss_saltlen(EVP_PKEY_CTX *ctx, int saltlen);
     123int EVP_PKEY_CTX_get_rsa_pss_saltlen(EVP_PKEY_CTX *ctx, int *saltlen);
     124
     125int EVP_PKEY_CTX_set_rsa_keygen_bits(EVP_PKEY_CTX *ctx, int bits);
     126int EVP_PKEY_CTX_set1_rsa_keygen_pubexp(EVP_PKEY_CTX *ctx, BIGNUM *pubexp);
     127int EVP_PKEY_CTX_set_rsa_keygen_primes(EVP_PKEY_CTX *ctx, int primes);
     128int EVP_PKEY_CTX_set_rsa_pss_keygen_saltlen(EVP_PKEY_CTX *ctx, int saltlen);
     129# ifndef OPENSSL_NO_DEPRECATED_3_0
     130OSSL_DEPRECATEDIN_3_0
     131int EVP_PKEY_CTX_set_rsa_keygen_pubexp(EVP_PKEY_CTX *ctx, BIGNUM *pubexp);
     132# endif
     133
    104134/* Salt length matches digest */
    105135# define RSA_PSS_SALTLEN_DIGEST -1
     
    111141# define RSA_PSS_SALTLEN_MAX_SIGN    -2
    112142
    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))
     143int EVP_PKEY_CTX_set_rsa_mgf1_md(EVP_PKEY_CTX *ctx, const EVP_MD *md);
     144int EVP_PKEY_CTX_set_rsa_mgf1_md_name(EVP_PKEY_CTX *ctx, const char *mdname,
     145                                      const char *mdprops);
     146int EVP_PKEY_CTX_get_rsa_mgf1_md(EVP_PKEY_CTX *ctx, const EVP_MD **md);
     147int EVP_PKEY_CTX_get_rsa_mgf1_md_name(EVP_PKEY_CTX *ctx, char *name,
     148                                      size_t namelen);
     149int EVP_PKEY_CTX_set_rsa_pss_keygen_mgf1_md(EVP_PKEY_CTX *ctx, const EVP_MD *md);
     150int EVP_PKEY_CTX_set_rsa_pss_keygen_mgf1_md_name(EVP_PKEY_CTX *ctx,
     151                                                 const char *mdname);
     152
     153int EVP_PKEY_CTX_set_rsa_pss_keygen_md(EVP_PKEY_CTX *ctx, const EVP_MD *md);
     154int EVP_PKEY_CTX_set_rsa_pss_keygen_md_name(EVP_PKEY_CTX *ctx,
     155                                            const char *mdname,
     156                                            const char *mdprops);
     157
     158int EVP_PKEY_CTX_set_rsa_oaep_md(EVP_PKEY_CTX *ctx, const EVP_MD *md);
     159int EVP_PKEY_CTX_set_rsa_oaep_md_name(EVP_PKEY_CTX *ctx, const char *mdname,
     160                                      const char *mdprops);
     161int EVP_PKEY_CTX_get_rsa_oaep_md(EVP_PKEY_CTX *ctx, const EVP_MD **md);
     162int EVP_PKEY_CTX_get_rsa_oaep_md_name(EVP_PKEY_CTX *ctx, char *name,
     163                                      size_t namelen);
     164int EVP_PKEY_CTX_set0_rsa_oaep_label(EVP_PKEY_CTX *ctx, void *label, int llen);
     165int EVP_PKEY_CTX_get0_rsa_oaep_label(EVP_PKEY_CTX *ctx, unsigned char **label);
    165166
    166167# define EVP_PKEY_CTRL_RSA_PADDING       (EVP_PKEY_ALG_CTRL + 1)
     
    183184# define EVP_PKEY_CTRL_RSA_KEYGEN_PRIMES  (EVP_PKEY_ALG_CTRL + 13)
    184185
    185 # define RSA_PKCS1_PADDING       1
    186 # define RSA_SSLV23_PADDING      2
    187 # define RSA_NO_PADDING          3
    188 # define RSA_PKCS1_OAEP_PADDING  4
    189 # 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
    190191/* 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
    194196
    195197# define RSA_set_app_data(s,arg)         RSA_set_ex_data(s,0,arg)
    196198# define RSA_get_app_data(s)             RSA_get_ex_data(s,0)
    197199
    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
     201OSSL_DEPRECATEDIN_3_0 RSA *RSA_new(void);
     202OSSL_DEPRECATEDIN_3_0 RSA *RSA_new_method(ENGINE *engine);
     203OSSL_DEPRECATEDIN_3_0 int RSA_bits(const RSA *rsa);
     204OSSL_DEPRECATEDIN_3_0 int RSA_size(const RSA *rsa);
     205OSSL_DEPRECATEDIN_3_0 int RSA_security_bits(const RSA *rsa);
     206
     207OSSL_DEPRECATEDIN_3_0 int RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d);
     208OSSL_DEPRECATEDIN_3_0 int RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q);
     209OSSL_DEPRECATEDIN_3_0 int RSA_set0_crt_params(RSA *r,
     210                                              BIGNUM *dmp1, BIGNUM *dmq1,
     211                                              BIGNUM *iqmp);
     212OSSL_DEPRECATEDIN_3_0 int RSA_set0_multi_prime_params(RSA *r,
     213                                                      BIGNUM *primes[],
     214                                                      BIGNUM *exps[],
     215                                                      BIGNUM *coeffs[],
     216                                                      int pnum);
     217OSSL_DEPRECATEDIN_3_0 void RSA_get0_key(const RSA *r,
     218                                        const BIGNUM **n, const BIGNUM **e,
     219                                        const BIGNUM **d);
     220OSSL_DEPRECATEDIN_3_0 void RSA_get0_factors(const RSA *r,
     221                                            const BIGNUM **p, const BIGNUM **q);
     222OSSL_DEPRECATEDIN_3_0 int RSA_get_multi_prime_extra_count(const RSA *r);
     223OSSL_DEPRECATEDIN_3_0 int RSA_get0_multi_prime_factors(const RSA *r,
     224                                                       const BIGNUM *primes[]);
     225OSSL_DEPRECATEDIN_3_0 void RSA_get0_crt_params(const RSA *r,
     226                                               const BIGNUM **dmp1,
     227                                               const BIGNUM **dmq1,
     228                                               const BIGNUM **iqmp);
     229OSSL_DEPRECATEDIN_3_0
    217230int RSA_get0_multi_prime_crt_params(const RSA *r, const BIGNUM *exps[],
    218231                                    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);
     232OSSL_DEPRECATEDIN_3_0 const BIGNUM *RSA_get0_n(const RSA *d);
     233OSSL_DEPRECATEDIN_3_0 const BIGNUM *RSA_get0_e(const RSA *d);
     234OSSL_DEPRECATEDIN_3_0 const BIGNUM *RSA_get0_d(const RSA *d);
     235OSSL_DEPRECATEDIN_3_0 const BIGNUM *RSA_get0_p(const RSA *d);
     236OSSL_DEPRECATEDIN_3_0 const BIGNUM *RSA_get0_q(const RSA *d);
     237OSSL_DEPRECATEDIN_3_0 const BIGNUM *RSA_get0_dmp1(const RSA *r);
     238OSSL_DEPRECATEDIN_3_0 const BIGNUM *RSA_get0_dmq1(const RSA *r);
     239OSSL_DEPRECATEDIN_3_0 const BIGNUM *RSA_get0_iqmp(const RSA *r);
     240OSSL_DEPRECATEDIN_3_0 const RSA_PSS_PARAMS *RSA_get0_pss_params(const RSA *r);
     241OSSL_DEPRECATEDIN_3_0 void RSA_clear_flags(RSA *r, int flags);
     242OSSL_DEPRECATEDIN_3_0 int RSA_test_flags(const RSA *r, int flags);
     243OSSL_DEPRECATEDIN_3_0 void RSA_set_flags(RSA *r, int flags);
     244OSSL_DEPRECATEDIN_3_0 int RSA_get_version(RSA *r);
     245OSSL_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)))
    233250
    234251/* 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
     253OSSL_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
    238257
    239258/* New version */
    240 int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e, BN_GENCB *cb);
     259# ifndef OPENSSL_NO_DEPRECATED_3_0
     260OSSL_DEPRECATEDIN_3_0 int RSA_generate_key_ex(RSA *rsa, int bits, BIGNUM *e,
     261                                              BN_GENCB *cb);
    241262/* 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);
     263OSSL_DEPRECATEDIN_3_0 int RSA_generate_multi_prime_key(RSA *rsa, int bits,
     264                                                       int primes, BIGNUM *e,
     265                                                       BN_GENCB *cb);
     266
     267OSSL_DEPRECATEDIN_3_0
     268int 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);
     274OSSL_DEPRECATEDIN_3_0 int RSA_X931_generate_key_ex(RSA *rsa, int bits,
     275                                                   const BIGNUM *e,
     276                                                   BN_GENCB *cb);
     277
     278OSSL_DEPRECATEDIN_3_0 int RSA_check_key(const RSA *);
     279OSSL_DEPRECATEDIN_3_0 int RSA_check_key_ex(const RSA *, BN_GENCB *cb);
    254280        /* 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);
     281OSSL_DEPRECATEDIN_3_0
     282int RSA_public_encrypt(int flen, const unsigned char *from, unsigned char *to,
     283                       RSA *rsa, int padding);
     284OSSL_DEPRECATEDIN_3_0
     285int RSA_private_encrypt(int flen, const unsigned char *from, unsigned char *to,
     286                        RSA *rsa, int padding);
     287OSSL_DEPRECATEDIN_3_0
     288int RSA_public_decrypt(int flen, const unsigned char *from, unsigned char *to,
     289                       RSA *rsa, int padding);
     290OSSL_DEPRECATEDIN_3_0
     291int RSA_private_decrypt(int flen, const unsigned char *from, unsigned char *to,
     292                        RSA *rsa, int padding);
     293OSSL_DEPRECATEDIN_3_0 void RSA_free(RSA *r);
    264294/* "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);
     295OSSL_DEPRECATEDIN_3_0 int RSA_up_ref(RSA *r);
     296OSSL_DEPRECATEDIN_3_0 int RSA_flags(const RSA *r);
     297
     298OSSL_DEPRECATEDIN_3_0 void RSA_set_default_method(const RSA_METHOD *meth);
     299OSSL_DEPRECATEDIN_3_0 const RSA_METHOD *RSA_get_default_method(void);
     300OSSL_DEPRECATEDIN_3_0 const RSA_METHOD *RSA_null_method(void);
     301OSSL_DEPRECATEDIN_3_0 const RSA_METHOD *RSA_get_method(const RSA *rsa);
     302OSSL_DEPRECATEDIN_3_0 int RSA_set_method(RSA *rsa, const RSA_METHOD *meth);
    274303
    275304/* these are the actual RSA functions */
    276 const RSA_METHOD *RSA_PKCS1_OpenSSL(void);
     305OSSL_DEPRECATEDIN_3_0 const RSA_METHOD *RSA_PKCS1_OpenSSL(void);
     306
     307DECLARE_ASN1_ENCODE_FUNCTIONS_name_attr(OSSL_DEPRECATEDIN_3_0,
     308                                        RSA, RSAPublicKey)
     309DECLARE_ASN1_ENCODE_FUNCTIONS_name_attr(OSSL_DEPRECATEDIN_3_0,
     310                                        RSA, RSAPrivateKey)
     311# endif  /* !OPENSSL_NO_DEPRECATED_3_0 */
    277312
    278313int 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)
    282314
    283315struct rsa_pss_params_st {
     
    291323
    292324DECLARE_ASN1_FUNCTIONS(RSA_PSS_PARAMS)
     325DECLARE_ASN1_DUP_FUNCTION(RSA_PSS_PARAMS)
    293326
    294327typedef struct rsa_oaep_params_st {
     
    302335DECLARE_ASN1_FUNCTIONS(RSA_OAEP_PARAMS)
    303336
    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
     339OSSL_DEPRECATEDIN_3_0 int RSA_print_fp(FILE *fp, const RSA *r, int offset);
     340#  endif
     341
     342OSSL_DEPRECATEDIN_3_0 int RSA_print(BIO *bp, const RSA *r, int offset);
    309343
    310344/*
     
    312346 * PKCS#1 padded RSA encryption
    313347 */
    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);
     348OSSL_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);
     351OSSL_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);
    318355
    319356/*
     
    321358 * PKCS#1 padded RSA encryption
    322359 */
     360OSSL_DEPRECATEDIN_3_0
    323361int RSA_sign_ASN1_OCTET_STRING(int type,
    324362                               const unsigned char *m, unsigned int m_length,
    325363                               unsigned char *sigret, unsigned int *siglen,
    326364                               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 
     365OSSL_DEPRECATEDIN_3_0
     366int 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
     371OSSL_DEPRECATEDIN_3_0 int RSA_blinding_on(RSA *rsa, BN_CTX *ctx);
     372OSSL_DEPRECATEDIN_3_0 void RSA_blinding_off(RSA *rsa);
     373OSSL_DEPRECATEDIN_3_0 BN_BLINDING *RSA_setup_blinding(RSA *rsa, BN_CTX *ctx);
     374
     375OSSL_DEPRECATEDIN_3_0
    335376int RSA_padding_add_PKCS1_type_1(unsigned char *to, int tlen,
    336377                                 const unsigned char *f, int fl);
     378OSSL_DEPRECATEDIN_3_0
    337379int RSA_padding_check_PKCS1_type_1(unsigned char *to, int tlen,
    338380                                   const unsigned char *f, int fl,
    339381                                   int rsa_len);
     382OSSL_DEPRECATEDIN_3_0
    340383int RSA_padding_add_PKCS1_type_2(unsigned char *to, int tlen,
    341384                                 const unsigned char *f, int fl);
     385OSSL_DEPRECATEDIN_3_0
    342386int RSA_padding_check_PKCS1_type_2(unsigned char *to, int tlen,
    343387                                   const unsigned char *f, int fl,
    344388                                   int rsa_len);
    345 int PKCS1_MGF1(unsigned char *mask, long len, const unsigned char *seed,
    346                long seedlen, const EVP_MD *dgst);
     389OSSL_DEPRECATEDIN_3_0 int PKCS1_MGF1(unsigned char *mask, long len,
     390                                     const unsigned char *seed, long seedlen,
     391                                     const EVP_MD *dgst);
     392OSSL_DEPRECATEDIN_3_0
    347393int RSA_padding_add_PKCS1_OAEP(unsigned char *to, int tlen,
    348394                               const unsigned char *f, int fl,
    349395                               const unsigned char *p, int pl);
     396OSSL_DEPRECATEDIN_3_0
    350397int RSA_padding_check_PKCS1_OAEP(unsigned char *to, int tlen,
    351398                                 const unsigned char *f, int fl, int rsa_len,
    352399                                 const unsigned char *p, int pl);
     400OSSL_DEPRECATEDIN_3_0
    353401int RSA_padding_add_PKCS1_OAEP_mgf1(unsigned char *to, int tlen,
    354402                                    const unsigned char *from, int flen,
    355403                                    const unsigned char *param, int plen,
    356404                                    const EVP_MD *md, const EVP_MD *mgf1md);
     405OSSL_DEPRECATEDIN_3_0
    357406int RSA_padding_check_PKCS1_OAEP_mgf1(unsigned char *to, int tlen,
    358407                                      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);
     411OSSL_DEPRECATEDIN_3_0 int RSA_padding_add_none(unsigned char *to, int tlen,
     412                                               const unsigned char *f, int fl);
     413OSSL_DEPRECATEDIN_3_0 int RSA_padding_check_none(unsigned char *to, int tlen,
     414                                                 const unsigned char *f, int fl,
     415                                                 int rsa_len);
     416OSSL_DEPRECATEDIN_3_0 int RSA_padding_add_X931(unsigned char *to, int tlen,
     417                                               const unsigned char *f, int fl);
     418OSSL_DEPRECATEDIN_3_0 int RSA_padding_check_X931(unsigned char *to, int tlen,
     419                                                 const unsigned char *f, int fl,
     420                                                 int rsa_len);
     421OSSL_DEPRECATEDIN_3_0 int RSA_X931_hash_id(int nid);
     422
     423OSSL_DEPRECATEDIN_3_0
    376424int RSA_verify_PKCS1_PSS(RSA *rsa, const unsigned char *mHash,
    377425                         const EVP_MD *Hash, const unsigned char *EM,
    378426                         int sLen);
     427OSSL_DEPRECATEDIN_3_0
    379428int RSA_padding_add_PKCS1_PSS(RSA *rsa, unsigned char *EM,
    380429                              const unsigned char *mHash, const EVP_MD *Hash,
    381430                              int sLen);
    382431
     432OSSL_DEPRECATEDIN_3_0
    383433int RSA_verify_PKCS1_PSS_mgf1(RSA *rsa, const unsigned char *mHash,
    384434                              const EVP_MD *Hash, const EVP_MD *mgf1Hash,
    385435                              const unsigned char *EM, int sLen);
    386436
     437OSSL_DEPRECATEDIN_3_0
    387438int RSA_padding_add_PKCS1_PSS_mgf1(RSA *rsa, unsigned char *EM,
    388439                                   const unsigned char *mHash,
     
    390441                                   int sLen);
    391442
    392 #define RSA_get_ex_new_index(l, p, newf, dupf, freef) \
     443# define RSA_get_ex_new_index(l, p, newf, dupf, freef) \
    393444    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);
     445OSSL_DEPRECATEDIN_3_0 int RSA_set_ex_data(RSA *r, int idx, void *arg);
     446OSSL_DEPRECATEDIN_3_0 void *RSA_get_ex_data(const RSA *r, int idx);
     447
     448DECLARE_ASN1_DUP_FUNCTION_name_attr(OSSL_DEPRECATEDIN_3_0, RSA, RSAPublicKey)
     449DECLARE_ASN1_DUP_FUNCTION_name_attr(OSSL_DEPRECATEDIN_3_0, RSA, RSAPrivateKey)
    399450
    400451/*
     
    405456 */
    406457
    407 # define RSA_FLAG_FIPS_METHOD                    0x0400
     458#  define RSA_FLAG_FIPS_METHOD                    0x0400
    408459
    409460/*
     
    413464 */
    414465
    415 # define RSA_FLAG_NON_FIPS_ALLOW                 0x0400
     466#  define RSA_FLAG_NON_FIPS_ALLOW                 0x0400
    416467/*
    417468 * Application has decided PRNG is good enough to generate a key: don't
    418469 * check.
    419470 */
    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
     473OSSL_DEPRECATEDIN_3_0 RSA_METHOD *RSA_meth_new(const char *name, int flags);
     474OSSL_DEPRECATEDIN_3_0 void RSA_meth_free(RSA_METHOD *meth);
     475OSSL_DEPRECATEDIN_3_0 RSA_METHOD *RSA_meth_dup(const RSA_METHOD *meth);
     476OSSL_DEPRECATEDIN_3_0 const char *RSA_meth_get0_name(const RSA_METHOD *meth);
     477OSSL_DEPRECATEDIN_3_0 int RSA_meth_set1_name(RSA_METHOD *meth,
     478                                             const char *name);
     479OSSL_DEPRECATEDIN_3_0 int RSA_meth_get_flags(const RSA_METHOD *meth);
     480OSSL_DEPRECATEDIN_3_0 int RSA_meth_set_flags(RSA_METHOD *meth, int flags);
     481OSSL_DEPRECATEDIN_3_0 void *RSA_meth_get0_app_data(const RSA_METHOD *meth);
     482OSSL_DEPRECATEDIN_3_0 int RSA_meth_set0_app_data(RSA_METHOD *meth,
     483                                                 void *app_data);
     484OSSL_DEPRECATEDIN_3_0
     485int (*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);
     489OSSL_DEPRECATEDIN_3_0
    434490int RSA_meth_set_pub_enc(RSA_METHOD *rsa,
    435491                         int (*pub_enc) (int flen, const unsigned char *from,
    436492                                         unsigned char *to, RSA *rsa,
    437493                                         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);
     494OSSL_DEPRECATEDIN_3_0
     495int (*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);
     499OSSL_DEPRECATEDIN_3_0
    441500int RSA_meth_set_pub_dec(RSA_METHOD *rsa,
    442501                         int (*pub_dec) (int flen, const unsigned char *from,
    443502                                         unsigned char *to, RSA *rsa,
    444503                                         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);
     504OSSL_DEPRECATEDIN_3_0
     505int (*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);
     509OSSL_DEPRECATEDIN_3_0
    448510int RSA_meth_set_priv_enc(RSA_METHOD *rsa,
    449511                          int (*priv_enc) (int flen, const unsigned char *from,
    450512                                           unsigned char *to, RSA *rsa,
    451513                                           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);
     514OSSL_DEPRECATEDIN_3_0
     515int (*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);
     519OSSL_DEPRECATEDIN_3_0
    455520int RSA_meth_set_priv_dec(RSA_METHOD *rsa,
    456521                          int (*priv_dec) (int flen, const unsigned char *from,
    457522                                           unsigned char *to, RSA *rsa,
    458523                                           int padding));
    459 int (*RSA_meth_get_mod_exp(const RSA_METHOD *meth))
    460     (BIGNUM *r0, const BIGNUM *i, RSA *rsa, BN_CTX *ctx);
     524OSSL_DEPRECATEDIN_3_0
     525int (*RSA_meth_get_mod_exp(const RSA_METHOD *meth)) (BIGNUM *r0,
     526                                                     const BIGNUM *i,
     527                                                     RSA *rsa, BN_CTX *ctx);
     528OSSL_DEPRECATEDIN_3_0
    461529int RSA_meth_set_mod_exp(RSA_METHOD *rsa,
    462530                         int (*mod_exp) (BIGNUM *r0, const BIGNUM *i, RSA *rsa,
    463531                                         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);
     532OSSL_DEPRECATEDIN_3_0
     533int (*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);
     539OSSL_DEPRECATEDIN_3_0
    467540int RSA_meth_set_bn_mod_exp(RSA_METHOD *rsa,
    468541                            int (*bn_mod_exp) (BIGNUM *r,
     
    472545                                               BN_CTX *ctx,
    473546                                               BN_MONT_CTX *m_ctx));
     547OSSL_DEPRECATEDIN_3_0
    474548int (*RSA_meth_get_init(const RSA_METHOD *meth)) (RSA *rsa);
     549OSSL_DEPRECATEDIN_3_0
    475550int RSA_meth_set_init(RSA_METHOD *rsa, int (*init) (RSA *rsa));
     551OSSL_DEPRECATEDIN_3_0
    476552int (*RSA_meth_get_finish(const RSA_METHOD *meth)) (RSA *rsa);
     553OSSL_DEPRECATEDIN_3_0
    477554int 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);
     555OSSL_DEPRECATEDIN_3_0
     556int (*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);
     562OSSL_DEPRECATEDIN_3_0
    483563int RSA_meth_set_sign(RSA_METHOD *rsa,
    484564                      int (*sign) (int type, const unsigned char *m,
     
    486566                                   unsigned char *sigret, unsigned int *siglen,
    487567                                   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);
     568OSSL_DEPRECATEDIN_3_0
     569int (*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);
     575OSSL_DEPRECATEDIN_3_0
    492576int RSA_meth_set_verify(RSA_METHOD *rsa,
    493577                        int (*verify) (int dtype, const unsigned char *m,
     
    495579                                       const unsigned char *sigbuf,
    496580                                       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);
     581OSSL_DEPRECATEDIN_3_0
     582int (*RSA_meth_get_keygen(const RSA_METHOD *meth)) (RSA *rsa, int bits,
     583                                                    BIGNUM *e, BN_GENCB *cb);
     584OSSL_DEPRECATEDIN_3_0
    499585int RSA_meth_set_keygen(RSA_METHOD *rsa,
    500586                        int (*keygen) (RSA *rsa, int bits, BIGNUM *e,
    501587                                       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);
     588OSSL_DEPRECATEDIN_3_0
     589int (*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);
     594OSSL_DEPRECATEDIN_3_0
    504595int RSA_meth_set_multi_prime_keygen(RSA_METHOD *meth,
    505596                                    int (*keygen) (RSA *rsa, int bits,
    506597                                                   int primes, BIGNUM *e,
    507598                                                   BN_GENCB *cb));
    508 
    509 #  ifdef  __cplusplus
     599#endif  /* !OPENSSL_NO_DEPRECATED_3_0 */
     600
     601# ifdef  __cplusplus
    510602}
    511 #  endif
    512603# endif
    513604#endif
  • trunk/src/libs/openssl-3.0.1/include/openssl/rsaerr.h

    r91772 r94082  
    11/*
    22 * Generated by util/mkerr.pl DO NOT EDIT
    3  * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
     3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    44 *
    5  * Licensed under the OpenSSL license (the "License").  You may not use
     5 * Licensed under the Apache License 2.0 (the "License").  You may not use
    66 * this file except in compliance with the License.  You can obtain a copy
    77 * in the file LICENSE in the source distribution or at
     
    99 */
    1010
    11 #ifndef HEADER_RSAERR_H
    12 # define HEADER_RSAERR_H
     11#ifndef OPENSSL_RSAERR_H
     12# define OPENSSL_RSAERR_H
     13# pragma once
    1314
    14 # ifndef HEADER_SYMHACKS_H
    15 #  include <openssl/symhacks.h>
    16 # endif
     15# include <openssl/opensslconf.h>
     16# include <openssl/symhacks.h>
     17# include <openssl/cryptoerr_legacy.h>
    1718
    18 # ifdef  __cplusplus
    19 extern "C"
    20 # endif
    21 int ERR_load_RSA_strings(void);
    2219
    23 /*
    24  * RSA function codes.
    25  */
    26 # define RSA_F_CHECK_PADDING_MD                           140
    27 # define RSA_F_ENCODE_PKCS1                               146
    28 # define RSA_F_INT_RSA_VERIFY                             145
    29 # define RSA_F_OLD_RSA_PRIV_DECODE                        147
    30 # define RSA_F_PKEY_PSS_INIT                              165
    31 # define RSA_F_PKEY_RSA_CTRL                              143
    32 # define RSA_F_PKEY_RSA_CTRL_STR                          144
    33 # define RSA_F_PKEY_RSA_SIGN                              142
    34 # define RSA_F_PKEY_RSA_VERIFY                            149
    35 # define RSA_F_PKEY_RSA_VERIFYRECOVER                     141
    36 # define RSA_F_RSA_ALGOR_TO_MD                            156
    37 # define RSA_F_RSA_BUILTIN_KEYGEN                         129
    38 # define RSA_F_RSA_CHECK_KEY                              123
    39 # define RSA_F_RSA_CHECK_KEY_EX                           160
    40 # define RSA_F_RSA_CMS_DECRYPT                            159
    41 # define RSA_F_RSA_CMS_VERIFY                             158
    42 # define RSA_F_RSA_ITEM_VERIFY                            148
    43 # define RSA_F_RSA_METH_DUP                               161
    44 # define RSA_F_RSA_METH_NEW                               162
    45 # define RSA_F_RSA_METH_SET1_NAME                         163
    46 # define RSA_F_RSA_MGF1_TO_MD                             157
    47 # define RSA_F_RSA_MULTIP_INFO_NEW                        166
    48 # define RSA_F_RSA_NEW_METHOD                             106
    49 # define RSA_F_RSA_NULL                                   124
    50 # define RSA_F_RSA_NULL_PRIVATE_DECRYPT                   132
    51 # define RSA_F_RSA_NULL_PRIVATE_ENCRYPT                   133
    52 # define RSA_F_RSA_NULL_PUBLIC_DECRYPT                    134
    53 # define RSA_F_RSA_NULL_PUBLIC_ENCRYPT                    135
    54 # define RSA_F_RSA_OSSL_PRIVATE_DECRYPT                   101
    55 # define RSA_F_RSA_OSSL_PRIVATE_ENCRYPT                   102
    56 # define RSA_F_RSA_OSSL_PUBLIC_DECRYPT                    103
    57 # define RSA_F_RSA_OSSL_PUBLIC_ENCRYPT                    104
    58 # define RSA_F_RSA_PADDING_ADD_NONE                       107
    59 # define RSA_F_RSA_PADDING_ADD_PKCS1_OAEP                 121
    60 # define RSA_F_RSA_PADDING_ADD_PKCS1_OAEP_MGF1            154
    61 # define RSA_F_RSA_PADDING_ADD_PKCS1_PSS                  125
    62 # define RSA_F_RSA_PADDING_ADD_PKCS1_PSS_MGF1             152
    63 # define RSA_F_RSA_PADDING_ADD_PKCS1_TYPE_1               108
    64 # define RSA_F_RSA_PADDING_ADD_PKCS1_TYPE_2               109
    65 # define RSA_F_RSA_PADDING_ADD_SSLV23                     110
    66 # define RSA_F_RSA_PADDING_ADD_X931                       127
    67 # define RSA_F_RSA_PADDING_CHECK_NONE                     111
    68 # define RSA_F_RSA_PADDING_CHECK_PKCS1_OAEP               122
    69 # define RSA_F_RSA_PADDING_CHECK_PKCS1_OAEP_MGF1          153
    70 # define RSA_F_RSA_PADDING_CHECK_PKCS1_TYPE_1             112
    71 # define RSA_F_RSA_PADDING_CHECK_PKCS1_TYPE_2             113
    72 # define RSA_F_RSA_PADDING_CHECK_SSLV23                   114
    73 # define RSA_F_RSA_PADDING_CHECK_X931                     128
    74 # define RSA_F_RSA_PARAM_DECODE                           164
    75 # define RSA_F_RSA_PRINT                                  115
    76 # define RSA_F_RSA_PRINT_FP                               116
    77 # define RSA_F_RSA_PRIV_DECODE                            150
    78 # define RSA_F_RSA_PRIV_ENCODE                            138
    79 # define RSA_F_RSA_PSS_GET_PARAM                          151
    80 # define RSA_F_RSA_PSS_TO_CTX                             155
    81 # define RSA_F_RSA_PUB_DECODE                             139
    82 # define RSA_F_RSA_SETUP_BLINDING                         136
    83 # define RSA_F_RSA_SIGN                                   117
    84 # define RSA_F_RSA_SIGN_ASN1_OCTET_STRING                 118
    85 # define RSA_F_RSA_VERIFY                                 119
    86 # define RSA_F_RSA_VERIFY_ASN1_OCTET_STRING               120
    87 # define RSA_F_RSA_VERIFY_PKCS1_PSS_MGF1                  126
    88 # define RSA_F_SETUP_TBUF                                 167
    8920
    9021/*
     
    11546# define RSA_R_INVALID_DIGEST_LENGTH                      143
    11647# define RSA_R_INVALID_HEADER                             137
     48# define RSA_R_INVALID_KEYPAIR                            171
     49# define RSA_R_INVALID_KEY_LENGTH                         173
    11750# define RSA_R_INVALID_LABEL                              160
     51# define RSA_R_INVALID_LENGTH                             181
    11852# define RSA_R_INVALID_MESSAGE_LENGTH                     131
    11953# define RSA_R_INVALID_MGF1_MD                            156
     54# define RSA_R_INVALID_MODULUS                            174
    12055# define RSA_R_INVALID_MULTI_PRIME_KEY                    167
    12156# define RSA_R_INVALID_OAEP_PARAMETERS                    161
     
    12459# define RSA_R_INVALID_PSS_PARAMETERS                     149
    12560# define RSA_R_INVALID_PSS_SALTLEN                        146
     61# define RSA_R_INVALID_REQUEST                            175
    12662# define RSA_R_INVALID_SALT_LENGTH                        150
     63# define RSA_R_INVALID_STRENGTH                           176
    12764# define RSA_R_INVALID_TRAILER                            139
    12865# define RSA_R_INVALID_X931_DIGEST                        142
     
    13168# define RSA_R_KEY_SIZE_TOO_SMALL                         120
    13269# define RSA_R_LAST_OCTET_INVALID                         134
     70# define RSA_R_MGF1_DIGEST_NOT_ALLOWED                    152
    13371# define RSA_R_MISSING_PRIVATE_KEY                        179
    134 # define RSA_R_MGF1_DIGEST_NOT_ALLOWED                    152
    13572# define RSA_R_MODULUS_TOO_LARGE                          105
    13673# define RSA_R_MP_COEFFICIENT_NOT_INVERSE_OF_R            168
     
    14481# define RSA_R_OPERATION_NOT_SUPPORTED_FOR_THIS_KEYTYPE   148
    14582# define RSA_R_PADDING_CHECK_FAILED                       114
     83# define RSA_R_PAIRWISE_TEST_FAILURE                      177
    14684# define RSA_R_PKCS_DECODING_ERROR                        159
    14785# define RSA_R_PSS_SALTLEN_TOO_SMALL                      164
     86# define RSA_R_PUB_EXPONENT_OUT_OF_RANGE                  178
    14887# define RSA_R_P_NOT_PRIME                                128
    14988# define RSA_R_Q_NOT_PRIME                                129
     89# define RSA_R_RANDOMNESS_SOURCE_STRENGTH_INSUFFICIENT    180
    15090# define RSA_R_RSA_OPERATIONS_NOT_SUPPORTED               130
    15191# define RSA_R_SLEN_CHECK_FAILED                          136
  • trunk/src/libs/openssl-3.0.1/include/openssl/seed.h

    r91772 r94082  
    11/*
    2  * Copyright 2007-2016 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 2007-2020 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    3333 */
    3434
    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
    3743
    3844# include <openssl/opensslconf.h>
    3945
    4046# 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>
    4350
    44 #ifdef  __cplusplus
     51#  ifdef  __cplusplus
    4552extern "C" {
    46 #endif
     53#  endif
    4754
     55#  define SEED_BLOCK_SIZE 16
     56#  define SEED_KEY_LENGTH 16
     57
     58#  ifndef OPENSSL_NO_DEPRECATED_3_0
    4859/* 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
     67typedef 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
     76OSSL_DEPRECATEDIN_3_0
     77void SEED_set_key(const unsigned char rawkey[SEED_KEY_LENGTH],
     78                  SEED_KEY_SCHEDULE *ks);
     79OSSL_DEPRECATEDIN_3_0
     80void SEED_encrypt(const unsigned char s[SEED_BLOCK_SIZE],
     81                  unsigned char d[SEED_BLOCK_SIZE],
     82                  const SEED_KEY_SCHEDULE *ks);
     83OSSL_DEPRECATEDIN_3_0
     84void SEED_decrypt(const unsigned char s[SEED_BLOCK_SIZE],
     85                  unsigned char d[SEED_BLOCK_SIZE],
     86                  const SEED_KEY_SCHEDULE *ks);
     87OSSL_DEPRECATEDIN_3_0
     88void SEED_ecb_encrypt(const unsigned char *in,
     89                      unsigned char *out,
     90                      const SEED_KEY_SCHEDULE *ks, int enc);
     91OSSL_DEPRECATEDIN_3_0
     92void 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);
     96OSSL_DEPRECATEDIN_3_0
     97void 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);
     101OSSL_DEPRECATEDIN_3_0
     102void 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}
    52110#  endif
    53111# endif
    54112
    55 # include <sys/types.h>
    56 
    57 # define SEED_BLOCK_SIZE 16
    58 # define SEED_KEY_LENGTH 16
    59 
    60 typedef struct seed_key_st {
    61 # ifdef SEED_LONG
    62     unsigned long data[32];
    63 # else
    64     unsigned int data[32];
    65 # endif
    66 } 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  __cplusplus
    92 }
    93 # endif
    94 # endif
    95 
    96113#endif
  • trunk/src/libs/openssl-3.0.1/include/openssl/sha.h

    r91772 r94082  
    11/*
    2  * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    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
    1218
    1319# include <openssl/e_os2.h>
    1420# include <stddef.h>
    1521
    16 #ifdef  __cplusplus
     22# ifdef  __cplusplus
    1723extern "C" {
    18 #endif
     24# endif
    1925
     26# define SHA_DIGEST_LENGTH 20
     27
     28# ifndef OPENSSL_NO_DEPRECATED_3_0
    2029/*-
    2130 * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
     
    2332 * !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    2433 */
    25 # define SHA_LONG unsigned int
     34#  define SHA_LONG unsigned int
    2635
    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)
    3341
    3442typedef struct SHAstate_st {
     
    3947} SHA_CTX;
    4048
    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);
     49OSSL_DEPRECATEDIN_3_0 int SHA1_Init(SHA_CTX *c);
     50OSSL_DEPRECATEDIN_3_0 int SHA1_Update(SHA_CTX *c, const void *data, size_t len);
     51OSSL_DEPRECATEDIN_3_0 int SHA1_Final(unsigned char *md, SHA_CTX *c);
     52OSSL_DEPRECATEDIN_3_0 void SHA1_Transform(SHA_CTX *c, const unsigned char *data);
     53# endif
     54
    4455unsigned char *SHA1(const unsigned char *d, size_t n, unsigned char *md);
    45 void SHA1_Transform(SHA_CTX *c, const unsigned char *data);
    4656
    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
    4859                                        * contiguous array of 32 bit wide
    4960                                        * big-endian values. */
     
    5667} SHA256_CTX;
    5768
    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);
     69OSSL_DEPRECATEDIN_3_0 int SHA224_Init(SHA256_CTX *c);
     70OSSL_DEPRECATEDIN_3_0 int SHA224_Update(SHA256_CTX *c,
     71                                        const void *data, size_t len);
     72OSSL_DEPRECATEDIN_3_0 int SHA224_Final(unsigned char *md, SHA256_CTX *c);
     73OSSL_DEPRECATEDIN_3_0 int SHA256_Init(SHA256_CTX *c);
     74OSSL_DEPRECATEDIN_3_0 int SHA256_Update(SHA256_CTX *c,
     75                                        const void *data, size_t len);
     76OSSL_DEPRECATEDIN_3_0 int SHA256_Final(unsigned char *md, SHA256_CTX *c);
     77OSSL_DEPRECATEDIN_3_0 void SHA256_Transform(SHA256_CTX *c,
     78                                            const unsigned char *data);
     79# endif
     80
    6181unsigned 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);
    6582unsigned char *SHA256(const unsigned char *d, size_t n, unsigned char *md);
    66 void SHA256_Transform(SHA256_CTX *c, const unsigned char *data);
    6783
    6884# define SHA224_DIGEST_LENGTH    28
     
    7187# define SHA512_DIGEST_LENGTH    64
    7288
     89# ifndef OPENSSL_NO_DEPRECATED_3_0
    7390/*
    7491 * Unlike 32-bit digest algorithms, SHA-512 *relies* on SHA_LONG64
     
    8198 * wide big-endian values.
    8299 */
    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
    94108
    95109typedef struct SHA512state_st {
     
    103117} SHA512_CTX;
    104118
    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);
     119OSSL_DEPRECATEDIN_3_0 int SHA384_Init(SHA512_CTX *c);
     120OSSL_DEPRECATEDIN_3_0 int SHA384_Update(SHA512_CTX *c,
     121                                        const void *data, size_t len);
     122OSSL_DEPRECATEDIN_3_0 int SHA384_Final(unsigned char *md, SHA512_CTX *c);
     123OSSL_DEPRECATEDIN_3_0 int SHA512_Init(SHA512_CTX *c);
     124OSSL_DEPRECATEDIN_3_0 int SHA512_Update(SHA512_CTX *c,
     125                                        const void *data, size_t len);
     126OSSL_DEPRECATEDIN_3_0 int SHA512_Final(unsigned char *md, SHA512_CTX *c);
     127OSSL_DEPRECATEDIN_3_0 void SHA512_Transform(SHA512_CTX *c,
     128                                            const unsigned char *data);
     129# endif
     130
    108131unsigned 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);
    112132unsigned char *SHA512(const unsigned char *d, size_t n, unsigned char *md);
    113 void SHA512_Transform(SHA512_CTX *c, const unsigned char *data);
    114133
    115 #ifdef  __cplusplus
     134# ifdef  __cplusplus
    116135}
    117 #endif
     136# endif
    118137
    119138#endif
  • trunk/src/libs/openssl-3.0.1/include/openssl/srtp.h

    r91772 r94082  
    22 * Copyright 2011-2016 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    1414 */
    1515
    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
    1824
    1925# include <openssl/ssl.h>
  • trunk/src/libs/openssl-3.0.1/include/openssl/ssl2.h

    r91772 r94082  
    22 * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    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
    1218
    1319#ifdef  __cplusplus
  • trunk/src/libs/openssl-3.0.1/include/openssl/ssl3.h

    r91772 r94082  
    11/*
    2  * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    33 * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
    44 *
    5  * Licensed under the OpenSSL license (the "License").  You may not use
     5 * Licensed under the Apache License 2.0 (the "License").  You may not use
    66 * this file except in compliance with the License.  You can obtain a copy
    77 * in the file LICENSE in the source distribution or at
     
    99 */
    1010
    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
    1319
    1420# include <openssl/comp.h>
     
    207213# define SSL3_MD_SERVER_FINISHED_CONST   "\x53\x52\x56\x52"
    208214
    209 # define SSL3_VERSION                    0x0300
     215/* SSL3_VERSION is defined in prov_ssl.h */
    210216# define SSL3_VERSION_MAJOR              0x03
    211217# define SSL3_VERSION_MINOR              0x00
     
    215221# define SSL3_RT_HANDSHAKE               22
    216222# define SSL3_RT_APPLICATION_DATA        23
    217 # define DTLS1_RT_HEARTBEAT              24
    218223
    219224/* Pseudo content types to indicate additional parameters */
     
    266271 * contain all of the cert types defined for *either* SSLv3 and TLSv1.
    267272 */
    268 # define SSL3_CT_NUMBER                  10
     273# define SSL3_CT_NUMBER                  12
    269274
    270275# if defined(TLS_CT_NUMBER)
  • trunk/src/libs/openssl-3.0.1/include/openssl/sslerr.h

    r91772 r94082  
    33 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    44 *
    5  * Licensed under the OpenSSL license (the "License").  You may not use
     5 * Licensed under the Apache License 2.0 (the "License").  You may not use
    66 * this file except in compliance with the License.  You can obtain a copy
    77 * in the file LICENSE in the source distribution or at
     
    99 */
    1010
    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
    45420
    45521/*
     
    45925# define SSL_R_APP_DATA_IN_HANDSHAKE                      100
    46026# define SSL_R_ATTEMPT_TO_REUSE_SESSION_IN_DIFFERENT_CONTEXT 272
    461 # define SSL_R_AT_LEAST_TLS_1_0_NEEDED_IN_FIPS_MODE       143
    46227# define SSL_R_AT_LEAST_TLS_1_2_NEEDED_IN_SUITEB_MODE     158
    46328# define SSL_R_BAD_CHANGE_CIPHER_SPEC                     103
     
    50166# define SSL_R_CALLBACK_FAILED                            234
    50267# define SSL_R_CANNOT_CHANGE_CIPHER                       109
     68# define SSL_R_CANNOT_GET_GROUP_NAME                      299
    50369# define SSL_R_CA_DN_LENGTH_MISMATCH                      131
    50470# define SSL_R_CA_KEY_TOO_SMALL                           397
     
    51076# define SSL_R_CIPHERSUITE_DIGEST_HAS_CHANGED             218
    51177# define SSL_R_CIPHER_CODE_WRONG_LENGTH                   137
    512 # define SSL_R_CIPHER_OR_HASH_UNAVAILABLE                 138
    51378# define SSL_R_CLIENTHELLO_TLSEXT                         226
    51479# define SSL_R_COMPRESSED_LENGTH_TOO_LONG                 140
     
    52186# define SSL_R_COOKIE_GEN_CALLBACK_FAILURE                400
    52287# define SSL_R_COOKIE_MISMATCH                            308
     88# define SSL_R_COPY_PARAMETERS_FAILED                     296
    52389# define SSL_R_CUSTOM_EXT_HANDLER_ALREADY_INSTALLED       206
    52490# define SSL_R_DANE_ALREADY_ENABLED                       172
     
    630196# define SSL_R_NO_SHARED_SIGNATURE_ALGORITHMS             376
    631197# define SSL_R_NO_SRTP_PROFILES                           359
     198# define SSL_R_NO_SUITABLE_DIGEST_ALGORITHM               297
     199# define SSL_R_NO_SUITABLE_GROUPS                         295
    632200# define SSL_R_NO_SUITABLE_KEY_SHARE                      101
    633201# define SSL_R_NO_SUITABLE_SIGNATURE_ALGORITHM            118
     
    636204# define SSL_R_NULL_SSL_CTX                               195
    637205# define SSL_R_NULL_SSL_METHOD_PASSED                     196
    638 # define SSL_R_OCSP_CALLBACK_FAILURE                      294
     206# define SSL_R_OCSP_CALLBACK_FAILURE                      305
    639207# define SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED            197
    640208# define SSL_R_OLD_SESSION_COMPRESSION_ALGORITHM_NOT_RETURNED 344
     
    725293# define SSL_R_TLSV1_UNRECOGNIZED_NAME                    1112
    726294# define SSL_R_TLSV1_UNSUPPORTED_EXTENSION                1110
    727 # define SSL_R_TLS_HEARTBEAT_PEER_DOESNT_ACCEPT           365
    728 # define SSL_R_TLS_HEARTBEAT_PENDING                      366
    729295# define SSL_R_TLS_ILLEGAL_EXPORTER_LABEL                 367
    730296# define SSL_R_TLS_INVALID_ECPOINTFORMAT_LIST             157
     
    738304# define SSL_R_UNEXPECTED_CCS_MESSAGE                     262
    739305# define SSL_R_UNEXPECTED_END_OF_EARLY_DATA               178
     306# define SSL_R_UNEXPECTED_EOF_WHILE_READING               294
    740307# define SSL_R_UNEXPECTED_MESSAGE                         244
    741308# define SSL_R_UNEXPECTED_RECORD                          245
  • trunk/src/libs/openssl-3.0.1/include/openssl/stack.h

    r91772 r94082  
    11/*
    2  * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    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
    1218
    1319#ifdef  __cplusplus
     
    4046int OPENSSL_sk_find(OPENSSL_STACK *st, const void *data);
    4147int OPENSSL_sk_find_ex(OPENSSL_STACK *st, const void *data);
     48int OPENSSL_sk_find_all(OPENSSL_STACK *st, const void *data, int *pnum);
    4249int OPENSSL_sk_push(OPENSSL_STACK *st, const void *data);
    4350int OPENSSL_sk_unshift(OPENSSL_STACK *st, const void *data);
     
    5158int OPENSSL_sk_is_sorted(const OPENSSL_STACK *st);
    5259
    53 # if OPENSSL_API_COMPAT < 0x10100000L
     60# ifndef OPENSSL_NO_DEPRECATED_1_1_0
    5461#  define _STACK OPENSSL_STACK
    5562#  define sk_num OPENSSL_sk_num
  • trunk/src/libs/openssl-3.0.1/include/openssl/store.h

    r91772 r94082  
    11/*
    2  * Copyright 2016-2019 The OpenSSL Project Authors. All Rights Reserved.
    3  *
    4  * Licensed under the OpenSSL license (the "License").  You may not use
     2 * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    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
    1218
    1319# include <stdarg.h>
    14 # include <openssl/ossl_typ.h>
     20# include <openssl/types.h>
    1521# include <openssl/pem.h>
    1622# include <openssl/storeerr.h>
     
    4753 * through.
    4854 */
    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);
     55OSSL_STORE_CTX *
     56OSSL_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);
     59OSSL_STORE_CTX *
     60OSSL_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);
    5365
    5466/*
     
    5870 * Each command takes different arguments.
    5971 */
    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
     73OSSL_DEPRECATEDIN_3_0 int OSSL_STORE_ctrl(OSSL_STORE_CTX *ctx, int cmd,
     74                                          ... /* args */);
     75OSSL_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
    6280
    6381/*
     
    6886/* Where custom commands start */
    6987# define OSSL_STORE_C_CUSTOM_START    100
     88
     89# endif
    7090
    7191/*
     
    97117int OSSL_STORE_close(OSSL_STORE_CTX *ctx);
    98118
     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 */
     132OSSL_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);
    99138
    100139/*-
     
    110149# define OSSL_STORE_INFO_NAME           1   /* char * */
    111150# 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 * */
    115155
    116156/*
     
    121161 * and will therefore be freed when the OSSL_STORE_INFO is freed.
    122162 */
     163OSSL_STORE_INFO *OSSL_STORE_INFO_new(int type, void *data);
    123164OSSL_STORE_INFO *OSSL_STORE_INFO_new_NAME(char *name);
    124165int OSSL_STORE_INFO_set0_NAME_description(OSSL_STORE_INFO *info, char *desc);
    125166OSSL_STORE_INFO *OSSL_STORE_INFO_new_PARAMS(EVP_PKEY *params);
     167OSSL_STORE_INFO *OSSL_STORE_INFO_new_PUBKEY(EVP_PKEY *pubkey);
    126168OSSL_STORE_INFO *OSSL_STORE_INFO_new_PKEY(EVP_PKEY *pkey);
    127169OSSL_STORE_INFO *OSSL_STORE_INFO_new_CERT(X509 *x509);
     
    132174 */
    133175int OSSL_STORE_INFO_get_type(const OSSL_STORE_INFO *info);
     176void *OSSL_STORE_INFO_get0_data(int type, const OSSL_STORE_INFO *info);
    134177const char *OSSL_STORE_INFO_get0_NAME(const OSSL_STORE_INFO *info);
    135178char *OSSL_STORE_INFO_get1_NAME(const OSSL_STORE_INFO *info);
     
    138181EVP_PKEY *OSSL_STORE_INFO_get0_PARAMS(const OSSL_STORE_INFO *info);
    139182EVP_PKEY *OSSL_STORE_INFO_get1_PARAMS(const OSSL_STORE_INFO *info);
     183EVP_PKEY *OSSL_STORE_INFO_get0_PUBKEY(const OSSL_STORE_INFO *info);
     184EVP_PKEY *OSSL_STORE_INFO_get1_PUBKEY(const OSSL_STORE_INFO *info);
    140185EVP_PKEY *OSSL_STORE_INFO_get0_PKEY(const OSSL_STORE_INFO *info);
    141186EVP_PKEY *OSSL_STORE_INFO_get1_PKEY(const OSSL_STORE_INFO *info);
     
    186231/* Search term accessors */
    187232int OSSL_STORE_SEARCH_get_type(const OSSL_STORE_SEARCH *criterion);
    188 X509_NAME *OSSL_STORE_SEARCH_get0_name(OSSL_STORE_SEARCH *criterion);
     233X509_NAME *OSSL_STORE_SEARCH_get0_name(const OSSL_STORE_SEARCH *criterion);
    189234const ASN1_INTEGER *OSSL_STORE_SEARCH_get0_serial(const OSSL_STORE_SEARCH
    190235                                                  *criterion);
     
    199244 */
    200245int OSSL_STORE_expect(OSSL_STORE_CTX *ctx, int expected_type);
    201 int OSSL_STORE_find(OSSL_STORE_CTX *ctx, OSSL_STORE_SEARCH *search);
    202 
     246int 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
     254typedef struct ossl_store_loader_st OSSL_STORE_LOADER;
     255
     256OSSL_STORE_LOADER *OSSL_STORE_LOADER_fetch(OSSL_LIB_CTX *libctx,
     257                                           const char *scheme,
     258                                           const char *properties);
     259int OSSL_STORE_LOADER_up_ref(OSSL_STORE_LOADER *loader);
     260void OSSL_STORE_LOADER_free(OSSL_STORE_LOADER *loader);
     261const OSSL_PROVIDER *OSSL_STORE_LOADER_get0_provider(const OSSL_STORE_LOADER *
     262                                                loader);
     263const char *OSSL_STORE_LOADER_get0_properties(const OSSL_STORE_LOADER *loader);
     264const char *OSSL_STORE_LOADER_get0_description(const OSSL_STORE_LOADER *loader);
     265int OSSL_STORE_LOADER_is_a(const OSSL_STORE_LOADER *loader,
     266                           const char *scheme);
     267void OSSL_STORE_LOADER_do_all_provided(OSSL_LIB_CTX *libctx,
     268                                       void (*fn)(OSSL_STORE_LOADER *loader,
     269                                                  void *arg),
     270                                       void *arg);
     271int OSSL_STORE_LOADER_names_do_all(const OSSL_STORE_LOADER *loader,
     272                                   void (*fn)(const char *name, void *data),
     273                                   void *data);
    203274
    204275/*-
     
    210281 */
    211282
    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
    216285/* struct ossl_store_loader_ctx_st is defined differently by each loader */
    217286typedef 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);
     287typedef 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);
     290typedef 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
     295typedef 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);
     299typedef int (*OSSL_STORE_ctrl_fn)
     300    (OSSL_STORE_LOADER_CTX *ctx, int cmd, va_list args);
     301typedef int (*OSSL_STORE_expect_fn)
     302    (OSSL_STORE_LOADER_CTX *ctx, int expected);
     303typedef int (*OSSL_STORE_find_fn)
     304    (OSSL_STORE_LOADER_CTX *ctx, const OSSL_STORE_SEARCH *criteria);
     305typedef OSSL_STORE_INFO *(*OSSL_STORE_load_fn)
     306    (OSSL_STORE_LOADER_CTX *ctx, const UI_METHOD *ui_method, void *ui_data);
     307typedef int (*OSSL_STORE_eof_fn)(OSSL_STORE_LOADER_CTX *ctx);
     308typedef int (*OSSL_STORE_error_fn)(OSSL_STORE_LOADER_CTX *ctx);
     309typedef int (*OSSL_STORE_close_fn)(OSSL_STORE_LOADER_CTX *ctx);
     310
     311# endif
     312# ifndef OPENSSL_NO_DEPRECATED_3_0
     313OSSL_DEPRECATEDIN_3_0
     314OSSL_STORE_LOADER *OSSL_STORE_LOADER_new(ENGINE *e, const char *scheme);
     315OSSL_DEPRECATEDIN_3_0
    223316int OSSL_STORE_LOADER_set_open(OSSL_STORE_LOADER *loader,
    224317                               OSSL_STORE_open_fn open_function);
    225 typedef int (*OSSL_STORE_ctrl_fn)(OSSL_STORE_LOADER_CTX *ctx, int cmd,
    226                                   va_list args);
     318OSSL_DEPRECATEDIN_3_0
     319int OSSL_STORE_LOADER_set_open_ex(OSSL_STORE_LOADER *loader,
     320                                  OSSL_STORE_open_ex_fn open_ex_function);
     321OSSL_DEPRECATEDIN_3_0
     322int OSSL_STORE_LOADER_set_attach(OSSL_STORE_LOADER *loader,
     323                                 OSSL_STORE_attach_fn attach_function);
     324OSSL_DEPRECATEDIN_3_0
    227325int OSSL_STORE_LOADER_set_ctrl(OSSL_STORE_LOADER *loader,
    228326                               OSSL_STORE_ctrl_fn ctrl_function);
    229 typedef int (*OSSL_STORE_expect_fn)(OSSL_STORE_LOADER_CTX *ctx, int expected);
     327OSSL_DEPRECATEDIN_3_0
    230328int OSSL_STORE_LOADER_set_expect(OSSL_STORE_LOADER *loader,
    231329                                 OSSL_STORE_expect_fn expect_function);
    232 typedef int (*OSSL_STORE_find_fn)(OSSL_STORE_LOADER_CTX *ctx,
    233                                   OSSL_STORE_SEARCH *criteria);
     330OSSL_DEPRECATEDIN_3_0
    234331int OSSL_STORE_LOADER_set_find(OSSL_STORE_LOADER *loader,
    235332                               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);
     333OSSL_DEPRECATEDIN_3_0
    239334int OSSL_STORE_LOADER_set_load(OSSL_STORE_LOADER *loader,
    240335                               OSSL_STORE_load_fn load_function);
    241 typedef int (*OSSL_STORE_eof_fn)(OSSL_STORE_LOADER_CTX *ctx);
     336OSSL_DEPRECATEDIN_3_0
    242337int OSSL_STORE_LOADER_set_eof(OSSL_STORE_LOADER *loader,
    243338                              OSSL_STORE_eof_fn eof_function);
    244 typedef int (*OSSL_STORE_error_fn)(OSSL_STORE_LOADER_CTX *ctx);
     339OSSL_DEPRECATEDIN_3_0
    245340int OSSL_STORE_LOADER_set_error(OSSL_STORE_LOADER *loader,
    246341                                OSSL_STORE_error_fn error_function);
    247 typedef int (*OSSL_STORE_close_fn)(OSSL_STORE_LOADER_CTX *ctx);
     342OSSL_DEPRECATEDIN_3_0
    248343int OSSL_STORE_LOADER_set_close(OSSL_STORE_LOADER *loader,
    249344                                OSSL_STORE_close_fn close_function);
    250 void OSSL_STORE_LOADER_free(OSSL_STORE_LOADER *loader);
    251 
     345OSSL_DEPRECATEDIN_3_0
     346const ENGINE *OSSL_STORE_LOADER_get0_engine(const OSSL_STORE_LOADER *loader);
     347OSSL_DEPRECATEDIN_3_0
     348const char * OSSL_STORE_LOADER_get0_scheme(const OSSL_STORE_LOADER *loader);
     349OSSL_DEPRECATEDIN_3_0
    252350int OSSL_STORE_register_loader(OSSL_STORE_LOADER *loader);
     351OSSL_DEPRECATEDIN_3_0
    253352OSSL_STORE_LOADER *OSSL_STORE_unregister_loader(const char *scheme);
     353# endif
    254354
    255355/*-
     
    257357 *  -------------------------------
    258358 */
    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
     360OSSL_DEPRECATEDIN_3_0
     361int OSSL_STORE_do_all_loaders(void (*do_function)(const OSSL_STORE_LOADER *loader,
     362                                                  void *do_arg),
    261363                              void *do_arg);
     364# endif
    262365
    263366# ifdef  __cplusplus
  • trunk/src/libs/openssl-3.0.1/include/openssl/storeerr.h

    r91772 r94082  
    11/*
    22 * Generated by util/mkerr.pl DO NOT EDIT
    3  * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
     3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    44 *
    5  * Licensed under the OpenSSL license (the "License").  You may not use
     5 * Licensed under the Apache License 2.0 (the "License").  You may not use
    66 * this file except in compliance with the License.  You can obtain a copy
    77 * in the file LICENSE in the source distribution or at
     
    99 */
    1010
    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
    1314
    14 # ifndef HEADER_SYMHACKS_H
    15 #  include <openssl/symhacks.h>
    16 # endif
     15# include <openssl/opensslconf.h>
     16# include <openssl/symhacks.h>
     17# include <openssl/cryptoerr_legacy.h>
    1718
    18 # ifdef  __cplusplus
    19 extern "C"
    20 # endif
    21 int ERR_load_OSSL_STORE_strings(void);
    2219
    23 /*
    24  * OSSL_STORE function codes.
    25  */
    26 # define OSSL_STORE_F_FILE_CTRL                           129
    27 # define OSSL_STORE_F_FILE_FIND                           138
    28 # define OSSL_STORE_F_FILE_GET_PASS                       118
    29 # define OSSL_STORE_F_FILE_LOAD                           119
    30 # define OSSL_STORE_F_FILE_LOAD_TRY_DECODE                124
    31 # define OSSL_STORE_F_FILE_NAME_TO_URI                    126
    32 # define OSSL_STORE_F_FILE_OPEN                           120
    33 # define OSSL_STORE_F_OSSL_STORE_ATTACH_PEM_BIO           127
    34 # define OSSL_STORE_F_OSSL_STORE_EXPECT                   130
    35 # define OSSL_STORE_F_OSSL_STORE_FILE_ATTACH_PEM_BIO_INT  128
    36 # define OSSL_STORE_F_OSSL_STORE_FIND                     131
    37 # define OSSL_STORE_F_OSSL_STORE_GET0_LOADER_INT          100
    38 # define OSSL_STORE_F_OSSL_STORE_INFO_GET1_CERT           101
    39 # define OSSL_STORE_F_OSSL_STORE_INFO_GET1_CRL            102
    40 # define OSSL_STORE_F_OSSL_STORE_INFO_GET1_NAME           103
    41 # define OSSL_STORE_F_OSSL_STORE_INFO_GET1_NAME_DESCRIPTION 135
    42 # define OSSL_STORE_F_OSSL_STORE_INFO_GET1_PARAMS         104
    43 # define OSSL_STORE_F_OSSL_STORE_INFO_GET1_PKEY           105
    44 # define OSSL_STORE_F_OSSL_STORE_INFO_NEW_CERT            106
    45 # define OSSL_STORE_F_OSSL_STORE_INFO_NEW_CRL             107
    46 # define OSSL_STORE_F_OSSL_STORE_INFO_NEW_EMBEDDED        123
    47 # define OSSL_STORE_F_OSSL_STORE_INFO_NEW_NAME            109
    48 # define OSSL_STORE_F_OSSL_STORE_INFO_NEW_PARAMS          110
    49 # define OSSL_STORE_F_OSSL_STORE_INFO_NEW_PKEY            111
    50 # define OSSL_STORE_F_OSSL_STORE_INFO_SET0_NAME_DESCRIPTION 134
    51 # define OSSL_STORE_F_OSSL_STORE_INIT_ONCE                112
    52 # define OSSL_STORE_F_OSSL_STORE_LOADER_NEW               113
    53 # define OSSL_STORE_F_OSSL_STORE_OPEN                     114
    54 # define OSSL_STORE_F_OSSL_STORE_OPEN_INT                 115
    55 # define OSSL_STORE_F_OSSL_STORE_REGISTER_LOADER_INT      117
    56 # define OSSL_STORE_F_OSSL_STORE_SEARCH_BY_ALIAS          132
    57 # define OSSL_STORE_F_OSSL_STORE_SEARCH_BY_ISSUER_SERIAL  133
    58 # define OSSL_STORE_F_OSSL_STORE_SEARCH_BY_KEY_FINGERPRINT 136
    59 # define OSSL_STORE_F_OSSL_STORE_SEARCH_BY_NAME           137
    60 # define OSSL_STORE_F_OSSL_STORE_UNREGISTER_LOADER_INT    116
    61 # define OSSL_STORE_F_TRY_DECODE_PARAMS                   121
    62 # define OSSL_STORE_F_TRY_DECODE_PKCS12                   122
    63 # define OSSL_STORE_F_TRY_DECODE_PKCS8ENCRYPTED           125
    6420
    6521/*
     
    7632# define OSSL_STORE_R_NOT_A_CERTIFICATE                   100
    7733# define OSSL_STORE_R_NOT_A_CRL                           101
    78 # define OSSL_STORE_R_NOT_A_KEY                           102
    7934# 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
    8037# define OSSL_STORE_R_NOT_PARAMETERS                      104
     38# define OSSL_STORE_R_NO_LOADERS_FOUND                    123
    8139# define OSSL_STORE_R_PASSPHRASE_CALLBACK_ERROR           114
    8240# define OSSL_STORE_R_PATH_MUST_BE_ABSOLUTE               108
  • trunk/src/libs/openssl-3.0.1/include/openssl/symhacks.h

    r91772 r94082  
    11/*
    2  * Copyright 1999-2018 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 1999-2021 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    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
    1218
    1319# include <openssl/e_os2.h>
     
    2935#  define i2d_ECPKPARAMETERS                      i2d_UC_ECPKPARAMETERS
    3036
    31 /* This one clashes with CMS_data_create */
    32 #  undef cms_Data_create
    33 #  define cms_Data_create                         priv_cms_Data_create
    34 
    3537# endif
    3638
  • trunk/src/libs/openssl-3.0.1/include/openssl/tls1.h

    r91772 r94082  
    11/*
    2  * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    33 * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved
    44 * Copyright 2005 Nokia. All rights reserved.
    55 *
    6  * Licensed under the OpenSSL license (the "License").  You may not use
     6 * Licensed under the Apache License 2.0 (the "License").  You may not use
    77 * this file except in compliance with the License.  You can obtain a copy
    88 * in the file LICENSE in the source distribution or at
     
    1010 */
    1111
    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
    1420
    1521# include <openssl/buffer.h>
    1622# include <openssl/x509.h>
     23# include <openssl/prov_ssl.h>
    1724
    1825#ifdef  __cplusplus
     
    2532# endif
    2633
    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
    3238
    3339/* Special value for method supporting multiple versions */
     
    108114# define TLSEXT_TYPE_use_srtp    14
    109115
    110 /* ExtensionType value from RFC5620 */
    111 # define TLSEXT_TYPE_heartbeat   15
    112 
    113116/* ExtensionType value from RFC7301 */
    114117# define TLSEXT_TYPE_application_layer_protocol_negotiation 16
     
    323326        SSL_CTX_ctrl(ssl,SSL_CTRL_GET_TLSEXT_STATUS_REQ_TYPE,0,NULL)
    324327
    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) \
    326330        SSL_CTX_callback_ctrl(ssl,SSL_CTRL_SET_TLSEXT_TICKET_KEY_CB,\
    327331                (void (*)(void))cb)
    328 
    329 # ifndef OPENSSL_NO_HEARTBEATS
    330 #  define SSL_DTLSEXT_HB_ENABLED                   0x01
    331 #  define SSL_DTLSEXT_HB_DONT_SEND_REQUESTS        0x02
    332 #  define SSL_DTLSEXT_HB_DONT_RECV_REQUESTS        0x04
    333 #  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 < 0x10100000L
    339 #   define SSL_CTRL_TLS_EXT_SEND_HEARTBEAT \
    340         SSL_CTRL_DTLS_EXT_SEND_HEARTBEAT
    341 #   define SSL_CTRL_GET_TLS_EXT_HEARTBEAT_PENDING \
    342         SSL_CTRL_GET_DTLS_EXT_HEARTBEAT_PENDING
    343 #   define SSL_CTRL_SET_TLS_EXT_HEARTBEAT_NO_REQUESTS \
    344         SSL_CTRL_SET_DTLS_EXT_HEARTBEAT_NO_REQUESTS
    345 #   define SSL_TLSEXT_HB_ENABLED \
    346         SSL_DTLSEXT_HB_ENABLED
    347 #   define SSL_TLSEXT_HB_DONT_SEND_REQUESTS \
    348         SSL_DTLSEXT_HB_DONT_SEND_REQUESTS
    349 #   define SSL_TLSEXT_HB_DONT_RECV_REQUESTS \
    350         SSL_DTLSEXT_HB_DONT_RECV_REQUESTS
    351 #   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 #  endif
    356332# endif
     333int 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));
    357336
    358337/* PSK ciphersuites from 4279 */
     
    11361115# define TLS_CT_ECDSA_FIXED_ECDH         66
    11371116# 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
    11401126
    11411127/*
     
    11431129 * comment there)
    11441130 */
    1145 # define TLS_CT_NUMBER                   10
     1131# define TLS_CT_NUMBER                   12
    11461132
    11471133# if defined(SSL3_CT_NUMBER)
  • trunk/src/libs/openssl-3.0.1/include/openssl/ts.h

    r91772 r94082  
    11/*
    2  * Copyright 2006-2018 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 2006-2021 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    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
    1218
    1319# include <openssl/opensslconf.h>
     
    2430# include <openssl/dh.h>
    2531# include <openssl/tserr.h>
     32# include <openssl/ess.h>
    2633# ifdef  __cplusplus
    2734extern "C" {
     
    5663
    5764typedef 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)
    6865
    6966typedef struct TS_resp_st TS_RESP;
    7067
    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);
     68DECLARE_ASN1_ALLOC_FUNCTIONS(TS_REQ)
     69DECLARE_ASN1_ENCODE_FUNCTIONS_only(TS_REQ, TS_REQ)
     70DECLARE_ASN1_DUP_FUNCTION(TS_REQ)
    7771
    7872#ifndef OPENSSL_NO_STDIO
    7973TS_REQ *d2i_TS_REQ_fp(FILE *fp, TS_REQ **a);
    80 int i2d_TS_REQ_fp(FILE *fp, TS_REQ *a);
     74int i2d_TS_REQ_fp(FILE *fp, const TS_REQ *a);
    8175#endif
    8276TS_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);
     77int i2d_TS_REQ_bio(BIO *fp, const TS_REQ *a);
     78
     79DECLARE_ASN1_ALLOC_FUNCTIONS(TS_MSG_IMPRINT)
     80DECLARE_ASN1_ENCODE_FUNCTIONS_only(TS_MSG_IMPRINT, TS_MSG_IMPRINT)
     81DECLARE_ASN1_DUP_FUNCTION(TS_MSG_IMPRINT)
    9282
    9383#ifndef OPENSSL_NO_STDIO
    9484TS_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);
     85int i2d_TS_MSG_IMPRINT_fp(FILE *fp, const TS_MSG_IMPRINT *a);
    9686#endif
    9787TS_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);
     88int i2d_TS_MSG_IMPRINT_bio(BIO *bio, const TS_MSG_IMPRINT *a);
     89
     90DECLARE_ASN1_ALLOC_FUNCTIONS(TS_RESP)
     91DECLARE_ASN1_ENCODE_FUNCTIONS_only(TS_RESP, TS_RESP)
     92DECLARE_ASN1_DUP_FUNCTION(TS_RESP)
    10693
    10794#ifndef OPENSSL_NO_STDIO
    10895TS_RESP *d2i_TS_RESP_fp(FILE *fp, TS_RESP **a);
    109 int i2d_TS_RESP_fp(FILE *fp, TS_RESP *a);
     96int i2d_TS_RESP_fp(FILE *fp, const TS_RESP *a);
    11097#endif
    11198TS_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);
     99int i2d_TS_RESP_bio(BIO *bio, const TS_RESP *a);
     100
     101DECLARE_ASN1_ALLOC_FUNCTIONS(TS_STATUS_INFO)
     102DECLARE_ASN1_ENCODE_FUNCTIONS_only(TS_STATUS_INFO, TS_STATUS_INFO)
     103DECLARE_ASN1_DUP_FUNCTION(TS_STATUS_INFO)
     104
     105DECLARE_ASN1_ALLOC_FUNCTIONS(TS_TST_INFO)
     106DECLARE_ASN1_ENCODE_FUNCTIONS_only(TS_TST_INFO, TS_TST_INFO)
     107DECLARE_ASN1_DUP_FUNCTION(TS_TST_INFO)
     108TS_TST_INFO *PKCS7_to_TS_TST_INFO(PKCS7 *token);
    127109
    128110#ifndef OPENSSL_NO_STDIO
    129111TS_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);
     112int i2d_TS_TST_INFO_fp(FILE *fp, const TS_TST_INFO *a);
    131113#endif
    132114TS_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);
     115int i2d_TS_TST_INFO_bio(BIO *bio, const TS_TST_INFO *a);
     116
     117DECLARE_ASN1_ALLOC_FUNCTIONS(TS_ACCURACY)
     118DECLARE_ASN1_ENCODE_FUNCTIONS_only(TS_ACCURACY, TS_ACCURACY)
     119DECLARE_ASN1_DUP_FUNCTION(TS_ACCURACY)
    178120
    179121int TS_REQ_set_version(TS_REQ *a, long version);
     
    323265typedef struct TS_resp_ctx TS_RESP_CTX;
    324266
    325 DEFINE_STACK_OF_CONST(EVP_MD)
    326 
    327267/* Creates a response context that can be used for generating responses. */
    328268TS_RESP_CTX *TS_RESP_CTX_new(void);
     269TS_RESP_CTX *TS_RESP_CTX_new_ex(OSSL_LIB_CTX *libctx, const char *propq);
    329270void TS_RESP_CTX_free(TS_RESP_CTX *ctx);
    330271
     
    480421                                         unsigned char *hexstr, long len);
    481422X509_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
     426STACK_OF(X509) *TS_VERIFY_CTX_set_certs(TS_VERIFY_CTX *ctx, STACK_OF(X509) *certs);
    483427
    484428/*-
     
    544488int TS_CONF_set_digests(CONF *conf, const char *section, TS_RESP_CTX *ctx);
    545489int 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,
     490int TS_CONF_set_clock_precision_digits(const CONF *conf, const char *section,
    547491                                       TS_RESP_CTX *ctx);
    548492int 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  
    11/*
    22 * Generated by util/mkerr.pl DO NOT EDIT
    3  * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
     3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    44 *
    5  * Licensed under the OpenSSL license (the "License").  You may not use
     5 * Licensed under the Apache License 2.0 (the "License").  You may not use
    66 * this file except in compliance with the License.  You can obtain a copy
    77 * in the file LICENSE in the source distribution or at
     
    99 */
    1010
    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
    1714
    1815# include <openssl/opensslconf.h>
     16# include <openssl/symhacks.h>
     17# include <openssl/cryptoerr_legacy.h>
     18
    1919
    2020# ifndef OPENSSL_NO_TS
    2121
    22 #  ifdef  __cplusplus
    23 extern "C"
    24 #  endif
    25 int ERR_load_TS_strings(void);
    26 
    27 /*
    28  * TS function codes.
    29  */
    30 #  define TS_F_DEF_SERIAL_CB                               110
    31 #  define TS_F_DEF_TIME_CB                                 111
    32 #  define TS_F_ESS_ADD_SIGNING_CERT                        112
    33 #  define TS_F_ESS_ADD_SIGNING_CERT_V2                     147
    34 #  define TS_F_ESS_CERT_ID_NEW_INIT                        113
    35 #  define TS_F_ESS_CERT_ID_V2_NEW_INIT                     156
    36 #  define TS_F_ESS_SIGNING_CERT_NEW_INIT                   114
    37 #  define TS_F_ESS_SIGNING_CERT_V2_NEW_INIT                157
    38 #  define TS_F_INT_TS_RESP_VERIFY_TOKEN                    149
    39 #  define TS_F_PKCS7_TO_TS_TST_INFO                        148
    40 #  define TS_F_TS_ACCURACY_SET_MICROS                      115
    41 #  define TS_F_TS_ACCURACY_SET_MILLIS                      116
    42 #  define TS_F_TS_ACCURACY_SET_SECONDS                     117
    43 #  define TS_F_TS_CHECK_IMPRINTS                           100
    44 #  define TS_F_TS_CHECK_NONCES                             101
    45 #  define TS_F_TS_CHECK_POLICY                             102
    46 #  define TS_F_TS_CHECK_SIGNING_CERTS                      103
    47 #  define TS_F_TS_CHECK_STATUS_INFO                        104
    48 #  define TS_F_TS_COMPUTE_IMPRINT                          145
    49 #  define TS_F_TS_CONF_INVALID                             151
    50 #  define TS_F_TS_CONF_LOAD_CERT                           153
    51 #  define TS_F_TS_CONF_LOAD_CERTS                          154
    52 #  define TS_F_TS_CONF_LOAD_KEY                            155
    53 #  define TS_F_TS_CONF_LOOKUP_FAIL                         152
    54 #  define TS_F_TS_CONF_SET_DEFAULT_ENGINE                  146
    55 #  define TS_F_TS_GET_STATUS_TEXT                          105
    56 #  define TS_F_TS_MSG_IMPRINT_SET_ALGO                     118
    57 #  define TS_F_TS_REQ_SET_MSG_IMPRINT                      119
    58 #  define TS_F_TS_REQ_SET_NONCE                            120
    59 #  define TS_F_TS_REQ_SET_POLICY_ID                        121
    60 #  define TS_F_TS_RESP_CREATE_RESPONSE                     122
    61 #  define TS_F_TS_RESP_CREATE_TST_INFO                     123
    62 #  define TS_F_TS_RESP_CTX_ADD_FAILURE_INFO                124
    63 #  define TS_F_TS_RESP_CTX_ADD_MD                          125
    64 #  define TS_F_TS_RESP_CTX_ADD_POLICY                      126
    65 #  define TS_F_TS_RESP_CTX_NEW                             127
    66 #  define TS_F_TS_RESP_CTX_SET_ACCURACY                    128
    67 #  define TS_F_TS_RESP_CTX_SET_CERTS                       129
    68 #  define TS_F_TS_RESP_CTX_SET_DEF_POLICY                  130
    69 #  define TS_F_TS_RESP_CTX_SET_SIGNER_CERT                 131
    70 #  define TS_F_TS_RESP_CTX_SET_STATUS_INFO                 132
    71 #  define TS_F_TS_RESP_GET_POLICY                          133
    72 #  define TS_F_TS_RESP_SET_GENTIME_WITH_PRECISION          134
    73 #  define TS_F_TS_RESP_SET_STATUS_INFO                     135
    74 #  define TS_F_TS_RESP_SET_TST_INFO                        150
    75 #  define TS_F_TS_RESP_SIGN                                136
    76 #  define TS_F_TS_RESP_VERIFY_SIGNATURE                    106
    77 #  define TS_F_TS_TST_INFO_SET_ACCURACY                    137
    78 #  define TS_F_TS_TST_INFO_SET_MSG_IMPRINT                 138
    79 #  define TS_F_TS_TST_INFO_SET_NONCE                       139
    80 #  define TS_F_TS_TST_INFO_SET_POLICY_ID                   140
    81 #  define TS_F_TS_TST_INFO_SET_SERIAL                      141
    82 #  define TS_F_TS_TST_INFO_SET_TIME                        142
    83 #  define TS_F_TS_TST_INFO_SET_TSA                         143
    84 #  define TS_F_TS_VERIFY                                   108
    85 #  define TS_F_TS_VERIFY_CERT                              109
    86 #  define TS_F_TS_VERIFY_CTX_NEW                           144
    8722
    8823/*
  • trunk/src/libs/openssl-3.0.1/include/openssl/txt_db.h

    r91772 r94082  
    22 * Copyright 1995-2017 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    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
    1218
    1319# include <openssl/opensslconf.h>
  • trunk/src/libs/openssl-3.0.1/include/openssl/uierr.h

    r91772 r94082  
    11/*
    22 * Generated by util/mkerr.pl DO NOT EDIT
    3  * Copyright 1995-2019 The OpenSSL Project Authors. All Rights Reserved.
     3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    44 *
    5  * Licensed under the OpenSSL license (the "License").  You may not use
     5 * Licensed under the Apache License 2.0 (the "License").  You may not use
    66 * this file except in compliance with the License.  You can obtain a copy
    77 * in the file LICENSE in the source distribution or at
     
    99 */
    1010
    11 #ifndef HEADER_UIERR_H
    12 # define HEADER_UIERR_H
     11#ifndef OPENSSL_UIERR_H
     12# define OPENSSL_UIERR_H
     13# pragma once
    1314
    14 # ifndef HEADER_SYMHACKS_H
    15 #  include <openssl/symhacks.h>
    16 # endif
     15# include <openssl/opensslconf.h>
     16# include <openssl/symhacks.h>
     17# include <openssl/cryptoerr_legacy.h>
    1718
    18 # ifdef  __cplusplus
    19 extern "C"
    20 # endif
    21 int ERR_load_UI_strings(void);
    2219
    23 /*
    24  * UI function codes.
    25  */
    26 # define UI_F_CLOSE_CONSOLE                               115
    27 # define UI_F_ECHO_CONSOLE                                116
    28 # define UI_F_GENERAL_ALLOCATE_BOOLEAN                    108
    29 # define UI_F_GENERAL_ALLOCATE_PROMPT                     109
    30 # define UI_F_NOECHO_CONSOLE                              117
    31 # define UI_F_OPEN_CONSOLE                                114
    32 # define UI_F_UI_CONSTRUCT_PROMPT                         121
    33 # define UI_F_UI_CREATE_METHOD                            112
    34 # define UI_F_UI_CTRL                                     111
    35 # define UI_F_UI_DUP_ERROR_STRING                         101
    36 # define UI_F_UI_DUP_INFO_STRING                          102
    37 # define UI_F_UI_DUP_INPUT_BOOLEAN                        110
    38 # define UI_F_UI_DUP_INPUT_STRING                         103
    39 # define UI_F_UI_DUP_USER_DATA                            118
    40 # define UI_F_UI_DUP_VERIFY_STRING                        106
    41 # define UI_F_UI_GET0_RESULT                              107
    42 # define UI_F_UI_GET_RESULT_LENGTH                        119
    43 # define UI_F_UI_NEW_METHOD                               104
    44 # define UI_F_UI_PROCESS                                  113
    45 # define UI_F_UI_SET_RESULT                               105
    46 # define UI_F_UI_SET_RESULT_EX                            120
    4720
    4821/*
  • trunk/src/libs/openssl-3.0.1/include/openssl/whrlpool.h

    r91772 r94082  
    11/*
    2  * Copyright 2005-2016 The OpenSSL Project Authors. All Rights Reserved.
     2 * Copyright 2005-2020 The OpenSSL Project Authors. All Rights Reserved.
    33 *
    4  * 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
    55 * this file except in compliance with the License.  You can obtain a copy
    66 * in the file LICENSE in the source distribution or at
     
    88 */
    99
    10 #ifndef HEADER_WHRLPOOL_H
    11 # define HEADER_WHRLPOOL_H
     10#ifndef OPENSSL_WHRLPOOL_H
     11# define OPENSSL_WHRLPOOL_H
     12# pragma once
    1213
    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>
    1420
    1521# ifndef OPENSSL_NO_WHIRLPOOL
    16 # include <openssl/e_os2.h>
    17 # include <stddef.h>
    18 # ifdef __cplusplus
     22#  include <openssl/e_os2.h>
     23#  include <stddef.h>
     24#  ifdef __cplusplus
    1925extern "C" {
    20 # endif
     26#  endif
    2127
    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)
    2534
    2635typedef struct {
     
    3443    size_t bitlen[WHIRLPOOL_COUNTER / sizeof(size_t)];
    3544} WHIRLPOOL_CTX;
     45#  endif
     46#  ifndef OPENSSL_NO_DEPRECATED_3_0
     47OSSL_DEPRECATEDIN_3_0 int WHIRLPOOL_Init(WHIRLPOOL_CTX *c);
     48OSSL_DEPRECATEDIN_3_0 int WHIRLPOOL_Update(WHIRLPOOL_CTX *c,
     49                                           const void *inp, size_t bytes);
     50OSSL_DEPRECATEDIN_3_0 void WHIRLPOOL_BitUpdate(WHIRLPOOL_CTX *c,
     51                                               const void *inp, size_t bits);
     52OSSL_DEPRECATEDIN_3_0 int WHIRLPOOL_Final(unsigned char *md, WHIRLPOOL_CTX *c);
     53OSSL_DEPRECATEDIN_3_0 unsigned char *WHIRLPOOL(const void *inp, size_t bytes,
     54                                               unsigned char *md);
     55#  endif
    3656
    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
    4458}
    45 # endif
     59#  endif
    4660# endif
    4761
  • trunk/src/libs/openssl-3.0.1/include/openssl/x509err.h

    r91772 r94082  
    11/*
    22 * Generated by util/mkerr.pl DO NOT EDIT
    3  * Copyright 1995-2020 The OpenSSL Project Authors. All Rights Reserved.
     3 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    44 *
    5  * Licensed under the OpenSSL license (the "License").  You may not use
     5 * Licensed under the Apache License 2.0 (the "License").  You may not use
    66 * this file except in compliance with the License.  You can obtain a copy
    77 * in the file LICENSE in the source distribution or at
     
    99 */
    1010
    11 #ifndef HEADER_X509ERR_H
    12 # define HEADER_X509ERR_H
     11#ifndef OPENSSL_X509ERR_H
     12# define OPENSSL_X509ERR_H
     13# pragma once
    1314
     15# include <openssl/opensslconf.h>
    1416# include <openssl/symhacks.h>
     17# include <openssl/cryptoerr_legacy.h>
    1518
    16 # ifdef  __cplusplus
    17 extern "C"
    18 # endif
    19 int ERR_load_X509_strings(void);
    2019
    21 /*
    22  * X509 function codes.
    23  */
    24 # define X509_F_ADD_CERT_DIR                              100
    25 # define X509_F_BUILD_CHAIN                               106
    26 # define X509_F_BY_FILE_CTRL                              101
    27 # define X509_F_CHECK_NAME_CONSTRAINTS                    149
    28 # define X509_F_CHECK_POLICY                              145
    29 # define X509_F_DANE_I2D                                  107
    30 # define X509_F_DIR_CTRL                                  102
    31 # define X509_F_GET_CERT_BY_SUBJECT                       103
    32 # define X509_F_I2D_X509_AUX                              151
    33 # define X509_F_LOOKUP_CERTS_SK                           152
    34 # define X509_F_NETSCAPE_SPKI_B64_DECODE                  129
    35 # define X509_F_NETSCAPE_SPKI_B64_ENCODE                  130
    36 # define X509_F_NEW_DIR                                   153
    37 # define X509_F_X509AT_ADD1_ATTR                          135
    38 # define X509_F_X509V3_ADD_EXT                            104
    39 # define X509_F_X509_ATTRIBUTE_CREATE_BY_NID              136
    40 # define X509_F_X509_ATTRIBUTE_CREATE_BY_OBJ              137
    41 # define X509_F_X509_ATTRIBUTE_CREATE_BY_TXT              140
    42 # define X509_F_X509_ATTRIBUTE_GET0_DATA                  139
    43 # define X509_F_X509_ATTRIBUTE_SET1_DATA                  138
    44 # define X509_F_X509_CHECK_PRIVATE_KEY                    128
    45 # define X509_F_X509_CRL_DIFF                             105
    46 # define X509_F_X509_CRL_METHOD_NEW                       154
    47 # define X509_F_X509_CRL_PRINT_FP                         147
    48 # define X509_F_X509_EXTENSION_CREATE_BY_NID              108
    49 # define X509_F_X509_EXTENSION_CREATE_BY_OBJ              109
    50 # define X509_F_X509_GET_PUBKEY_PARAMETERS                110
    51 # define X509_F_X509_LOAD_CERT_CRL_FILE                   132
    52 # define X509_F_X509_LOAD_CERT_FILE                       111
    53 # define X509_F_X509_LOAD_CRL_FILE                        112
    54 # define X509_F_X509_LOOKUP_METH_NEW                      160
    55 # define X509_F_X509_LOOKUP_NEW                           155
    56 # define X509_F_X509_NAME_ADD_ENTRY                       113
    57 # define X509_F_X509_NAME_CANON                           156
    58 # define X509_F_X509_NAME_ENTRY_CREATE_BY_NID             114
    59 # define X509_F_X509_NAME_ENTRY_CREATE_BY_TXT             131
    60 # define X509_F_X509_NAME_ENTRY_SET_OBJECT                115
    61 # define X509_F_X509_NAME_ONELINE                         116
    62 # define X509_F_X509_NAME_PRINT                           117
    63 # define X509_F_X509_OBJECT_NEW                           150
    64 # define X509_F_X509_PRINT_EX_FP                          118
    65 # define X509_F_X509_PUBKEY_DECODE                        148
    66 # define X509_F_X509_PUBKEY_GET                           161
    67 # define X509_F_X509_PUBKEY_GET0                          119
    68 # define X509_F_X509_PUBKEY_SET                           120
    69 # define X509_F_X509_REQ_CHECK_PRIVATE_KEY                144
    70 # define X509_F_X509_REQ_PRINT_EX                         121
    71 # define X509_F_X509_REQ_PRINT_FP                         122
    72 # define X509_F_X509_REQ_TO_X509                          123
    73 # define X509_F_X509_STORE_ADD_CERT                       124
    74 # define X509_F_X509_STORE_ADD_CRL                        125
    75 # define X509_F_X509_STORE_ADD_LOOKUP                     157
    76 # define X509_F_X509_STORE_CTX_GET1_ISSUER                146
    77 # define X509_F_X509_STORE_CTX_INIT                       143
    78 # define X509_F_X509_STORE_CTX_NEW                        142
    79 # define X509_F_X509_STORE_CTX_PURPOSE_INHERIT            134
    80 # define X509_F_X509_STORE_NEW                            158
    81 # define X509_F_X509_TO_X509_REQ                          126
    82 # define X509_F_X509_TRUST_ADD                            133
    83 # define X509_F_X509_TRUST_SET                            141
    84 # define X509_F_X509_VERIFY_CERT                          127
    85 # define X509_F_X509_VERIFY_PARAM_NEW                     159
    8620
    8721/*
     
    9327# define X509_R_BASE64_DECODE_ERROR                       118
    9428# define X509_R_CANT_CHECK_DH_KEY                         114
     29# define X509_R_CERTIFICATE_VERIFICATION_FAILED           139
    9530# define X509_R_CERT_ALREADY_IN_HASH_TABLE                101
    9631# define X509_R_CRL_ALREADY_DELTA                         127
    9732# 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
    9835# define X509_R_IDP_MISMATCH                              128
    9936# define X509_R_INVALID_ATTRIBUTES                        138
    10037# define X509_R_INVALID_DIRECTORY                         113
     38# define X509_R_INVALID_DISTPOINT                         143
    10139# define X509_R_INVALID_FIELD_NAME                        119
    10240# define X509_R_INVALID_TRUST                             123
     
    12260# define X509_R_UNKNOWN_NID                               109
    12361# define X509_R_UNKNOWN_PURPOSE_ID                        121
     62# define X509_R_UNKNOWN_SIGID_ALGS                        144
    12463# define X509_R_UNKNOWN_TRUST_ID                          120
    12564# define X509_R_UNSUPPORTED_ALGORITHM                     111
  • trunk/src/libs/openssl-3.0.1/include/openssl/x509v3err.h

    r91772 r94082  
    33 * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
    44 *
    5  * Licensed under the OpenSSL license (the "License").  You may not use
     5 * Licensed under the Apache License 2.0 (the "License").  You may not use
    66 * this file except in compliance with the License.  You can obtain a copy
    77 * in the file LICENSE in the source distribution or at
     
    99 */
    1010
    11 #ifndef HEADER_X509V3ERR_H
    12 # define HEADER_X509V3ERR_H
     11#ifndef OPENSSL_X509V3ERR_H
     12# define OPENSSL_X509V3ERR_H
     13# pragma once
    1314
    14 # ifndef HEADER_SYMHACKS_H
    15 #  include <openssl/symhacks.h>
    16 # endif
     15# include <openssl/opensslconf.h>
     16# include <openssl/symhacks.h>
     17# include <openssl/cryptoerr_legacy.h>
    1718
    18 # ifdef  __cplusplus
    19 extern "C"
    20 # endif
    21 int ERR_load_X509V3_strings(void);
    2219
    23 /*
    24  * X509V3 function codes.
    25  */
    26 # define X509V3_F_A2I_GENERAL_NAME                        164
    27 # define X509V3_F_ADDR_VALIDATE_PATH_INTERNAL             166
    28 # define X509V3_F_ASIDENTIFIERCHOICE_CANONIZE             161
    29 # define X509V3_F_ASIDENTIFIERCHOICE_IS_CANONICAL         162
    30 # define X509V3_F_BIGNUM_TO_STRING                        167
    31 # define X509V3_F_COPY_EMAIL                              122
    32 # define X509V3_F_COPY_ISSUER                             123
    33 # define X509V3_F_DO_DIRNAME                              144
    34 # define X509V3_F_DO_EXT_I2D                              135
    35 # define X509V3_F_DO_EXT_NCONF                            151
    36 # define X509V3_F_GNAMES_FROM_SECTNAME                    156
    37 # define X509V3_F_I2S_ASN1_ENUMERATED                     121
    38 # define X509V3_F_I2S_ASN1_IA5STRING                      149
    39 # define X509V3_F_I2S_ASN1_INTEGER                        120
    40 # define X509V3_F_I2V_AUTHORITY_INFO_ACCESS               138
    41 # define X509V3_F_I2V_AUTHORITY_KEYID                     173
    42 # define X509V3_F_LEVEL_ADD_NODE                          168
    43 # define X509V3_F_NOTICE_SECTION                          132
    44 # define X509V3_F_NREF_NOS                                133
    45 # define X509V3_F_POLICY_CACHE_CREATE                     169
    46 # define X509V3_F_POLICY_CACHE_NEW                        170
    47 # define X509V3_F_POLICY_DATA_NEW                         171
    48 # define X509V3_F_POLICY_SECTION                          131
    49 # define X509V3_F_PROCESS_PCI_VALUE                       150
    50 # define X509V3_F_R2I_CERTPOL                             130
    51 # define X509V3_F_R2I_PCI                                 155
    52 # define X509V3_F_S2I_ASN1_IA5STRING                      100
    53 # define X509V3_F_S2I_ASN1_INTEGER                        108
    54 # define X509V3_F_S2I_ASN1_OCTET_STRING                   112
    55 # define X509V3_F_S2I_SKEY_ID                             115
    56 # define X509V3_F_SET_DIST_POINT_NAME                     158
    57 # define X509V3_F_SXNET_ADD_ID_ASC                        125
    58 # define X509V3_F_SXNET_ADD_ID_INTEGER                    126
    59 # define X509V3_F_SXNET_ADD_ID_ULONG                      127
    60 # define X509V3_F_SXNET_GET_ID_ASC                        128
    61 # define X509V3_F_SXNET_GET_ID_ULONG                      129
    62 # define X509V3_F_TREE_INIT                               172
    63 # define X509V3_F_V2I_ASIDENTIFIERS                       163
    64 # define X509V3_F_V2I_ASN1_BIT_STRING                     101
    65 # define X509V3_F_V2I_AUTHORITY_INFO_ACCESS               139
    66 # define X509V3_F_V2I_AUTHORITY_KEYID                     119
    67 # define X509V3_F_V2I_BASIC_CONSTRAINTS                   102
    68 # define X509V3_F_V2I_CRLD                                134
    69 # define X509V3_F_V2I_EXTENDED_KEY_USAGE                  103
    70 # define X509V3_F_V2I_GENERAL_NAMES                       118
    71 # define X509V3_F_V2I_GENERAL_NAME_EX                     117
    72 # define X509V3_F_V2I_IDP                                 157
    73 # define X509V3_F_V2I_IPADDRBLOCKS                        159
    74 # define X509V3_F_V2I_ISSUER_ALT                          153
    75 # define X509V3_F_V2I_NAME_CONSTRAINTS                    147
    76 # define X509V3_F_V2I_POLICY_CONSTRAINTS                  146
    77 # define X509V3_F_V2I_POLICY_MAPPINGS                     145
    78 # define X509V3_F_V2I_SUBJECT_ALT                         154
    79 # define X509V3_F_V2I_TLS_FEATURE                         165
    80 # define X509V3_F_V3_GENERIC_EXTENSION                    116
    81 # define X509V3_F_X509V3_ADD1_I2D                         140
    82 # define X509V3_F_X509V3_ADD_LEN_VALUE                    174
    83 # define X509V3_F_X509V3_ADD_VALUE                        105
    84 # define X509V3_F_X509V3_EXT_ADD                          104
    85 # define X509V3_F_X509V3_EXT_ADD_ALIAS                    106
    86 # define X509V3_F_X509V3_EXT_I2D                          136
    87 # define X509V3_F_X509V3_EXT_NCONF                        152
    88 # define X509V3_F_X509V3_GET_SECTION                      142
    89 # define X509V3_F_X509V3_GET_STRING                       143
    90 # define X509V3_F_X509V3_GET_VALUE_BOOL                   110
    91 # define X509V3_F_X509V3_PARSE_LIST                       109
    92 # define X509V3_F_X509_PURPOSE_ADD                        137
    93 # define X509V3_F_X509_PURPOSE_SET                        141
    9420
    9521/*
     
    10329# define X509V3_R_DISTPOINT_ALREADY_SET                   160
    10430# define X509V3_R_DUPLICATE_ZONE_ID                       133
     31# define X509V3_R_EMPTY_KEY_USAGE                         169
    10532# define X509V3_R_ERROR_CONVERTING_ZONE                   131
    10633# define X509V3_R_ERROR_CREATING_EXTENSION                144
     
    11744# define X509V3_R_INVALID_ASRANGE                         163
    11845# define X509V3_R_INVALID_BOOLEAN_STRING                  104
     46# define X509V3_R_INVALID_CERTIFICATE                     158
     47# define X509V3_R_INVALID_EMPTY_NAME                      108
    11948# define X509V3_R_INVALID_EXTENSION_STRING                105
    12049# define X509V3_R_INVALID_INHERITANCE                     165
     
    12352# define X509V3_R_INVALID_NAME                            106
    12453# define X509V3_R_INVALID_NULL_ARGUMENT                   107
    125 # define X509V3_R_INVALID_NULL_NAME                       108
    12654# define X509V3_R_INVALID_NULL_VALUE                      109
    12755# define X509V3_R_INVALID_NUMBER                          140
     
    13866# define X509V3_R_MISSING_VALUE                           124
    13967# define X509V3_R_NEED_ORGANIZATION_AND_NUMBERS           142
     68# define X509V3_R_NEGATIVE_PATHLEN                        168
    14069# define X509V3_R_NO_CONFIG_DATABASE                      136
    14170# define X509V3_R_NO_ISSUER_CERTIFICATE                   121
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette