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:
2 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/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
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