Rename <openssl/core_numbers.h> -> <openssl/core_dispatch.h>
authorDr. Matthias St. Pierre <matthias.st.pierre@ncp-e.com>
Sat, 20 Jun 2020 23:21:19 +0000 (01:21 +0200)
committerDr. Matthias St. Pierre <matthias.st.pierre@ncp-e.com>
Wed, 24 Jun 2020 20:01:22 +0000 (22:01 +0200)
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/12222)

81 files changed:
apps/provider.c
crypto/core_algorithm.c
crypto/evp/evp_local.h
crypto/evp/kdf_meth.c
crypto/evp/keymgmt_meth.c
crypto/evp/mac_meth.c
crypto/initthread.c
crypto/provider_core.c
crypto/serializer/serializer_local.h
crypto/serializer/serializer_meth.c
doc/internal/man3/evp_generic_fetch.pod
doc/man7/OSSL_PROVIDER-FIPS.pod
doc/man7/OSSL_PROVIDER-default.pod
doc/man7/OSSL_PROVIDER-legacy.pod
doc/man7/openssl-core.h.pod
doc/man7/openssl-core_dispatch.h.pod [new file with mode: 0644]
doc/man7/openssl-core_numbers.h.pod [deleted file]
doc/man7/provider-asym_cipher.pod
doc/man7/provider-base.pod
doc/man7/provider-cipher.pod
doc/man7/provider-digest.pod
doc/man7/provider-keyexch.pod
doc/man7/provider-keymgmt.pod
doc/man7/provider-mac.pod
doc/man7/provider-serializer.pod
doc/man7/provider-signature.pod
include/crypto/evp.h
include/internal/provider.h
include/openssl/core_dispatch.h [new file with mode: 0644]
include/openssl/core_numbers.h [deleted file]
providers/common/bio_prov.c
providers/common/capabilities.c
providers/common/include/prov/providercommon.h
providers/defltprov.c
providers/fips/fipsprov.c
providers/fips/self_test.h
providers/implementations/asymciphers/rsa_enc.c
providers/implementations/ciphers/cipher_null.c
providers/implementations/ciphers/cipher_tdes.h
providers/implementations/digests/sha2_prov.c
providers/implementations/exchange/dh_exch.c
providers/implementations/exchange/ecdh_exch.c
providers/implementations/exchange/ecx_exch.c
providers/implementations/include/prov/ciphercommon.h
providers/implementations/include/prov/digestcommon.h
providers/implementations/keymgmt/dh_kmgmt.c
providers/implementations/keymgmt/dsa_kmgmt.c
providers/implementations/keymgmt/ec_kmgmt.c
providers/implementations/keymgmt/ecx_kmgmt.c
providers/implementations/keymgmt/rsa_kmgmt.c
providers/implementations/macs/blake2_mac_impl.c
providers/implementations/macs/cmac_prov.c
providers/implementations/macs/gmac_prov.c
providers/implementations/macs/hmac_prov.c
providers/implementations/macs/kmac_prov.c
providers/implementations/macs/poly1305_prov.c
providers/implementations/macs/siphash_prov.c
providers/implementations/serializers/serializer_dh_param.c
providers/implementations/serializers/serializer_dh_priv.c
providers/implementations/serializers/serializer_dh_pub.c
providers/implementations/serializers/serializer_dsa_param.c
providers/implementations/serializers/serializer_dsa_priv.c
providers/implementations/serializers/serializer_dsa_pub.c
providers/implementations/serializers/serializer_ec_param.c
providers/implementations/serializers/serializer_ec_priv.c
providers/implementations/serializers/serializer_ec_pub.c
providers/implementations/serializers/serializer_ecx_priv.c
providers/implementations/serializers/serializer_ecx_pub.c
providers/implementations/serializers/serializer_local.h
providers/implementations/serializers/serializer_rsa_priv.c
providers/implementations/serializers/serializer_rsa_pub.c
providers/implementations/signature/dsa.c
providers/implementations/signature/ecdsa.c
providers/implementations/signature/eddsa.c
providers/implementations/signature/rsa.c
providers/legacyprov.c
providers/nullprov.c
test/filterprov.c
test/p_test.c
test/sslapitest.c
test/tls-provider.c

index d1a1ce7e4fcf6d553b1b5bf5b2af12f3000742a8..83fb2f3aee2c4540bc0bd7e9518d7fdd6f100311 100644 (file)
@@ -18,7 +18,7 @@
 #include <openssl/safestack.h>
 #include <openssl/provider.h>
 #include <openssl/core.h>
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 
 DEFINE_STACK_OF_CSTRING()
 
index f2e0e06fa8ee0e3d262a00ecd357ce334e71f244..b035ecfbb4cfd718bd9a9631411a6331ca2c1884 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include <openssl/core.h>
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include "internal/core.h"
 #include "internal/property.h"
 #include "internal/provider.h"
index 132534464fdf9508942170b8c6c71bb1e255ed42..4138ad8d9519352648863a4469a4d850990e4d56 100644 (file)
@@ -9,7 +9,7 @@
 
 /* EVP_MD_CTX related stuff */
 
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include "internal/refcount.h"
 
 #define EVP_CTRL_RET_UNSUPPORTED -1
index 219dbdfa07ac4550c1405b07bf9c78783c51b1e3..a328c97c0882d881dfff4f0a08548aaefbe813ad 100644 (file)
@@ -10,7 +10,7 @@
 #include <openssl/evp.h>
 #include <openssl/err.h>
 #include <openssl/core.h>
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/kdf.h>
 #include "crypto/evp.h"
 #include "internal/provider.h"
index ab5e00dfba95b84745dac73b90cb03cbd4e606a0..55dcae73e3de43ca4536970568cfc89f2cee0122 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include <openssl/crypto.h>
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/evp.h>
 #include <openssl/err.h>
 #include "internal/provider.h"
index b1fadb6cebed538c15f8f5aa81283f694af3c2c8..c22ebd335fc370044ccef75169bbff3348ee5ecc 100644 (file)
@@ -1,7 +1,7 @@
 #include <openssl/evp.h>
 #include <openssl/err.h>
 #include <openssl/core.h>
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include "crypto/evp.h"
 #include "internal/provider.h"
 #include "evp_local.h"
index a97cf359af5b37ca3ddc66908edc213327267bf9..23b34966a564ced1e6bb5b4cd8a74b36d1dbf0be 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include <openssl/crypto.h>
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include "crypto/cryptlib.h"
 #include "prov/providercommon.h"
 #include "internal/thread_once.h"
index cfaa09ff7b661ae36efb356d598c74948f1672da..20319b74178f386e6da45f4199c02889dc7edf49 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include <openssl/core.h>
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/core_names.h>
 #include <openssl/provider.h>
 #include <openssl/params.h>
index 44578448fc4a5b8876826bf1301ca29876bed9bf..121616d24afbb9019358eedfeb29bbe6616b9ed8 100644 (file)
@@ -7,7 +7,7 @@
  * https://www.openssl.org/source/license.html
  */
 
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/types.h>
 #include "internal/cryptlib.h"
 #include "internal/refcount.h"
index e3e77c542a65427ab4cae2eb912c07ee81d93967..b95bd14a51b527517019c9e70ff77a4dd08a9f75 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include <openssl/core.h>
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/serializer.h>
 #include <openssl/ui.h>
 #include "internal/core.h"
index 4cff97def81c1f76ee87967e04a46e075544a22d..4d2f6bdd69c42678d7f6fcb72b837258c2ad772a 100644 (file)
@@ -78,7 +78,7 @@ This is a short example of the fictitious EVP API and operation called
 B<EVP_FOO>.
 
 To begin with, let's assume something like this in
-F<include/openssl/core_numbers.h>:
+F<include/openssl/core_dispatch.h>:
 
     #define OSSL_OP_FOO                         100
 
index 1da465f47b6c8f8da406cee3ca313520ae48e15e..dd4d21f7ccbd5ab33ff1fb43977ef1de10dc3fbf 100644 (file)
@@ -330,7 +330,7 @@ L<OSSL_SELF_TEST_set_callback(3)>,
 L<OSSL_SELF_TEST_new(3)>,
 L<OSSL_PARAM(3)>,
 L<openssl-core.h(7)>,
-L<openssl-core_numbers.h(7)>,
+L<openssl-core_dispatch.h(7)>,
 L<provider(7)>
 
 =head1 HISTORY
index 91b02c5e67eb6cd392aa0012eab32fb8833f80fe..d9a51dce0001bed11255241deaf6aeeb66484876 100644 (file)
@@ -214,7 +214,7 @@ provider.
 
 =head1 SEE ALSO
 
-L<openssl-core.h(7)>, L<openssl-core_numbers.h(7)>, L<provider(7)>
+L<openssl-core.h(7)>, L<openssl-core_dispatch.h(7)>, L<provider(7)>
 
 =head1 COPYRIGHT
 
index db2d57ed59f97c63410796022e554a53d8af7cfa..36aeafec9492c6856cb3e1ef9a8e70b89618b3aa 100644 (file)
@@ -77,7 +77,7 @@ following =head2 titles are appropriate to use:
 
 L<OSSL_PARAM(3)>,
 L<openssl-core.h(7)>,
-L<openssl-core_numbers.h(7)>,
+L<openssl-core_dispatch.h(7)>,
 L<provider(7)>
 
 =head1 COPYRIGHT
index 28307a97d4095be688116077a259fa8e77f880c4..945cca0edab87ed3e8a47aada3d99e964878a107 100644 (file)
@@ -30,7 +30,7 @@ Arrays of this type must be terminated with a tuple having function
 identity zero and function pointer NULL.
 
 The available function identities and corresponding function
-signatures are defined in L<openssl-core_numbers.h(7)>.
+signatures are defined in L<openssl-core_dispatch.h(7)>.
 
 Any function identity not recognised by the recipient of this type
 will be ignored.
@@ -111,7 +111,7 @@ callback.
 
 =head1 SEE ALSO
 
-L<openssl-core_numbers.h(7)>
+L<openssl-core_dispatch.h(7)>
 
 =head1 HISTORY
 
diff --git a/doc/man7/openssl-core_dispatch.h.pod b/doc/man7/openssl-core_dispatch.h.pod
new file mode 100644 (file)
index 0000000..a19e133
--- /dev/null
@@ -0,0 +1,56 @@
+=pod
+
+=head1 NAME
+
+openssl/core_dispatch.h
+- OpenSSL provider dispatch numbers and function types
+
+=head1 SYNOPSIS
+
+ #include <openssl/core_dispatch.h>
+
+=head1 DESCRIPTION
+
+The F<< <openssl/core_dispatch.h> >> header defines all the operation
+numbers, dispatch numbers and provider interface function types
+currently available.
+
+The operation and dispatch numbers are represented with macros, which
+are named as follows:
+
+=over 4
+
+=item operation numbers
+
+These macros have the form C<OSSL_OP_I<opname>>.
+
+=item dipatch numbers
+
+These macros have the form C<OSSL_FUNC_I<opname>_I<funcname>>, where
+C<I<opname>> is the same as in the macro for the operation this
+function belongs to.
+
+=back
+
+With every dispatch number, there is an associated function type.
+
+For further information, please see the L<provider(7)>
+
+=head1 SEE ALSO
+
+L<provider(7)>
+
+=head1 HISTORY
+
+The types and macros described here were added in OpenSSL 3.0.
+
+=head1 COPYRIGHT
+
+Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.
+
+Licensed under the Apache License 2.0 (the "License").  You may not use
+this file except in compliance with the License.  You can obtain a copy
+in the file LICENSE in the source distribution or at
+L<https://www.openssl.org/source/license.html>.
+
+=cut
diff --git a/doc/man7/openssl-core_numbers.h.pod b/doc/man7/openssl-core_numbers.h.pod
deleted file mode 100644 (file)
index d9bdcbc..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-=pod
-
-=head1 NAME
-
-openssl/core_numbers.h
-- OpenSSL provider dispatch numbers and function types
-
-=head1 SYNOPSIS
-
- #include <openssl/core_numbers.h>
-
-=head1 DESCRIPTION
-
-The F<< <openssl/core_numbers.h> >> header defines all the operation
-numbers, dispatch numbers and provider interface function types
-currently available.
-
-The operation and dispatch numbers are represented with macros, which
-are named as follows:
-
-=over 4
-
-=item operation numbers
-
-These macros have the form C<OSSL_OP_I<opname>>.
-
-=item dipatch numbers
-
-These macros have the form C<OSSL_FUNC_I<opname>_I<funcname>>, where
-C<I<opname>> is the same as in the macro for the operation this
-function belongs to.
-
-=back
-
-With every dispatch number, there is an associated function type.
-
-For further information, please see the L<provider(7)>
-
-=head1 SEE ALSO
-
-L<provider(7)>
-
-=head1 HISTORY
-
-The types and macros described here were added in OpenSSL 3.0.
-
-=head1 COPYRIGHT
-
-Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.
-
-Licensed under the Apache License 2.0 (the "License").  You may not use
-this file except in compliance with the License.  You can obtain a copy
-in the file LICENSE in the source distribution or at
-L<https://www.openssl.org/source/license.html>.
-
-=cut
index a271cb408b2e1d8eecd7fe8f84fb20919b662b72..5a911f9a0ef69bf03e2873907b13e0ae03209375 100644 (file)
@@ -8,7 +8,7 @@ provider-asym_cipher - The asym_cipher library E<lt>-E<gt> provider functions
 
 =for openssl multiple includes
 
- #include <openssl/core_numbers.h>
+ #include <openssl/core_dispatch.h>
  #include <openssl/core_names.h>
 
  /*
@@ -68,7 +68,7 @@ For example, the "function" OP_asym_cipher_newctx() has these:
      OSSL_get_OP_asym_cipher_newctx(const OSSL_DISPATCH *opf);
 
 B<OSSL_DISPATCH> arrays are indexed by numbers that are provided as
-macros in L<openssl-core_numbers.h(7)>, as follows:
+macros in L<openssl-core_dispatch.h(7)>, as follows:
 
  OP_asym_cipher_newctx               OSSL_FUNC_ASYM_CIPHER_NEWCTX
  OP_asym_cipher_freectx              OSSL_FUNC_ASYM_CIPHER_FREECTX
index 69183cf28285729263085f8041c05367227a11a5..d6a510c2dca52601d366a549307f961a2a347213 100644 (file)
@@ -7,7 +7,7 @@ provider-base
 
 =head1 SYNOPSIS
 
- #include <openssl/core_numbers.h>
+ #include <openssl/core_dispatch.h>
 
  /*
   * None of these are actual functions, but are displayed like this for
@@ -96,7 +96,7 @@ For example, the "function" core_gettable_params() has these:
      OSSL_get_core_gettable_params(const OSSL_DISPATCH *opf);
 
 B<OSSL_DISPATCH> arrays are indexed by numbers that are provided as
-macros in L<openssl-core_numbers.h(7)>, as follows:
+macros in L<openssl-core_dispatch.h(7)>, as follows:
 
 For I<in> (the B<OSSL_DISPATCH> array passed from F<libcrypto> to the
 provider):
@@ -419,7 +419,7 @@ operation C<BAR>.
 
  #include <malloc.h>
  #include <openssl/core.h>
- #include <openssl/core_numbers.h>
+ #include <openssl/core_dispatch.h>
 
  /* Errors used in this provider */
  #define E_MALLOC       1
@@ -431,7 +431,7 @@ operation C<BAR>.
 
  /*
   * To ensure we get the function signature right, forward declare
-  * them using function types provided by openssl/core_numbers.h
+  * them using function types provided by openssl/core_dispatch.h
   */
  OSSL_OP_bar_newctx_fn foo_newctx;
  OSSL_OP_bar_freectx_fn foo_freectx;
@@ -569,7 +569,7 @@ operation C<BAR>.
      return 1;
  }
 
-This relies on a few things existing in F<openssl/core_numbers.h>:
+This relies on a few things existing in F<openssl/core_dispatch.h>:
 
  #define OSSL_OP_BAR            4711
 
index 24c5f40e3fdcacb5e0061c7d87687006e673f616..c3b1b77fe4cb696bce983c0cc2078cf661299cd2 100644 (file)
@@ -8,7 +8,7 @@ provider-cipher - The cipher library E<lt>-E<gt> provider functions
 
 =for openssl multiple includes
 
- #include <openssl/core_numbers.h>
+ #include <openssl/core_dispatch.h>
  #include <openssl/core_names.h>
 
  /*
@@ -77,7 +77,7 @@ For example, the "function" OP_cipher_newctx() has these:
      OSSL_get_OP_cipher_newctx(const OSSL_DISPATCH *opf);
 
 B<OSSL_DISPATCH> arrays are indexed by numbers that are provided as
-macros in L<openssl-core_numbers.h(7)>, as follows:
+macros in L<openssl-core_dispatch.h(7)>, as follows:
 
  OP_cipher_newctx               OSSL_FUNC_CIPHER_NEWCTX
  OP_cipher_freectx              OSSL_FUNC_CIPHER_FREECTX
index 01b117039ae2f1b8a6e34476e2a4cb1dae2ce808..4164e34bbe894881ecbbdbb9c02efea7e5c5a95d 100644 (file)
@@ -8,7 +8,7 @@ provider-digest - The digest library E<lt>-E<gt> provider functions
 
 =for openssl multiple includes
 
- #include <openssl/core_numbers.h>
+ #include <openssl/core_dispatch.h>
  #include <openssl/core_names.h>
 
  /*
@@ -69,7 +69,7 @@ For example, the "function" OP_digest_newctx() has these:
      OSSL_get_OP_digest_newctx(const OSSL_DISPATCH *opf);
 
 B<OSSL_DISPATCH> arrays are indexed by numbers that are provided as
-macros in L<openssl-core_numbers.h(7)>, as follows:
+macros in L<openssl-core_dispatch.h(7)>, as follows:
 
  OP_digest_newctx               OSSL_FUNC_DIGEST_NEWCTX
  OP_digest_freectx              OSSL_FUNC_DIGEST_FREECTX
index 59cc2033bb52cf08c9cb05e6b9e891405c55bfd9..2dcde351e65aa23c0f36e38cf2575a1da69a99ce 100644 (file)
@@ -8,7 +8,7 @@ provider-keyexch - The keyexch library E<lt>-E<gt> provider functions
 
 =for openssl multiple includes
 
- #include <openssl/core_numbers.h>
+ #include <openssl/core_dispatch.h>
  #include <openssl/core_names.h>
 
  /*
@@ -61,7 +61,7 @@ For example, the "function" OP_keyexch_newctx() has these:
      OSSL_get_OP_keyexch_newctx(const OSSL_DISPATCH *opf);
 
 B<OSSL_DISPATCH> arrays are indexed by numbers that are provided as
-macros in L<openssl-core_numbers.h(7)>, as follows:
+macros in L<openssl-core_dispatch.h(7)>, as follows:
 
  OP_keyexch_newctx                OSSL_FUNC_KEYEXCH_NEWCTX
  OP_keyexch_freectx               OSSL_FUNC_KEYEXCH_FREECTX
index 4202a77b54d5711e04ed3634f5145513d4f37f17..21dd51ac9ab52ceaa8d78dfd4769158d4fb9f4f8 100644 (file)
@@ -6,7 +6,7 @@ provider-keymgmt - The KEYMGMT library E<lt>-E<gt> provider functions
 
 =head1 SYNOPSIS
 
- #include <openssl/core_numbers.h>
+ #include <openssl/core_dispatch.h>
 
  /*
   * None of these are actual functions, but are displayed like this for
@@ -82,7 +82,7 @@ For example, the "function" OP_keymgmt_new() has these:
      OSSL_get_OP_keymgmt_new(const OSSL_DISPATCH *opf);
 
 B<OSSL_DISPATCH> arrays are indexed by numbers that are provided as
-macros in L<openssl-core_numbers.h(7)>, as follows:
+macros in L<openssl-core_dispatch.h(7)>, as follows:
 
  OP_keymgmt_new                  OSSL_FUNC_KEYMGMT_NEW
  OP_keymgmt_free                 OSSL_FUNC_KEYMGMT_FREE
index d0a8881eef5e1d90b39b82e5837ef86c758a657c..d0b9462509841526f9b1dc587f22b1573811285d 100644 (file)
@@ -8,7 +8,7 @@ provider-mac - The mac library E<lt>-E<gt> provider functions
 
 =for openssl multiple includes
 
- #include <openssl/core_numbers.h>
+ #include <openssl/core_dispatch.h>
  #include <openssl/core_names.h>
 
  /*
@@ -63,7 +63,7 @@ For example, the "function" OP_mac_newctx() has these:
      OSSL_get_OP_mac_newctx(const OSSL_DISPATCH *opf);
 
 B<OSSL_DISPATCH> arrays are indexed by numbers that are provided as
-macros in L<openssl-core_numbers.h(7)>, as follows:
+macros in L<openssl-core_dispatch.h(7)>, as follows:
 
  OP_mac_newctx               OSSL_FUNC_MAC_NEWCTX
  OP_mac_freectx              OSSL_FUNC_MAC_FREECTX
index ad3b5fdd6593ff92759fc7d4369bd8252b41ddab..8eba0e3e30169cf4a59c011424260bfc864c0173 100644 (file)
@@ -12,7 +12,7 @@ Future development will also include deserializing functions.
 
 =end comment
 
- #include <openssl/core_numbers.h>
+ #include <openssl/core_dispatch.h>
 
  /*
   * None of these are actual functions, but are displayed like this for
@@ -76,7 +76,7 @@ For example, the "function" OP_serializer_serialize_data() has these:
      OSSL_get_OP_serializer_serialize_data(const OSSL_DISPATCH *opf);
 
 B<OSSL_DISPATCH> arrays are indexed by numbers that are provided as
-macros in L<openssl-core_numbers.h(7)>, as follows:
+macros in L<openssl-core_dispatch.h(7)>, as follows:
 
  OP_serializer_newctx              OSSL_FUNC_SERIALIZER_NEWCTX
  OP_serializer_freectx             OSSL_FUNC_SERIALIZER_FREECTX
index 538c342e86a94a4b7eecafcaadde0022f4b9ed2e..6b20dd9daaa7fac604a07d3f667bbb195ae7c041 100644 (file)
@@ -8,7 +8,7 @@ provider-signature - The signature library E<lt>-E<gt> provider functions
 
 =for openssl multiple includes
 
- #include <openssl/core_numbers.h>
+ #include <openssl/core_dispatch.h>
  #include <openssl/core_names.h>
 
  /*
@@ -101,7 +101,7 @@ For example, the "function" OP_signature_newctx() has these:
      OSSL_get_OP_signature_newctx(const OSSL_DISPATCH *opf);
 
 B<OSSL_DISPATCH> arrays are indexed by numbers that are provided as
-macros in L<openssl-core_numbers.h(7)>, as follows:
+macros in L<openssl-core_dispatch.h(7)>, as follows:
 
  OP_signature_newctx                 OSSL_FUNC_SIGNATURE_NEWCTX
  OP_signature_freectx                OSSL_FUNC_SIGNATURE_FREECTX
index d1756cf183bea0c985e91e310af8ebab2a92550d..1044cad218fe6b915e5ad2c5eb1a1e78c75e134c 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include <openssl/evp.h>
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include "internal/refcount.h"
 #include "crypto/ecx.h"
 
index 3bfc1542839d9b6eb993d06487d0e53db4d5df7b..dcd57708bafe66c92e43676f0cc315ad4007e852 100644 (file)
@@ -11,7 +11,7 @@
 # define OSSL_INTERNAL_PROVIDER_H
 
 # include <openssl/core.h>
-# include <openssl/core_numbers.h>
+# include <openssl/core_dispatch.h>
 # include "internal/dso.h"
 # include "internal/symhacks.h"
 
diff --git a/include/openssl/core_dispatch.h b/include/openssl/core_dispatch.h
new file mode 100644 (file)
index 0000000..af2a35e
--- /dev/null
@@ -0,0 +1,717 @@
+/*
+ * Copyright 2019-2020 The OpenSSL Project Authors. All Rights Reserved.
+ *
+ * Licensed under the Apache License 2.0 (the "License").  You may not use
+ * this file except in compliance with the License.  You can obtain a copy
+ * in the file LICENSE in the source distribution or at
+ * https://www.openssl.org/source/license.html
+ */
+
+#ifndef OPENSSL_CORE_NUMBERS_H
+# define OPENSSL_CORE_NUMBERS_H
+
+# include <stdarg.h>
+# include <openssl/core.h>
+
+# ifdef __cplusplus
+extern "C" {
+# endif
+
+/*-
+ * Identities
+ * ----------
+ *
+ * All series start with 1, to allow 0 to be an array terminator.
+ * For any FUNC identity, we also provide a function signature typedef
+ * and a static inline function to extract a function pointer from a
+ * OSSL_DISPATCH element in a type safe manner.
+ *
+ * Names:
+ * for any function base name 'foo' (uppercase form 'FOO'), we will have
+ * the following:
+ * - a macro for the identity with the name OSSL_FUNC_'FOO' or derivatives
+ *   thereof (to be specified further down)
+ * - a function signature typedef with the name OSSL_'foo'_fn
+ * - a function pointer extractor function with the name OSSL_'foo'
+ */
+
+/*
+ * Helper macro to create the function signature typedef and the extractor
+ * |type| is the return-type of the function, |name| is the name of the
+ * function to fetch, and |args| is a parenthesized list of parameters
+ * for the function (that is, it is |name|'s function signature).
+ */
+#define OSSL_CORE_MAKE_FUNC(type,name,args)                             \
+    typedef type (OSSL_##name##_fn)args;                                \
+    static ossl_inline \
+    OSSL_##name##_fn *OSSL_get_##name(const OSSL_DISPATCH *opf)         \
+    {                                                                   \
+        return (OSSL_##name##_fn *)opf->function;                       \
+    }
+
+/*
+ * Core function identities, for the two OSSL_DISPATCH tables being passed
+ * in the OSSL_provider_init call.
+ *
+ * 0 serves as a marker for the end of the OSSL_DISPATCH array, and must
+ * therefore NEVER be used as a function identity.
+ */
+/* Functions provided by the Core to the provider, reserved numbers 1-1023 */
+# define OSSL_FUNC_CORE_GETTABLE_PARAMS        1
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *,
+                    core_gettable_params,(const OSSL_CORE_HANDLE *prov))
+# define OSSL_FUNC_CORE_GET_PARAMS             2
+OSSL_CORE_MAKE_FUNC(int,core_get_params,(const OSSL_CORE_HANDLE *prov,
+                                         OSSL_PARAM params[]))
+# define OSSL_FUNC_CORE_THREAD_START           3
+OSSL_CORE_MAKE_FUNC(int,core_thread_start,(const OSSL_CORE_HANDLE *prov,
+                                           OSSL_thread_stop_handler_fn handfn))
+# define OSSL_FUNC_CORE_GET_LIBRARY_CONTEXT    4
+OSSL_CORE_MAKE_FUNC(OPENSSL_CORE_CTX *,core_get_library_context,
+                    (const OSSL_CORE_HANDLE *prov))
+# define OSSL_FUNC_CORE_NEW_ERROR              5
+OSSL_CORE_MAKE_FUNC(void,core_new_error,(const OSSL_CORE_HANDLE *prov))
+# define OSSL_FUNC_CORE_SET_ERROR_DEBUG        6
+OSSL_CORE_MAKE_FUNC(void,core_set_error_debug,
+                    (const OSSL_CORE_HANDLE *prov,
+                     const char *file, int line, const char *func))
+# define OSSL_FUNC_CORE_VSET_ERROR             7
+OSSL_CORE_MAKE_FUNC(void,core_vset_error,
+                    (const OSSL_CORE_HANDLE *prov,
+                     uint32_t reason, const char *fmt, va_list args))
+# define OSSL_FUNC_CORE_SET_ERROR_MARK         8
+OSSL_CORE_MAKE_FUNC(int, core_set_error_mark, (const OSSL_CORE_HANDLE *prov))
+# define OSSL_FUNC_CORE_CLEAR_LAST_ERROR_MARK  9
+OSSL_CORE_MAKE_FUNC(int, core_clear_last_error_mark,
+                    (const OSSL_CORE_HANDLE *prov))
+# define OSSL_FUNC_CORE_POP_ERROR_TO_MARK     10
+OSSL_CORE_MAKE_FUNC(int, core_pop_error_to_mark, (const OSSL_CORE_HANDLE *prov))
+
+/* Memory allocation, freeing, clearing. */
+#define OSSL_FUNC_CRYPTO_MALLOC               20
+OSSL_CORE_MAKE_FUNC(void *,
+        CRYPTO_malloc, (size_t num, const char *file, int line))
+#define OSSL_FUNC_CRYPTO_ZALLOC               21
+OSSL_CORE_MAKE_FUNC(void *,
+        CRYPTO_zalloc, (size_t num, const char *file, int line))
+#define OSSL_FUNC_CRYPTO_FREE                 22
+OSSL_CORE_MAKE_FUNC(void,
+        CRYPTO_free, (void *ptr, const char *file, int line))
+#define OSSL_FUNC_CRYPTO_CLEAR_FREE           23
+OSSL_CORE_MAKE_FUNC(void,
+        CRYPTO_clear_free, (void *ptr, size_t num, const char *file, int line))
+#define OSSL_FUNC_CRYPTO_REALLOC              24
+OSSL_CORE_MAKE_FUNC(void *,
+        CRYPTO_realloc, (void *addr, size_t num, const char *file, int line))
+#define OSSL_FUNC_CRYPTO_CLEAR_REALLOC        25
+OSSL_CORE_MAKE_FUNC(void *,
+        CRYPTO_clear_realloc, (void *addr, size_t old_num, size_t num,
+                               const char *file, int line))
+#define OSSL_FUNC_CRYPTO_SECURE_MALLOC        26
+OSSL_CORE_MAKE_FUNC(void *,
+        CRYPTO_secure_malloc, (size_t num, const char *file, int line))
+#define OSSL_FUNC_CRYPTO_SECURE_ZALLOC        27
+OSSL_CORE_MAKE_FUNC(void *,
+        CRYPTO_secure_zalloc, (size_t num, const char *file, int line))
+#define OSSL_FUNC_CRYPTO_SECURE_FREE          28
+OSSL_CORE_MAKE_FUNC(void,
+        CRYPTO_secure_free, (void *ptr, const char *file, int line))
+#define OSSL_FUNC_CRYPTO_SECURE_CLEAR_FREE    29
+OSSL_CORE_MAKE_FUNC(void,
+        CRYPTO_secure_clear_free, (void *ptr, size_t num, const char *file,
+                                   int line))
+#define OSSL_FUNC_CRYPTO_SECURE_ALLOCATED     30
+OSSL_CORE_MAKE_FUNC(int,
+        CRYPTO_secure_allocated, (const void *ptr))
+#define OSSL_FUNC_OPENSSL_CLEANSE             31
+OSSL_CORE_MAKE_FUNC(void,
+        OPENSSL_cleanse, (void *ptr, size_t len))
+
+/* Bio functions provided by the core */
+#define OSSL_FUNC_BIO_NEW_FILE                40
+#define OSSL_FUNC_BIO_NEW_MEMBUF              41
+#define OSSL_FUNC_BIO_READ_EX                 42
+#define OSSL_FUNC_BIO_WRITE_EX                43
+#define OSSL_FUNC_BIO_FREE                    44
+#define OSSL_FUNC_BIO_VPRINTF                 45
+#define OSSL_FUNC_BIO_VSNPRINTF               46
+
+OSSL_CORE_MAKE_FUNC(OSSL_CORE_BIO *, BIO_new_file, (const char *filename,
+                                                    const char *mode))
+OSSL_CORE_MAKE_FUNC(OSSL_CORE_BIO *, BIO_new_membuf, (const void *buf, int len))
+OSSL_CORE_MAKE_FUNC(int, BIO_read_ex, (OSSL_CORE_BIO *bio, void *data,
+                                       size_t data_len, size_t *bytes_read))
+OSSL_CORE_MAKE_FUNC(int, BIO_write_ex, (OSSL_CORE_BIO *bio, const void *data,
+                                        size_t data_len, size_t *written))
+OSSL_CORE_MAKE_FUNC(int, BIO_free, (OSSL_CORE_BIO *bio))
+OSSL_CORE_MAKE_FUNC(int, BIO_vprintf, (OSSL_CORE_BIO *bio, const char *format,
+                                       va_list args))
+OSSL_CORE_MAKE_FUNC(int, BIO_vsnprintf,
+                   (char *buf, size_t n, const char *fmt, va_list args))
+
+#define OSSL_FUNC_SELF_TEST_CB               100
+OSSL_CORE_MAKE_FUNC(void, self_test_cb, (OPENSSL_CORE_CTX *ctx, OSSL_CALLBACK **cb,
+                                         void **cbarg))
+
+/* Functions provided by the provider to the Core, reserved numbers 1024-1535 */
+# define OSSL_FUNC_PROVIDER_TEARDOWN           1024
+OSSL_CORE_MAKE_FUNC(void,provider_teardown,(void *provctx))
+# define OSSL_FUNC_PROVIDER_GETTABLE_PARAMS    1025
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *,
+                    provider_gettable_params,(void *provctx))
+# define OSSL_FUNC_PROVIDER_GET_PARAMS         1026
+OSSL_CORE_MAKE_FUNC(int,provider_get_params,(void *provctx,
+                                             OSSL_PARAM params[]))
+# define OSSL_FUNC_PROVIDER_QUERY_OPERATION    1027
+OSSL_CORE_MAKE_FUNC(const OSSL_ALGORITHM *,provider_query_operation,
+                    (void *provctx, int operation_id, int *no_store))
+# define OSSL_FUNC_PROVIDER_GET_REASON_STRINGS 1028
+OSSL_CORE_MAKE_FUNC(const OSSL_ITEM *,provider_get_reason_strings,
+                    (void *provctx))
+# define OSSL_FUNC_PROVIDER_GET_CAPABILITIES   1029
+OSSL_CORE_MAKE_FUNC(int, provider_get_capabilities, (void *provctx,
+                    const char *capability, OSSL_CALLBACK *cb, void *arg))
+
+/* Operations */
+
+# define OSSL_OP_DIGEST                              1
+# define OSSL_OP_CIPHER                              2   /* Symmetric Ciphers */
+# define OSSL_OP_MAC                                 3
+# define OSSL_OP_KDF                                 4
+# define OSSL_OP_RAND                                5
+# define OSSL_OP_KEYMGMT                            10
+# define OSSL_OP_KEYEXCH                            11
+# define OSSL_OP_SIGNATURE                          12
+# define OSSL_OP_ASYM_CIPHER                        13
+/* New section for non-EVP operations */
+# define OSSL_OP_SERIALIZER                         20
+/* Highest known operation number */
+# define OSSL_OP__HIGHEST                           20
+
+/* Digests */
+
+# define OSSL_FUNC_DIGEST_NEWCTX                     1
+# define OSSL_FUNC_DIGEST_INIT                       2
+# define OSSL_FUNC_DIGEST_UPDATE                     3
+# define OSSL_FUNC_DIGEST_FINAL                      4
+# define OSSL_FUNC_DIGEST_DIGEST                     5
+# define OSSL_FUNC_DIGEST_FREECTX                    6
+# define OSSL_FUNC_DIGEST_DUPCTX                     7
+# define OSSL_FUNC_DIGEST_GET_PARAMS                 8
+# define OSSL_FUNC_DIGEST_SET_CTX_PARAMS             9
+# define OSSL_FUNC_DIGEST_GET_CTX_PARAMS            10
+# define OSSL_FUNC_DIGEST_GETTABLE_PARAMS           11
+# define OSSL_FUNC_DIGEST_SETTABLE_CTX_PARAMS       12
+# define OSSL_FUNC_DIGEST_GETTABLE_CTX_PARAMS       13
+
+OSSL_CORE_MAKE_FUNC(void *, OP_digest_newctx, (void *provctx))
+OSSL_CORE_MAKE_FUNC(int, OP_digest_init, (void *dctx))
+OSSL_CORE_MAKE_FUNC(int, OP_digest_update,
+                    (void *dctx, const unsigned char *in, size_t inl))
+OSSL_CORE_MAKE_FUNC(int, OP_digest_final,
+                    (void *dctx,
+                     unsigned char *out, size_t *outl, size_t outsz))
+OSSL_CORE_MAKE_FUNC(int, OP_digest_digest,
+                    (void *provctx, const unsigned char *in, size_t inl,
+                     unsigned char *out, size_t *outl, size_t outsz))
+
+OSSL_CORE_MAKE_FUNC(void, OP_digest_freectx, (void *dctx))
+OSSL_CORE_MAKE_FUNC(void *, OP_digest_dupctx, (void *dctx))
+
+OSSL_CORE_MAKE_FUNC(int, OP_digest_get_params, (OSSL_PARAM params[]))
+OSSL_CORE_MAKE_FUNC(int, OP_digest_set_ctx_params,
+                    (void *vctx, const OSSL_PARAM params[]))
+OSSL_CORE_MAKE_FUNC(int, OP_digest_get_ctx_params,
+                    (void *vctx, OSSL_PARAM params[]))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_digest_gettable_params, (void))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_digest_settable_ctx_params, (void))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_digest_gettable_ctx_params, (void))
+
+/* Symmetric Ciphers */
+
+# define OSSL_FUNC_CIPHER_NEWCTX                     1
+# define OSSL_FUNC_CIPHER_ENCRYPT_INIT               2
+# define OSSL_FUNC_CIPHER_DECRYPT_INIT               3
+# define OSSL_FUNC_CIPHER_UPDATE                     4
+# define OSSL_FUNC_CIPHER_FINAL                      5
+# define OSSL_FUNC_CIPHER_CIPHER                     6
+# define OSSL_FUNC_CIPHER_FREECTX                    7
+# define OSSL_FUNC_CIPHER_DUPCTX                     8
+# define OSSL_FUNC_CIPHER_GET_PARAMS                 9
+# define OSSL_FUNC_CIPHER_GET_CTX_PARAMS            10
+# define OSSL_FUNC_CIPHER_SET_CTX_PARAMS            11
+# define OSSL_FUNC_CIPHER_GETTABLE_PARAMS           12
+# define OSSL_FUNC_CIPHER_GETTABLE_CTX_PARAMS       13
+# define OSSL_FUNC_CIPHER_SETTABLE_CTX_PARAMS       14
+
+OSSL_CORE_MAKE_FUNC(void *, OP_cipher_newctx, (void *provctx))
+OSSL_CORE_MAKE_FUNC(int, OP_cipher_encrypt_init, (void *cctx,
+                                                  const unsigned char *key,
+                                                  size_t keylen,
+                                                  const unsigned char *iv,
+                                                  size_t ivlen))
+OSSL_CORE_MAKE_FUNC(int, OP_cipher_decrypt_init, (void *cctx,
+                                                  const unsigned char *key,
+                                                  size_t keylen,
+                                                  const unsigned char *iv,
+                                                  size_t ivlen))
+OSSL_CORE_MAKE_FUNC(int, OP_cipher_update,
+                    (void *cctx,
+                     unsigned char *out, size_t *outl, size_t outsize,
+                     const unsigned char *in, size_t inl))
+OSSL_CORE_MAKE_FUNC(int, OP_cipher_final,
+                    (void *cctx,
+                     unsigned char *out, size_t *outl, size_t outsize))
+OSSL_CORE_MAKE_FUNC(int, OP_cipher_cipher,
+                    (void *cctx,
+                     unsigned char *out, size_t *outl, size_t outsize,
+                     const unsigned char *in, size_t inl))
+OSSL_CORE_MAKE_FUNC(void, OP_cipher_freectx, (void *cctx))
+OSSL_CORE_MAKE_FUNC(void *, OP_cipher_dupctx, (void *cctx))
+OSSL_CORE_MAKE_FUNC(int, OP_cipher_get_params, (OSSL_PARAM params[]))
+OSSL_CORE_MAKE_FUNC(int, OP_cipher_get_ctx_params, (void *cctx,
+                                                    OSSL_PARAM params[]))
+OSSL_CORE_MAKE_FUNC(int, OP_cipher_set_ctx_params, (void *cctx,
+                                                    const OSSL_PARAM params[]))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_cipher_gettable_params,     (void))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_cipher_settable_ctx_params, (void))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_cipher_gettable_ctx_params, (void))
+
+/* MACs */
+
+# define OSSL_FUNC_MAC_NEWCTX                        1
+# define OSSL_FUNC_MAC_DUPCTX                        2
+# define OSSL_FUNC_MAC_FREECTX                       3
+# define OSSL_FUNC_MAC_INIT                          4
+# define OSSL_FUNC_MAC_UPDATE                        5
+# define OSSL_FUNC_MAC_FINAL                         6
+# define OSSL_FUNC_MAC_GET_PARAMS                    7
+# define OSSL_FUNC_MAC_GET_CTX_PARAMS                8
+# define OSSL_FUNC_MAC_SET_CTX_PARAMS                9
+# define OSSL_FUNC_MAC_GETTABLE_PARAMS              10
+# define OSSL_FUNC_MAC_GETTABLE_CTX_PARAMS          11
+# define OSSL_FUNC_MAC_SETTABLE_CTX_PARAMS          12
+
+OSSL_CORE_MAKE_FUNC(void *, OP_mac_newctx, (void *provctx))
+OSSL_CORE_MAKE_FUNC(void *, OP_mac_dupctx, (void *src))
+OSSL_CORE_MAKE_FUNC(void, OP_mac_freectx, (void *mctx))
+OSSL_CORE_MAKE_FUNC(size_t, OP_mac_size, (void *mctx))
+OSSL_CORE_MAKE_FUNC(int, OP_mac_init, (void *mctx))
+OSSL_CORE_MAKE_FUNC(int, OP_mac_update,
+                    (void *mctx, const unsigned char *in, size_t inl))
+OSSL_CORE_MAKE_FUNC(int, OP_mac_final,
+                    (void *mctx,
+                     unsigned char *out, size_t *outl, size_t outsize))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_mac_gettable_params, (void))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_mac_gettable_ctx_params, (void))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_mac_settable_ctx_params, (void))
+OSSL_CORE_MAKE_FUNC(int, OP_mac_get_params, (OSSL_PARAM params[]))
+OSSL_CORE_MAKE_FUNC(int, OP_mac_get_ctx_params,
+                    (void *mctx, OSSL_PARAM params[]))
+OSSL_CORE_MAKE_FUNC(int, OP_mac_set_ctx_params,
+                    (void *mctx, const OSSL_PARAM params[]))
+
+/* KDFs and PRFs */
+
+# define OSSL_FUNC_KDF_NEWCTX                        1
+# define OSSL_FUNC_KDF_DUPCTX                        2
+# define OSSL_FUNC_KDF_FREECTX                       3
+# define OSSL_FUNC_KDF_RESET                         4
+# define OSSL_FUNC_KDF_DERIVE                        5
+# define OSSL_FUNC_KDF_GETTABLE_PARAMS               6
+# define OSSL_FUNC_KDF_GETTABLE_CTX_PARAMS           7
+# define OSSL_FUNC_KDF_SETTABLE_CTX_PARAMS           8
+# define OSSL_FUNC_KDF_GET_PARAMS                    9
+# define OSSL_FUNC_KDF_GET_CTX_PARAMS               10
+# define OSSL_FUNC_KDF_SET_CTX_PARAMS               11
+
+OSSL_CORE_MAKE_FUNC(void *, OP_kdf_newctx, (void *provctx))
+OSSL_CORE_MAKE_FUNC(void *, OP_kdf_dupctx, (void *src))
+OSSL_CORE_MAKE_FUNC(void, OP_kdf_freectx, (void *kctx))
+OSSL_CORE_MAKE_FUNC(void, OP_kdf_reset, (void *kctx))
+OSSL_CORE_MAKE_FUNC(int, OP_kdf_derive, (void *kctx, unsigned char *key,
+                                          size_t keylen))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_kdf_gettable_params, (void))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_kdf_gettable_ctx_params, (void))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_kdf_settable_ctx_params, (void))
+OSSL_CORE_MAKE_FUNC(int, OP_kdf_get_params, (OSSL_PARAM params[]))
+OSSL_CORE_MAKE_FUNC(int, OP_kdf_get_ctx_params,
+                    (void *kctx, OSSL_PARAM params[]))
+OSSL_CORE_MAKE_FUNC(int, OP_kdf_set_ctx_params,
+                    (void *kctx, const OSSL_PARAM params[]))
+
+/* RAND */
+
+# define OSSL_FUNC_RAND_NEWCTX                        1
+# define OSSL_FUNC_RAND_FREECTX                       2
+# define OSSL_FUNC_RAND_INSTANTIATE                   3
+# define OSSL_FUNC_RAND_UNINSTANTIATE                 4
+# define OSSL_FUNC_RAND_GENERATE                      5
+# define OSSL_FUNC_RAND_RESEED                        6
+# define OSSL_FUNC_RAND_NONCE                         7
+# define OSSL_FUNC_RAND_ENABLE_LOCKING                8
+# define OSSL_FUNC_RAND_LOCK                          9
+# define OSSL_FUNC_RAND_UNLOCK                       10
+# define OSSL_FUNC_RAND_GETTABLE_PARAMS              11
+# define OSSL_FUNC_RAND_GETTABLE_CTX_PARAMS          12
+# define OSSL_FUNC_RAND_SETTABLE_CTX_PARAMS          13
+# define OSSL_FUNC_RAND_GET_PARAMS                   14
+# define OSSL_FUNC_RAND_GET_CTX_PARAMS               15
+# define OSSL_FUNC_RAND_SET_CTX_PARAMS               16
+# define OSSL_FUNC_RAND_SET_CALLBACKS                17
+# define OSSL_FUNC_RAND_VERIFY_ZEROIZATION           18
+
+OSSL_CORE_MAKE_FUNC(void *, OP_rand_newctx,
+                    (void *provctx, void *parent,
+                    const OSSL_DISPATCH *parent_calls))
+OSSL_CORE_MAKE_FUNC(void, OP_rand_freectx, (void *vctx))
+OSSL_CORE_MAKE_FUNC(int, OP_rand_instantiate,
+                    (void *vdrbg, unsigned int strength,
+                     int prediction_resistance,
+                     const unsigned char *pstr, size_t pstr_len))
+OSSL_CORE_MAKE_FUNC(int, OP_rand_uninstantiate, (void *vdrbg))
+OSSL_CORE_MAKE_FUNC(int, OP_rand_generate,
+                    (void *vctx, unsigned char *out, size_t outlen,
+                     unsigned int strength, int prediction_resistance,
+                     const unsigned char *addin, size_t addin_len))
+OSSL_CORE_MAKE_FUNC(int, OP_rand_reseed,
+                    (void *vctx, int prediction_resistance,
+                     const unsigned char *ent, size_t ent_len,
+                     const unsigned char *addin, size_t addin_len))
+OSSL_CORE_MAKE_FUNC(size_t, OP_rand_nonce,
+                    (void *vctx, unsigned char *out, unsigned int strength,
+                     size_t min_noncelen, size_t max_noncelen))
+OSSL_CORE_MAKE_FUNC(int, OP_rand_enable_locking, (void *vctx))
+OSSL_CORE_MAKE_FUNC(int, OP_rand_lock, (void *vctx))
+OSSL_CORE_MAKE_FUNC(void, OP_rand_unlock, (void *vctx))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_rand_gettable_params, (void))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_rand_gettable_ctx_params, (void))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_rand_settable_ctx_params, (void))
+OSSL_CORE_MAKE_FUNC(int, OP_rand_get_params, (OSSL_PARAM params[]))
+OSSL_CORE_MAKE_FUNC(int, OP_rand_get_ctx_params,
+                    (void *vctx, OSSL_PARAM params[]))
+OSSL_CORE_MAKE_FUNC(int, OP_rand_set_ctx_params,
+                    (void *vctx, const OSSL_PARAM params[]))
+OSSL_CORE_MAKE_FUNC(void, OP_rand_set_callbacks,
+                    (void *vctx, OSSL_INOUT_CALLBACK *get_entropy,
+                     OSSL_CALLBACK *cleanup_entropy,
+                     OSSL_INOUT_CALLBACK *get_nonce,
+                     OSSL_CALLBACK *cleanup_nonce, void *arg))
+OSSL_CORE_MAKE_FUNC(int, OP_rand_verify_zeroization,
+                    (void *vctx))
+
+/*-
+ * Key management
+ *
+ * The Key Management takes care of provider side key objects, and includes
+ * all current functionality to create them, destroy them, set parameters
+ * and key material, etc, essentially everything that manipulates the keys
+ * themselves and their parameters.
+ *
+ * The key objects are commonly refered to as |keydata|, and it MUST be able
+ * to contain parameters if the key has any, the public key and the private
+ * key.  All parts are optional, but their presence determines what can be
+ * done with the key object in terms of encryption, signature, and so on.
+ * The assumption from libcrypto is that the key object contains any of the
+ * following data combinations:
+ *
+ * - parameters only
+ * - public key only
+ * - public key + private key
+ * - parameters + public key
+ * - parameters + public key + private key
+ *
+ * What "parameters", "public key" and "private key" means in detail is left
+ * to the implementation.  In the case of DH and DSA, they would typically
+ * include domain parameters, while for certain variants of RSA, they would
+ * typically include PSS or OAEP parameters.
+ *
+ * Key objects are created with OP_keymgmt_new() and destroyed with
+ * Op_keymgmt_free().  Key objects can have data filled in with
+ * OP_keymgmt_import().
+ *
+ * Three functions are made available to check what selection of data is
+ * present in a key object: OP_keymgmt_has_parameters(),
+ * OP_keymgmt_has_public_key(), and OP_keymgmt_has_private_key(),
+ */
+
+/* Key data subset selection - individual bits */
+# define OSSL_KEYMGMT_SELECT_PRIVATE_KEY            0x01
+# define OSSL_KEYMGMT_SELECT_PUBLIC_KEY             0x02
+# define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS      0x04
+# define OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS       0x80
+
+/* Key data subset selection - combinations */
+# define OSSL_KEYMGMT_SELECT_ALL_PARAMETERS     \
+    ( OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS     \
+      | OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS)
+# define OSSL_KEYMGMT_SELECT_KEYPAIR            \
+    ( OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY )
+# define OSSL_KEYMGMT_SELECT_ALL                \
+    ( OSSL_KEYMGMT_SELECT_KEYPAIR | OSSL_KEYMGMT_SELECT_ALL_PARAMETERS )
+
+/* Basic key object creation */
+# define OSSL_FUNC_KEYMGMT_NEW                         1
+OSSL_CORE_MAKE_FUNC(void *, OP_keymgmt_new, (void *provctx))
+
+/* Generation, a more complex constructor */
+# define OSSL_FUNC_KEYMGMT_GEN_INIT                    2
+# define OSSL_FUNC_KEYMGMT_GEN_SET_TEMPLATE            3
+# define OSSL_FUNC_KEYMGMT_GEN_SET_PARAMS              4
+# define OSSL_FUNC_KEYMGMT_GEN_SETTABLE_PARAMS         5
+# define OSSL_FUNC_KEYMGMT_GEN                         6
+# define OSSL_FUNC_KEYMGMT_GEN_CLEANUP                 7
+OSSL_CORE_MAKE_FUNC(void *, OP_keymgmt_gen_init,
+                    (void *provctx, int selection))
+OSSL_CORE_MAKE_FUNC(int, OP_keymgmt_gen_set_template,
+                    (void *genctx, void *templ))
+OSSL_CORE_MAKE_FUNC(int, OP_keymgmt_gen_set_params,
+                    (void *genctx, const OSSL_PARAM params[]))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *,
+                    OP_keymgmt_gen_settable_params, (void *provctx))
+OSSL_CORE_MAKE_FUNC(int, OP_keymgmt_gen_get_params,
+                    (void *genctx, OSSL_PARAM params[]))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *,
+                    OP_keymgmt_gen_gettable_params, (void *provctx))
+OSSL_CORE_MAKE_FUNC(void *, OP_keymgmt_gen,
+                    (void *genctx, OSSL_CALLBACK *cb, void *cbarg))
+OSSL_CORE_MAKE_FUNC(void, OP_keymgmt_gen_cleanup, (void *genctx))
+
+/* Basic key object destruction */
+# define OSSL_FUNC_KEYMGMT_FREE                       10
+OSSL_CORE_MAKE_FUNC(void, OP_keymgmt_free, (void *keydata))
+
+/* Key object information, with discovery */
+#define OSSL_FUNC_KEYMGMT_GET_PARAMS                  11
+#define OSSL_FUNC_KEYMGMT_GETTABLE_PARAMS             12
+OSSL_CORE_MAKE_FUNC(int, OP_keymgmt_get_params,
+                    (void *keydata, OSSL_PARAM params[]))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_keymgmt_gettable_params, (void))
+
+#define OSSL_FUNC_KEYMGMT_SET_PARAMS                  13
+#define OSSL_FUNC_KEYMGMT_SETTABLE_PARAMS             14
+OSSL_CORE_MAKE_FUNC(int, OP_keymgmt_set_params,
+                    (void *keydata, const OSSL_PARAM params[]))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_keymgmt_settable_params, (void))
+
+/* Key checks - discovery of supported operations */
+# define OSSL_FUNC_KEYMGMT_QUERY_OPERATION_NAME       20
+OSSL_CORE_MAKE_FUNC(const char *, OP_keymgmt_query_operation_name,
+                    (int operation_id))
+
+/* Key checks - key data content checks */
+# define OSSL_FUNC_KEYMGMT_HAS                        21
+OSSL_CORE_MAKE_FUNC(int, OP_keymgmt_has, (void *keydata, int selection))
+
+/* Key checks - validation */
+# define OSSL_FUNC_KEYMGMT_VALIDATE                   22
+OSSL_CORE_MAKE_FUNC(int, OP_keymgmt_validate, (void *keydata, int selection))
+
+/* Key checks - matching */
+# define OSSL_FUNC_KEYMGMT_MATCH                      23
+OSSL_CORE_MAKE_FUNC(int, OP_keymgmt_match,
+                    (const void *keydata1, const void *keydata2,
+                     int selection))
+
+/* Import and export functions, with discovery */
+# define OSSL_FUNC_KEYMGMT_IMPORT                     40
+# define OSSL_FUNC_KEYMGMT_IMPORT_TYPES               41
+# define OSSL_FUNC_KEYMGMT_EXPORT                     42
+# define OSSL_FUNC_KEYMGMT_EXPORT_TYPES               43
+OSSL_CORE_MAKE_FUNC(int, OP_keymgmt_import,
+                    (void *keydata, int selection, const OSSL_PARAM params[]))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_keymgmt_import_types,
+                    (int selection))
+OSSL_CORE_MAKE_FUNC(int, OP_keymgmt_export,
+                    (void *keydata, int selection,
+                     OSSL_CALLBACK *param_cb, void *cbarg))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_keymgmt_export_types,
+                    (int selection))
+
+/* Copy function, only works for matching keymgmt */
+# define OSSL_FUNC_KEYMGMT_COPY                       44
+OSSL_CORE_MAKE_FUNC(int, OP_keymgmt_copy,
+                    ( void *keydata_to, const void *keydata_from,
+                     int selection))
+
+/* Key Exchange */
+
+# define OSSL_FUNC_KEYEXCH_NEWCTX                      1
+# define OSSL_FUNC_KEYEXCH_INIT                        2
+# define OSSL_FUNC_KEYEXCH_DERIVE                      3
+# define OSSL_FUNC_KEYEXCH_SET_PEER                    4
+# define OSSL_FUNC_KEYEXCH_FREECTX                     5
+# define OSSL_FUNC_KEYEXCH_DUPCTX                      6
+# define OSSL_FUNC_KEYEXCH_SET_CTX_PARAMS              7
+# define OSSL_FUNC_KEYEXCH_SETTABLE_CTX_PARAMS         8
+# define OSSL_FUNC_KEYEXCH_GET_CTX_PARAMS              9
+# define OSSL_FUNC_KEYEXCH_GETTABLE_CTX_PARAMS        10
+
+OSSL_CORE_MAKE_FUNC(void *, OP_keyexch_newctx, (void *provctx))
+OSSL_CORE_MAKE_FUNC(int, OP_keyexch_init, (void *ctx, void *provkey))
+OSSL_CORE_MAKE_FUNC(int, OP_keyexch_derive, (void *ctx,  unsigned char *secret,
+                                             size_t *secretlen, size_t outlen))
+OSSL_CORE_MAKE_FUNC(int, OP_keyexch_set_peer, (void *ctx, void *provkey))
+OSSL_CORE_MAKE_FUNC(void, OP_keyexch_freectx, (void *ctx))
+OSSL_CORE_MAKE_FUNC(void *, OP_keyexch_dupctx, (void *ctx))
+OSSL_CORE_MAKE_FUNC(int, OP_keyexch_set_ctx_params, (void *ctx,
+                                                     const OSSL_PARAM params[]))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_keyexch_settable_ctx_params,
+                    (void))
+OSSL_CORE_MAKE_FUNC(int, OP_keyexch_get_ctx_params, (void *ctx,
+                                                     OSSL_PARAM params[]))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_keyexch_gettable_ctx_params,
+                    (void))
+
+/* Signature */
+
+# define OSSL_FUNC_SIGNATURE_NEWCTX                  1
+# define OSSL_FUNC_SIGNATURE_SIGN_INIT               2
+# define OSSL_FUNC_SIGNATURE_SIGN                    3
+# define OSSL_FUNC_SIGNATURE_VERIFY_INIT             4
+# define OSSL_FUNC_SIGNATURE_VERIFY                  5
+# define OSSL_FUNC_SIGNATURE_VERIFY_RECOVER_INIT     6
+# define OSSL_FUNC_SIGNATURE_VERIFY_RECOVER          7
+# define OSSL_FUNC_SIGNATURE_DIGEST_SIGN_INIT        8
+# define OSSL_FUNC_SIGNATURE_DIGEST_SIGN_UPDATE      9
+# define OSSL_FUNC_SIGNATURE_DIGEST_SIGN_FINAL      10
+# define OSSL_FUNC_SIGNATURE_DIGEST_SIGN            11
+# define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_INIT     12
+# define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_UPDATE   13
+# define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_FINAL    14
+# define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY          15
+# define OSSL_FUNC_SIGNATURE_FREECTX                16
+# define OSSL_FUNC_SIGNATURE_DUPCTX                 17
+# define OSSL_FUNC_SIGNATURE_GET_CTX_PARAMS         18
+# define OSSL_FUNC_SIGNATURE_GETTABLE_CTX_PARAMS    19
+# define OSSL_FUNC_SIGNATURE_SET_CTX_PARAMS         20
+# define OSSL_FUNC_SIGNATURE_SETTABLE_CTX_PARAMS    21
+# define OSSL_FUNC_SIGNATURE_GET_CTX_MD_PARAMS      22
+# define OSSL_FUNC_SIGNATURE_GETTABLE_CTX_MD_PARAMS 23
+# define OSSL_FUNC_SIGNATURE_SET_CTX_MD_PARAMS      24
+# define OSSL_FUNC_SIGNATURE_SETTABLE_CTX_MD_PARAMS 25
+
+OSSL_CORE_MAKE_FUNC(void *, OP_signature_newctx, (void *provctx,
+                                                  const char *propq))
+OSSL_CORE_MAKE_FUNC(int, OP_signature_sign_init, (void *ctx, void *provkey))
+OSSL_CORE_MAKE_FUNC(int, OP_signature_sign, (void *ctx,  unsigned char *sig,
+                                             size_t *siglen, size_t sigsize,
+                                             const unsigned char *tbs,
+                                             size_t tbslen))
+OSSL_CORE_MAKE_FUNC(int, OP_signature_verify_init, (void *ctx, void *provkey))
+OSSL_CORE_MAKE_FUNC(int, OP_signature_verify, (void *ctx,
+                                               const unsigned char *sig,
+                                               size_t siglen,
+                                               const unsigned char *tbs,
+                                               size_t tbslen))
+OSSL_CORE_MAKE_FUNC(int, OP_signature_verify_recover_init, (void *ctx,
+                                                            void *provkey))
+OSSL_CORE_MAKE_FUNC(int, OP_signature_verify_recover, (void *ctx,
+                                                       unsigned char *rout,
+                                                       size_t *routlen,
+                                                       size_t routsize,
+                                                       const unsigned char *sig,
+                                                       size_t siglen))
+OSSL_CORE_MAKE_FUNC(int, OP_signature_digest_sign_init,
+                    (void *ctx, const char *mdname, void *provkey))
+OSSL_CORE_MAKE_FUNC(int, OP_signature_digest_sign_update,
+                    (void *ctx, const unsigned char *data, size_t datalen))
+OSSL_CORE_MAKE_FUNC(int, OP_signature_digest_sign_final,
+                    (void *ctx, unsigned char *sig, size_t *siglen,
+                     size_t sigsize))
+OSSL_CORE_MAKE_FUNC(int, OP_signature_digest_sign,
+                    (void *ctx, unsigned char *sigret, size_t *siglen,
+                     size_t sigsize, const unsigned char *tbs, size_t tbslen))
+OSSL_CORE_MAKE_FUNC(int, OP_signature_digest_verify_init,
+                    (void *ctx, const char *mdname, void *provkey))
+OSSL_CORE_MAKE_FUNC(int, OP_signature_digest_verify_update,
+                    (void *ctx, const unsigned char *data, size_t datalen))
+OSSL_CORE_MAKE_FUNC(int, OP_signature_digest_verify_final,
+                    (void *ctx, const unsigned char *sig, size_t siglen))
+OSSL_CORE_MAKE_FUNC(int, OP_signature_digest_verify,
+                    (void *ctx, const unsigned char *sig, size_t siglen,
+                     const unsigned char *tbs, size_t tbslen))
+OSSL_CORE_MAKE_FUNC(void, OP_signature_freectx, (void *ctx))
+OSSL_CORE_MAKE_FUNC(void *, OP_signature_dupctx, (void *ctx))
+OSSL_CORE_MAKE_FUNC(int, OP_signature_get_ctx_params,
+                    (void *ctx, OSSL_PARAM params[]))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_signature_gettable_ctx_params,
+                    (void))
+OSSL_CORE_MAKE_FUNC(int, OP_signature_set_ctx_params,
+                    (void *ctx, const OSSL_PARAM params[]))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_signature_settable_ctx_params,
+                    (void))
+OSSL_CORE_MAKE_FUNC(int, OP_signature_get_ctx_md_params,
+                    (void *ctx, OSSL_PARAM params[]))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_signature_gettable_ctx_md_params,
+                    (void *ctx))
+OSSL_CORE_MAKE_FUNC(int, OP_signature_set_ctx_md_params,
+                    (void *ctx, const OSSL_PARAM params[]))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_signature_settable_ctx_md_params,
+                    (void *ctx))
+
+
+/* Asymmetric Ciphers */
+
+# define OSSL_FUNC_ASYM_CIPHER_NEWCTX                  1
+# define OSSL_FUNC_ASYM_CIPHER_ENCRYPT_INIT            2
+# define OSSL_FUNC_ASYM_CIPHER_ENCRYPT                 3
+# define OSSL_FUNC_ASYM_CIPHER_DECRYPT_INIT            4
+# define OSSL_FUNC_ASYM_CIPHER_DECRYPT                 5
+# define OSSL_FUNC_ASYM_CIPHER_FREECTX                 6
+# define OSSL_FUNC_ASYM_CIPHER_DUPCTX                  7
+# define OSSL_FUNC_ASYM_CIPHER_GET_CTX_PARAMS          8
+# define OSSL_FUNC_ASYM_CIPHER_GETTABLE_CTX_PARAMS     9
+# define OSSL_FUNC_ASYM_CIPHER_SET_CTX_PARAMS         10
+# define OSSL_FUNC_ASYM_CIPHER_SETTABLE_CTX_PARAMS    11
+
+OSSL_CORE_MAKE_FUNC(void *, OP_asym_cipher_newctx, (void *provctx))
+OSSL_CORE_MAKE_FUNC(int, OP_asym_cipher_encrypt_init, (void *ctx, void *provkey))
+OSSL_CORE_MAKE_FUNC(int, OP_asym_cipher_encrypt, (void *ctx, unsigned char *out,
+                                                  size_t *outlen,
+                                                  size_t outsize,
+                                                  const unsigned char *in,
+                                                  size_t inlen))
+OSSL_CORE_MAKE_FUNC(int, OP_asym_cipher_decrypt_init, (void *ctx, void *provkey))
+OSSL_CORE_MAKE_FUNC(int, OP_asym_cipher_decrypt, (void *ctx, unsigned char *out,
+                                                  size_t *outlen,
+                                                  size_t outsize,
+                                                  const unsigned char *in,
+                                                  size_t inlen))
+OSSL_CORE_MAKE_FUNC(void, OP_asym_cipher_freectx, (void *ctx))
+OSSL_CORE_MAKE_FUNC(void *, OP_asym_cipher_dupctx, (void *ctx))
+OSSL_CORE_MAKE_FUNC(int, OP_asym_cipher_get_ctx_params,
+                    (void *ctx, OSSL_PARAM params[]))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_asym_cipher_gettable_ctx_params,
+                    (void))
+OSSL_CORE_MAKE_FUNC(int, OP_asym_cipher_set_ctx_params,
+                    (void *ctx, const OSSL_PARAM params[]))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_asym_cipher_settable_ctx_params,
+                    (void))
+
+/* Serializers */
+# define OSSL_FUNC_SERIALIZER_NEWCTX                1
+# define OSSL_FUNC_SERIALIZER_FREECTX               2
+# define OSSL_FUNC_SERIALIZER_SET_CTX_PARAMS        3
+# define OSSL_FUNC_SERIALIZER_SETTABLE_CTX_PARAMS   4
+# define OSSL_FUNC_SERIALIZER_SERIALIZE_DATA       10
+# define OSSL_FUNC_SERIALIZER_SERIALIZE_OBJECT     11
+OSSL_CORE_MAKE_FUNC(void *, OP_serializer_newctx, (void *provctx))
+OSSL_CORE_MAKE_FUNC(void, OP_serializer_freectx, (void *ctx))
+OSSL_CORE_MAKE_FUNC(int, OP_serializer_set_ctx_params,
+                    (void *ctx, const OSSL_PARAM params[]))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_serializer_settable_ctx_params,
+                    (void))
+
+OSSL_CORE_MAKE_FUNC(int, OP_serializer_serialize_data,
+                    (void *ctx, const OSSL_PARAM[], OSSL_CORE_BIO *out,
+                     OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg))
+OSSL_CORE_MAKE_FUNC(int, OP_serializer_serialize_object,
+                    (void *ctx, void *obj, OSSL_CORE_BIO *out,
+                     OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg))
+
+# ifdef __cplusplus
+}
+# endif
+
+#endif
diff --git a/include/openssl/core_numbers.h b/include/openssl/core_numbers.h
deleted file mode 100644 (file)
index af2a35e..0000000
+++ /dev/null
@@ -1,717 +0,0 @@
-/*
- * Copyright 2019-2020 The OpenSSL Project Authors. All Rights Reserved.
- *
- * Licensed under the Apache License 2.0 (the "License").  You may not use
- * this file except in compliance with the License.  You can obtain a copy
- * in the file LICENSE in the source distribution or at
- * https://www.openssl.org/source/license.html
- */
-
-#ifndef OPENSSL_CORE_NUMBERS_H
-# define OPENSSL_CORE_NUMBERS_H
-
-# include <stdarg.h>
-# include <openssl/core.h>
-
-# ifdef __cplusplus
-extern "C" {
-# endif
-
-/*-
- * Identities
- * ----------
- *
- * All series start with 1, to allow 0 to be an array terminator.
- * For any FUNC identity, we also provide a function signature typedef
- * and a static inline function to extract a function pointer from a
- * OSSL_DISPATCH element in a type safe manner.
- *
- * Names:
- * for any function base name 'foo' (uppercase form 'FOO'), we will have
- * the following:
- * - a macro for the identity with the name OSSL_FUNC_'FOO' or derivatives
- *   thereof (to be specified further down)
- * - a function signature typedef with the name OSSL_'foo'_fn
- * - a function pointer extractor function with the name OSSL_'foo'
- */
-
-/*
- * Helper macro to create the function signature typedef and the extractor
- * |type| is the return-type of the function, |name| is the name of the
- * function to fetch, and |args| is a parenthesized list of parameters
- * for the function (that is, it is |name|'s function signature).
- */
-#define OSSL_CORE_MAKE_FUNC(type,name,args)                             \
-    typedef type (OSSL_##name##_fn)args;                                \
-    static ossl_inline \
-    OSSL_##name##_fn *OSSL_get_##name(const OSSL_DISPATCH *opf)         \
-    {                                                                   \
-        return (OSSL_##name##_fn *)opf->function;                       \
-    }
-
-/*
- * Core function identities, for the two OSSL_DISPATCH tables being passed
- * in the OSSL_provider_init call.
- *
- * 0 serves as a marker for the end of the OSSL_DISPATCH array, and must
- * therefore NEVER be used as a function identity.
- */
-/* Functions provided by the Core to the provider, reserved numbers 1-1023 */
-# define OSSL_FUNC_CORE_GETTABLE_PARAMS        1
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *,
-                    core_gettable_params,(const OSSL_CORE_HANDLE *prov))
-# define OSSL_FUNC_CORE_GET_PARAMS             2
-OSSL_CORE_MAKE_FUNC(int,core_get_params,(const OSSL_CORE_HANDLE *prov,
-                                         OSSL_PARAM params[]))
-# define OSSL_FUNC_CORE_THREAD_START           3
-OSSL_CORE_MAKE_FUNC(int,core_thread_start,(const OSSL_CORE_HANDLE *prov,
-                                           OSSL_thread_stop_handler_fn handfn))
-# define OSSL_FUNC_CORE_GET_LIBRARY_CONTEXT    4
-OSSL_CORE_MAKE_FUNC(OPENSSL_CORE_CTX *,core_get_library_context,
-                    (const OSSL_CORE_HANDLE *prov))
-# define OSSL_FUNC_CORE_NEW_ERROR              5
-OSSL_CORE_MAKE_FUNC(void,core_new_error,(const OSSL_CORE_HANDLE *prov))
-# define OSSL_FUNC_CORE_SET_ERROR_DEBUG        6
-OSSL_CORE_MAKE_FUNC(void,core_set_error_debug,
-                    (const OSSL_CORE_HANDLE *prov,
-                     const char *file, int line, const char *func))
-# define OSSL_FUNC_CORE_VSET_ERROR             7
-OSSL_CORE_MAKE_FUNC(void,core_vset_error,
-                    (const OSSL_CORE_HANDLE *prov,
-                     uint32_t reason, const char *fmt, va_list args))
-# define OSSL_FUNC_CORE_SET_ERROR_MARK         8
-OSSL_CORE_MAKE_FUNC(int, core_set_error_mark, (const OSSL_CORE_HANDLE *prov))
-# define OSSL_FUNC_CORE_CLEAR_LAST_ERROR_MARK  9
-OSSL_CORE_MAKE_FUNC(int, core_clear_last_error_mark,
-                    (const OSSL_CORE_HANDLE *prov))
-# define OSSL_FUNC_CORE_POP_ERROR_TO_MARK     10
-OSSL_CORE_MAKE_FUNC(int, core_pop_error_to_mark, (const OSSL_CORE_HANDLE *prov))
-
-/* Memory allocation, freeing, clearing. */
-#define OSSL_FUNC_CRYPTO_MALLOC               20
-OSSL_CORE_MAKE_FUNC(void *,
-        CRYPTO_malloc, (size_t num, const char *file, int line))
-#define OSSL_FUNC_CRYPTO_ZALLOC               21
-OSSL_CORE_MAKE_FUNC(void *,
-        CRYPTO_zalloc, (size_t num, const char *file, int line))
-#define OSSL_FUNC_CRYPTO_FREE                 22
-OSSL_CORE_MAKE_FUNC(void,
-        CRYPTO_free, (void *ptr, const char *file, int line))
-#define OSSL_FUNC_CRYPTO_CLEAR_FREE           23
-OSSL_CORE_MAKE_FUNC(void,
-        CRYPTO_clear_free, (void *ptr, size_t num, const char *file, int line))
-#define OSSL_FUNC_CRYPTO_REALLOC              24
-OSSL_CORE_MAKE_FUNC(void *,
-        CRYPTO_realloc, (void *addr, size_t num, const char *file, int line))
-#define OSSL_FUNC_CRYPTO_CLEAR_REALLOC        25
-OSSL_CORE_MAKE_FUNC(void *,
-        CRYPTO_clear_realloc, (void *addr, size_t old_num, size_t num,
-                               const char *file, int line))
-#define OSSL_FUNC_CRYPTO_SECURE_MALLOC        26
-OSSL_CORE_MAKE_FUNC(void *,
-        CRYPTO_secure_malloc, (size_t num, const char *file, int line))
-#define OSSL_FUNC_CRYPTO_SECURE_ZALLOC        27
-OSSL_CORE_MAKE_FUNC(void *,
-        CRYPTO_secure_zalloc, (size_t num, const char *file, int line))
-#define OSSL_FUNC_CRYPTO_SECURE_FREE          28
-OSSL_CORE_MAKE_FUNC(void,
-        CRYPTO_secure_free, (void *ptr, const char *file, int line))
-#define OSSL_FUNC_CRYPTO_SECURE_CLEAR_FREE    29
-OSSL_CORE_MAKE_FUNC(void,
-        CRYPTO_secure_clear_free, (void *ptr, size_t num, const char *file,
-                                   int line))
-#define OSSL_FUNC_CRYPTO_SECURE_ALLOCATED     30
-OSSL_CORE_MAKE_FUNC(int,
-        CRYPTO_secure_allocated, (const void *ptr))
-#define OSSL_FUNC_OPENSSL_CLEANSE             31
-OSSL_CORE_MAKE_FUNC(void,
-        OPENSSL_cleanse, (void *ptr, size_t len))
-
-/* Bio functions provided by the core */
-#define OSSL_FUNC_BIO_NEW_FILE                40
-#define OSSL_FUNC_BIO_NEW_MEMBUF              41
-#define OSSL_FUNC_BIO_READ_EX                 42
-#define OSSL_FUNC_BIO_WRITE_EX                43
-#define OSSL_FUNC_BIO_FREE                    44
-#define OSSL_FUNC_BIO_VPRINTF                 45
-#define OSSL_FUNC_BIO_VSNPRINTF               46
-
-OSSL_CORE_MAKE_FUNC(OSSL_CORE_BIO *, BIO_new_file, (const char *filename,
-                                                    const char *mode))
-OSSL_CORE_MAKE_FUNC(OSSL_CORE_BIO *, BIO_new_membuf, (const void *buf, int len))
-OSSL_CORE_MAKE_FUNC(int, BIO_read_ex, (OSSL_CORE_BIO *bio, void *data,
-                                       size_t data_len, size_t *bytes_read))
-OSSL_CORE_MAKE_FUNC(int, BIO_write_ex, (OSSL_CORE_BIO *bio, const void *data,
-                                        size_t data_len, size_t *written))
-OSSL_CORE_MAKE_FUNC(int, BIO_free, (OSSL_CORE_BIO *bio))
-OSSL_CORE_MAKE_FUNC(int, BIO_vprintf, (OSSL_CORE_BIO *bio, const char *format,
-                                       va_list args))
-OSSL_CORE_MAKE_FUNC(int, BIO_vsnprintf,
-                   (char *buf, size_t n, const char *fmt, va_list args))
-
-#define OSSL_FUNC_SELF_TEST_CB               100
-OSSL_CORE_MAKE_FUNC(void, self_test_cb, (OPENSSL_CORE_CTX *ctx, OSSL_CALLBACK **cb,
-                                         void **cbarg))
-
-/* Functions provided by the provider to the Core, reserved numbers 1024-1535 */
-# define OSSL_FUNC_PROVIDER_TEARDOWN           1024
-OSSL_CORE_MAKE_FUNC(void,provider_teardown,(void *provctx))
-# define OSSL_FUNC_PROVIDER_GETTABLE_PARAMS    1025
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *,
-                    provider_gettable_params,(void *provctx))
-# define OSSL_FUNC_PROVIDER_GET_PARAMS         1026
-OSSL_CORE_MAKE_FUNC(int,provider_get_params,(void *provctx,
-                                             OSSL_PARAM params[]))
-# define OSSL_FUNC_PROVIDER_QUERY_OPERATION    1027
-OSSL_CORE_MAKE_FUNC(const OSSL_ALGORITHM *,provider_query_operation,
-                    (void *provctx, int operation_id, int *no_store))
-# define OSSL_FUNC_PROVIDER_GET_REASON_STRINGS 1028
-OSSL_CORE_MAKE_FUNC(const OSSL_ITEM *,provider_get_reason_strings,
-                    (void *provctx))
-# define OSSL_FUNC_PROVIDER_GET_CAPABILITIES   1029
-OSSL_CORE_MAKE_FUNC(int, provider_get_capabilities, (void *provctx,
-                    const char *capability, OSSL_CALLBACK *cb, void *arg))
-
-/* Operations */
-
-# define OSSL_OP_DIGEST                              1
-# define OSSL_OP_CIPHER                              2   /* Symmetric Ciphers */
-# define OSSL_OP_MAC                                 3
-# define OSSL_OP_KDF                                 4
-# define OSSL_OP_RAND                                5
-# define OSSL_OP_KEYMGMT                            10
-# define OSSL_OP_KEYEXCH                            11
-# define OSSL_OP_SIGNATURE                          12
-# define OSSL_OP_ASYM_CIPHER                        13
-/* New section for non-EVP operations */
-# define OSSL_OP_SERIALIZER                         20
-/* Highest known operation number */
-# define OSSL_OP__HIGHEST                           20
-
-/* Digests */
-
-# define OSSL_FUNC_DIGEST_NEWCTX                     1
-# define OSSL_FUNC_DIGEST_INIT                       2
-# define OSSL_FUNC_DIGEST_UPDATE                     3
-# define OSSL_FUNC_DIGEST_FINAL                      4
-# define OSSL_FUNC_DIGEST_DIGEST                     5
-# define OSSL_FUNC_DIGEST_FREECTX                    6
-# define OSSL_FUNC_DIGEST_DUPCTX                     7
-# define OSSL_FUNC_DIGEST_GET_PARAMS                 8
-# define OSSL_FUNC_DIGEST_SET_CTX_PARAMS             9
-# define OSSL_FUNC_DIGEST_GET_CTX_PARAMS            10
-# define OSSL_FUNC_DIGEST_GETTABLE_PARAMS           11
-# define OSSL_FUNC_DIGEST_SETTABLE_CTX_PARAMS       12
-# define OSSL_FUNC_DIGEST_GETTABLE_CTX_PARAMS       13
-
-OSSL_CORE_MAKE_FUNC(void *, OP_digest_newctx, (void *provctx))
-OSSL_CORE_MAKE_FUNC(int, OP_digest_init, (void *dctx))
-OSSL_CORE_MAKE_FUNC(int, OP_digest_update,
-                    (void *dctx, const unsigned char *in, size_t inl))
-OSSL_CORE_MAKE_FUNC(int, OP_digest_final,
-                    (void *dctx,
-                     unsigned char *out, size_t *outl, size_t outsz))
-OSSL_CORE_MAKE_FUNC(int, OP_digest_digest,
-                    (void *provctx, const unsigned char *in, size_t inl,
-                     unsigned char *out, size_t *outl, size_t outsz))
-
-OSSL_CORE_MAKE_FUNC(void, OP_digest_freectx, (void *dctx))
-OSSL_CORE_MAKE_FUNC(void *, OP_digest_dupctx, (void *dctx))
-
-OSSL_CORE_MAKE_FUNC(int, OP_digest_get_params, (OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(int, OP_digest_set_ctx_params,
-                    (void *vctx, const OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(int, OP_digest_get_ctx_params,
-                    (void *vctx, OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_digest_gettable_params, (void))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_digest_settable_ctx_params, (void))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_digest_gettable_ctx_params, (void))
-
-/* Symmetric Ciphers */
-
-# define OSSL_FUNC_CIPHER_NEWCTX                     1
-# define OSSL_FUNC_CIPHER_ENCRYPT_INIT               2
-# define OSSL_FUNC_CIPHER_DECRYPT_INIT               3
-# define OSSL_FUNC_CIPHER_UPDATE                     4
-# define OSSL_FUNC_CIPHER_FINAL                      5
-# define OSSL_FUNC_CIPHER_CIPHER                     6
-# define OSSL_FUNC_CIPHER_FREECTX                    7
-# define OSSL_FUNC_CIPHER_DUPCTX                     8
-# define OSSL_FUNC_CIPHER_GET_PARAMS                 9
-# define OSSL_FUNC_CIPHER_GET_CTX_PARAMS            10
-# define OSSL_FUNC_CIPHER_SET_CTX_PARAMS            11
-# define OSSL_FUNC_CIPHER_GETTABLE_PARAMS           12
-# define OSSL_FUNC_CIPHER_GETTABLE_CTX_PARAMS       13
-# define OSSL_FUNC_CIPHER_SETTABLE_CTX_PARAMS       14
-
-OSSL_CORE_MAKE_FUNC(void *, OP_cipher_newctx, (void *provctx))
-OSSL_CORE_MAKE_FUNC(int, OP_cipher_encrypt_init, (void *cctx,
-                                                  const unsigned char *key,
-                                                  size_t keylen,
-                                                  const unsigned char *iv,
-                                                  size_t ivlen))
-OSSL_CORE_MAKE_FUNC(int, OP_cipher_decrypt_init, (void *cctx,
-                                                  const unsigned char *key,
-                                                  size_t keylen,
-                                                  const unsigned char *iv,
-                                                  size_t ivlen))
-OSSL_CORE_MAKE_FUNC(int, OP_cipher_update,
-                    (void *cctx,
-                     unsigned char *out, size_t *outl, size_t outsize,
-                     const unsigned char *in, size_t inl))
-OSSL_CORE_MAKE_FUNC(int, OP_cipher_final,
-                    (void *cctx,
-                     unsigned char *out, size_t *outl, size_t outsize))
-OSSL_CORE_MAKE_FUNC(int, OP_cipher_cipher,
-                    (void *cctx,
-                     unsigned char *out, size_t *outl, size_t outsize,
-                     const unsigned char *in, size_t inl))
-OSSL_CORE_MAKE_FUNC(void, OP_cipher_freectx, (void *cctx))
-OSSL_CORE_MAKE_FUNC(void *, OP_cipher_dupctx, (void *cctx))
-OSSL_CORE_MAKE_FUNC(int, OP_cipher_get_params, (OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(int, OP_cipher_get_ctx_params, (void *cctx,
-                                                    OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(int, OP_cipher_set_ctx_params, (void *cctx,
-                                                    const OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_cipher_gettable_params,     (void))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_cipher_settable_ctx_params, (void))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_cipher_gettable_ctx_params, (void))
-
-/* MACs */
-
-# define OSSL_FUNC_MAC_NEWCTX                        1
-# define OSSL_FUNC_MAC_DUPCTX                        2
-# define OSSL_FUNC_MAC_FREECTX                       3
-# define OSSL_FUNC_MAC_INIT                          4
-# define OSSL_FUNC_MAC_UPDATE                        5
-# define OSSL_FUNC_MAC_FINAL                         6
-# define OSSL_FUNC_MAC_GET_PARAMS                    7
-# define OSSL_FUNC_MAC_GET_CTX_PARAMS                8
-# define OSSL_FUNC_MAC_SET_CTX_PARAMS                9
-# define OSSL_FUNC_MAC_GETTABLE_PARAMS              10
-# define OSSL_FUNC_MAC_GETTABLE_CTX_PARAMS          11
-# define OSSL_FUNC_MAC_SETTABLE_CTX_PARAMS          12
-
-OSSL_CORE_MAKE_FUNC(void *, OP_mac_newctx, (void *provctx))
-OSSL_CORE_MAKE_FUNC(void *, OP_mac_dupctx, (void *src))
-OSSL_CORE_MAKE_FUNC(void, OP_mac_freectx, (void *mctx))
-OSSL_CORE_MAKE_FUNC(size_t, OP_mac_size, (void *mctx))
-OSSL_CORE_MAKE_FUNC(int, OP_mac_init, (void *mctx))
-OSSL_CORE_MAKE_FUNC(int, OP_mac_update,
-                    (void *mctx, const unsigned char *in, size_t inl))
-OSSL_CORE_MAKE_FUNC(int, OP_mac_final,
-                    (void *mctx,
-                     unsigned char *out, size_t *outl, size_t outsize))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_mac_gettable_params, (void))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_mac_gettable_ctx_params, (void))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_mac_settable_ctx_params, (void))
-OSSL_CORE_MAKE_FUNC(int, OP_mac_get_params, (OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(int, OP_mac_get_ctx_params,
-                    (void *mctx, OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(int, OP_mac_set_ctx_params,
-                    (void *mctx, const OSSL_PARAM params[]))
-
-/* KDFs and PRFs */
-
-# define OSSL_FUNC_KDF_NEWCTX                        1
-# define OSSL_FUNC_KDF_DUPCTX                        2
-# define OSSL_FUNC_KDF_FREECTX                       3
-# define OSSL_FUNC_KDF_RESET                         4
-# define OSSL_FUNC_KDF_DERIVE                        5
-# define OSSL_FUNC_KDF_GETTABLE_PARAMS               6
-# define OSSL_FUNC_KDF_GETTABLE_CTX_PARAMS           7
-# define OSSL_FUNC_KDF_SETTABLE_CTX_PARAMS           8
-# define OSSL_FUNC_KDF_GET_PARAMS                    9
-# define OSSL_FUNC_KDF_GET_CTX_PARAMS               10
-# define OSSL_FUNC_KDF_SET_CTX_PARAMS               11
-
-OSSL_CORE_MAKE_FUNC(void *, OP_kdf_newctx, (void *provctx))
-OSSL_CORE_MAKE_FUNC(void *, OP_kdf_dupctx, (void *src))
-OSSL_CORE_MAKE_FUNC(void, OP_kdf_freectx, (void *kctx))
-OSSL_CORE_MAKE_FUNC(void, OP_kdf_reset, (void *kctx))
-OSSL_CORE_MAKE_FUNC(int, OP_kdf_derive, (void *kctx, unsigned char *key,
-                                          size_t keylen))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_kdf_gettable_params, (void))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_kdf_gettable_ctx_params, (void))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_kdf_settable_ctx_params, (void))
-OSSL_CORE_MAKE_FUNC(int, OP_kdf_get_params, (OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(int, OP_kdf_get_ctx_params,
-                    (void *kctx, OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(int, OP_kdf_set_ctx_params,
-                    (void *kctx, const OSSL_PARAM params[]))
-
-/* RAND */
-
-# define OSSL_FUNC_RAND_NEWCTX                        1
-# define OSSL_FUNC_RAND_FREECTX                       2
-# define OSSL_FUNC_RAND_INSTANTIATE                   3
-# define OSSL_FUNC_RAND_UNINSTANTIATE                 4
-# define OSSL_FUNC_RAND_GENERATE                      5
-# define OSSL_FUNC_RAND_RESEED                        6
-# define OSSL_FUNC_RAND_NONCE                         7
-# define OSSL_FUNC_RAND_ENABLE_LOCKING                8
-# define OSSL_FUNC_RAND_LOCK                          9
-# define OSSL_FUNC_RAND_UNLOCK                       10
-# define OSSL_FUNC_RAND_GETTABLE_PARAMS              11
-# define OSSL_FUNC_RAND_GETTABLE_CTX_PARAMS          12
-# define OSSL_FUNC_RAND_SETTABLE_CTX_PARAMS          13
-# define OSSL_FUNC_RAND_GET_PARAMS                   14
-# define OSSL_FUNC_RAND_GET_CTX_PARAMS               15
-# define OSSL_FUNC_RAND_SET_CTX_PARAMS               16
-# define OSSL_FUNC_RAND_SET_CALLBACKS                17
-# define OSSL_FUNC_RAND_VERIFY_ZEROIZATION           18
-
-OSSL_CORE_MAKE_FUNC(void *, OP_rand_newctx,
-                    (void *provctx, void *parent,
-                    const OSSL_DISPATCH *parent_calls))
-OSSL_CORE_MAKE_FUNC(void, OP_rand_freectx, (void *vctx))
-OSSL_CORE_MAKE_FUNC(int, OP_rand_instantiate,
-                    (void *vdrbg, unsigned int strength,
-                     int prediction_resistance,
-                     const unsigned char *pstr, size_t pstr_len))
-OSSL_CORE_MAKE_FUNC(int, OP_rand_uninstantiate, (void *vdrbg))
-OSSL_CORE_MAKE_FUNC(int, OP_rand_generate,
-                    (void *vctx, unsigned char *out, size_t outlen,
-                     unsigned int strength, int prediction_resistance,
-                     const unsigned char *addin, size_t addin_len))
-OSSL_CORE_MAKE_FUNC(int, OP_rand_reseed,
-                    (void *vctx, int prediction_resistance,
-                     const unsigned char *ent, size_t ent_len,
-                     const unsigned char *addin, size_t addin_len))
-OSSL_CORE_MAKE_FUNC(size_t, OP_rand_nonce,
-                    (void *vctx, unsigned char *out, unsigned int strength,
-                     size_t min_noncelen, size_t max_noncelen))
-OSSL_CORE_MAKE_FUNC(int, OP_rand_enable_locking, (void *vctx))
-OSSL_CORE_MAKE_FUNC(int, OP_rand_lock, (void *vctx))
-OSSL_CORE_MAKE_FUNC(void, OP_rand_unlock, (void *vctx))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_rand_gettable_params, (void))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_rand_gettable_ctx_params, (void))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_rand_settable_ctx_params, (void))
-OSSL_CORE_MAKE_FUNC(int, OP_rand_get_params, (OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(int, OP_rand_get_ctx_params,
-                    (void *vctx, OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(int, OP_rand_set_ctx_params,
-                    (void *vctx, const OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(void, OP_rand_set_callbacks,
-                    (void *vctx, OSSL_INOUT_CALLBACK *get_entropy,
-                     OSSL_CALLBACK *cleanup_entropy,
-                     OSSL_INOUT_CALLBACK *get_nonce,
-                     OSSL_CALLBACK *cleanup_nonce, void *arg))
-OSSL_CORE_MAKE_FUNC(int, OP_rand_verify_zeroization,
-                    (void *vctx))
-
-/*-
- * Key management
- *
- * The Key Management takes care of provider side key objects, and includes
- * all current functionality to create them, destroy them, set parameters
- * and key material, etc, essentially everything that manipulates the keys
- * themselves and their parameters.
- *
- * The key objects are commonly refered to as |keydata|, and it MUST be able
- * to contain parameters if the key has any, the public key and the private
- * key.  All parts are optional, but their presence determines what can be
- * done with the key object in terms of encryption, signature, and so on.
- * The assumption from libcrypto is that the key object contains any of the
- * following data combinations:
- *
- * - parameters only
- * - public key only
- * - public key + private key
- * - parameters + public key
- * - parameters + public key + private key
- *
- * What "parameters", "public key" and "private key" means in detail is left
- * to the implementation.  In the case of DH and DSA, they would typically
- * include domain parameters, while for certain variants of RSA, they would
- * typically include PSS or OAEP parameters.
- *
- * Key objects are created with OP_keymgmt_new() and destroyed with
- * Op_keymgmt_free().  Key objects can have data filled in with
- * OP_keymgmt_import().
- *
- * Three functions are made available to check what selection of data is
- * present in a key object: OP_keymgmt_has_parameters(),
- * OP_keymgmt_has_public_key(), and OP_keymgmt_has_private_key(),
- */
-
-/* Key data subset selection - individual bits */
-# define OSSL_KEYMGMT_SELECT_PRIVATE_KEY            0x01
-# define OSSL_KEYMGMT_SELECT_PUBLIC_KEY             0x02
-# define OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS      0x04
-# define OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS       0x80
-
-/* Key data subset selection - combinations */
-# define OSSL_KEYMGMT_SELECT_ALL_PARAMETERS     \
-    ( OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS     \
-      | OSSL_KEYMGMT_SELECT_OTHER_PARAMETERS)
-# define OSSL_KEYMGMT_SELECT_KEYPAIR            \
-    ( OSSL_KEYMGMT_SELECT_PRIVATE_KEY | OSSL_KEYMGMT_SELECT_PUBLIC_KEY )
-# define OSSL_KEYMGMT_SELECT_ALL                \
-    ( OSSL_KEYMGMT_SELECT_KEYPAIR | OSSL_KEYMGMT_SELECT_ALL_PARAMETERS )
-
-/* Basic key object creation */
-# define OSSL_FUNC_KEYMGMT_NEW                         1
-OSSL_CORE_MAKE_FUNC(void *, OP_keymgmt_new, (void *provctx))
-
-/* Generation, a more complex constructor */
-# define OSSL_FUNC_KEYMGMT_GEN_INIT                    2
-# define OSSL_FUNC_KEYMGMT_GEN_SET_TEMPLATE            3
-# define OSSL_FUNC_KEYMGMT_GEN_SET_PARAMS              4
-# define OSSL_FUNC_KEYMGMT_GEN_SETTABLE_PARAMS         5
-# define OSSL_FUNC_KEYMGMT_GEN                         6
-# define OSSL_FUNC_KEYMGMT_GEN_CLEANUP                 7
-OSSL_CORE_MAKE_FUNC(void *, OP_keymgmt_gen_init,
-                    (void *provctx, int selection))
-OSSL_CORE_MAKE_FUNC(int, OP_keymgmt_gen_set_template,
-                    (void *genctx, void *templ))
-OSSL_CORE_MAKE_FUNC(int, OP_keymgmt_gen_set_params,
-                    (void *genctx, const OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *,
-                    OP_keymgmt_gen_settable_params, (void *provctx))
-OSSL_CORE_MAKE_FUNC(int, OP_keymgmt_gen_get_params,
-                    (void *genctx, OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *,
-                    OP_keymgmt_gen_gettable_params, (void *provctx))
-OSSL_CORE_MAKE_FUNC(void *, OP_keymgmt_gen,
-                    (void *genctx, OSSL_CALLBACK *cb, void *cbarg))
-OSSL_CORE_MAKE_FUNC(void, OP_keymgmt_gen_cleanup, (void *genctx))
-
-/* Basic key object destruction */
-# define OSSL_FUNC_KEYMGMT_FREE                       10
-OSSL_CORE_MAKE_FUNC(void, OP_keymgmt_free, (void *keydata))
-
-/* Key object information, with discovery */
-#define OSSL_FUNC_KEYMGMT_GET_PARAMS                  11
-#define OSSL_FUNC_KEYMGMT_GETTABLE_PARAMS             12
-OSSL_CORE_MAKE_FUNC(int, OP_keymgmt_get_params,
-                    (void *keydata, OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_keymgmt_gettable_params, (void))
-
-#define OSSL_FUNC_KEYMGMT_SET_PARAMS                  13
-#define OSSL_FUNC_KEYMGMT_SETTABLE_PARAMS             14
-OSSL_CORE_MAKE_FUNC(int, OP_keymgmt_set_params,
-                    (void *keydata, const OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_keymgmt_settable_params, (void))
-
-/* Key checks - discovery of supported operations */
-# define OSSL_FUNC_KEYMGMT_QUERY_OPERATION_NAME       20
-OSSL_CORE_MAKE_FUNC(const char *, OP_keymgmt_query_operation_name,
-                    (int operation_id))
-
-/* Key checks - key data content checks */
-# define OSSL_FUNC_KEYMGMT_HAS                        21
-OSSL_CORE_MAKE_FUNC(int, OP_keymgmt_has, (void *keydata, int selection))
-
-/* Key checks - validation */
-# define OSSL_FUNC_KEYMGMT_VALIDATE                   22
-OSSL_CORE_MAKE_FUNC(int, OP_keymgmt_validate, (void *keydata, int selection))
-
-/* Key checks - matching */
-# define OSSL_FUNC_KEYMGMT_MATCH                      23
-OSSL_CORE_MAKE_FUNC(int, OP_keymgmt_match,
-                    (const void *keydata1, const void *keydata2,
-                     int selection))
-
-/* Import and export functions, with discovery */
-# define OSSL_FUNC_KEYMGMT_IMPORT                     40
-# define OSSL_FUNC_KEYMGMT_IMPORT_TYPES               41
-# define OSSL_FUNC_KEYMGMT_EXPORT                     42
-# define OSSL_FUNC_KEYMGMT_EXPORT_TYPES               43
-OSSL_CORE_MAKE_FUNC(int, OP_keymgmt_import,
-                    (void *keydata, int selection, const OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_keymgmt_import_types,
-                    (int selection))
-OSSL_CORE_MAKE_FUNC(int, OP_keymgmt_export,
-                    (void *keydata, int selection,
-                     OSSL_CALLBACK *param_cb, void *cbarg))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_keymgmt_export_types,
-                    (int selection))
-
-/* Copy function, only works for matching keymgmt */
-# define OSSL_FUNC_KEYMGMT_COPY                       44
-OSSL_CORE_MAKE_FUNC(int, OP_keymgmt_copy,
-                    ( void *keydata_to, const void *keydata_from,
-                     int selection))
-
-/* Key Exchange */
-
-# define OSSL_FUNC_KEYEXCH_NEWCTX                      1
-# define OSSL_FUNC_KEYEXCH_INIT                        2
-# define OSSL_FUNC_KEYEXCH_DERIVE                      3
-# define OSSL_FUNC_KEYEXCH_SET_PEER                    4
-# define OSSL_FUNC_KEYEXCH_FREECTX                     5
-# define OSSL_FUNC_KEYEXCH_DUPCTX                      6
-# define OSSL_FUNC_KEYEXCH_SET_CTX_PARAMS              7
-# define OSSL_FUNC_KEYEXCH_SETTABLE_CTX_PARAMS         8
-# define OSSL_FUNC_KEYEXCH_GET_CTX_PARAMS              9
-# define OSSL_FUNC_KEYEXCH_GETTABLE_CTX_PARAMS        10
-
-OSSL_CORE_MAKE_FUNC(void *, OP_keyexch_newctx, (void *provctx))
-OSSL_CORE_MAKE_FUNC(int, OP_keyexch_init, (void *ctx, void *provkey))
-OSSL_CORE_MAKE_FUNC(int, OP_keyexch_derive, (void *ctx,  unsigned char *secret,
-                                             size_t *secretlen, size_t outlen))
-OSSL_CORE_MAKE_FUNC(int, OP_keyexch_set_peer, (void *ctx, void *provkey))
-OSSL_CORE_MAKE_FUNC(void, OP_keyexch_freectx, (void *ctx))
-OSSL_CORE_MAKE_FUNC(void *, OP_keyexch_dupctx, (void *ctx))
-OSSL_CORE_MAKE_FUNC(int, OP_keyexch_set_ctx_params, (void *ctx,
-                                                     const OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_keyexch_settable_ctx_params,
-                    (void))
-OSSL_CORE_MAKE_FUNC(int, OP_keyexch_get_ctx_params, (void *ctx,
-                                                     OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_keyexch_gettable_ctx_params,
-                    (void))
-
-/* Signature */
-
-# define OSSL_FUNC_SIGNATURE_NEWCTX                  1
-# define OSSL_FUNC_SIGNATURE_SIGN_INIT               2
-# define OSSL_FUNC_SIGNATURE_SIGN                    3
-# define OSSL_FUNC_SIGNATURE_VERIFY_INIT             4
-# define OSSL_FUNC_SIGNATURE_VERIFY                  5
-# define OSSL_FUNC_SIGNATURE_VERIFY_RECOVER_INIT     6
-# define OSSL_FUNC_SIGNATURE_VERIFY_RECOVER          7
-# define OSSL_FUNC_SIGNATURE_DIGEST_SIGN_INIT        8
-# define OSSL_FUNC_SIGNATURE_DIGEST_SIGN_UPDATE      9
-# define OSSL_FUNC_SIGNATURE_DIGEST_SIGN_FINAL      10
-# define OSSL_FUNC_SIGNATURE_DIGEST_SIGN            11
-# define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_INIT     12
-# define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_UPDATE   13
-# define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_FINAL    14
-# define OSSL_FUNC_SIGNATURE_DIGEST_VERIFY          15
-# define OSSL_FUNC_SIGNATURE_FREECTX                16
-# define OSSL_FUNC_SIGNATURE_DUPCTX                 17
-# define OSSL_FUNC_SIGNATURE_GET_CTX_PARAMS         18
-# define OSSL_FUNC_SIGNATURE_GETTABLE_CTX_PARAMS    19
-# define OSSL_FUNC_SIGNATURE_SET_CTX_PARAMS         20
-# define OSSL_FUNC_SIGNATURE_SETTABLE_CTX_PARAMS    21
-# define OSSL_FUNC_SIGNATURE_GET_CTX_MD_PARAMS      22
-# define OSSL_FUNC_SIGNATURE_GETTABLE_CTX_MD_PARAMS 23
-# define OSSL_FUNC_SIGNATURE_SET_CTX_MD_PARAMS      24
-# define OSSL_FUNC_SIGNATURE_SETTABLE_CTX_MD_PARAMS 25
-
-OSSL_CORE_MAKE_FUNC(void *, OP_signature_newctx, (void *provctx,
-                                                  const char *propq))
-OSSL_CORE_MAKE_FUNC(int, OP_signature_sign_init, (void *ctx, void *provkey))
-OSSL_CORE_MAKE_FUNC(int, OP_signature_sign, (void *ctx,  unsigned char *sig,
-                                             size_t *siglen, size_t sigsize,
-                                             const unsigned char *tbs,
-                                             size_t tbslen))
-OSSL_CORE_MAKE_FUNC(int, OP_signature_verify_init, (void *ctx, void *provkey))
-OSSL_CORE_MAKE_FUNC(int, OP_signature_verify, (void *ctx,
-                                               const unsigned char *sig,
-                                               size_t siglen,
-                                               const unsigned char *tbs,
-                                               size_t tbslen))
-OSSL_CORE_MAKE_FUNC(int, OP_signature_verify_recover_init, (void *ctx,
-                                                            void *provkey))
-OSSL_CORE_MAKE_FUNC(int, OP_signature_verify_recover, (void *ctx,
-                                                       unsigned char *rout,
-                                                       size_t *routlen,
-                                                       size_t routsize,
-                                                       const unsigned char *sig,
-                                                       size_t siglen))
-OSSL_CORE_MAKE_FUNC(int, OP_signature_digest_sign_init,
-                    (void *ctx, const char *mdname, void *provkey))
-OSSL_CORE_MAKE_FUNC(int, OP_signature_digest_sign_update,
-                    (void *ctx, const unsigned char *data, size_t datalen))
-OSSL_CORE_MAKE_FUNC(int, OP_signature_digest_sign_final,
-                    (void *ctx, unsigned char *sig, size_t *siglen,
-                     size_t sigsize))
-OSSL_CORE_MAKE_FUNC(int, OP_signature_digest_sign,
-                    (void *ctx, unsigned char *sigret, size_t *siglen,
-                     size_t sigsize, const unsigned char *tbs, size_t tbslen))
-OSSL_CORE_MAKE_FUNC(int, OP_signature_digest_verify_init,
-                    (void *ctx, const char *mdname, void *provkey))
-OSSL_CORE_MAKE_FUNC(int, OP_signature_digest_verify_update,
-                    (void *ctx, const unsigned char *data, size_t datalen))
-OSSL_CORE_MAKE_FUNC(int, OP_signature_digest_verify_final,
-                    (void *ctx, const unsigned char *sig, size_t siglen))
-OSSL_CORE_MAKE_FUNC(int, OP_signature_digest_verify,
-                    (void *ctx, const unsigned char *sig, size_t siglen,
-                     const unsigned char *tbs, size_t tbslen))
-OSSL_CORE_MAKE_FUNC(void, OP_signature_freectx, (void *ctx))
-OSSL_CORE_MAKE_FUNC(void *, OP_signature_dupctx, (void *ctx))
-OSSL_CORE_MAKE_FUNC(int, OP_signature_get_ctx_params,
-                    (void *ctx, OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_signature_gettable_ctx_params,
-                    (void))
-OSSL_CORE_MAKE_FUNC(int, OP_signature_set_ctx_params,
-                    (void *ctx, const OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_signature_settable_ctx_params,
-                    (void))
-OSSL_CORE_MAKE_FUNC(int, OP_signature_get_ctx_md_params,
-                    (void *ctx, OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_signature_gettable_ctx_md_params,
-                    (void *ctx))
-OSSL_CORE_MAKE_FUNC(int, OP_signature_set_ctx_md_params,
-                    (void *ctx, const OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_signature_settable_ctx_md_params,
-                    (void *ctx))
-
-
-/* Asymmetric Ciphers */
-
-# define OSSL_FUNC_ASYM_CIPHER_NEWCTX                  1
-# define OSSL_FUNC_ASYM_CIPHER_ENCRYPT_INIT            2
-# define OSSL_FUNC_ASYM_CIPHER_ENCRYPT                 3
-# define OSSL_FUNC_ASYM_CIPHER_DECRYPT_INIT            4
-# define OSSL_FUNC_ASYM_CIPHER_DECRYPT                 5
-# define OSSL_FUNC_ASYM_CIPHER_FREECTX                 6
-# define OSSL_FUNC_ASYM_CIPHER_DUPCTX                  7
-# define OSSL_FUNC_ASYM_CIPHER_GET_CTX_PARAMS          8
-# define OSSL_FUNC_ASYM_CIPHER_GETTABLE_CTX_PARAMS     9
-# define OSSL_FUNC_ASYM_CIPHER_SET_CTX_PARAMS         10
-# define OSSL_FUNC_ASYM_CIPHER_SETTABLE_CTX_PARAMS    11
-
-OSSL_CORE_MAKE_FUNC(void *, OP_asym_cipher_newctx, (void *provctx))
-OSSL_CORE_MAKE_FUNC(int, OP_asym_cipher_encrypt_init, (void *ctx, void *provkey))
-OSSL_CORE_MAKE_FUNC(int, OP_asym_cipher_encrypt, (void *ctx, unsigned char *out,
-                                                  size_t *outlen,
-                                                  size_t outsize,
-                                                  const unsigned char *in,
-                                                  size_t inlen))
-OSSL_CORE_MAKE_FUNC(int, OP_asym_cipher_decrypt_init, (void *ctx, void *provkey))
-OSSL_CORE_MAKE_FUNC(int, OP_asym_cipher_decrypt, (void *ctx, unsigned char *out,
-                                                  size_t *outlen,
-                                                  size_t outsize,
-                                                  const unsigned char *in,
-                                                  size_t inlen))
-OSSL_CORE_MAKE_FUNC(void, OP_asym_cipher_freectx, (void *ctx))
-OSSL_CORE_MAKE_FUNC(void *, OP_asym_cipher_dupctx, (void *ctx))
-OSSL_CORE_MAKE_FUNC(int, OP_asym_cipher_get_ctx_params,
-                    (void *ctx, OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_asym_cipher_gettable_ctx_params,
-                    (void))
-OSSL_CORE_MAKE_FUNC(int, OP_asym_cipher_set_ctx_params,
-                    (void *ctx, const OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_asym_cipher_settable_ctx_params,
-                    (void))
-
-/* Serializers */
-# define OSSL_FUNC_SERIALIZER_NEWCTX                1
-# define OSSL_FUNC_SERIALIZER_FREECTX               2
-# define OSSL_FUNC_SERIALIZER_SET_CTX_PARAMS        3
-# define OSSL_FUNC_SERIALIZER_SETTABLE_CTX_PARAMS   4
-# define OSSL_FUNC_SERIALIZER_SERIALIZE_DATA       10
-# define OSSL_FUNC_SERIALIZER_SERIALIZE_OBJECT     11
-OSSL_CORE_MAKE_FUNC(void *, OP_serializer_newctx, (void *provctx))
-OSSL_CORE_MAKE_FUNC(void, OP_serializer_freectx, (void *ctx))
-OSSL_CORE_MAKE_FUNC(int, OP_serializer_set_ctx_params,
-                    (void *ctx, const OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_serializer_settable_ctx_params,
-                    (void))
-
-OSSL_CORE_MAKE_FUNC(int, OP_serializer_serialize_data,
-                    (void *ctx, const OSSL_PARAM[], OSSL_CORE_BIO *out,
-                     OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg))
-OSSL_CORE_MAKE_FUNC(int, OP_serializer_serialize_object,
-                    (void *ctx, void *obj, OSSL_CORE_BIO *out,
-                     OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg))
-
-# ifdef __cplusplus
-}
-# endif
-
-#endif
index 4ddfa0c4148f0e0a3e5be14d14b609af16ec1d7d..2186894b11072092ce388a6dea1ad13ae6afcf83 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include <assert.h>
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include "internal/cryptlib.h"
 #include "prov/bio.h"
 
index 84d2006ceeeeeddd3ca565a95f7643bd1ee8e5ac..a41d3990f0d92b5f9067d41ba15f96d4e9a0cc3c 100644 (file)
@@ -9,7 +9,7 @@
 
 #include <assert.h>
 #include <string.h>
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/core_names.h>
 /* For TLS1_VERSION etc */
 #include <openssl/ssl.h>
index b9fcf3d52e1eea2b71b9aefa0543e3adab23e76b..2a614f5d815461a2f3c5e1493a03c73ba981d1cd 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include <openssl/provider.h>
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 
 const OSSL_CORE_HANDLE *FIPS_get_core_handle(OPENSSL_CTX *ctx);
 
index 7c1ffc7763e1ebfa9ffad36af30d2ae7e0ee85b1..1ea360437757fcfa6b77d6f77b36cd9772aa6eca 100644 (file)
@@ -11,7 +11,7 @@
 #include <stdio.h>
 #include <openssl/opensslconf.h>
 #include <openssl/core.h>
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/core_names.h>
 #include <openssl/params.h>
 #include "prov/bio.h"
index 6a1b56eeae806c1678337df7497b52f3b031a42e..d847d5c903eaffceba6341b19dc2c53cc998410e 100644 (file)
@@ -10,7 +10,7 @@
 #include <string.h>
 #include <stdio.h>
 #include <openssl/core.h>
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/core_names.h>
 #include <openssl/params.h>
 #include <openssl/err.h>
index ad693aa9a24534a5434361b25d8b7ec10bf01b14..77ef6314ef84fff5332f5213c46fcc7d852fef58 100644 (file)
@@ -7,7 +7,7 @@
  * https://www.openssl.org/source/license.html
  */
 
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/types.h>
 #include <openssl/self_test.h>
 
index db89de8a268a8f50c5bf888ee15fa5026c652c15..86d4b878fa0477742198b00850245d47d321b92c 100644 (file)
@@ -15,7 +15,7 @@
 
 #include <openssl/crypto.h>
 #include <openssl/evp.h>
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/core_names.h>
 #include <openssl/rsa.h>
 #include <openssl/params.h>
index 6443e6574203ec9f90908fbf607ea2fde0db2652..20567279ebb93ee1fb53de8d8a2096c12d0ba258 100644 (file)
@@ -9,7 +9,7 @@
 
 #include <string.h>
 #include <openssl/crypto.h>
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include "prov/implementations.h"
 #include "prov/ciphercommon.h"
 #include "prov/providercommonerr.h"
index 98bb32ee3c5cf189d3686dce5e79adbc42d3aef5..8455cc466001225ad313df86260b9b45eb135f85 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include <openssl/des.h>
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include "crypto/des_platform.h"
 
 #define DES_BLOCK_SIZE 8
index 91be5087f52cffea1d67e12023207e24e2b34d5f..4cabd323dee90a51f9f57ce0e73fd6e3eae953a3 100644 (file)
@@ -14,7 +14,7 @@
 #include "internal/deprecated.h"
 
 #include <openssl/crypto.h>
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/evp.h>
 #include <openssl/sha.h>
 #include <openssl/evp.h>
index 3830e0e0be3e13831facb28e303399ed11d15986..c8ed76e8b168b73420c4def6251d80d7ff5133fe 100644 (file)
@@ -14,7 +14,7 @@
 #include "internal/deprecated.h"
 
 #include <openssl/crypto.h>
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/core_names.h>
 #include <openssl/dh.h>
 #include <openssl/params.h>
index ae0720d90debc2c9a268ea51073b8053d4328644..686559d5617cc02b8c268c3c28b4e439f9878420 100644 (file)
@@ -16,7 +16,7 @@
 #include <string.h>
 #include <openssl/crypto.h>
 #include <openssl/evp.h>
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/core_names.h>
 #include <openssl/ec.h>
 #include <openssl/params.h>
index ea12628937392fd4d420d2eb130bebbfcfc2f953..311a31d36a933c069a1e2f4974093826ea9e4d1d 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include <openssl/crypto.h>
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/core_names.h>
 #include <openssl/params.h>
 #include <openssl/err.h>
index d4dc5ed1db02847f6d622d7b7e791cf223fac471..fe3b3143c47f0da345b284bb7f41c55066b98b6d 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include <openssl/params.h>
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/core_names.h>
 #include <openssl/evp.h>
 #include "internal/cryptlib.h"
index e5b76ff49f06efb5fb17d5d95a6a1436f3537c15..99fe09cbe6ee21c2c3db08370f6d156b3bd196ab 100644 (file)
@@ -10,7 +10,7 @@
 #ifndef OSSL_PROVIDERS_DIGESTCOMMON_H
 # define OSSL_PROVIDERS_DIGESTCOMMON_H
 
-# include <openssl/core_numbers.h>
+# include <openssl/core_dispatch.h>
 # include <openssl/core_names.h>
 # include <openssl/params.h>
 
index 82fbdc8bb415da8bb006449634e2f7ace6630da4..52709b4e2ddb4d921466c5b6813a7bd0d19bde76 100644 (file)
@@ -14,7 +14,7 @@
 #include "internal/deprecated.h"
 
 #include <string.h> /* strcmp */
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/core_names.h>
 #include <openssl/bn.h>
 #include <openssl/err.h>
index 5fa3e08af9db0b3a6e9e03fa37705b7e8c55558f..feadb875dcd41c29743ca4f9095ba24fbdce545e 100644 (file)
@@ -14,7 +14,7 @@
 #include "internal/deprecated.h"
 
 #include "e_os.h" /* strcasecmp */
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/core_names.h>
 #include <openssl/bn.h>
 #include <openssl/err.h>
index cd8e7f5ecec90920cf110bd6cb4786f0e5e3fe78..7212ddf9731c53fa93c2fb8f0cd785a20302abc3 100644 (file)
@@ -13,7 +13,7 @@
  */
 #include "internal/deprecated.h"
 
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/core_names.h>
 #include <openssl/bn.h>
 #include <openssl/err.h>
index 813604f7b1febb770fd07d16120f5e95c3b7c8fd..33fecba8b82d27f17af307628bb5db3f4642e8d3 100644 (file)
@@ -11,7 +11,7 @@
 #include <string.h>
 /* For strcasecmp on Windows */
 #include "e_os.h"
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/core_names.h>
 #include <openssl/params.h>
 #include <openssl/err.h>
index 313b9c292df8114e4e72d87c2da743736d70e2ef..f8b466a60379d5f176a03a1ae0893d3c40cba965 100644 (file)
@@ -13,7 +13,7 @@
  */
 #include "internal/deprecated.h"
 
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/core_names.h>
 #include <openssl/bn.h>
 #include <openssl/err.h>
index 6b6261f31c7bfb2772bbfc2f4bf6586d89fc2976..64d997bd50e235f0e8f8ccd8650eb0f4c59fe28f 100644 (file)
@@ -7,7 +7,7 @@
  * https://www.openssl.org/source/license.html
  */
 
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/core_names.h>
 #include <openssl/params.h>
 
index 1377c795df495be0d7593a89623e3751d7a875dd..748824782f5323d26964f406f1d77d97e4af82ad 100644 (file)
@@ -13,7 +13,7 @@
  */
 #include "internal/deprecated.h"
 
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/core_names.h>
 #include <openssl/params.h>
 #include <openssl/engine.h>
index f9e5a3a17d52e22e9b8139ba9dbea4c51446cd2e..5a0174573d12b6e514ec55d74796444822cb4756 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include <stdlib.h>
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/core_names.h>
 #include <openssl/params.h>
 #include <openssl/engine.h>
index bd2cff27affd2d20a9259fd2950c95b74c3b1164..6974db294457dcc7a79368e8f60230f8da666838 100644 (file)
@@ -13,7 +13,7 @@
  */
 #include "internal/deprecated.h"
 
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/core_names.h>
 #include <openssl/params.h>
 #include <openssl/engine.h>
index da465965de1e0855dc64fdd9ab68b2a8d43388e0..d1ccda9b23c2ba227029d6628e461eea1dcc6a42 100644 (file)
@@ -48,7 +48,7 @@
 
 #include <stdlib.h>
 #include <string.h>
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/core_names.h>
 #include <openssl/params.h>
 #include <openssl/evp.h>
index 1edd2dc06312a60270ca7c98c613f463be5ba305..b14fc35b3e9cb9283a0c674f662749686713ad9d 100644 (file)
@@ -7,7 +7,7 @@
  * https://www.openssl.org/source/license.html
  */
 
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/core_names.h>
 #include <openssl/params.h>
 #include <openssl/evp.h>
index e82f94ce7bd939bbd4d1845c467c9b40a2022944..4ddcb43d593f7335b5d678d7af254614b754d3db 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include <string.h>
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/core_names.h>
 #include <openssl/params.h>
 #include <openssl/evp.h>
index 4acf5caec651f6b5f99dff103ebe284eae0d4376..725469569793d7654cced4a921980b85389d4d94 100644 (file)
@@ -13,7 +13,7 @@
  */
 #include "internal/deprecated.h"
 
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/pem.h>
 #include <openssl/dh.h>
 #include <openssl/types.h>
index c37eb40297e61d6228be2d43383e26dc38974490..7badf827ea57a321e2d18f83a17f27eed70d5a55 100644 (file)
@@ -13,7 +13,7 @@
  */
 #include "internal/deprecated.h"
 
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/core_names.h>
 #include <openssl/err.h>
 #include <openssl/pem.h>
index d1b60d87c522ac3b4cfdb15581acc40f8a99f515..45aa2a946c91d5381cdff1ddedf61fb64f22e559 100644 (file)
@@ -13,7 +13,7 @@
  */
 #include "internal/deprecated.h"
 
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/err.h>
 #include <openssl/pem.h>
 #include <openssl/dh.h>
index 23a6d1d25dd17a2d3cd98f0f18014547acd73f60..40e9a7b7ae4ceb4073c36c484605f8583ff06eae 100644 (file)
@@ -13,7 +13,7 @@
  */
 #include "internal/deprecated.h"
 
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/pem.h>
 #include <openssl/dsa.h>
 #include <openssl/types.h>
index cb9136140ddae70eafd0307665d6b5e649d53fc5..4e9f80056e1b70a570391661042be7430af6d32d 100644 (file)
@@ -13,7 +13,7 @@
  */
 #include "internal/deprecated.h"
 
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/core_names.h>
 #include <openssl/err.h>
 #include <openssl/pem.h>
index 5c5e61f13d3f1f05e173126d5fafc8f7a07f1920..b47d0dd2d7cd562692a3ee678e59f4fc3199a58b 100644 (file)
@@ -13,7 +13,7 @@
  */
 #include "internal/deprecated.h"
 
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/err.h>
 #include <openssl/pem.h>
 #include <openssl/dsa.h>
index a82971602f36f46e0a459cd0b60645ff510dfc0b..7eda31f3a0dd59864b15416fe47d422629db24f0 100644 (file)
@@ -7,7 +7,7 @@
  * https://www.openssl.org/source/license.html
  */
 
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/pem.h>
 #include <openssl/ec.h>
 #include <openssl/types.h>
index 4a0e3d8be70bedbf08768bab61dc7a21b3e4b141..e96c08b7e73fc57a695ac55f67a0f312c0e15ef7 100644 (file)
@@ -7,7 +7,7 @@
  * https://www.openssl.org/source/license.html
  */
 
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/core_names.h>
 #include <openssl/err.h>
 #include <openssl/pem.h>
index 1c145cf3c0412a6c17d8f3e06a9106d022e9cb5d..87e7646285e7673c7594551bfe8802c261741a69 100644 (file)
@@ -7,7 +7,7 @@
  * https://www.openssl.org/source/license.html
  */
 
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/err.h>
 #include <openssl/pem.h>
 #include <openssl/types.h>
index ea46d6c5e485b8fa0284508c8aaa1d85a1a623fb..0036ea68787df0539ec2912c467c2b027c3323d0 100644 (file)
@@ -7,7 +7,7 @@
  * https://www.openssl.org/source/license.html
  */
 
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/core_names.h>
 #include <openssl/err.h>
 #include <openssl/pem.h>
index 94483f10edaa9322d650188383c53c7ae559a2ad..3e2c7620ac80af6bfc7b1dc43bd423ab14666ffa 100644 (file)
@@ -7,7 +7,7 @@
  * https://www.openssl.org/source/license.html
  */
 
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/err.h>
 #include <openssl/pem.h>
 #include <openssl/types.h>
index f4aee6fc23b05f8b1858798307d009e2d75d0376..237e83a195d060363851473755d319c49d5d8de7 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include <openssl/core.h>
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/bn.h>
 #include <openssl/asn1.h>        /* i2d_of_void */
 #include <openssl/x509.h>        /* X509_SIG */
index 981ddcf2fc5370c291fbba126b64e3ebd9a3f1ee..115a8a6d7bba8075db90f4b07f58a1d6888233ea 100644 (file)
@@ -13,7 +13,7 @@
  */
 #include "internal/deprecated.h"
 
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/core_names.h>
 #include <openssl/err.h>
 #include <openssl/pem.h>
index 80e1504611c7a4d2ec7616f4d237e1c6303a8c8c..d5da6df80515402e359eba13f6a869dc39ce504c 100644 (file)
@@ -13,7 +13,7 @@
  */
 #include "internal/deprecated.h"
 
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/pem.h>
 #include <openssl/rsa.h>
 #include <openssl/types.h>
index a4902babcbae3c877bec76195ea02a1b62dad7a2..067f9e70c72f83f898fbcaf3346fdfcb0fec65dd 100644 (file)
@@ -16,7 +16,7 @@
 #include <string.h>
 
 #include <openssl/crypto.h>
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/core_names.h>
 #include <openssl/err.h>
 #include <openssl/dsa.h>
index 61a13f4f2f80565cce48fc1260e149cb6337bb00..7ee14ff16bcb58d4cc1cb8ff5cb1f71836ac5a1c 100644 (file)
@@ -15,7 +15,7 @@
 
 #include <string.h> /* memcpy */
 #include <openssl/crypto.h>
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/core_names.h>
 #include <openssl/dsa.h>
 #include <openssl/params.h>
index 35a69504d37158ee45a12cab344995d339d83036..9a7188ef7e4efd6349636dd5d900e592fc8a93f3 100644 (file)
@@ -8,7 +8,7 @@
  */
 
 #include <openssl/crypto.h>
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/core_names.h>
 #include <openssl/err.h>
 #include <openssl/params.h>
index 5af64d2a9084c5b289738056894dbbb691d27eb0..49334e5cf0aa6564a58e6283b74403e95ecd87b0 100644 (file)
@@ -15,7 +15,7 @@
 
 #include <string.h>
 #include <openssl/crypto.h>
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/core_names.h>
 #include <openssl/err.h>
 #include <openssl/rsa.h>
index 886037cff9e2ff278f0d2a0be385c4bc37428583..288c17d2e4f40dbc8019f5ec40592ed183c85374 100644 (file)
@@ -10,7 +10,7 @@
 #include <string.h>
 #include <stdio.h>
 #include <openssl/core.h>
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/core_names.h>
 #include <openssl/params.h>
 #include "prov/provider_ctx.h"
index 945ec2fbb6d82af7680cc7334a42174fc1f392be..bdad5f15e64613cf7383cdb5e65d3325307c8078 100644 (file)
@@ -10,7 +10,7 @@
 #include <string.h>
 #include <stdio.h>
 #include <openssl/core.h>
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/core_names.h>
 #include <openssl/params.h>
 #include "prov/implementations.h"
index c2189e25a83cf3168678e1d37308fcad82321acb..03063d6206b6d883fbab063aca3594ca1f0d89b7 100644 (file)
@@ -14,7 +14,7 @@
 
 #include <string.h>
 #include <openssl/core.h>
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/provider.h>
 #include <openssl/crypto.h>
 
index 5a491234a06485033a0d0528bc8504d32aa78380..9a0f22947a0f175b831f4cfedf21f93169829c0b 100644 (file)
@@ -27,7 +27,7 @@
 #endif
 
 #include <openssl/core.h>
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 
 static OSSL_core_gettable_params_fn *c_gettable_params = NULL;
 static OSSL_core_get_params_fn *c_get_params = NULL;
index c3ee6fa9968340aacbd8f041269ed5602c93f352..989d041a17997e681c6cd6126d46160183485e04 100644 (file)
@@ -28,7 +28,7 @@
 #include <openssl/aes.h>
 #include <openssl/rand.h>
 #include <openssl/core_names.h>
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/provider.h>
 
 #include "ssltestlib.h"
index 4025d9ee168d185d68212c20b9fac06a024570e0..158c00747c7594508643fa6ae8ebdd776491f720 100644 (file)
@@ -9,7 +9,7 @@
 
 #include <string.h>
 #include <openssl/core_names.h>
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
 #include <openssl/rand.h>
 #include <openssl/params.h>
 /* For TLS1_3_VERSION */