prov: prefix provider internal functions with ossl_
authorPauli <paul.dale@oracle.com>
Mon, 28 Sep 2020 02:47:04 +0000 (12:47 +1000)
committerPauli <paul.dale@oracle.com>
Tue, 29 Sep 2020 06:33:16 +0000 (16:33 +1000)
Also convert the names to lower case.

Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/13014)

87 files changed:
providers/baseprov.c
providers/common/bio_prov.c
providers/common/include/prov/provider_ctx.h
providers/common/provider_ctx.c
providers/defltprov.c
providers/fips/fipsprov.c
providers/fips/self_test_kats.c
providers/implementations/ciphers/cipher_aes.h
providers/implementations/ciphers/cipher_aes_cbc_hmac_sha.c
providers/implementations/ciphers/cipher_aes_cbc_hmac_sha.h
providers/implementations/ciphers/cipher_aes_cbc_hmac_sha1_hw.c
providers/implementations/ciphers/cipher_aes_cbc_hmac_sha256_hw.c
providers/implementations/ciphers/cipher_aes_ccm.c
providers/implementations/ciphers/cipher_aes_ccm.h
providers/implementations/ciphers/cipher_aes_ccm_hw.c
providers/implementations/ciphers/cipher_aes_ccm_hw_aesni.inc
providers/implementations/ciphers/cipher_aes_ccm_hw_s390x.inc
providers/implementations/ciphers/cipher_aes_ccm_hw_t4.inc
providers/implementations/ciphers/cipher_aes_gcm.c
providers/implementations/ciphers/cipher_aes_gcm.h
providers/implementations/ciphers/cipher_aes_gcm_hw.c
providers/implementations/ciphers/cipher_aes_gcm_hw_aesni.inc
providers/implementations/ciphers/cipher_aes_gcm_hw_armv8.inc
providers/implementations/ciphers/cipher_aes_gcm_hw_s390x.inc
providers/implementations/ciphers/cipher_aes_gcm_hw_t4.inc
providers/implementations/ciphers/cipher_aes_hw.c
providers/implementations/ciphers/cipher_aes_ocb.c
providers/implementations/ciphers/cipher_aes_ocb.h
providers/implementations/ciphers/cipher_aes_ocb_hw.c
providers/implementations/ciphers/cipher_aes_siv.c
providers/implementations/ciphers/cipher_aes_siv.h
providers/implementations/ciphers/cipher_aes_siv_hw.c
providers/implementations/ciphers/cipher_aes_xts.c
providers/implementations/ciphers/cipher_aes_xts.h
providers/implementations/ciphers/cipher_aes_xts_hw.c
providers/implementations/ciphers/cipher_aria.h
providers/implementations/ciphers/cipher_aria_ccm.c
providers/implementations/ciphers/cipher_aria_ccm.h
providers/implementations/ciphers/cipher_aria_ccm_hw.c
providers/implementations/ciphers/cipher_aria_gcm.c
providers/implementations/ciphers/cipher_aria_gcm.h
providers/implementations/ciphers/cipher_aria_gcm_hw.c
providers/implementations/ciphers/cipher_aria_hw.c
providers/implementations/ciphers/cipher_blowfish.h
providers/implementations/ciphers/cipher_blowfish_hw.c
providers/implementations/ciphers/cipher_camellia.h
providers/implementations/ciphers/cipher_camellia_hw.c
providers/implementations/ciphers/cipher_cast.h
providers/implementations/ciphers/cipher_cast5_hw.c
providers/implementations/ciphers/cipher_chacha20.c
providers/implementations/ciphers/cipher_chacha20.h
providers/implementations/ciphers/cipher_chacha20_hw.c
providers/implementations/ciphers/cipher_chacha20_poly1305.c
providers/implementations/ciphers/cipher_chacha20_poly1305.h
providers/implementations/ciphers/cipher_chacha20_poly1305_hw.c
providers/implementations/ciphers/cipher_desx_hw.c
providers/implementations/ciphers/cipher_idea.h
providers/implementations/ciphers/cipher_idea_hw.c
providers/implementations/ciphers/cipher_rc2.c
providers/implementations/ciphers/cipher_rc2.h
providers/implementations/ciphers/cipher_rc2_hw.c
providers/implementations/ciphers/cipher_rc4.c
providers/implementations/ciphers/cipher_rc4.h
providers/implementations/ciphers/cipher_rc4_hmac_md5.c
providers/implementations/ciphers/cipher_rc4_hmac_md5.h
providers/implementations/ciphers/cipher_rc4_hmac_md5_hw.c
providers/implementations/ciphers/cipher_rc4_hw.c
providers/implementations/ciphers/cipher_rc5.c
providers/implementations/ciphers/cipher_rc5.h
providers/implementations/ciphers/cipher_rc5_hw.c
providers/implementations/ciphers/cipher_seed.h
providers/implementations/ciphers/cipher_seed_hw.c
providers/implementations/ciphers/cipher_sm4.h
providers/implementations/ciphers/cipher_sm4_hw.c
providers/implementations/ciphers/cipher_tdes.h
providers/implementations/ciphers/cipher_tdes_default.h
providers/implementations/ciphers/cipher_tdes_wrap.c
providers/implementations/encode_decode/encode_key2any.c
providers/implementations/include/prov/ciphercommon.h
providers/implementations/rands/drbg.c
providers/implementations/rands/drbg_ctr.c
providers/implementations/rands/drbg_hash.c
providers/implementations/rands/drbg_hmac.c
providers/implementations/rands/drbg_local.h
providers/implementations/rands/test_rng.c
providers/implementations/storemgmt/file_store.c
providers/legacyprov.c

index aeb81e27e3063f8591e495cd422104b32a0605c9..41dc65655e43716d3d77914ed06550943922f150 100644 (file)
@@ -116,8 +116,8 @@ static const OSSL_ALGORITHM *base_query(void *provctx, int operation_id,
 
 static void base_teardown(void *provctx)
 {
-    BIO_meth_free(PROV_CTX_get0_core_bio_method(provctx));
-    PROV_CTX_free(provctx);
+    BIO_meth_free(ossl_prov_ctx_get0_core_bio_method(provctx));
+    ossl_prov_ctx_free(provctx);
 }
 
 /* Functions we provide to the core */
@@ -169,15 +169,16 @@ int ossl_base_provider_init(const OSSL_CORE_HANDLE *handle,
      * This only works for built-in providers.  Most providers should
      * create their own library context.
      */
-    if ((*provctx = PROV_CTX_new()) == NULL
+    if ((*provctx = ossl_prov_ctx_new()) == NULL
             || (corebiometh = bio_prov_init_bio_method()) == NULL) {
-        PROV_CTX_free(*provctx);
+        ossl_prov_ctx_free(*provctx);
         *provctx = NULL;
         return 0;
     }
-    PROV_CTX_set0_library_context(*provctx, (OPENSSL_CTX *)c_get_libctx(handle));
-    PROV_CTX_set0_handle(*provctx, handle);
-    PROV_CTX_set0_core_bio_method(*provctx, corebiometh);
+    ossl_prov_ctx_set0_library_context(*provctx,
+                                       (OPENSSL_CTX *)c_get_libctx(handle));
+    ossl_prov_ctx_set0_handle(*provctx, handle);
+    ossl_prov_ctx_set0_core_bio_method(*provctx, corebiometh);
 
     *out = base_dispatch_table;
 
index c049795cd1447aa9278d52f9e66131ddbd314413..afdeb80d802cad04e57c3f351a125a91a3cef26d 100644 (file)
@@ -213,7 +213,7 @@ BIO_METHOD *bio_prov_init_bio_method(void)
 BIO *bio_new_from_core_bio(PROV_CTX *provctx, OSSL_CORE_BIO *corebio)
 {
     BIO *outbio;
-    BIO_METHOD *corebiometh = PROV_CTX_get0_core_bio_method(provctx);
+    BIO_METHOD *corebiometh = ossl_prov_ctx_get0_core_bio_method(provctx);
 
     if (corebiometh == NULL)
         return NULL;
index a252143e818ebdc3cb22f2ba65bef2cbd1c028bd..c65077728032f6091fcfad3f08906405e998f420 100644 (file)
@@ -26,15 +26,15 @@ typedef struct prov_ctx_st {
  * fetching functions.
  */
 # define PROV_LIBRARY_CONTEXT_OF(provctx)        \
-    PROV_CTX_get0_library_context((provctx))
+    ossl_prov_ctx_get0_library_context((provctx))
 
-PROV_CTX *PROV_CTX_new(void);
-void PROV_CTX_free(PROV_CTX *ctx);
-void PROV_CTX_set0_library_context(PROV_CTX *ctx, OPENSSL_CTX *libctx);
-void PROV_CTX_set0_handle(PROV_CTX *ctx, const OSSL_CORE_HANDLE *handle);
-void PROV_CTX_set0_core_bio_method(PROV_CTX *ctx, BIO_METHOD *corebiometh);
-OPENSSL_CTX *PROV_CTX_get0_library_context(PROV_CTX *ctx);
-const OSSL_CORE_HANDLE *PROV_CTX_get0_handle(PROV_CTX *ctx);
-BIO_METHOD *PROV_CTX_get0_core_bio_method(PROV_CTX *ctx);
+PROV_CTX *ossl_prov_ctx_new(void);
+void ossl_prov_ctx_free(PROV_CTX *ctx);
+void ossl_prov_ctx_set0_library_context(PROV_CTX *ctx, OPENSSL_CTX *libctx);
+void ossl_prov_ctx_set0_handle(PROV_CTX *ctx, const OSSL_CORE_HANDLE *handle);
+void ossl_prov_ctx_set0_core_bio_method(PROV_CTX *ctx, BIO_METHOD *corebiometh);
+OPENSSL_CTX *ossl_prov_ctx_get0_library_context(PROV_CTX *ctx);
+const OSSL_CORE_HANDLE *ossl_prov_ctx_get0_handle(PROV_CTX *ctx);
+BIO_METHOD *ossl_prov_ctx_get0_core_bio_method(PROV_CTX *ctx);
 
 #endif
index 04cca1f23ebfdcd0150eaeefbe04cf0da87150b0..6d81c209810ac7e96819ebea914767c48cdd437b 100644 (file)
 #include "prov/provider_ctx.h"
 #include "prov/bio.h"
 
-PROV_CTX *PROV_CTX_new(void)
+PROV_CTX *ossl_prov_ctx_new(void)
 {
     return OPENSSL_zalloc(sizeof(PROV_CTX));
 }
 
-void PROV_CTX_free(PROV_CTX *ctx)
+void ossl_prov_ctx_free(PROV_CTX *ctx)
 {
     OPENSSL_free(ctx);
 }
 
-void PROV_CTX_set0_library_context(PROV_CTX *ctx, OPENSSL_CTX *libctx)
+void ossl_prov_ctx_set0_library_context(PROV_CTX *ctx, OPENSSL_CTX *libctx)
 {
     if (ctx != NULL)
         ctx->libctx = libctx;
 }
 
-void PROV_CTX_set0_handle(PROV_CTX *ctx, const OSSL_CORE_HANDLE *handle)
+void ossl_prov_ctx_set0_handle(PROV_CTX *ctx, const OSSL_CORE_HANDLE *handle)
 {
     if (ctx != NULL)
         ctx->handle = handle;
 }
 
-void PROV_CTX_set0_core_bio_method(PROV_CTX *ctx, BIO_METHOD *corebiometh)
+void ossl_prov_ctx_set0_core_bio_method(PROV_CTX *ctx, BIO_METHOD *corebiometh)
 {
     if (ctx != NULL)
         ctx->corebiometh = corebiometh;
 }
 
-OPENSSL_CTX *PROV_CTX_get0_library_context(PROV_CTX *ctx)
+OPENSSL_CTX *ossl_prov_ctx_get0_library_context(PROV_CTX *ctx)
 {
     if (ctx == NULL)
         return NULL;
     return ctx->libctx;
 }
 
-const OSSL_CORE_HANDLE *PROV_CTX_get0_handle(PROV_CTX *ctx)
+const OSSL_CORE_HANDLE *ossl_prov_ctx_get0_handle(PROV_CTX *ctx)
 {
     if (ctx == NULL)
         return NULL;
     return ctx->handle;
 }
 
-BIO_METHOD *PROV_CTX_get0_core_bio_method(PROV_CTX *ctx)
+BIO_METHOD *ossl_prov_ctx_get0_core_bio_method(PROV_CTX *ctx)
 {
     if (ctx == NULL)
         return NULL;
index 542e120c8fd84224745b8af92c3c9eef568cf30b..06ce516041e359a83b4ccc65bf8005485a39a89d 100644 (file)
@@ -502,8 +502,8 @@ static const OSSL_ALGORITHM *deflt_query(void *provctx, int operation_id,
 
 static void deflt_teardown(void *provctx)
 {
-    BIO_meth_free(PROV_CTX_get0_core_bio_method(provctx));
-    PROV_CTX_free(provctx);
+    BIO_meth_free(ossl_prov_ctx_get0_core_bio_method(provctx));
+    ossl_prov_ctx_free(provctx);
 }
 
 /* Functions we provide to the core */
@@ -556,15 +556,16 @@ int ossl_default_provider_init(const OSSL_CORE_HANDLE *handle,
      * This only works for built-in providers.  Most providers should
      * create their own library context.
      */
-    if ((*provctx = PROV_CTX_new()) == NULL
+    if ((*provctx = ossl_prov_ctx_new()) == NULL
             || (corebiometh = bio_prov_init_bio_method()) == NULL) {
-        PROV_CTX_free(*provctx);
+        ossl_prov_ctx_free(*provctx);
         *provctx = NULL;
         return 0;
     }
-    PROV_CTX_set0_library_context(*provctx, (OPENSSL_CTX *)c_get_libctx(handle));
-    PROV_CTX_set0_handle(*provctx, handle);
-    PROV_CTX_set0_core_bio_method(*provctx, corebiometh);
+    ossl_prov_ctx_set0_library_context(*provctx,
+                                       (OPENSSL_CTX *)c_get_libctx(handle));
+    ossl_prov_ctx_set0_handle(*provctx, handle);
+    ossl_prov_ctx_set0_core_bio_method(*provctx, corebiometh);
 
     *out = deflt_dispatch_table;
 
index 3425133c60f1738a6d55b94c7d95be2882cd9045..1cbe5ed45498db4f960389df66498f216c2c7cd8 100644 (file)
@@ -519,7 +519,8 @@ static const OSSL_ALGORITHM *fips_query(void *provctx, int operation_id,
     case OSSL_OP_DIGEST:
         return fips_digests;
     case OSSL_OP_CIPHER:
-        ossl_prov_cache_exported_algorithms(fips_ciphers, exported_fips_ciphers);
+        ossl_prov_cache_exported_algorithms(fips_ciphers,
+                                            exported_fips_ciphers);
         return exported_fips_ciphers;
     case OSSL_OP_MAC:
         return fips_macs;
@@ -544,7 +545,7 @@ static const OSSL_ALGORITHM *fips_query(void *provctx, int operation_id,
 static void fips_teardown(void *provctx)
 {
     OPENSSL_CTX_free(PROV_LIBRARY_CONTEXT_OF(provctx));
-    PROV_CTX_free(provctx);
+    ossl_prov_ctx_free(provctx);
 }
 
 static void fips_intern_teardown(void *provctx)
@@ -553,7 +554,7 @@ static void fips_intern_teardown(void *provctx)
      * We know that the library context is the same as for the outer provider,
      * so no need to destroy it here.
      */
-    PROV_CTX_free(provctx);
+    ossl_prov_ctx_free(provctx);
 }
 
 /* Functions we provide to the core */
@@ -690,7 +691,7 @@ int OSSL_provider_init(const OSSL_CORE_HANDLE *handle,
         fips_security_checks = 0;
 
     /*  Create a context. */
-    if ((*provctx = PROV_CTX_new()) == NULL
+    if ((*provctx = ossl_prov_ctx_new()) == NULL
         || (libctx = OPENSSL_CTX_new()) == NULL) {
         /*
          * We free libctx separately here and only here because it hasn't
@@ -700,8 +701,8 @@ int OSSL_provider_init(const OSSL_CORE_HANDLE *handle,
         OPENSSL_CTX_free(libctx);
         goto err;
     }
-    PROV_CTX_set0_library_context(*provctx, libctx);
-    PROV_CTX_set0_handle(*provctx, handle);
+    ossl_prov_ctx_set0_library_context(*provctx, libctx);
+    ossl_prov_ctx_set0_handle(*provctx, handle);
 
     if ((fgbl = openssl_ctx_get_data(libctx, OPENSSL_CTX_FIPS_PROV_INDEX,
                                      &fips_prov_ossl_ctx_method)) == NULL)
@@ -754,7 +755,7 @@ int fips_intern_provider_init(const OSSL_CORE_HANDLE *handle,
     if (c_internal_get_libctx == NULL)
         return 0;
 
-    if ((*provctx = PROV_CTX_new()) == NULL)
+    if ((*provctx = ossl_prov_ctx_new()) == NULL)
         return 0;
 
     /*
@@ -762,9 +763,10 @@ int fips_intern_provider_init(const OSSL_CORE_HANDLE *handle,
      * internal provider. This is not something that most providers would be
      * able to do.
      */
-    PROV_CTX_set0_library_context(*provctx,
-                                  (OPENSSL_CTX *)c_internal_get_libctx(handle));
-    PROV_CTX_set0_handle(*provctx, handle);
+    ossl_prov_ctx_set0_library_context(
+        *provctx, (OPENSSL_CTX *)c_internal_get_libctx(handle)
+    );
+    ossl_prov_ctx_set0_handle(*provctx, handle);
 
     *out = intern_dispatch_table;
     return 1;
index 50a0a6960985bc6799addef8b68baeef888b5e27..5e76a1c84d4ab2aaa620cd011b9a11c8f6f02869 100644 (file)
@@ -315,7 +315,10 @@ static int self_test_drbg(const ST_KAT_DRBG *t, OSSL_SELF_TEST *st,
     if (!EVP_RAND_set_ctx_params(test, drbg_params))
         goto err;
 
-    /* This calls PROV_DRBG_reseed() internally when prediction_resistance = 1 */
+    /*
+     * This calls ossl_prov_drbg_reseed() internally when
+     * prediction_resistance = 1
+     */
     if (!EVP_RAND_generate(drbg, out, t->expectedlen, strength,
                            prediction_resistance,
                            t->entropyaddin2, t->entropyaddin2len))
@@ -329,7 +332,8 @@ static int self_test_drbg(const ST_KAT_DRBG *t, OSSL_SELF_TEST *st,
     if (!EVP_RAND_uninstantiate(drbg))
         goto err;
     /*
-     * Check that the DRBG data has been zeroized after PROV_DRBG_uninstantiate.
+     * Check that the DRBG data has been zeroized after
+     * ossl_prov_drbg_uninstantiate.
      */
     if (!EVP_RAND_verify_zeroization(drbg))
         goto err;
index f2ee746295a2e5370a8d10b785dd3229081f5edf..2fa96582cee7505626ca1e07853ef63ecda0ded6 100644 (file)
@@ -51,12 +51,12 @@ typedef struct prov_aes_ctx_st {
 
 } PROV_AES_CTX;
 
-#define PROV_CIPHER_HW_aes_ofb PROV_CIPHER_HW_aes_ofb128
-#define PROV_CIPHER_HW_aes_cfb PROV_CIPHER_HW_aes_cfb128
-const PROV_CIPHER_HW *PROV_CIPHER_HW_aes_ecb(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_aes_cbc(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_aes_ofb128(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_aes_cfb128(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_aes_cfb1(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_aes_cfb8(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_aes_ctr(size_t keybits);
+#define ossl_prov_cipher_hw_aes_ofb ossl_prov_cipher_hw_aes_ofb128
+#define ossl_prov_cipher_hw_aes_cfb ossl_prov_cipher_hw_aes_cfb128
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_aes_ecb(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_aes_cbc(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_aes_ofb128(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_aes_cfb128(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_aes_cfb1(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_aes_cfb8(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_aes_ctr(size_t keybits);
index 1d499d95557913cc9e9339587a8bc40233762cce..16916fdc472906e7f48ae8c6b77ce1086e4ea48f 100644 (file)
@@ -308,7 +308,7 @@ static void *aes_cbc_hmac_sha1_newctx(void *provctx, size_t kbits,
     ctx = OPENSSL_zalloc(sizeof(*ctx));
     if (ctx != NULL)
         base_init(provctx, &ctx->base_ctx,
-                  PROV_CIPHER_HW_aes_cbc_hmac_sha1(), kbits, blkbits,
+                  ossl_prov_cipher_hw_aes_cbc_hmac_sha1(), kbits, blkbits,
                   ivbits, flags);
     return ctx;
 }
@@ -335,7 +335,7 @@ static void *aes_cbc_hmac_sha256_newctx(void *provctx, size_t kbits,
     ctx = OPENSSL_zalloc(sizeof(*ctx));
     if (ctx != NULL)
         base_init(provctx, &ctx->base_ctx,
-                  PROV_CIPHER_HW_aes_cbc_hmac_sha256(), kbits, blkbits,
+                  ossl_prov_cipher_hw_aes_cbc_hmac_sha256(), kbits, blkbits,
                   ivbits, flags);
     return ctx;
 }
index 73d39bbc42a880dadc4828468931f6380f2253e7..75c450c350439921dfff6cf0445dc5eec978b432 100644 (file)
@@ -26,8 +26,8 @@ typedef struct prov_cipher_hw_aes_hmac_sha_ctx_st {
 # endif /* OPENSSL_NO_MULTIBLOCK) */
 } PROV_CIPHER_HW_AES_HMAC_SHA;
 
-const PROV_CIPHER_HW_AES_HMAC_SHA *PROV_CIPHER_HW_aes_cbc_hmac_sha1(void);
-const PROV_CIPHER_HW_AES_HMAC_SHA *PROV_CIPHER_HW_aes_cbc_hmac_sha256(void);
+const PROV_CIPHER_HW_AES_HMAC_SHA *ossl_prov_cipher_hw_aes_cbc_hmac_sha1(void);
+const PROV_CIPHER_HW_AES_HMAC_SHA *ossl_prov_cipher_hw_aes_cbc_hmac_sha256(void);
 
 #ifdef AES_CBC_HMAC_SHA_CAPABLE
 # include <openssl/aes.h>
index 12644e780ffe935c0ed84c57017231b0877d6c08..b3aebbe052962a5d6af51b4db4e5fcb3a793c184 100644 (file)
@@ -22,7 +22,7 @@ int cipher_capable_aes_cbc_hmac_sha1(void)
     return 0;
 }
 
-const PROV_CIPHER_HW_AES_HMAC_SHA *PROV_CIPHER_HW_aes_cbc_hmac_sha1(void)
+const PROV_CIPHER_HW_AES_HMAC_SHA *ossl_prov_cipher_hw_aes_cbc_hmac_sha1(void)
 {
     return NULL;
 }
@@ -788,7 +788,7 @@ static const PROV_CIPHER_HW_AES_HMAC_SHA cipher_hw_aes_hmac_sha1 = {
 # endif
 };
 
-const PROV_CIPHER_HW_AES_HMAC_SHA *PROV_CIPHER_HW_aes_cbc_hmac_sha1(void)
+const PROV_CIPHER_HW_AES_HMAC_SHA *ossl_prov_cipher_hw_aes_cbc_hmac_sha1(void)
 {
     return &cipher_hw_aes_hmac_sha1;
 }
index 35106e017156bf9179c8bc39b1a751ee3992e76e..8e738bcd10fb831c91b9f7ac7e6f62e05ca42939 100644 (file)
@@ -22,7 +22,7 @@ int cipher_capable_aes_cbc_hmac_sha256(void)
     return 0;
 }
 
-const PROV_CIPHER_HW_AES_HMAC_SHA *PROV_CIPHER_HW_aes_cbc_hmac_sha256(void)
+const PROV_CIPHER_HW_AES_HMAC_SHA *ossl_prov_cipher_hw_aes_cbc_hmac_sha256(void)
 {
     return NULL;
 }
@@ -837,7 +837,7 @@ static const PROV_CIPHER_HW_AES_HMAC_SHA cipher_hw_aes_hmac_sha256 = {
 # endif
 };
 
-const PROV_CIPHER_HW_AES_HMAC_SHA *PROV_CIPHER_HW_aes_cbc_hmac_sha256(void)
+const PROV_CIPHER_HW_AES_HMAC_SHA *ossl_prov_cipher_hw_aes_cbc_hmac_sha256(void)
 {
     return &cipher_hw_aes_hmac_sha256;
 }
index 52bdd784d0d0c16eb1637e77260ed175dc9250ce..5913b2ce0c9eff46e79df00f4e586d9b7776cdb2 100644 (file)
@@ -29,7 +29,7 @@ static void *aes_ccm_newctx(void *provctx, size_t keybits)
 
     ctx = OPENSSL_zalloc(sizeof(*ctx));
     if (ctx != NULL)
-        ccm_initctx(&ctx->base, keybits, PROV_AES_HW_ccm(keybits));
+        ccm_initctx(&ctx->base, keybits, ossl_prov_aes_hw_ccm(keybits));
     return ctx;
 }
 
index ee0257c5f68719cb21229ae5b0736bc576232ec8..2c3ebd09508f48090ae0bf23ee1a432a07924d39 100644 (file)
@@ -45,4 +45,4 @@ typedef struct prov_aes_ccm_ctx_st {
     } ccm;
 } PROV_AES_CCM_CTX;
 
-const PROV_CCM_HW *PROV_AES_HW_ccm(size_t keylen);
+const PROV_CCM_HW *ossl_prov_aes_hw_ccm(size_t keylen);
index db2e3f2742aa10ac4d9dd05cecf4035619e9e61c..db50187ea9e2c3178eaa84173aab0a782a5addbd 100644 (file)
@@ -62,7 +62,7 @@ static const PROV_CCM_HW aes_ccm = {
 #elif defined(SPARC_AES_CAPABLE)
 # include "cipher_aes_ccm_hw_t4.inc"
 #else
-const PROV_CCM_HW *PROV_AES_HW_ccm(size_t keybits)
+const PROV_CCM_HW *ossl_prov_aes_hw_ccm(size_t keybits)
 {
     return &aes_ccm;
 }
index 7e835658095e9d6d0434eb591cffa219123b9c93..12b2bfe96b1743abaae1601105ac3a773122f308 100644 (file)
@@ -32,7 +32,7 @@ static const PROV_CCM_HW aesni_ccm = {
     ccm_generic_gettag
 };
 
-const PROV_CCM_HW *PROV_AES_HW_ccm(size_t keybits)
+const PROV_CCM_HW *ossl_prov_aes_hw_ccm(size_t keybits)
 {
     return AESNI_CAPABLE ? &aesni_ccm : &aes_ccm;
 }
index cec7c9690277919f92f43d9ac38c08f9032ab253..9a9f12875fb927991542c7d609ea711aa7573e1d 100644 (file)
@@ -258,7 +258,7 @@ static const PROV_CCM_HW s390x_aes_ccm = {
     s390x_aes_ccm_gettag
 };
 
-const PROV_CCM_HW *PROV_AES_HW_ccm(size_t keybits)
+const PROV_CCM_HW *ossl_prov_aes_hw_ccm(size_t keybits)
 {
     if ((keybits == 128 && S390X_aes_128_ccm_CAPABLE)
          || (keybits == 192 && S390X_aes_192_ccm_CAPABLE)
index c4b6d15ed9e663e35a1503c1bdf516fa185f2a6d..f81f422d5a24a3e2891e657f4abb2dfbc2173c2d 100644 (file)
@@ -30,7 +30,7 @@ static const PROV_CCM_HW t4_aes_ccm = {
     ccm_generic_gettag
 };
 
-const PROV_CCM_HW *PROV_AES_HW_ccm(size_t keybits)
+const PROV_CCM_HW *ossl_prov_aes_hw_ccm(size_t keybits)
 {
     return SPARC_AES_CAPABLE ? &t4_aes_ccm : &aes_ccm;
 }
index b5c7e8472b94bd93898d658f5ec7cf9c90ca9789..6e97b1f9d9683c17297d04fa70274075483f9397 100644 (file)
@@ -32,7 +32,7 @@ static void *aes_gcm_newctx(void *provctx, size_t keybits)
 
     ctx = OPENSSL_zalloc(sizeof(*ctx));
     if (ctx != NULL)
-        gcm_initctx(provctx, &ctx->base, keybits, PROV_AES_HW_gcm(keybits),
+        gcm_initctx(provctx, &ctx->base, keybits, ossl_prov_aes_hw_gcm(keybits),
                     AES_GCM_IV_MIN_SIZE);
     return ctx;
 }
index d7006408de00b497e0df182f5034f2e73a97c50e..2fe5e5499e050cc68fade40fb38589dd49129072 100644 (file)
@@ -41,4 +41,4 @@ typedef struct prov_aes_gcm_ctx_st {
     } plat;
 } PROV_AES_GCM_CTX;
 
-const PROV_GCM_HW *PROV_AES_HW_gcm(size_t keybits);
+const PROV_GCM_HW *ossl_prov_aes_hw_gcm(size_t keybits);
index c662887272bfb7960f9d8d46c14bd79539ee94e8..f29a280643b99e954c156baa15d4ffd2bc29411c 100644 (file)
@@ -142,7 +142,7 @@ static const PROV_GCM_HW aes_gcm = {
 #elif defined(AES_PMULL_CAPABLE) && defined(AES_GCM_ASM)
 # include "cipher_aes_gcm_hw_armv8.inc"
 #else
-const PROV_GCM_HW *PROV_AES_HW_gcm(size_t keybits)
+const PROV_GCM_HW *ossl_prov_aes_hw_gcm(size_t keybits)
 {
     return &aes_gcm;
 }
index 9e2504a343eb446417487fe67055f0e925efcb85..c25bd617c2399ded2559249e703b295dd4ccc074 100644 (file)
@@ -31,7 +31,7 @@ static const PROV_GCM_HW aesni_gcm = {
     gcm_one_shot
 };
 
-const PROV_GCM_HW *PROV_AES_HW_gcm(size_t keybits)
+const PROV_GCM_HW *ossl_prov_aes_hw_gcm(size_t keybits)
 {
     return AESNI_CAPABLE ? &aesni_gcm : &aes_gcm;
 }
index f44ada0fafa5c388efc83b262b19c28a45fcc3c6..5c84bf31fda244e01c3c760a61e763cde12dffba 100644 (file)
@@ -77,7 +77,7 @@ static const PROV_GCM_HW armv8_aes_gcm = {
     gcm_one_shot
 };
 
-const PROV_GCM_HW *PROV_AES_HW_gcm(size_t keybits)
+const PROV_GCM_HW *ossl_prov_aes_hw_gcm(size_t keybits)
 {
     return AES_PMULL_CAPABLE ? &armv8_aes_gcm : &aes_gcm;
 }
index e13771a44959a5f6629a0fef9a208e76767c0e13..256b9cb91c5603a00dc239b850e6391668cb7b98 100644 (file)
@@ -290,7 +290,7 @@ static const PROV_GCM_HW s390x_aes_gcm = {
     s390x_aes_gcm_one_shot
 };
 
-const PROV_GCM_HW *PROV_AES_HW_gcm(size_t keybits)
+const PROV_GCM_HW *ossl_prov_aes_hw_gcm(size_t keybits)
 {
     if ((keybits == 128 && S390X_aes_128_gcm_CAPABLE)
          || (keybits == 192 && S390X_aes_192_gcm_CAPABLE)
index 0a477128d34e6fca027be1799e0cf9ae907c5238..1ad3ea465da76e23e5e33904362204de5c11c090 100644 (file)
@@ -46,7 +46,7 @@ static const PROV_GCM_HW t4_aes_gcm = {
     gcm_cipher_final,
     gcm_one_shot
 };
-const PROV_GCM_HW *PROV_AES_HW_gcm(size_t keybits)
+const PROV_GCM_HW *ossl_prov_aes_hw_gcm(size_t keybits)
 {
     return SPARC_AES_CAPABLE ? &t4_aes_gcm : &aes_gcm;
 }
index e0bd4db6d3f264f4c5cc64e9c9327afb3606d302..50809313ec4486b4141343d92438b12c4df355f5 100644 (file)
@@ -130,7 +130,7 @@ static const PROV_CIPHER_HW aes_##mode = {                                     \
     cipher_hw_aes_copyctx                                                      \
 };                                                                             \
 PROV_CIPHER_HW_declare(mode)                                                   \
-const PROV_CIPHER_HW *PROV_CIPHER_HW_aes_##mode(size_t keybits)                \
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_aes_##mode(size_t keybits)           \
 {                                                                              \
     PROV_CIPHER_HW_select(mode)                                                \
     return &aes_##mode;                                                        \
index 3728711828850b5f35d36eae1c36937d3bc5263a..c96718bf22c1e60485a87928eb9f10847021e3a2 100644 (file)
@@ -308,7 +308,7 @@ static void *aes_ocb_newctx(void *provctx, size_t kbits, size_t blkbits,
     ctx = OPENSSL_zalloc(sizeof(*ctx));
     if (ctx != NULL) {
         cipher_generic_initkey(ctx, kbits, blkbits, ivbits, mode, flags,
-                               PROV_CIPHER_HW_aes_ocb(kbits), NULL);
+                               ossl_prov_cipher_hw_aes_ocb(kbits), NULL);
         ctx->taglen = OCB_DEFAULT_TAG_LEN;
     }
     return ctx;
index 94d8183167c2577ddac0a2f1beebd9caac922b78..674f4bbcccec08fbe5e7c067051bd18deb52ccd7 100644 (file)
@@ -36,4 +36,4 @@ typedef struct prov_aes_ocb_ctx_st {
     unsigned char aad_buf[OCB_MAX_AAD_LEN];   /* Store partial AAD blocks */
 } PROV_AES_OCB_CTX;
 
-const PROV_CIPHER_HW *PROV_CIPHER_HW_aes_ocb(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_aes_ocb(size_t keybits);
index 5caca0b1df32ae53dce1a1fe3e1ea7657c0ce2b7..7aa97dc77e393ee27041ba0b541894b58da97a92 100644 (file)
@@ -113,7 +113,7 @@ static const PROV_CIPHER_HW aes_generic_ocb = {
     NULL
 };
 PROV_CIPHER_HW_declare()
-const PROV_CIPHER_HW *PROV_CIPHER_HW_aes_ocb(size_t keybits)
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_aes_ocb(size_t keybits)
 {
     PROV_CIPHER_HW_select()
     return &aes_generic_ocb;
index cac71eea9aa89ef790e2580d7839b2e2c5f7af5e..e427c6baf3dc7e055f476743292cdb7d200406c7 100644 (file)
@@ -39,7 +39,7 @@ static void *aes_siv_newctx(void *provctx, size_t keybits, unsigned int mode,
         ctx->mode = mode;
         ctx->flags = flags;
         ctx->keylen = keybits / 8;
-        ctx->hw = PROV_CIPHER_HW_aes_siv(keybits);
+        ctx->hw = ossl_prov_cipher_hw_aes_siv(keybits);
         ctx->libctx = PROV_LIBRARY_CONTEXT_OF(provctx);
     }
     return ctx;
index 3179943f0e597599667409aa06949d23494ec679..b407b407e61e9247a8b6d06802ab9752face4f23 100644 (file)
@@ -34,4 +34,4 @@ typedef struct prov_siv_ctx_st {
     OPENSSL_CTX *libctx;
 } PROV_AES_SIV_CTX;
 
-const PROV_CIPHER_HW_AES_SIV *PROV_CIPHER_HW_aes_siv(size_t keybits);
+const PROV_CIPHER_HW_AES_SIV *ossl_prov_cipher_hw_aes_siv(size_t keybits);
index 547eb1a4c466d3f0231fc1018393404e1806023f..ddd88e00c9f9dc492eb0702cba9fb1d07ae20239 100644 (file)
@@ -130,7 +130,7 @@ static const PROV_CIPHER_HW_AES_SIV aes_siv_hw =
     aes_siv_dupctx,
 };
 
-const PROV_CIPHER_HW_AES_SIV *PROV_CIPHER_HW_aes_siv(size_t keybits)
+const PROV_CIPHER_HW_AES_SIV *ossl_prov_cipher_hw_aes_siv(size_t keybits)
 {
     return &aes_siv_hw;
 }
index e28008b773bc84b75e18a17af6151c6a4ff05f7d..ca40bbde0ea1e194c2c43fb2304217cac50135db 100644 (file)
@@ -116,7 +116,7 @@ static void *aes_xts_newctx(void *provctx, unsigned int mode, uint64_t flags,
 
     if (ctx != NULL) {
         cipher_generic_initkey(&ctx->base, kbits, blkbits, ivbits, mode, flags,
-                               PROV_CIPHER_HW_aes_xts(kbits), NULL);
+                               ossl_prov_cipher_hw_aes_xts(kbits), NULL);
     }
     return ctx;
 }
index 23ae69619765a5940bded47a59ab248bb995da76..3e2bbebba3f3cce055cf7e355e3f431873898c8d 100644 (file)
@@ -32,4 +32,4 @@ typedef struct prov_aes_xts_ctx_st {
     OSSL_xts_stream_fn stream;
 } PROV_AES_XTS_CTX;
 
-const PROV_CIPHER_HW *PROV_CIPHER_HW_aes_xts(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_aes_xts(size_t keybits);
index 028d1608d231756dedf20826c9e095650a43a7e2..15c136bafd8ca8b06f5aa3d679525e99e69a8986 100644 (file)
@@ -169,7 +169,7 @@ static const PROV_CIPHER_HW aes_generic_xts = {
     cipher_hw_aes_xts_copyctx
 };
 PROV_CIPHER_HW_declare_xts()
-const PROV_CIPHER_HW *PROV_CIPHER_HW_aes_xts(size_t keybits)
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_aes_xts(size_t keybits)
 {
     PROV_CIPHER_HW_select_xts()
     return &aes_generic_xts;
index 282408c58edb0a1fcb8b07c9553684c77ab17991..7a5986087ef4779c5cf985778645326cf0b507d4 100644 (file)
@@ -19,12 +19,12 @@ typedef struct prov_aria_ctx_st {
 } PROV_ARIA_CTX;
 
 
-# define PROV_CIPHER_HW_aria_ofb PROV_CIPHER_HW_aria_ofb128
-# define PROV_CIPHER_HW_aria_cfb PROV_CIPHER_HW_aria_cfb128
-const PROV_CIPHER_HW *PROV_CIPHER_HW_aria_ecb(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_aria_cbc(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_aria_ofb128(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_aria_cfb128(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_aria_cfb1(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_aria_cfb8(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_aria_ctr(size_t keybits);
+#define ossl_prov_cipher_hw_aria_ofb ossl_prov_cipher_hw_aria_ofb128
+#define ossl_prov_cipher_hw_aria_cfb ossl_prov_cipher_hw_aria_cfb128
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_aria_ecb(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_aria_cbc(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_aria_ofb128(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_aria_cfb128(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_aria_cfb1(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_aria_cfb8(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_aria_ctr(size_t keybits);
index 7f89b223f1205f6149ed38b92193cc753236f35e..a19ad65b62fce691770ae9178cdad190ffecb885 100644 (file)
@@ -24,7 +24,7 @@ static void *aria_ccm_newctx(void *provctx, size_t keybits)
 
     ctx = OPENSSL_zalloc(sizeof(*ctx));
     if (ctx != NULL)
-        ccm_initctx(&ctx->base, keybits, PROV_ARIA_HW_ccm(keybits));
+        ccm_initctx(&ctx->base, keybits, ossl_prov_aria_hw_ccm(keybits));
     return ctx;
 }
 
index a85cf899efd1af227a7d940ee3813ac91918d091..c1865ce5e0ba19e5f4c065222065097bb103f388 100644 (file)
@@ -19,4 +19,4 @@ typedef struct prov_aria_ccm_ctx_st {
     } ks;                       /* ARIA key schedule to use */
 } PROV_ARIA_CCM_CTX;
 
-const PROV_CCM_HW *PROV_ARIA_HW_ccm(size_t keylen);
+const PROV_CCM_HW *ossl_prov_aria_hw_ccm(size_t keylen);
index db3a9c8ea81aac6de997c7692a78336650ec4e60..bfdb75be8119f4823668ee72ae47d9f1fbfcb327 100644 (file)
@@ -34,7 +34,7 @@ static const PROV_CCM_HW ccm_aria = {
     ccm_generic_auth_decrypt,
     ccm_generic_gettag
 };
-const PROV_CCM_HW *PROV_ARIA_HW_ccm(size_t keybits)
+const PROV_CCM_HW *ossl_prov_aria_hw_ccm(size_t keybits)
 {
     return &ccm_aria;
 }
index 4e934febac43e8f148a0daed9ca28379fe65ee96..ad667ae27a85bf9ea420953ce813e4959f04021d 100644 (file)
@@ -24,8 +24,8 @@ static void *aria_gcm_newctx(void *provctx, size_t keybits)
 
     ctx = OPENSSL_zalloc(sizeof(*ctx));
     if (ctx != NULL)
-        gcm_initctx(provctx, &ctx->base, keybits, PROV_ARIA_HW_gcm(keybits),
-                    ARIA_GCM_IV_MIN_SIZE);
+        gcm_initctx(provctx, &ctx->base, keybits,
+                    ossl_prov_aria_hw_gcm(keybits), ARIA_GCM_IV_MIN_SIZE);
     return ctx;
 }
 
index 2d08a5902903d89eee747038e92d6f136b54b973..973586bdec2664aadea7a02e24d41833e878b8de 100644 (file)
@@ -19,4 +19,4 @@ typedef struct prov_aria_gcm_ctx_st {
     } ks;
 } PROV_ARIA_GCM_CTX;
 
-const PROV_GCM_HW *PROV_ARIA_HW_gcm(size_t keybits);
+const PROV_GCM_HW *ossl_prov_aria_hw_gcm(size_t keybits);
index 1d8e470b203271a68973c70a28bb703d795f8ec7..54c635e4bfc8b4cb1c253263765013e7e3ef3de3 100644 (file)
@@ -31,7 +31,7 @@ static const PROV_GCM_HW aria_gcm = {
     gcm_cipher_final,
     gcm_one_shot
 };
-const PROV_GCM_HW *PROV_ARIA_HW_gcm(size_t keybits)
+const PROV_GCM_HW *ossl_prov_aria_hw_gcm(size_t keybits)
 {
     return &aria_gcm;
 }
index b0c5675f1ba97ddb92bfdc153c7d584021151513..6486474ec2d2d543fb13bdec131bd72b50acff7f 100644 (file)
@@ -37,7 +37,7 @@ static const PROV_CIPHER_HW aria_##mode = {                                    \
     cipher_hw_chunked_##mode,                                                  \
     cipher_hw_aria_copyctx                                                     \
 };                                                                             \
-const PROV_CIPHER_HW *PROV_CIPHER_HW_aria_##mode(size_t keybits)               \
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_aria_##mode(size_t keybits)          \
 {                                                                              \
     return &aria_##mode;                                                       \
 }
index 2d66d1bc0e3cbbbe78ba8a92638d47e428fe79ba..3fa86eeac6b54b8d453139c8f1218ae087421d78 100644 (file)
@@ -18,7 +18,7 @@ typedef struct prov_blowfish_ctx_st {
     } ks;
 } PROV_BLOWFISH_CTX;
 
-const PROV_CIPHER_HW *PROV_CIPHER_HW_blowfish_cbc(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_blowfish_ecb(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_blowfish_ofb64(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_blowfish_cfb64(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_blowfish_cbc(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_blowfish_ecb(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_blowfish_ofb64(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_blowfish_cfb64(size_t keybits);
index 3ff43e4c27ec84def7d7ee88770e5b8364bba788..4855a71f687144e6a36ee7823384a624525b8611 100644 (file)
@@ -31,7 +31,7 @@ static const PROV_CIPHER_HW bf_##mode = {                                      \
     cipher_hw_blowfish_initkey,                                                \
     cipher_hw_blowfish_##mode##_cipher                                         \
 };                                                                             \
-const PROV_CIPHER_HW *PROV_CIPHER_HW_blowfish_##mode(size_t keybits)           \
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_blowfish_##mode(size_t keybits)      \
 {                                                                              \
     return &bf_##mode;                                                         \
 }
index 07f67dbad866d76a5161bed7ac4e51459cdf0ebb..2dd658f00ed19283bec3cdb601311b6777b80d45 100644 (file)
@@ -19,12 +19,12 @@ typedef struct prov_camellia_ctx_st {
     } ks;
 } PROV_CAMELLIA_CTX;
 
-#define PROV_CIPHER_HW_camellia_ofb PROV_CIPHER_HW_camellia_ofb128
-#define PROV_CIPHER_HW_camellia_cfb PROV_CIPHER_HW_camellia_cfb128
-const PROV_CIPHER_HW *PROV_CIPHER_HW_camellia_ecb(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_camellia_cbc(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_camellia_ofb128(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_camellia_cfb128(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_camellia_cfb1(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_camellia_cfb8(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_camellia_ctr(size_t keybits);
+#define ossl_prov_cipher_hw_camellia_ofb ossl_prov_cipher_hw_camellia_ofb128
+#define ossl_prov_cipher_hw_camellia_cfb ossl_prov_cipher_hw_camellia_cfb128
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_camellia_ecb(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_camellia_cbc(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_camellia_ofb128(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_camellia_cfb128(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_camellia_cfb1(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_camellia_cfb8(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_camellia_ctr(size_t keybits);
index 3a8fa282c3aa10554960438467f3c0717c86eb7a..af4db4405a6b4d026257841fa0fc974fcbb5827d 100644 (file)
@@ -58,7 +58,7 @@ static const PROV_CIPHER_HW camellia_##mode = {                                \
     cipher_hw_camellia_copyctx                                                 \
 };                                                                             \
 PROV_CIPHER_HW_declare(mode)                                                   \
-const PROV_CIPHER_HW *PROV_CIPHER_HW_camellia_##mode(size_t keybits)           \
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_camellia_##mode(size_t keybits)      \
 {                                                                              \
     PROV_CIPHER_HW_select(mode)                                                \
     return &camellia_##mode;                                                   \
index 218f5c4fb5483f72556f45ac556be842f3fb9055..fdba630f099d601239fb8bd5cad1e69493caf3da 100644 (file)
@@ -18,7 +18,7 @@ typedef struct prov_cast_ctx_st {
     } ks;
 } PROV_CAST_CTX;
 
-const PROV_CIPHER_HW *PROV_CIPHER_HW_cast5_cbc(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_cast5_ecb(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_cast5_ofb64(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_cast5_cfb64(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_cast5_cbc(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_cast5_ecb(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_cast5_ofb64(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_cast5_cfb64(size_t keybits);
index 2257b405f0814e76ad59a80ce271a02bede4ceda..73f0628e578b3ac739046f1b2186ddd59cafa8f5 100644 (file)
@@ -31,7 +31,7 @@ static const PROV_CIPHER_HW cast5_##mode = {                                   \
     cipher_hw_cast5_initkey,                                                   \
     cipher_hw_cast5_##mode##_cipher                                            \
 };                                                                             \
-const PROV_CIPHER_HW *PROV_CIPHER_HW_cast5_##mode(size_t keybits)              \
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_cast5_##mode(size_t keybits)         \
 {                                                                              \
     return &cast5_##mode;                                                      \
 }
index 1f44601c619b1c384936d6081562ec52cefd8fe3..89493c3fbc3f7a75bb546b00145518aac25fecff 100644 (file)
@@ -38,7 +38,7 @@ void chacha20_initctx(PROV_CHACHA20_CTX *ctx)
                            CHACHA20_BLKLEN * 8,
                            CHACHA20_IVLEN * 8,
                            0, CHACHA20_FLAGS,
-                           PROV_CIPHER_HW_chacha20(CHACHA20_KEYLEN * 8),
+                           ossl_prov_cipher_hw_chacha20(CHACHA20_KEYLEN * 8),
                            NULL);
 }
 
index 808570f6dcf084baed0d558ba2f807c5394fb215..c494de7d85b1fcce1bf761abae98d4e6b7996dcf 100644 (file)
@@ -27,7 +27,7 @@ typedef struct prov_cipher_hw_chacha20_st {
 
 } PROV_CIPHER_HW_CHACHA20;
 
-const PROV_CIPHER_HW *PROV_CIPHER_HW_chacha20(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_chacha20(size_t keybits);
 
 OSSL_FUNC_cipher_encrypt_init_fn chacha20_einit;
 OSSL_FUNC_cipher_decrypt_init_fn chacha20_dinit;
index dce0a6c11c6c27c45cc72036f3b19f3442eed818..c298c6f0a3663f36d8464284cbe5bfe350ef39b8 100644 (file)
@@ -114,7 +114,7 @@ static const PROV_CIPHER_HW_CHACHA20 chacha20_hw = {
     chacha20_initiv
 };
 
-const PROV_CIPHER_HW *PROV_CIPHER_HW_chacha20(size_t keybits)
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_chacha20(size_t keybits)
 {
     return (PROV_CIPHER_HW *)&chacha20_hw;
 }
index e2aa691378eeb5c069b1ce7f852b068631367045..474d43b7fec3f44e4bae0f9fbd6531fa4e2bce7a 100644 (file)
@@ -56,9 +56,9 @@ static void *chacha20_poly1305_newctx(void *provctx)
                                CHACHA20_POLY1305_IVLEN * 8,
                                CHACHA20_POLY1305_MODE,
                                CHACHA20_POLY1305_FLAGS,
-                               PROV_CIPHER_HW_chacha20_poly1305(
+                               ossl_prov_cipher_hw_chacha20_poly1305(
                                    CHACHA20_POLY1305_KEYLEN * 8),
-                               NULL);
+                                   NULL);
         ctx->nonce_len = CHACHA20_POLY1305_IVLEN;
         ctx->tls_payload_length = NO_TLS_PAYLOAD_LENGTH;
         chacha20_initctx(&ctx->chacha);
index 00b173d1ed027cb18aec91168a7d135a5398277c..c7c3e88741b42a611687830ef995b8e5ce66b403 100644 (file)
@@ -40,4 +40,4 @@ typedef struct prov_cipher_hw_chacha_aead_st {
                             size_t flen);
 } PROV_CIPHER_HW_CHACHA20_POLY1305;
 
-const PROV_CIPHER_HW *PROV_CIPHER_HW_chacha20_poly1305(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_chacha20_poly1305(size_t keybits);
index d9f314c9b60546ff7991003651b9cf6055f3edc7..8bbae6529a9dc41810a7924dd0d7e55a812796a5 100644 (file)
@@ -399,7 +399,7 @@ static const PROV_CIPHER_HW_CHACHA20_POLY1305 chacha20poly1305_hw =
     chacha_poly1305_tls_iv_set_fixed
 };
 
-const PROV_CIPHER_HW *PROV_CIPHER_HW_chacha20_poly1305(size_t keybits)
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_chacha20_poly1305(size_t keybits)
 {
     return (PROV_CIPHER_HW *)&chacha20poly1305_hw;
 }
index dac6c396b155e4376486d7ca1c6fc960fe6d7e7c..7dc4c50ef55ade04035844933b55d2c3fe440cda 100644 (file)
@@ -73,7 +73,8 @@ static const PROV_CIPHER_HW desx_cbc =
     cipher_hw_desx_cbc,
     cipher_hw_desx_copyctx
 };
-const PROV_CIPHER_HW *PROV_CIPHER_HW_tdes_desx_cbc(void)
+
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_tdes_desx_cbc(void)
 {
     return &desx_cbc;
 }
index ebe590b93c4f580667b72a04338deda1a5c88485..cb3541a0314f9819495028d329edfcc2756405f2 100644 (file)
@@ -18,7 +18,7 @@ typedef struct prov_idea_ctx_st {
     } ks;
 } PROV_IDEA_CTX;
 
-const PROV_CIPHER_HW *PROV_CIPHER_HW_idea_cbc(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_idea_ecb(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_idea_ofb64(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_idea_cfb64(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_idea_cbc(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_idea_ecb(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_idea_ofb64(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_idea_cfb64(size_t keybits);
index 009ef358d0f2fde75ff8b6d194b3a3314133cd7e..1c451b77edc4ed3e603e067b66c03abcc7bcc6fa 100644 (file)
@@ -43,7 +43,7 @@ static const PROV_CIPHER_HW idea_##mode = {                                    \
     cipher_hw_idea_initkey,                                                    \
     cipher_hw_idea_##mode##_cipher                                             \
 };                                                                             \
-const PROV_CIPHER_HW *PROV_CIPHER_HW_idea_##mode(size_t keybits)               \
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_idea_##mode(size_t keybits)          \
 {                                                                              \
     return &idea_##mode;                                                       \
 }
index 022f4c66a3212a09215c0926a90e4500f6d9f4d1..2a303ceef4e2fb31087ce2191a4ed60f3ef07d62 100644 (file)
@@ -210,7 +210,8 @@ static void * alg##_##kbits##_##lcmode##_newctx(void *provctx)                 \
      if (ctx != NULL) {                                                        \
          cipher_generic_initkey(ctx, kbits, blkbits, ivbits,                   \
                                 EVP_CIPH_##UCMODE##_MODE, flags,               \
-                                PROV_CIPHER_HW_##alg##_##lcmode(kbits), NULL); \
+                                ossl_prov_cipher_hw_##alg##_##lcmode(kbits),   \
+                                NULL);                                         \
          ctx->key_bits = kbits;                                                \
      }                                                                         \
      return ctx;                                                               \
index 82f0f6ca74e30fb110dcfa33061911212000d829..fca1e9527189175d2440b6271c4db515d009edf2 100644 (file)
@@ -19,10 +19,10 @@ typedef struct prov_rc2_ctx_st {
     size_t key_bits;
 } PROV_RC2_CTX;
 
-#define PROV_CIPHER_HW_rc2_ofb128 PROV_CIPHER_HW_rc2_ofb64
-#define PROV_CIPHER_HW_rc2_cfb128 PROV_CIPHER_HW_rc2_cfb64
+#define ossl_prov_cipher_hw_rc2_ofb128 ossl_prov_cipher_hw_rc2_ofb64
+#define ossl_prov_cipher_hw_rc2_cfb128 ossl_prov_cipher_hw_rc2_cfb64
 
-const PROV_CIPHER_HW *PROV_CIPHER_HW_rc2_cbc(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_rc2_ecb(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_rc2_ofb64(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_rc2_cfb64(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_rc2_cbc(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_rc2_ecb(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_rc2_ofb64(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_rc2_cfb64(size_t keybits);
index 2583172bd83453ebce25e7089d9c2f96fe577672..da9ff729cda05477fe44dc24e2ddcbfbf6596053 100644 (file)
@@ -32,7 +32,7 @@ static const PROV_CIPHER_HW rc2_##mode = {                                     \
     cipher_hw_rc2_initkey,                                                     \
     cipher_hw_rc2_##mode##_cipher                                              \
 };                                                                             \
-const PROV_CIPHER_HW *PROV_CIPHER_HW_rc2_##mode(size_t keybits)                \
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_rc2_##mode(size_t keybits)           \
 {                                                                              \
     return &rc2_##mode;                                                        \
 }
index f9086fbfc546a41e2c83bc25d660f7504a9cfde8..d92d036ab5b88237faccb31fa31628ef9d71b04e 100644 (file)
@@ -67,7 +67,7 @@ static void * alg##_##kbits##_newctx(void *provctx)                            \
      ctx = OPENSSL_zalloc(sizeof(*ctx));                                       \
      if (ctx != NULL) {                                                        \
          cipher_generic_initkey(ctx, kbits, blkbits, ivbits, 0, flags,         \
-                                PROV_CIPHER_HW_##alg(kbits), NULL);            \
+                                ossl_prov_cipher_hw_##alg(kbits), NULL);       \
      }                                                                         \
      return ctx;                                                               \
 }                                                                              \
index a2d0a50f219961de198cf3a7b8e6b77c2d737be6..ec038bdde5aacddd86d9bfb79dc55d89f285fdd1 100644 (file)
@@ -18,4 +18,4 @@ typedef struct prov_rc4_ctx_st {
     } ks;
 } PROV_RC4_CTX;
 
-const PROV_CIPHER_HW *PROV_CIPHER_HW_rc4(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_rc4(size_t keybits);
index 60d0eea3dd14bbe4ae6341ac7fb70ed0d218c674..964597beba3bc244dd1ab2a0b7d2ccb5233717a8 100644 (file)
@@ -58,7 +58,7 @@ static void *rc4_hmac_md5_newctx(void *provctx)
                                RC4_HMAC_MD5_BLOCK_BITS,
                                RC4_HMAC_MD5_IV_BITS,
                                RC4_HMAC_MD5_MODE, RC4_HMAC_MD5_FLAGS,
-                               PROV_CIPHER_HW_rc4_hmac_md5(RC4_HMAC_MD5_KEY_BITS),
+                               ossl_prov_cipher_hw_rc4_hmac_md5(RC4_HMAC_MD5_KEY_BITS),
                                NULL);
      return ctx;
 }
index ff7ed7ef86fcfaa354cf3b1e16d3b0c58b9f357d..042f5f13df3aa59a106d540b3ee48b5497e0cf6c 100644 (file)
@@ -30,4 +30,4 @@ typedef struct prov_cipher_hw_rc4_hmac_md5_st {
 
 } PROV_CIPHER_HW_RC4_HMAC_MD5;
 
-const PROV_CIPHER_HW *PROV_CIPHER_HW_rc4_hmac_md5(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_rc4_hmac_md5(size_t keybits);
index 54b8f0862806f6c6d3c3fa57efde30f367e2f433..73233a2de7ef01e1240742a46f9b91989ac9af2d 100644 (file)
@@ -225,7 +225,8 @@ static const PROV_CIPHER_HW_RC4_HMAC_MD5 rc4_hmac_md5_hw = {
     cipher_hw_rc4_hmac_md5_tls_init,
     cipher_hw_rc4_hmac_md5_init_mackey
 };
-const PROV_CIPHER_HW *PROV_CIPHER_HW_rc4_hmac_md5(size_t keybits)
+
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_rc4_hmac_md5(size_t keybits)
 {
     return (PROV_CIPHER_HW *)&rc4_hmac_md5_hw;
 }
index 8d88aca73cc385f722cc0472105d6bc52b4c333b..09192b5d5e14e3beadd426a2c30619755b315124 100644 (file)
@@ -37,7 +37,7 @@ static const PROV_CIPHER_HW rc4_hw = {
     cipher_hw_rc4_initkey,
     cipher_hw_rc4_cipher
 };
-const PROV_CIPHER_HW *PROV_CIPHER_HW_rc4(size_t keybits)
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_rc4(size_t keybits)
 {
     return &rc4_hw;
 }
index 0078b32e025e71ce5672be8c6aa1a881182f6d6e..dba0a3aaae93fc397c11ddedead0b4462c80b840 100644 (file)
@@ -121,7 +121,8 @@ static void * alg##_##kbits##_##lcmode##_newctx(void *provctx)                 \
      if (ctx != NULL) {                                                        \
          cipher_generic_initkey(ctx, kbits, blkbits, ivbits,                   \
                                 EVP_CIPH_##UCMODE##_MODE, flags,               \
-                                PROV_CIPHER_HW_##alg##_##lcmode(kbits), NULL); \
+                                ossl_prov_cipher_hw_##alg##_##lcmode(kbits),   \
+                                NULL);                                         \
          ctx->rounds = RC5_12_ROUNDS;                                          \
      }                                                                         \
      return ctx;                                                               \
index fe0d09f710b8132f4b0eceff84d77d02533c8527..508b662cfe41cf4068683282128b00d0c3026bd0 100644 (file)
@@ -19,7 +19,7 @@ typedef struct prov_blowfish_ctx_st {
     unsigned int rounds;       /* number of rounds */
 } PROV_RC5_CTX;
 
-const PROV_CIPHER_HW *PROV_CIPHER_HW_rc5_cbc(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_rc5_ecb(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_rc5_ofb64(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_rc5_cfb64(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_rc5_cbc(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_rc5_ecb(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_rc5_ofb64(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_rc5_cfb64(size_t keybits);
index 0d3d513148d23642c0dfbebe4cbfb2779fb06aaf..898bd383f95a87c89832de2ff169196082afd4b6 100644 (file)
@@ -30,7 +30,7 @@ static const PROV_CIPHER_HW rc5_##mode = {                                     \
     cipher_hw_rc5_initkey,                                                     \
     cipher_hw_rc5_##mode##_cipher                                              \
 };                                                                             \
-const PROV_CIPHER_HW *PROV_CIPHER_HW_rc5_##mode(size_t keybits)                \
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_rc5_##mode(size_t keybits)           \
 {                                                                              \
     return &rc5_##mode;                                                        \
 }
index 976af35005e84788b6f59b07386a6a7a216d1c5d..21f8b6e384acc560ec2fddfcb7b63f9e74ca5ef5 100644 (file)
@@ -18,7 +18,7 @@ typedef struct prov_seed_ctx_st {
     } ks;
 } PROV_SEED_CTX;
 
-const PROV_CIPHER_HW *PROV_CIPHER_HW_seed_cbc(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_seed_ecb(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_seed_ofb128(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_seed_cfb128(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_seed_cbc(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_seed_ecb(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_seed_ofb128(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_seed_cfb128(size_t keybits);
index 016b3bc2213b5bd91fd1c4ba8759b64bcd0bfdfb..2d1dba92bc73b7bf45b94e11796cab9888d6ff2f 100644 (file)
@@ -31,7 +31,7 @@ static const PROV_CIPHER_HW seed_##mode = {                                    \
     cipher_hw_seed_initkey,                                                    \
     cipher_hw_seed_##mode##_cipher                                             \
 };                                                                             \
-const PROV_CIPHER_HW *PROV_CIPHER_HW_seed_##mode(size_t keybits)               \
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_seed_##mode(size_t keybits)          \
 {                                                                              \
     return &seed_##mode;                                                       \
 }
index d5c9633552a176ff6c53006173fb053f69531403..e1b3363a406370893ad30c940990c4115ff1b299 100644 (file)
@@ -18,8 +18,8 @@ typedef struct prov_cast_ctx_st {
     } ks;
 } PROV_SM4_CTX;
 
-const PROV_CIPHER_HW *PROV_CIPHER_HW_sm4_cbc(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_sm4_ecb(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_sm4_ctr(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_sm4_ofb128(size_t keybits);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_sm4_cfb128(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_sm4_cbc(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_sm4_ecb(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_sm4_ctr(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_sm4_ofb128(size_t keybits);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_sm4_cfb128(size_t keybits);
index 73e88280c2b5d72562ac8f3a8edfb0e37d7963b0..bc135171863a900823468cdab54a2df9394e0871 100644 (file)
@@ -34,7 +34,7 @@ static const PROV_CIPHER_HW sm4_##mode = {                                     \
     cipher_hw_chunked_##mode,                                                  \
     cipher_hw_sm4_copyctx                                                      \
 };                                                                             \
-const PROV_CIPHER_HW *PROV_CIPHER_HW_sm4_##mode(size_t keybits)                \
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_sm4_##mode(size_t keybits)           \
 {                                                                              \
     return &sm4_##mode;                                                        \
 }
index 902f80e25ef50bc9fb5fbcc270a58f06833b8469..d3500e71ce3689453fb025ffe39e6df417b46854 100644 (file)
@@ -36,7 +36,8 @@ static OSSL_FUNC_cipher_newctx_fn tdes_##type##_##lcmode##_newctx;
 static void *tdes_##type##_##lcmode##_newctx(void *provctx)                    \
 {                                                                              \
     return tdes_newctx(provctx, EVP_CIPH_##UCMODE##_MODE, kbits, blkbits,      \
-                       ivbits, flags, PROV_CIPHER_HW_tdes_##type##_##lcmode());\
+                       ivbits, flags,                                          \
+                       ossl_prov_cipher_hw_tdes_##type##_##lcmode());          \
 }                                                                              \
 static OSSL_FUNC_cipher_get_params_fn tdes_##type##_##lcmode##_get_params;       \
 static int tdes_##type##_##lcmode##_get_params(OSSL_PARAM params[])            \
@@ -84,7 +85,7 @@ static const PROV_CIPHER_HW type##_##mode = {                                  \
     cipher_hw_tdes_##mode,                                                     \
     cipher_hw_tdes_copyctx                                                     \
 };                                                                             \
-const PROV_CIPHER_HW *PROV_CIPHER_HW_tdes_##type##_##mode(void)                \
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_tdes_##type##_##mode(void)           \
 {                                                                              \
     return &type##_##mode;                                                     \
 }
@@ -97,5 +98,5 @@ int cipher_hw_tdes_cbc(PROV_CIPHER_CTX *ctx, unsigned char *out,
 int cipher_hw_tdes_ecb(PROV_CIPHER_CTX *ctx, unsigned char *out,
                        const unsigned char *in, size_t len);
 
-const PROV_CIPHER_HW *PROV_CIPHER_HW_tdes_ede3_cbc(void);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_tdes_ede3_ecb(void);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_tdes_ede3_cbc(void);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_tdes_ede3_ecb(void);
index 0bc499fc86b92ba3d73037942376908f07162c51..7d2f1cb0348e18455ae01c23ac8863c2275aef2b 100644 (file)
 #include "prov/ciphercommon.h"
 #include "cipher_tdes.h"
 
-const PROV_CIPHER_HW *PROV_CIPHER_HW_tdes_ede3_ofb(void);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_tdes_ede3_cfb(void);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_tdes_ede3_cfb1(void);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_tdes_ede3_cfb8(void);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_tdes_ede3_ofb(void);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_tdes_ede3_cfb(void);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_tdes_ede3_cfb1(void);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_tdes_ede3_cfb8(void);
 
-const PROV_CIPHER_HW *PROV_CIPHER_HW_tdes_ede2_cbc(void);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_tdes_ede2_ecb(void);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_tdes_ede2_ofb(void);
-const PROV_CIPHER_HW *PROV_CIPHER_HW_tdes_ede2_cfb(void);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_tdes_ede2_cbc(void);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_tdes_ede2_ecb(void);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_tdes_ede2_ofb(void);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_tdes_ede2_cfb(void);
 
-const PROV_CIPHER_HW *PROV_CIPHER_HW_tdes_desx_cbc(void);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_tdes_desx_cbc(void);
 
-const PROV_CIPHER_HW *PROV_CIPHER_HW_tdes_wrap_cbc(void);
+const PROV_CIPHER_HW *ossl_prov_cipher_hw_tdes_wrap_cbc(void);
index 9007e403a4ce671679109ee1e63eb0a92fbbb22a..2c8450586a776dfb53bee91fc4863264f4c82072 100644 (file)
@@ -175,7 +175,7 @@ static OSSL_FUNC_cipher_newctx_fn tdes_wrap_newctx;                            \
 static void *tdes_wrap_newctx(void *provctx)                                   \
 {                                                                              \
     return tdes_newctx(provctx, EVP_CIPH_WRAP_MODE, kbits, blkbits, ivbits,    \
-                       flags, PROV_CIPHER_HW_tdes_wrap_cbc());                 \
+                       flags, ossl_prov_cipher_hw_tdes_wrap_cbc());            \
 }                                                                              \
 static OSSL_FUNC_cipher_get_params_fn tdes_wrap_get_params;                    \
 static int tdes_wrap_get_params(OSSL_PARAM params[])                           \
index dc7ccbc2c0ae7f571f62a5c7fc9474337e0e08de..c3402c875c2b37025a926a6f6d9aea23b50f9417 100644 (file)
@@ -778,7 +778,7 @@ static const OSSL_PARAM *key2any_settable_ctx_params(ossl_unused void *provctx)
 static int key2any_set_ctx_params(void *vctx, const OSSL_PARAM params[])
 {
     struct key2any_ctx_st *ctx = vctx;
-    OPENSSL_CTX *libctx = PROV_CTX_get0_library_context(ctx->provctx);
+    OPENSSL_CTX *libctx = ossl_prov_ctx_get0_library_context(ctx->provctx);
     const OSSL_PARAM *cipherp =
         OSSL_PARAM_locate_const(params, OSSL_ENCODER_PARAM_CIPHER);
     const OSSL_PARAM *propsp =
index 4c7eb3171e658a2a8ffb23f2a44588d1e5fe2421..137836d7abc5bda1a26595a638c850d4c9313116 100644 (file)
@@ -186,7 +186,7 @@ static void * alg##_##kbits##_##lcmode##_newctx(void *provctx)                 \
      if (ctx != NULL) {                                                        \
          cipher_generic_initkey(ctx, kbits, blkbits, ivbits,                   \
                                 EVP_CIPH_##UCMODE##_MODE, flags,               \
-                                PROV_CIPHER_HW_##alg##_##lcmode(kbits),        \
+                                ossl_prov_cipher_hw_##alg##_##lcmode(kbits),   \
                                 provctx);                                      \
      }                                                                         \
      return ctx;                                                               \
index f97d830478605087dad755052fbb98f182dc0c47..022e8e37949dc684d6385581cdcc942c0fb89690 100644 (file)
@@ -136,7 +136,7 @@ static unsigned int get_parent_reseed_count(PROV_DRBG *drbg)
  * Implements the get_entropy() callback
  *
  * If the DRBG has a parent, then the required amount of entropy input
- * is fetched using the parent's PROV_DRBG_generate().
+ * is fetched using the parent's ossl_prov_drbg_generate().
  *
  * Otherwise, the entropy is polled from the system entropy sources
  * using prov_pool_acquire_entropy().
@@ -390,9 +390,9 @@ static void prov_drbg_clear_nonce(PROV_DRBG *drbg, unsigned char *nonce,
  *
  * Returns 1 on success, 0 on failure.
  */
-int PROV_DRBG_instantiate(PROV_DRBG *drbg, unsigned int strength,
-                          int prediction_resistance,
-                          const unsigned char *pers, size_t perslen)
+int ossl_prov_drbg_instantiate(PROV_DRBG *drbg, unsigned int strength,
+                               int prediction_resistance,
+                               const unsigned char *pers, size_t perslen)
 {
     unsigned char *nonce = NULL, *entropy = NULL;
     size_t noncelen = 0, entropylen = 0;
@@ -520,7 +520,7 @@ int PROV_DRBG_instantiate(PROV_DRBG *drbg, unsigned int strength,
  *
  * Returns 1 on success, 0 on failure.
  */
-int PROV_DRBG_uninstantiate(PROV_DRBG *drbg)
+int ossl_prov_drbg_uninstantiate(PROV_DRBG *drbg)
 {
     drbg->state = EVP_RAND_STATE_UNINITIALISED;
     return 1;
@@ -533,9 +533,9 @@ int PROV_DRBG_uninstantiate(PROV_DRBG *drbg)
  *
  * Returns 1 on success, 0 on failure.
  */
-int PROV_DRBG_reseed(PROV_DRBG *drbg, int prediction_resistance,
-                     const unsigned char *ent, size_t ent_len,
-                     const unsigned char *adin, size_t adinlen)
+int ossl_prov_drbg_reseed(PROV_DRBG *drbg, int prediction_resistance,
+                          const unsigned char *ent, size_t ent_len,
+                          const unsigned char *adin, size_t adinlen)
 {
     unsigned char *entropy = NULL;
     size_t entropylen = 0;
@@ -647,9 +647,9 @@ int PROV_DRBG_reseed(PROV_DRBG *drbg, int prediction_resistance,
  * Returns 1 on success, 0 on failure.
  *
  */
-int PROV_DRBG_generate(PROV_DRBG *drbg, unsigned char *out, size_t outlen,
-                       unsigned int strength, int prediction_resistance,
-                       const unsigned char *adin, size_t adinlen)
+int ossl_prov_drbg_generate(PROV_DRBG *drbg, unsigned char *out, size_t outlen,
+                            unsigned int strength, int prediction_resistance,
+                            const unsigned char *adin, size_t adinlen)
 {
     int fork_id;
     int reseed_required = 0;
@@ -706,8 +706,8 @@ int PROV_DRBG_generate(PROV_DRBG *drbg, unsigned char *out, size_t outlen,
         reseed_required = 1;
 
     if (reseed_required || prediction_resistance) {
-        if (!PROV_DRBG_reseed(drbg, prediction_resistance, NULL, 0,
-                              adin, adinlen)) {
+        if (!ossl_prov_drbg_reseed(drbg, prediction_resistance, NULL, 0,
+                                   adin, adinlen)) {
             PROVerr(0, PROV_R_RESEED_ERROR);
             return 0;
         }
@@ -760,7 +760,7 @@ static int rand_drbg_restart(PROV_DRBG *drbg)
     /* repair uninitialized state */
     if (drbg->state == EVP_RAND_STATE_UNINITIALISED)
         /* reinstantiate drbg */
-        PROV_DRBG_instantiate(drbg, drbg->strength, 0, NULL, 0);
+        ossl_prov_drbg_instantiate(drbg, drbg->strength, 0, NULL, 0);
 
     rand_pool_free(drbg->seed_pool);
     drbg->seed_pool = NULL;
index a13582f6a2f4a557bbcd7338e98292348379d506..990fac3e7b1fdd8050dea06abeb955c57cc4df19 100644 (file)
@@ -330,8 +330,8 @@ static int drbg_ctr_instantiate_wrapper(void *vdrbg, unsigned int strength,
 {
     PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
 
-    return PROV_DRBG_instantiate(drbg, strength, prediction_resistance,
-                                 pstr, pstr_len);
+    return ossl_prov_drbg_instantiate(drbg, strength, prediction_resistance,
+                                      pstr, pstr_len);
 }
 
 static int drbg_ctr_reseed(PROV_DRBG *drbg,
@@ -355,8 +355,8 @@ static int drbg_ctr_reseed_wrapper(void *vdrbg, int prediction_resistance,
 {
     PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
 
-    return PROV_DRBG_reseed(drbg, prediction_resistance, ent, ent_len,
-                            adin, adin_len);
+    return ossl_prov_drbg_reseed(drbg, prediction_resistance, ent, ent_len,
+                                 adin, adin_len);
 }
 
 static void ctr96_inc(unsigned char *counter)
@@ -452,8 +452,8 @@ static int drbg_ctr_generate_wrapper
 {
     PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
 
-    return PROV_DRBG_generate(drbg, out, outlen, strength,
-                              prediction_resistance, adin, adin_len);
+    return ossl_prov_drbg_generate(drbg, out, outlen, strength,
+                                   prediction_resistance, adin, adin_len);
 }
 
 static int drbg_ctr_uninstantiate(PROV_DRBG *drbg)
@@ -465,7 +465,7 @@ static int drbg_ctr_uninstantiate(PROV_DRBG *drbg)
     OPENSSL_cleanse(ctr->bltmp, sizeof(ctr->bltmp));
     OPENSSL_cleanse(ctr->KX, sizeof(ctr->KX));
     ctr->bltmp_pos = 0;
-    return PROV_DRBG_uninstantiate(drbg);
+    return ossl_prov_drbg_uninstantiate(drbg);
 }
 
 static int drbg_ctr_uninstantiate_wrapper(void *vdrbg)
index e420d70d55620f30a03713cb7988fea65adef010..cf05188968d9ec6a82703a1215a7a53053c337eb 100644 (file)
@@ -270,8 +270,8 @@ static int drbg_hash_instantiate_wrapper(void *vdrbg, unsigned int strength,
 {
     PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
 
-    return PROV_DRBG_instantiate(drbg, strength, prediction_resistance,
-                                 pstr, pstr_len);
+    return ossl_prov_drbg_instantiate(drbg, strength, prediction_resistance,
+                                      pstr, pstr_len);
 }
 
 /*
@@ -304,8 +304,8 @@ static int drbg_hash_reseed_wrapper(void *vdrbg, int prediction_resistance,
 {
     PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
 
-    return PROV_DRBG_reseed(drbg, prediction_resistance, ent, ent_len,
-                            adin, adin_len);
+    return ossl_prov_drbg_reseed(drbg, prediction_resistance, ent, ent_len,
+                                 adin, adin_len);
 }
 
 /*
@@ -352,8 +352,8 @@ static int drbg_hash_generate_wrapper
 {
     PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
 
-    return PROV_DRBG_generate(drbg, out, outlen, strength,
-                              prediction_resistance, adin, adin_len);
+    return ossl_prov_drbg_generate(drbg, out, outlen, strength,
+                                   prediction_resistance, adin, adin_len);
 }
 
 static int drbg_hash_uninstantiate(PROV_DRBG *drbg)
@@ -363,7 +363,7 @@ static int drbg_hash_uninstantiate(PROV_DRBG *drbg)
     OPENSSL_cleanse(hash->V, sizeof(hash->V));
     OPENSSL_cleanse(hash->C, sizeof(hash->C));
     OPENSSL_cleanse(hash->vtmp, sizeof(hash->vtmp));
-    return PROV_DRBG_uninstantiate(drbg);
+    return ossl_prov_drbg_uninstantiate(drbg);
 }
 
 static int drbg_hash_uninstantiate_wrapper(void *vdrbg)
index 9b6ce0a9cc92cb2b76739cae3628ad835bf7a0d8..57b9ac63f1a179a0a121c3ec508d426461075f9a 100644 (file)
@@ -154,8 +154,8 @@ static int drbg_hmac_instantiate_wrapper(void *vdrbg, unsigned int strength,
 {
     PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
 
-    return PROV_DRBG_instantiate(drbg, strength, prediction_resistance,
-                                 pstr, pstr_len);
+    return ossl_prov_drbg_instantiate(drbg, strength, prediction_resistance,
+                                      pstr, pstr_len);
 }
 
 /*
@@ -182,8 +182,8 @@ static int drbg_hmac_reseed_wrapper(void *vdrbg, int prediction_resistance,
 {
     PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
 
-    return PROV_DRBG_reseed(drbg, prediction_resistance, ent, ent_len,
-                            adin, adin_len);
+    return ossl_prov_drbg_reseed(drbg, prediction_resistance, ent, ent_len,
+                                 adin, adin_len);
 }
 
 /*
@@ -251,8 +251,8 @@ static int drbg_hmac_generate_wrapper
 {
     PROV_DRBG *drbg = (PROV_DRBG *)vdrbg;
 
-    return PROV_DRBG_generate(drbg, out, outlen, strength,
-                              prediction_resistance, adin, adin_len);
+    return ossl_prov_drbg_generate(drbg, out, outlen, strength,
+                                   prediction_resistance, adin, adin_len);
 }
 
 static int drbg_hmac_uninstantiate(PROV_DRBG *drbg)
@@ -261,7 +261,7 @@ static int drbg_hmac_uninstantiate(PROV_DRBG *drbg)
 
     OPENSSL_cleanse(hmac->K, sizeof(hmac->K));
     OPENSSL_cleanse(hmac->V, sizeof(hmac->V));
-    return PROV_DRBG_uninstantiate(drbg);
+    return ossl_prov_drbg_uninstantiate(drbg);
 }
 
 static int drbg_hmac_uninstantiate_wrapper(void *vdrbg)
index 66539def42872effab3d5b471a6e6106d486afcb..40ca6fadaae460c07d7e2f84047d0e9c842a45c7 100644 (file)
@@ -205,19 +205,19 @@ PROV_DRBG *prov_rand_drbg_new
                      const unsigned char *adin, size_t adin_len));
 void prov_rand_drbg_free(PROV_DRBG *drbg);
 
-int PROV_DRBG_instantiate(PROV_DRBG *drbg, unsigned int strength,
-                          int prediction_resistance,
-                          const unsigned char *pers, size_t perslen);
+int ossl_prov_drbg_instantiate(PROV_DRBG *drbg, unsigned int strength,
+                               int prediction_resistance,
+                               const unsigned char *pers, size_t perslen);
 
-int PROV_DRBG_uninstantiate(PROV_DRBG *drbg);
+int ossl_prov_drbg_uninstantiate(PROV_DRBG *drbg);
 
-int PROV_DRBG_reseed(PROV_DRBG *drbg, int prediction_resistance,
-                     const unsigned char *ent, size_t ent_len,
-                     const unsigned char *adin, size_t adinlen);
+int ossl_prov_drbg_reseed(PROV_DRBG *drbg, int prediction_resistance,
+                          const unsigned char *ent, size_t ent_len,
+                          const unsigned char *adin, size_t adinlen);
 
-int PROV_DRBG_generate(PROV_DRBG *drbg, unsigned char *out, size_t outlen,
-                       unsigned int strength, int prediction_resistance,
-                       const unsigned char *adin, size_t adinlen);
+int ossl_prov_drbg_generate(PROV_DRBG *drbg, unsigned char *out, size_t outlen,
+                            unsigned int strength, int prediction_resistance,
+                            const unsigned char *adin, size_t adinlen);
 
 /* Verify that an array of numeric values is all zero */
 #define PROV_DRBG_VERYIFY_ZEROIZATION(v)    \
index b6ec7b104a39ce0ff6d23ff52a5c960929931426..bb0d2a46a9bcc0a6d6f027bbb4eff4c4e97bd98a 100644 (file)
@@ -94,8 +94,8 @@ static int test_rng_instantiate_wrapper(void *vdrbg, unsigned int strength,
     if (pstr != NULL && pstr_len >= drbg->max_perslen)
         return 0;
 
-    return PROV_DRBG_instantiate(drbg, strength, prediction_resistance,
-                                 pstr, pstr_len);
+    return ossl_prov_drbg_instantiate(drbg, strength, prediction_resistance,
+                                      pstr, pstr_len);
 }
 
 static int test_rng_uninstantiate(PROV_DRBG *drbg)
@@ -103,7 +103,7 @@ static int test_rng_uninstantiate(PROV_DRBG *drbg)
     PROV_TEST_RNG *t = (PROV_TEST_RNG *)drbg->data;
 
     t->entropy_pos = 0;
-    return PROV_DRBG_uninstantiate(drbg);
+    return ossl_prov_drbg_uninstantiate(drbg);
 }
 
 static int test_rng_uninstantiate_wrapper(void *vdrbg)
index 9fd65149fffe5c669725b8ae0f88440e0b6da01c..5b0616e26a2315c2400356d3c44b4dce34dab15f 100644 (file)
@@ -530,7 +530,7 @@ void file_load_cleanup(void *construct_data)
 static int file_setup_decoders(struct file_ctx_st *ctx)
 {
     EVP_PKEY *dummy; /* for OSSL_DECODER_CTX_new_by_EVP_PKEY() */
-    OPENSSL_CTX *libctx = PROV_CTX_get0_library_context(ctx->provctx);
+    OPENSSL_CTX *libctx = ossl_prov_ctx_get0_library_context(ctx->provctx);
     OSSL_DECODER *to_obj = NULL; /* Last resort decoder */
     OSSL_DECODER_INSTANCE *to_obj_inst = NULL;
     OSSL_DECODER_CLEANUP *old_cleanup = NULL;
index f6e9db06f617ca3604cfef2916e2d6cf1ca8935b..2085f4d4b3ab1080b6ad551b644da92fb747b7ab 100644 (file)
@@ -162,7 +162,7 @@ static const OSSL_ALGORITHM *legacy_query(void *provctx, int operation_id,
 static void legacy_teardown(void *provctx)
 {
     OPENSSL_CTX_free(PROV_LIBRARY_CONTEXT_OF(provctx));
-    PROV_CTX_free(provctx);
+    ossl_prov_ctx_free(provctx);
 }
 
 /* Functions we provide to the core */
@@ -202,15 +202,15 @@ int OSSL_provider_init(const OSSL_CORE_HANDLE *handle,
     if (c_get_libctx == NULL)
         return 0;
 
-    if ((*provctx = PROV_CTX_new()) == NULL
+    if ((*provctx = ossl_prov_ctx_new()) == NULL
         || (libctx = OPENSSL_CTX_new()) == NULL) {
         OPENSSL_CTX_free(libctx);
         legacy_teardown(*provctx);
         *provctx = NULL;
         return 0;
     }
-    PROV_CTX_set0_library_context(*provctx, libctx);
-    PROV_CTX_set0_handle(*provctx, handle);
+    ossl_prov_ctx_set0_library_context(*provctx, libctx);
+    ossl_prov_ctx_set0_handle(*provctx, handle);
 
     *out = legacy_dispatch_table;