switch (fns->function_id) {
case OSSL_FUNC_DIGEST_NEWCTX:
if (md->newctx == NULL) {
- md->newctx = OSSL_get_OP_digest_newctx(fns);
+ md->newctx = OSSL_FUNC_digest_newctx(fns);
fncnt++;
}
break;
case OSSL_FUNC_DIGEST_INIT:
if (md->dinit == NULL) {
- md->dinit = OSSL_get_OP_digest_init(fns);
+ md->dinit = OSSL_FUNC_digest_init(fns);
fncnt++;
}
break;
case OSSL_FUNC_DIGEST_UPDATE:
if (md->dupdate == NULL) {
- md->dupdate = OSSL_get_OP_digest_update(fns);
+ md->dupdate = OSSL_FUNC_digest_update(fns);
fncnt++;
}
break;
case OSSL_FUNC_DIGEST_FINAL:
if (md->dfinal == NULL) {
- md->dfinal = OSSL_get_OP_digest_final(fns);
+ md->dfinal = OSSL_FUNC_digest_final(fns);
fncnt++;
}
break;
case OSSL_FUNC_DIGEST_DIGEST:
if (md->digest == NULL)
- md->digest = OSSL_get_OP_digest_digest(fns);
+ md->digest = OSSL_FUNC_digest_digest(fns);
/* We don't increment fnct for this as it is stand alone */
break;
case OSSL_FUNC_DIGEST_FREECTX:
if (md->freectx == NULL) {
- md->freectx = OSSL_get_OP_digest_freectx(fns);
+ md->freectx = OSSL_FUNC_digest_freectx(fns);
fncnt++;
}
break;
case OSSL_FUNC_DIGEST_DUPCTX:
if (md->dupctx == NULL)
- md->dupctx = OSSL_get_OP_digest_dupctx(fns);
+ md->dupctx = OSSL_FUNC_digest_dupctx(fns);
break;
case OSSL_FUNC_DIGEST_GET_PARAMS:
if (md->get_params == NULL)
- md->get_params = OSSL_get_OP_digest_get_params(fns);
+ md->get_params = OSSL_FUNC_digest_get_params(fns);
break;
case OSSL_FUNC_DIGEST_SET_CTX_PARAMS:
if (md->set_ctx_params == NULL)
- md->set_ctx_params = OSSL_get_OP_digest_set_ctx_params(fns);
+ md->set_ctx_params = OSSL_FUNC_digest_set_ctx_params(fns);
break;
case OSSL_FUNC_DIGEST_GET_CTX_PARAMS:
if (md->get_ctx_params == NULL)
- md->get_ctx_params = OSSL_get_OP_digest_get_ctx_params(fns);
+ md->get_ctx_params = OSSL_FUNC_digest_get_ctx_params(fns);
break;
case OSSL_FUNC_DIGEST_GETTABLE_PARAMS:
if (md->gettable_params == NULL)
- md->gettable_params = OSSL_get_OP_digest_gettable_params(fns);
+ md->gettable_params = OSSL_FUNC_digest_gettable_params(fns);
break;
case OSSL_FUNC_DIGEST_SETTABLE_CTX_PARAMS:
if (md->settable_ctx_params == NULL)
md->settable_ctx_params =
- OSSL_get_OP_digest_settable_ctx_params(fns);
+ OSSL_FUNC_digest_settable_ctx_params(fns);
break;
case OSSL_FUNC_DIGEST_GETTABLE_CTX_PARAMS:
if (md->gettable_ctx_params == NULL)
md->gettable_ctx_params =
- OSSL_get_OP_digest_gettable_ctx_params(fns);
+ OSSL_FUNC_digest_gettable_ctx_params(fns);
break;
}
}
case OSSL_FUNC_CIPHER_NEWCTX:
if (cipher->newctx != NULL)
break;
- cipher->newctx = OSSL_get_OP_cipher_newctx(fns);
+ cipher->newctx = OSSL_FUNC_cipher_newctx(fns);
fnctxcnt++;
break;
case OSSL_FUNC_CIPHER_ENCRYPT_INIT:
if (cipher->einit != NULL)
break;
- cipher->einit = OSSL_get_OP_cipher_encrypt_init(fns);
+ cipher->einit = OSSL_FUNC_cipher_encrypt_init(fns);
fnciphcnt++;
break;
case OSSL_FUNC_CIPHER_DECRYPT_INIT:
if (cipher->dinit != NULL)
break;
- cipher->dinit = OSSL_get_OP_cipher_decrypt_init(fns);
+ cipher->dinit = OSSL_FUNC_cipher_decrypt_init(fns);
fnciphcnt++;
break;
case OSSL_FUNC_CIPHER_UPDATE:
if (cipher->cupdate != NULL)
break;
- cipher->cupdate = OSSL_get_OP_cipher_update(fns);
+ cipher->cupdate = OSSL_FUNC_cipher_update(fns);
fnciphcnt++;
break;
case OSSL_FUNC_CIPHER_FINAL:
if (cipher->cfinal != NULL)
break;
- cipher->cfinal = OSSL_get_OP_cipher_final(fns);
+ cipher->cfinal = OSSL_FUNC_cipher_final(fns);
fnciphcnt++;
break;
case OSSL_FUNC_CIPHER_CIPHER:
if (cipher->ccipher != NULL)
break;
- cipher->ccipher = OSSL_get_OP_cipher_cipher(fns);
+ cipher->ccipher = OSSL_FUNC_cipher_cipher(fns);
break;
case OSSL_FUNC_CIPHER_FREECTX:
if (cipher->freectx != NULL)
break;
- cipher->freectx = OSSL_get_OP_cipher_freectx(fns);
+ cipher->freectx = OSSL_FUNC_cipher_freectx(fns);
fnctxcnt++;
break;
case OSSL_FUNC_CIPHER_DUPCTX:
if (cipher->dupctx != NULL)
break;
- cipher->dupctx = OSSL_get_OP_cipher_dupctx(fns);
+ cipher->dupctx = OSSL_FUNC_cipher_dupctx(fns);
break;
case OSSL_FUNC_CIPHER_GET_PARAMS:
if (cipher->get_params != NULL)
break;
- cipher->get_params = OSSL_get_OP_cipher_get_params(fns);
+ cipher->get_params = OSSL_FUNC_cipher_get_params(fns);
break;
case OSSL_FUNC_CIPHER_GET_CTX_PARAMS:
if (cipher->get_ctx_params != NULL)
break;
- cipher->get_ctx_params = OSSL_get_OP_cipher_get_ctx_params(fns);
+ cipher->get_ctx_params = OSSL_FUNC_cipher_get_ctx_params(fns);
break;
case OSSL_FUNC_CIPHER_SET_CTX_PARAMS:
if (cipher->set_ctx_params != NULL)
break;
- cipher->set_ctx_params = OSSL_get_OP_cipher_set_ctx_params(fns);
+ cipher->set_ctx_params = OSSL_FUNC_cipher_set_ctx_params(fns);
break;
case OSSL_FUNC_CIPHER_GETTABLE_PARAMS:
if (cipher->gettable_params != NULL)
break;
- cipher->gettable_params = OSSL_get_OP_cipher_gettable_params(fns);
+ cipher->gettable_params = OSSL_FUNC_cipher_gettable_params(fns);
break;
case OSSL_FUNC_CIPHER_GETTABLE_CTX_PARAMS:
if (cipher->gettable_ctx_params != NULL)
break;
cipher->gettable_ctx_params =
- OSSL_get_OP_cipher_gettable_ctx_params(fns);
+ OSSL_FUNC_cipher_gettable_ctx_params(fns);
break;
case OSSL_FUNC_CIPHER_SETTABLE_CTX_PARAMS:
if (cipher->settable_ctx_params != NULL)
break;
cipher->settable_ctx_params =
- OSSL_get_OP_cipher_settable_ctx_params(fns);
+ OSSL_FUNC_cipher_settable_ctx_params(fns);
break;
}
}
CRYPTO_RWLOCK *refcnt_lock;
const OSSL_DISPATCH *dispatch;
- OSSL_OP_rand_newctx_fn *newctx;
- OSSL_OP_rand_freectx_fn *freectx;
- OSSL_OP_rand_instantiate_fn *instantiate;
- OSSL_OP_rand_uninstantiate_fn *uninstantiate;
- OSSL_OP_rand_generate_fn *generate;
- OSSL_OP_rand_reseed_fn *reseed;
- OSSL_OP_rand_nonce_fn *nonce;
- OSSL_OP_rand_enable_locking_fn *enable_locking;
- OSSL_OP_rand_lock_fn *lock;
- OSSL_OP_rand_unlock_fn *unlock;
- OSSL_OP_rand_gettable_params_fn *gettable_params;
- OSSL_OP_rand_gettable_ctx_params_fn *gettable_ctx_params;
- OSSL_OP_rand_settable_ctx_params_fn *settable_ctx_params;
- OSSL_OP_rand_get_params_fn *get_params;
- OSSL_OP_rand_get_ctx_params_fn *get_ctx_params;
- OSSL_OP_rand_set_ctx_params_fn *set_ctx_params;
- OSSL_OP_rand_set_callbacks_fn *set_callbacks;
- OSSL_OP_rand_verify_zeroization_fn *verify_zeroization;
+ OSSL_FUNC_rand_newctx_fn *newctx;
+ OSSL_FUNC_rand_freectx_fn *freectx;
+ OSSL_FUNC_rand_instantiate_fn *instantiate;
+ OSSL_FUNC_rand_uninstantiate_fn *uninstantiate;
+ OSSL_FUNC_rand_generate_fn *generate;
+ OSSL_FUNC_rand_reseed_fn *reseed;
+ OSSL_FUNC_rand_nonce_fn *nonce;
+ OSSL_FUNC_rand_enable_locking_fn *enable_locking;
+ OSSL_FUNC_rand_lock_fn *lock;
+ OSSL_FUNC_rand_unlock_fn *unlock;
+ OSSL_FUNC_rand_gettable_params_fn *gettable_params;
+ OSSL_FUNC_rand_gettable_ctx_params_fn *gettable_ctx_params;
+ OSSL_FUNC_rand_settable_ctx_params_fn *settable_ctx_params;
+ OSSL_FUNC_rand_get_params_fn *get_params;
+ OSSL_FUNC_rand_get_ctx_params_fn *get_ctx_params;
+ OSSL_FUNC_rand_set_ctx_params_fn *set_ctx_params;
+ OSSL_FUNC_rand_set_callbacks_fn *set_callbacks;
+ OSSL_FUNC_rand_verify_zeroization_fn *verify_zeroization;
} /* EVP_RAND */ ;
struct evp_keymgmt_st {
CRYPTO_RWLOCK *lock;
/* Constructor(s), destructor, information */
- OSSL_OP_keymgmt_new_fn *new;
- OSSL_OP_keymgmt_free_fn *free;
- OSSL_OP_keymgmt_get_params_fn *get_params;
- OSSL_OP_keymgmt_gettable_params_fn *gettable_params;
- OSSL_OP_keymgmt_set_params_fn *set_params;
- OSSL_OP_keymgmt_settable_params_fn *settable_params;
+ OSSL_FUNC_keymgmt_new_fn *new;
+ OSSL_FUNC_keymgmt_free_fn *free;
+ OSSL_FUNC_keymgmt_get_params_fn *get_params;
+ OSSL_FUNC_keymgmt_gettable_params_fn *gettable_params;
+ OSSL_FUNC_keymgmt_set_params_fn *set_params;
+ OSSL_FUNC_keymgmt_settable_params_fn *settable_params;
/* Generation, a complex constructor */
- OSSL_OP_keymgmt_gen_init_fn *gen_init;
- OSSL_OP_keymgmt_gen_set_template_fn *gen_set_template;
- OSSL_OP_keymgmt_gen_set_params_fn *gen_set_params;
- OSSL_OP_keymgmt_gen_settable_params_fn *gen_settable_params;
- OSSL_OP_keymgmt_gen_fn *gen;
- OSSL_OP_keymgmt_gen_cleanup_fn *gen_cleanup;
+ OSSL_FUNC_keymgmt_gen_init_fn *gen_init;
+ OSSL_FUNC_keymgmt_gen_set_template_fn *gen_set_template;
+ OSSL_FUNC_keymgmt_gen_set_params_fn *gen_set_params;
+ OSSL_FUNC_keymgmt_gen_settable_params_fn *gen_settable_params;
+ OSSL_FUNC_keymgmt_gen_fn *gen;
+ OSSL_FUNC_keymgmt_gen_cleanup_fn *gen_cleanup;
/* Key object checking */
- OSSL_OP_keymgmt_query_operation_name_fn *query_operation_name;
- OSSL_OP_keymgmt_has_fn *has;
- OSSL_OP_keymgmt_validate_fn *validate;
- OSSL_OP_keymgmt_match_fn *match;
+ OSSL_FUNC_keymgmt_query_operation_name_fn *query_operation_name;
+ OSSL_FUNC_keymgmt_has_fn *has;
+ OSSL_FUNC_keymgmt_validate_fn *validate;
+ OSSL_FUNC_keymgmt_match_fn *match;
/* Import and export routines */
- OSSL_OP_keymgmt_import_fn *import;
- OSSL_OP_keymgmt_import_types_fn *import_types;
- OSSL_OP_keymgmt_export_fn *export;
- OSSL_OP_keymgmt_export_types_fn *export_types;
- OSSL_OP_keymgmt_copy_fn *copy;
+ OSSL_FUNC_keymgmt_import_fn *import;
+ OSSL_FUNC_keymgmt_import_types_fn *import_types;
+ OSSL_FUNC_keymgmt_export_fn *export;
+ OSSL_FUNC_keymgmt_export_types_fn *export_types;
+ OSSL_FUNC_keymgmt_copy_fn *copy;
} /* EVP_KEYMGMT */ ;
struct evp_keyexch_st {
CRYPTO_REF_COUNT refcnt;
CRYPTO_RWLOCK *lock;
- OSSL_OP_keyexch_newctx_fn *newctx;
- OSSL_OP_keyexch_init_fn *init;
- OSSL_OP_keyexch_set_peer_fn *set_peer;
- OSSL_OP_keyexch_derive_fn *derive;
- OSSL_OP_keyexch_freectx_fn *freectx;
- OSSL_OP_keyexch_dupctx_fn *dupctx;
- OSSL_OP_keyexch_set_ctx_params_fn *set_ctx_params;
- OSSL_OP_keyexch_settable_ctx_params_fn *settable_ctx_params;
- OSSL_OP_keyexch_get_ctx_params_fn *get_ctx_params;
- OSSL_OP_keyexch_gettable_ctx_params_fn *gettable_ctx_params;
+ OSSL_FUNC_keyexch_newctx_fn *newctx;
+ OSSL_FUNC_keyexch_init_fn *init;
+ OSSL_FUNC_keyexch_set_peer_fn *set_peer;
+ OSSL_FUNC_keyexch_derive_fn *derive;
+ OSSL_FUNC_keyexch_freectx_fn *freectx;
+ OSSL_FUNC_keyexch_dupctx_fn *dupctx;
+ OSSL_FUNC_keyexch_set_ctx_params_fn *set_ctx_params;
+ OSSL_FUNC_keyexch_settable_ctx_params_fn *settable_ctx_params;
+ OSSL_FUNC_keyexch_get_ctx_params_fn *get_ctx_params;
+ OSSL_FUNC_keyexch_gettable_ctx_params_fn *gettable_ctx_params;
} /* EVP_KEYEXCH */;
struct evp_signature_st {
CRYPTO_REF_COUNT refcnt;
CRYPTO_RWLOCK *lock;
- OSSL_OP_signature_newctx_fn *newctx;
- OSSL_OP_signature_sign_init_fn *sign_init;
- OSSL_OP_signature_sign_fn *sign;
- OSSL_OP_signature_verify_init_fn *verify_init;
- OSSL_OP_signature_verify_fn *verify;
- OSSL_OP_signature_verify_recover_init_fn *verify_recover_init;
- OSSL_OP_signature_verify_recover_fn *verify_recover;
- OSSL_OP_signature_digest_sign_init_fn *digest_sign_init;
- OSSL_OP_signature_digest_sign_update_fn *digest_sign_update;
- OSSL_OP_signature_digest_sign_final_fn *digest_sign_final;
- OSSL_OP_signature_digest_sign_fn *digest_sign;
- OSSL_OP_signature_digest_verify_init_fn *digest_verify_init;
- OSSL_OP_signature_digest_verify_update_fn *digest_verify_update;
- OSSL_OP_signature_digest_verify_final_fn *digest_verify_final;
- OSSL_OP_signature_digest_verify_fn *digest_verify;
- OSSL_OP_signature_freectx_fn *freectx;
- OSSL_OP_signature_dupctx_fn *dupctx;
- OSSL_OP_signature_get_ctx_params_fn *get_ctx_params;
- OSSL_OP_signature_gettable_ctx_params_fn *gettable_ctx_params;
- OSSL_OP_signature_set_ctx_params_fn *set_ctx_params;
- OSSL_OP_signature_settable_ctx_params_fn *settable_ctx_params;
- OSSL_OP_signature_get_ctx_md_params_fn *get_ctx_md_params;
- OSSL_OP_signature_gettable_ctx_md_params_fn *gettable_ctx_md_params;
- OSSL_OP_signature_set_ctx_md_params_fn *set_ctx_md_params;
- OSSL_OP_signature_settable_ctx_md_params_fn *settable_ctx_md_params;
+ OSSL_FUNC_signature_newctx_fn *newctx;
+ OSSL_FUNC_signature_sign_init_fn *sign_init;
+ OSSL_FUNC_signature_sign_fn *sign;
+ OSSL_FUNC_signature_verify_init_fn *verify_init;
+ OSSL_FUNC_signature_verify_fn *verify;
+ OSSL_FUNC_signature_verify_recover_init_fn *verify_recover_init;
+ OSSL_FUNC_signature_verify_recover_fn *verify_recover;
+ OSSL_FUNC_signature_digest_sign_init_fn *digest_sign_init;
+ OSSL_FUNC_signature_digest_sign_update_fn *digest_sign_update;
+ OSSL_FUNC_signature_digest_sign_final_fn *digest_sign_final;
+ OSSL_FUNC_signature_digest_sign_fn *digest_sign;
+ OSSL_FUNC_signature_digest_verify_init_fn *digest_verify_init;
+ OSSL_FUNC_signature_digest_verify_update_fn *digest_verify_update;
+ OSSL_FUNC_signature_digest_verify_final_fn *digest_verify_final;
+ OSSL_FUNC_signature_digest_verify_fn *digest_verify;
+ OSSL_FUNC_signature_freectx_fn *freectx;
+ OSSL_FUNC_signature_dupctx_fn *dupctx;
+ OSSL_FUNC_signature_get_ctx_params_fn *get_ctx_params;
+ OSSL_FUNC_signature_gettable_ctx_params_fn *gettable_ctx_params;
+ OSSL_FUNC_signature_set_ctx_params_fn *set_ctx_params;
+ OSSL_FUNC_signature_settable_ctx_params_fn *settable_ctx_params;
+ OSSL_FUNC_signature_get_ctx_md_params_fn *get_ctx_md_params;
+ OSSL_FUNC_signature_gettable_ctx_md_params_fn *gettable_ctx_md_params;
+ OSSL_FUNC_signature_set_ctx_md_params_fn *set_ctx_md_params;
+ OSSL_FUNC_signature_settable_ctx_md_params_fn *settable_ctx_md_params;
} /* EVP_SIGNATURE */;
struct evp_asym_cipher_st {
CRYPTO_REF_COUNT refcnt;
CRYPTO_RWLOCK *lock;
- OSSL_OP_asym_cipher_newctx_fn *newctx;
- OSSL_OP_asym_cipher_encrypt_init_fn *encrypt_init;
- OSSL_OP_asym_cipher_encrypt_fn *encrypt;
- OSSL_OP_asym_cipher_decrypt_init_fn *decrypt_init;
- OSSL_OP_asym_cipher_decrypt_fn *decrypt;
- OSSL_OP_asym_cipher_freectx_fn *freectx;
- OSSL_OP_asym_cipher_dupctx_fn *dupctx;
- OSSL_OP_asym_cipher_get_ctx_params_fn *get_ctx_params;
- OSSL_OP_asym_cipher_gettable_ctx_params_fn *gettable_ctx_params;
- OSSL_OP_asym_cipher_set_ctx_params_fn *set_ctx_params;
- OSSL_OP_asym_cipher_settable_ctx_params_fn *settable_ctx_params;
+ OSSL_FUNC_asym_cipher_newctx_fn *newctx;
+ OSSL_FUNC_asym_cipher_encrypt_init_fn *encrypt_init;
+ OSSL_FUNC_asym_cipher_encrypt_fn *encrypt;
+ OSSL_FUNC_asym_cipher_decrypt_init_fn *decrypt_init;
+ OSSL_FUNC_asym_cipher_decrypt_fn *decrypt;
+ OSSL_FUNC_asym_cipher_freectx_fn *freectx;
+ OSSL_FUNC_asym_cipher_dupctx_fn *dupctx;
+ OSSL_FUNC_asym_cipher_get_ctx_params_fn *get_ctx_params;
+ OSSL_FUNC_asym_cipher_gettable_ctx_params_fn *gettable_ctx_params;
+ OSSL_FUNC_asym_cipher_set_ctx_params_fn *set_ctx_params;
+ OSSL_FUNC_asym_cipher_settable_ctx_params_fn *settable_ctx_params;
} /* EVP_ASYM_CIPHER */;
int PKCS5_v2_PBKDF2_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass,
case OSSL_FUNC_RAND_NEWCTX:
if (rand->newctx != NULL)
break;
- rand->newctx = OSSL_get_OP_rand_newctx(fns);
+ rand->newctx = OSSL_FUNC_rand_newctx(fns);
fnctxcnt++;
break;
case OSSL_FUNC_RAND_FREECTX:
if (rand->freectx != NULL)
break;
- rand->freectx = OSSL_get_OP_rand_freectx(fns);
+ rand->freectx = OSSL_FUNC_rand_freectx(fns);
fnctxcnt++;
break;
case OSSL_FUNC_RAND_INSTANTIATE:
if (rand->instantiate != NULL)
break;
- rand->instantiate = OSSL_get_OP_rand_instantiate(fns);
+ rand->instantiate = OSSL_FUNC_rand_instantiate(fns);
fnrandcnt++;
break;
case OSSL_FUNC_RAND_UNINSTANTIATE:
if (rand->uninstantiate != NULL)
break;
- rand->uninstantiate = OSSL_get_OP_rand_uninstantiate(fns);
+ rand->uninstantiate = OSSL_FUNC_rand_uninstantiate(fns);
fnrandcnt++;
break;
case OSSL_FUNC_RAND_GENERATE:
if (rand->generate != NULL)
break;
- rand->generate = OSSL_get_OP_rand_generate(fns);
+ rand->generate = OSSL_FUNC_rand_generate(fns);
fnrandcnt++;
break;
case OSSL_FUNC_RAND_RESEED:
if (rand->reseed != NULL)
break;
- rand->reseed = OSSL_get_OP_rand_reseed(fns);
+ rand->reseed = OSSL_FUNC_rand_reseed(fns);
break;
case OSSL_FUNC_RAND_NONCE:
if (rand->nonce != NULL)
break;
- rand->nonce = OSSL_get_OP_rand_nonce(fns);
+ rand->nonce = OSSL_FUNC_rand_nonce(fns);
break;
case OSSL_FUNC_RAND_SET_CALLBACKS:
if (rand->set_callbacks != NULL)
break;
- rand->set_callbacks = OSSL_get_OP_rand_set_callbacks(fns);
+ rand->set_callbacks = OSSL_FUNC_rand_set_callbacks(fns);
break;
case OSSL_FUNC_RAND_ENABLE_LOCKING:
if (rand->enable_locking != NULL)
break;
- rand->enable_locking = OSSL_get_OP_rand_enable_locking(fns);
+ rand->enable_locking = OSSL_FUNC_rand_enable_locking(fns);
fnlockcnt++;
break;
case OSSL_FUNC_RAND_LOCK:
if (rand->lock != NULL)
break;
- rand->lock = OSSL_get_OP_rand_lock(fns);
+ rand->lock = OSSL_FUNC_rand_lock(fns);
fnlockcnt++;
break;
case OSSL_FUNC_RAND_UNLOCK:
if (rand->unlock != NULL)
break;
- rand->unlock = OSSL_get_OP_rand_unlock(fns);
+ rand->unlock = OSSL_FUNC_rand_unlock(fns);
fnlockcnt++;
break;
case OSSL_FUNC_RAND_GETTABLE_PARAMS:
if (rand->gettable_params != NULL)
break;
rand->gettable_params =
- OSSL_get_OP_rand_gettable_params(fns);
+ OSSL_FUNC_rand_gettable_params(fns);
break;
case OSSL_FUNC_RAND_GETTABLE_CTX_PARAMS:
if (rand->gettable_ctx_params != NULL)
break;
rand->gettable_ctx_params =
- OSSL_get_OP_rand_gettable_ctx_params(fns);
+ OSSL_FUNC_rand_gettable_ctx_params(fns);
break;
case OSSL_FUNC_RAND_SETTABLE_CTX_PARAMS:
if (rand->settable_ctx_params != NULL)
break;
rand->settable_ctx_params =
- OSSL_get_OP_rand_settable_ctx_params(fns);
+ OSSL_FUNC_rand_settable_ctx_params(fns);
break;
case OSSL_FUNC_RAND_GET_PARAMS:
if (rand->get_params != NULL)
break;
- rand->get_params = OSSL_get_OP_rand_get_params(fns);
+ rand->get_params = OSSL_FUNC_rand_get_params(fns);
break;
case OSSL_FUNC_RAND_GET_CTX_PARAMS:
if (rand->get_ctx_params != NULL)
break;
- rand->get_ctx_params = OSSL_get_OP_rand_get_ctx_params(fns);
+ rand->get_ctx_params = OSSL_FUNC_rand_get_ctx_params(fns);
break;
case OSSL_FUNC_RAND_SET_CTX_PARAMS:
if (rand->set_ctx_params != NULL)
break;
- rand->set_ctx_params = OSSL_get_OP_rand_set_ctx_params(fns);
+ rand->set_ctx_params = OSSL_FUNC_rand_set_ctx_params(fns);
break;
case OSSL_FUNC_RAND_VERIFY_ZEROIZATION:
if (rand->verify_zeroization != NULL)
break;
- rand->verify_zeroization = OSSL_get_OP_rand_verify_zeroization(fns);
+ rand->verify_zeroization = OSSL_FUNC_rand_verify_zeroization(fns);
#ifdef FIPS_MODULE
fnzeroizecnt++;
#endif
case OSSL_FUNC_KEYEXCH_NEWCTX:
if (exchange->newctx != NULL)
break;
- exchange->newctx = OSSL_get_OP_keyexch_newctx(fns);
+ exchange->newctx = OSSL_FUNC_keyexch_newctx(fns);
fncnt++;
break;
case OSSL_FUNC_KEYEXCH_INIT:
if (exchange->init != NULL)
break;
- exchange->init = OSSL_get_OP_keyexch_init(fns);
+ exchange->init = OSSL_FUNC_keyexch_init(fns);
fncnt++;
break;
case OSSL_FUNC_KEYEXCH_SET_PEER:
if (exchange->set_peer != NULL)
break;
- exchange->set_peer = OSSL_get_OP_keyexch_set_peer(fns);
+ exchange->set_peer = OSSL_FUNC_keyexch_set_peer(fns);
break;
case OSSL_FUNC_KEYEXCH_DERIVE:
if (exchange->derive != NULL)
break;
- exchange->derive = OSSL_get_OP_keyexch_derive(fns);
+ exchange->derive = OSSL_FUNC_keyexch_derive(fns);
fncnt++;
break;
case OSSL_FUNC_KEYEXCH_FREECTX:
if (exchange->freectx != NULL)
break;
- exchange->freectx = OSSL_get_OP_keyexch_freectx(fns);
+ exchange->freectx = OSSL_FUNC_keyexch_freectx(fns);
fncnt++;
break;
case OSSL_FUNC_KEYEXCH_DUPCTX:
if (exchange->dupctx != NULL)
break;
- exchange->dupctx = OSSL_get_OP_keyexch_dupctx(fns);
+ exchange->dupctx = OSSL_FUNC_keyexch_dupctx(fns);
break;
case OSSL_FUNC_KEYEXCH_GET_CTX_PARAMS:
if (exchange->get_ctx_params != NULL)
break;
- exchange->get_ctx_params = OSSL_get_OP_keyexch_get_ctx_params(fns);
+ exchange->get_ctx_params = OSSL_FUNC_keyexch_get_ctx_params(fns);
gparamfncnt++;
break;
case OSSL_FUNC_KEYEXCH_GETTABLE_CTX_PARAMS:
if (exchange->gettable_ctx_params != NULL)
break;
exchange->gettable_ctx_params
- = OSSL_get_OP_keyexch_gettable_ctx_params(fns);
+ = OSSL_FUNC_keyexch_gettable_ctx_params(fns);
gparamfncnt++;
break;
case OSSL_FUNC_KEYEXCH_SET_CTX_PARAMS:
if (exchange->set_ctx_params != NULL)
break;
- exchange->set_ctx_params = OSSL_get_OP_keyexch_set_ctx_params(fns);
+ exchange->set_ctx_params = OSSL_FUNC_keyexch_set_ctx_params(fns);
sparamfncnt++;
break;
case OSSL_FUNC_KEYEXCH_SETTABLE_CTX_PARAMS:
if (exchange->settable_ctx_params != NULL)
break;
exchange->settable_ctx_params
- = OSSL_get_OP_keyexch_settable_ctx_params(fns);
+ = OSSL_FUNC_keyexch_settable_ctx_params(fns);
sparamfncnt++;
break;
}
case OSSL_FUNC_KDF_NEWCTX:
if (kdf->newctx != NULL)
break;
- kdf->newctx = OSSL_get_OP_kdf_newctx(fns);
+ kdf->newctx = OSSL_FUNC_kdf_newctx(fns);
fnctxcnt++;
break;
case OSSL_FUNC_KDF_DUPCTX:
if (kdf->dupctx != NULL)
break;
- kdf->dupctx = OSSL_get_OP_kdf_dupctx(fns);
+ kdf->dupctx = OSSL_FUNC_kdf_dupctx(fns);
break;
case OSSL_FUNC_KDF_FREECTX:
if (kdf->freectx != NULL)
break;
- kdf->freectx = OSSL_get_OP_kdf_freectx(fns);
+ kdf->freectx = OSSL_FUNC_kdf_freectx(fns);
fnctxcnt++;
break;
case OSSL_FUNC_KDF_RESET:
if (kdf->reset != NULL)
break;
- kdf->reset = OSSL_get_OP_kdf_reset(fns);
+ kdf->reset = OSSL_FUNC_kdf_reset(fns);
break;
case OSSL_FUNC_KDF_DERIVE:
if (kdf->derive != NULL)
break;
- kdf->derive = OSSL_get_OP_kdf_derive(fns);
+ kdf->derive = OSSL_FUNC_kdf_derive(fns);
fnkdfcnt++;
break;
case OSSL_FUNC_KDF_GETTABLE_PARAMS:
if (kdf->gettable_params != NULL)
break;
kdf->gettable_params =
- OSSL_get_OP_kdf_gettable_params(fns);
+ OSSL_FUNC_kdf_gettable_params(fns);
break;
case OSSL_FUNC_KDF_GETTABLE_CTX_PARAMS:
if (kdf->gettable_ctx_params != NULL)
break;
kdf->gettable_ctx_params =
- OSSL_get_OP_kdf_gettable_ctx_params(fns);
+ OSSL_FUNC_kdf_gettable_ctx_params(fns);
break;
case OSSL_FUNC_KDF_SETTABLE_CTX_PARAMS:
if (kdf->settable_ctx_params != NULL)
break;
kdf->settable_ctx_params =
- OSSL_get_OP_kdf_settable_ctx_params(fns);
+ OSSL_FUNC_kdf_settable_ctx_params(fns);
break;
case OSSL_FUNC_KDF_GET_PARAMS:
if (kdf->get_params != NULL)
break;
- kdf->get_params = OSSL_get_OP_kdf_get_params(fns);
+ kdf->get_params = OSSL_FUNC_kdf_get_params(fns);
break;
case OSSL_FUNC_KDF_GET_CTX_PARAMS:
if (kdf->get_ctx_params != NULL)
break;
- kdf->get_ctx_params = OSSL_get_OP_kdf_get_ctx_params(fns);
+ kdf->get_ctx_params = OSSL_FUNC_kdf_get_ctx_params(fns);
break;
case OSSL_FUNC_KDF_SET_CTX_PARAMS:
if (kdf->set_ctx_params != NULL)
break;
- kdf->set_ctx_params = OSSL_get_OP_kdf_set_ctx_params(fns);
+ kdf->set_ctx_params = OSSL_FUNC_kdf_set_ctx_params(fns);
break;
}
}
switch (fns->function_id) {
case OSSL_FUNC_KEYMGMT_NEW:
if (keymgmt->new == NULL)
- keymgmt->new = OSSL_get_OP_keymgmt_new(fns);
+ keymgmt->new = OSSL_FUNC_keymgmt_new(fns);
break;
case OSSL_FUNC_KEYMGMT_GEN_INIT:
if (keymgmt->gen_init == NULL)
- keymgmt->gen_init = OSSL_get_OP_keymgmt_gen_init(fns);
+ keymgmt->gen_init = OSSL_FUNC_keymgmt_gen_init(fns);
break;
case OSSL_FUNC_KEYMGMT_GEN_SET_TEMPLATE:
if (keymgmt->gen_set_template == NULL)
keymgmt->gen_set_template =
- OSSL_get_OP_keymgmt_gen_set_template(fns);
+ OSSL_FUNC_keymgmt_gen_set_template(fns);
break;
case OSSL_FUNC_KEYMGMT_GEN_SET_PARAMS:
if (keymgmt->gen_set_params == NULL) {
setgenparamfncnt++;
keymgmt->gen_set_params =
- OSSL_get_OP_keymgmt_gen_set_params(fns);
+ OSSL_FUNC_keymgmt_gen_set_params(fns);
}
break;
case OSSL_FUNC_KEYMGMT_GEN_SETTABLE_PARAMS:
if (keymgmt->gen_settable_params == NULL) {
setgenparamfncnt++;
keymgmt->gen_settable_params =
- OSSL_get_OP_keymgmt_gen_settable_params(fns);
+ OSSL_FUNC_keymgmt_gen_settable_params(fns);
}
break;
case OSSL_FUNC_KEYMGMT_GEN:
if (keymgmt->gen == NULL)
- keymgmt->gen = OSSL_get_OP_keymgmt_gen(fns);
+ keymgmt->gen = OSSL_FUNC_keymgmt_gen(fns);
break;
case OSSL_FUNC_KEYMGMT_GEN_CLEANUP:
if (keymgmt->gen_cleanup == NULL)
- keymgmt->gen_cleanup = OSSL_get_OP_keymgmt_gen_cleanup(fns);
+ keymgmt->gen_cleanup = OSSL_FUNC_keymgmt_gen_cleanup(fns);
break;
case OSSL_FUNC_KEYMGMT_FREE:
if (keymgmt->free == NULL)
- keymgmt->free = OSSL_get_OP_keymgmt_free(fns);
+ keymgmt->free = OSSL_FUNC_keymgmt_free(fns);
break;
case OSSL_FUNC_KEYMGMT_GET_PARAMS:
if (keymgmt->get_params == NULL) {
getparamfncnt++;
- keymgmt->get_params = OSSL_get_OP_keymgmt_get_params(fns);
+ keymgmt->get_params = OSSL_FUNC_keymgmt_get_params(fns);
}
break;
case OSSL_FUNC_KEYMGMT_GETTABLE_PARAMS:
if (keymgmt->gettable_params == NULL) {
getparamfncnt++;
keymgmt->gettable_params =
- OSSL_get_OP_keymgmt_gettable_params(fns);
+ OSSL_FUNC_keymgmt_gettable_params(fns);
}
break;
case OSSL_FUNC_KEYMGMT_SET_PARAMS:
if (keymgmt->set_params == NULL) {
setparamfncnt++;
- keymgmt->set_params = OSSL_get_OP_keymgmt_set_params(fns);
+ keymgmt->set_params = OSSL_FUNC_keymgmt_set_params(fns);
}
break;
case OSSL_FUNC_KEYMGMT_SETTABLE_PARAMS:
if (keymgmt->settable_params == NULL) {
setparamfncnt++;
keymgmt->settable_params =
- OSSL_get_OP_keymgmt_settable_params(fns);
+ OSSL_FUNC_keymgmt_settable_params(fns);
}
break;
case OSSL_FUNC_KEYMGMT_QUERY_OPERATION_NAME:
if (keymgmt->query_operation_name == NULL)
keymgmt->query_operation_name =
- OSSL_get_OP_keymgmt_query_operation_name(fns);
+ OSSL_FUNC_keymgmt_query_operation_name(fns);
break;
case OSSL_FUNC_KEYMGMT_HAS:
if (keymgmt->has == NULL)
- keymgmt->has = OSSL_get_OP_keymgmt_has(fns);
+ keymgmt->has = OSSL_FUNC_keymgmt_has(fns);
break;
case OSSL_FUNC_KEYMGMT_COPY:
if (keymgmt->copy == NULL)
- keymgmt->copy = OSSL_get_OP_keymgmt_copy(fns);
+ keymgmt->copy = OSSL_FUNC_keymgmt_copy(fns);
break;
case OSSL_FUNC_KEYMGMT_VALIDATE:
if (keymgmt->validate == NULL)
- keymgmt->validate = OSSL_get_OP_keymgmt_validate(fns);
+ keymgmt->validate = OSSL_FUNC_keymgmt_validate(fns);
break;
case OSSL_FUNC_KEYMGMT_MATCH:
if (keymgmt->match == NULL)
- keymgmt->match = OSSL_get_OP_keymgmt_match(fns);
+ keymgmt->match = OSSL_FUNC_keymgmt_match(fns);
break;
case OSSL_FUNC_KEYMGMT_IMPORT:
if (keymgmt->import == NULL) {
importfncnt++;
- keymgmt->import = OSSL_get_OP_keymgmt_import(fns);
+ keymgmt->import = OSSL_FUNC_keymgmt_import(fns);
}
break;
case OSSL_FUNC_KEYMGMT_IMPORT_TYPES:
if (keymgmt->import_types == NULL) {
importfncnt++;
- keymgmt->import_types = OSSL_get_OP_keymgmt_import_types(fns);
+ keymgmt->import_types = OSSL_FUNC_keymgmt_import_types(fns);
}
break;
case OSSL_FUNC_KEYMGMT_EXPORT:
if (keymgmt->export == NULL) {
exportfncnt++;
- keymgmt->export = OSSL_get_OP_keymgmt_export(fns);
+ keymgmt->export = OSSL_FUNC_keymgmt_export(fns);
}
break;
case OSSL_FUNC_KEYMGMT_EXPORT_TYPES:
if (keymgmt->export_types == NULL) {
exportfncnt++;
- keymgmt->export_types = OSSL_get_OP_keymgmt_export_types(fns);
+ keymgmt->export_types = OSSL_FUNC_keymgmt_export_types(fns);
}
break;
}
case OSSL_FUNC_MAC_NEWCTX:
if (mac->newctx != NULL)
break;
- mac->newctx = OSSL_get_OP_mac_newctx(fns);
+ mac->newctx = OSSL_FUNC_mac_newctx(fns);
fnctxcnt++;
break;
case OSSL_FUNC_MAC_DUPCTX:
if (mac->dupctx != NULL)
break;
- mac->dupctx = OSSL_get_OP_mac_dupctx(fns);
+ mac->dupctx = OSSL_FUNC_mac_dupctx(fns);
break;
case OSSL_FUNC_MAC_FREECTX:
if (mac->freectx != NULL)
break;
- mac->freectx = OSSL_get_OP_mac_freectx(fns);
+ mac->freectx = OSSL_FUNC_mac_freectx(fns);
fnctxcnt++;
break;
case OSSL_FUNC_MAC_INIT:
if (mac->init != NULL)
break;
- mac->init = OSSL_get_OP_mac_init(fns);
+ mac->init = OSSL_FUNC_mac_init(fns);
fnmaccnt++;
break;
case OSSL_FUNC_MAC_UPDATE:
if (mac->update != NULL)
break;
- mac->update = OSSL_get_OP_mac_update(fns);
+ mac->update = OSSL_FUNC_mac_update(fns);
fnmaccnt++;
break;
case OSSL_FUNC_MAC_FINAL:
if (mac->final != NULL)
break;
- mac->final = OSSL_get_OP_mac_final(fns);
+ mac->final = OSSL_FUNC_mac_final(fns);
fnmaccnt++;
break;
case OSSL_FUNC_MAC_GETTABLE_PARAMS:
if (mac->gettable_params != NULL)
break;
mac->gettable_params =
- OSSL_get_OP_mac_gettable_params(fns);
+ OSSL_FUNC_mac_gettable_params(fns);
break;
case OSSL_FUNC_MAC_GETTABLE_CTX_PARAMS:
if (mac->gettable_ctx_params != NULL)
break;
mac->gettable_ctx_params =
- OSSL_get_OP_mac_gettable_ctx_params(fns);
+ OSSL_FUNC_mac_gettable_ctx_params(fns);
break;
case OSSL_FUNC_MAC_SETTABLE_CTX_PARAMS:
if (mac->settable_ctx_params != NULL)
break;
mac->settable_ctx_params =
- OSSL_get_OP_mac_settable_ctx_params(fns);
+ OSSL_FUNC_mac_settable_ctx_params(fns);
break;
case OSSL_FUNC_MAC_GET_PARAMS:
if (mac->get_params != NULL)
break;
- mac->get_params = OSSL_get_OP_mac_get_params(fns);
+ mac->get_params = OSSL_FUNC_mac_get_params(fns);
break;
case OSSL_FUNC_MAC_GET_CTX_PARAMS:
if (mac->get_ctx_params != NULL)
break;
- mac->get_ctx_params = OSSL_get_OP_mac_get_ctx_params(fns);
+ mac->get_ctx_params = OSSL_FUNC_mac_get_ctx_params(fns);
break;
case OSSL_FUNC_MAC_SET_CTX_PARAMS:
if (mac->set_ctx_params != NULL)
break;
- mac->set_ctx_params = OSSL_get_OP_mac_set_ctx_params(fns);
+ mac->set_ctx_params = OSSL_FUNC_mac_set_ctx_params(fns);
break;
}
}
case OSSL_FUNC_ASYM_CIPHER_NEWCTX:
if (cipher->newctx != NULL)
break;
- cipher->newctx = OSSL_get_OP_asym_cipher_newctx(fns);
+ cipher->newctx = OSSL_FUNC_asym_cipher_newctx(fns);
ctxfncnt++;
break;
case OSSL_FUNC_ASYM_CIPHER_ENCRYPT_INIT:
if (cipher->encrypt_init != NULL)
break;
- cipher->encrypt_init = OSSL_get_OP_asym_cipher_encrypt_init(fns);
+ cipher->encrypt_init = OSSL_FUNC_asym_cipher_encrypt_init(fns);
encfncnt++;
break;
case OSSL_FUNC_ASYM_CIPHER_ENCRYPT:
if (cipher->encrypt != NULL)
break;
- cipher->encrypt = OSSL_get_OP_asym_cipher_encrypt(fns);
+ cipher->encrypt = OSSL_FUNC_asym_cipher_encrypt(fns);
encfncnt++;
break;
case OSSL_FUNC_ASYM_CIPHER_DECRYPT_INIT:
if (cipher->decrypt_init != NULL)
break;
- cipher->decrypt_init = OSSL_get_OP_asym_cipher_decrypt_init(fns);
+ cipher->decrypt_init = OSSL_FUNC_asym_cipher_decrypt_init(fns);
decfncnt++;
break;
case OSSL_FUNC_ASYM_CIPHER_DECRYPT:
if (cipher->decrypt != NULL)
break;
- cipher->decrypt = OSSL_get_OP_asym_cipher_decrypt(fns);
+ cipher->decrypt = OSSL_FUNC_asym_cipher_decrypt(fns);
decfncnt++;
break;
case OSSL_FUNC_ASYM_CIPHER_FREECTX:
if (cipher->freectx != NULL)
break;
- cipher->freectx = OSSL_get_OP_asym_cipher_freectx(fns);
+ cipher->freectx = OSSL_FUNC_asym_cipher_freectx(fns);
ctxfncnt++;
break;
case OSSL_FUNC_ASYM_CIPHER_DUPCTX:
if (cipher->dupctx != NULL)
break;
- cipher->dupctx = OSSL_get_OP_asym_cipher_dupctx(fns);
+ cipher->dupctx = OSSL_FUNC_asym_cipher_dupctx(fns);
break;
case OSSL_FUNC_ASYM_CIPHER_GET_CTX_PARAMS:
if (cipher->get_ctx_params != NULL)
break;
cipher->get_ctx_params
- = OSSL_get_OP_asym_cipher_get_ctx_params(fns);
+ = OSSL_FUNC_asym_cipher_get_ctx_params(fns);
gparamfncnt++;
break;
case OSSL_FUNC_ASYM_CIPHER_GETTABLE_CTX_PARAMS:
if (cipher->gettable_ctx_params != NULL)
break;
cipher->gettable_ctx_params
- = OSSL_get_OP_asym_cipher_gettable_ctx_params(fns);
+ = OSSL_FUNC_asym_cipher_gettable_ctx_params(fns);
gparamfncnt++;
break;
case OSSL_FUNC_ASYM_CIPHER_SET_CTX_PARAMS:
if (cipher->set_ctx_params != NULL)
break;
cipher->set_ctx_params
- = OSSL_get_OP_asym_cipher_set_ctx_params(fns);
+ = OSSL_FUNC_asym_cipher_set_ctx_params(fns);
sparamfncnt++;
break;
case OSSL_FUNC_ASYM_CIPHER_SETTABLE_CTX_PARAMS:
if (cipher->settable_ctx_params != NULL)
break;
cipher->settable_ctx_params
- = OSSL_get_OP_asym_cipher_settable_ctx_params(fns);
+ = OSSL_FUNC_asym_cipher_settable_ctx_params(fns);
sparamfncnt++;
break;
}
case OSSL_FUNC_SIGNATURE_NEWCTX:
if (signature->newctx != NULL)
break;
- signature->newctx = OSSL_get_OP_signature_newctx(fns);
+ signature->newctx = OSSL_FUNC_signature_newctx(fns);
ctxfncnt++;
break;
case OSSL_FUNC_SIGNATURE_SIGN_INIT:
if (signature->sign_init != NULL)
break;
- signature->sign_init = OSSL_get_OP_signature_sign_init(fns);
+ signature->sign_init = OSSL_FUNC_signature_sign_init(fns);
signfncnt++;
break;
case OSSL_FUNC_SIGNATURE_SIGN:
if (signature->sign != NULL)
break;
- signature->sign = OSSL_get_OP_signature_sign(fns);
+ signature->sign = OSSL_FUNC_signature_sign(fns);
signfncnt++;
break;
case OSSL_FUNC_SIGNATURE_VERIFY_INIT:
if (signature->verify_init != NULL)
break;
- signature->verify_init = OSSL_get_OP_signature_verify_init(fns);
+ signature->verify_init = OSSL_FUNC_signature_verify_init(fns);
verifyfncnt++;
break;
case OSSL_FUNC_SIGNATURE_VERIFY:
if (signature->verify != NULL)
break;
- signature->verify = OSSL_get_OP_signature_verify(fns);
+ signature->verify = OSSL_FUNC_signature_verify(fns);
verifyfncnt++;
break;
case OSSL_FUNC_SIGNATURE_VERIFY_RECOVER_INIT:
if (signature->verify_recover_init != NULL)
break;
signature->verify_recover_init
- = OSSL_get_OP_signature_verify_recover_init(fns);
+ = OSSL_FUNC_signature_verify_recover_init(fns);
verifyrecfncnt++;
break;
case OSSL_FUNC_SIGNATURE_VERIFY_RECOVER:
if (signature->verify_recover != NULL)
break;
signature->verify_recover
- = OSSL_get_OP_signature_verify_recover(fns);
+ = OSSL_FUNC_signature_verify_recover(fns);
verifyrecfncnt++;
break;
case OSSL_FUNC_SIGNATURE_DIGEST_SIGN_INIT:
if (signature->digest_sign_init != NULL)
break;
signature->digest_sign_init
- = OSSL_get_OP_signature_digest_sign_init(fns);
+ = OSSL_FUNC_signature_digest_sign_init(fns);
break;
case OSSL_FUNC_SIGNATURE_DIGEST_SIGN_UPDATE:
if (signature->digest_sign_update != NULL)
break;
signature->digest_sign_update
- = OSSL_get_OP_signature_digest_sign_update(fns);
+ = OSSL_FUNC_signature_digest_sign_update(fns);
digsignfncnt++;
break;
case OSSL_FUNC_SIGNATURE_DIGEST_SIGN_FINAL:
if (signature->digest_sign_final != NULL)
break;
signature->digest_sign_final
- = OSSL_get_OP_signature_digest_sign_final(fns);
+ = OSSL_FUNC_signature_digest_sign_final(fns);
digsignfncnt++;
break;
case OSSL_FUNC_SIGNATURE_DIGEST_SIGN:
if (signature->digest_sign != NULL)
break;
signature->digest_sign
- = OSSL_get_OP_signature_digest_sign(fns);
+ = OSSL_FUNC_signature_digest_sign(fns);
break;
case OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_INIT:
if (signature->digest_verify_init != NULL)
break;
signature->digest_verify_init
- = OSSL_get_OP_signature_digest_verify_init(fns);
+ = OSSL_FUNC_signature_digest_verify_init(fns);
break;
case OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_UPDATE:
if (signature->digest_verify_update != NULL)
break;
signature->digest_verify_update
- = OSSL_get_OP_signature_digest_verify_update(fns);
+ = OSSL_FUNC_signature_digest_verify_update(fns);
digverifyfncnt++;
break;
case OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_FINAL:
if (signature->digest_verify_final != NULL)
break;
signature->digest_verify_final
- = OSSL_get_OP_signature_digest_verify_final(fns);
+ = OSSL_FUNC_signature_digest_verify_final(fns);
digverifyfncnt++;
break;
case OSSL_FUNC_SIGNATURE_DIGEST_VERIFY:
if (signature->digest_verify != NULL)
break;
signature->digest_verify
- = OSSL_get_OP_signature_digest_verify(fns);
+ = OSSL_FUNC_signature_digest_verify(fns);
break;
case OSSL_FUNC_SIGNATURE_FREECTX:
if (signature->freectx != NULL)
break;
- signature->freectx = OSSL_get_OP_signature_freectx(fns);
+ signature->freectx = OSSL_FUNC_signature_freectx(fns);
ctxfncnt++;
break;
case OSSL_FUNC_SIGNATURE_DUPCTX:
if (signature->dupctx != NULL)
break;
- signature->dupctx = OSSL_get_OP_signature_dupctx(fns);
+ signature->dupctx = OSSL_FUNC_signature_dupctx(fns);
break;
case OSSL_FUNC_SIGNATURE_GET_CTX_PARAMS:
if (signature->get_ctx_params != NULL)
break;
signature->get_ctx_params
- = OSSL_get_OP_signature_get_ctx_params(fns);
+ = OSSL_FUNC_signature_get_ctx_params(fns);
gparamfncnt++;
break;
case OSSL_FUNC_SIGNATURE_GETTABLE_CTX_PARAMS:
if (signature->gettable_ctx_params != NULL)
break;
signature->gettable_ctx_params
- = OSSL_get_OP_signature_gettable_ctx_params(fns);
+ = OSSL_FUNC_signature_gettable_ctx_params(fns);
gparamfncnt++;
break;
case OSSL_FUNC_SIGNATURE_SET_CTX_PARAMS:
if (signature->set_ctx_params != NULL)
break;
signature->set_ctx_params
- = OSSL_get_OP_signature_set_ctx_params(fns);
+ = OSSL_FUNC_signature_set_ctx_params(fns);
sparamfncnt++;
break;
case OSSL_FUNC_SIGNATURE_SETTABLE_CTX_PARAMS:
if (signature->settable_ctx_params != NULL)
break;
signature->settable_ctx_params
- = OSSL_get_OP_signature_settable_ctx_params(fns);
+ = OSSL_FUNC_signature_settable_ctx_params(fns);
sparamfncnt++;
break;
case OSSL_FUNC_SIGNATURE_GET_CTX_MD_PARAMS:
if (signature->get_ctx_md_params != NULL)
break;
signature->get_ctx_md_params
- = OSSL_get_OP_signature_get_ctx_md_params(fns);
+ = OSSL_FUNC_signature_get_ctx_md_params(fns);
gmdparamfncnt++;
break;
case OSSL_FUNC_SIGNATURE_GETTABLE_CTX_MD_PARAMS:
if (signature->gettable_ctx_md_params != NULL)
break;
signature->gettable_ctx_md_params
- = OSSL_get_OP_signature_gettable_ctx_md_params(fns);
+ = OSSL_FUNC_signature_gettable_ctx_md_params(fns);
gmdparamfncnt++;
break;
case OSSL_FUNC_SIGNATURE_SET_CTX_MD_PARAMS:
if (signature->set_ctx_md_params != NULL)
break;
signature->set_ctx_md_params
- = OSSL_get_OP_signature_set_ctx_md_params(fns);
+ = OSSL_FUNC_signature_set_ctx_md_params(fns);
smdparamfncnt++;
break;
case OSSL_FUNC_SIGNATURE_SETTABLE_CTX_MD_PARAMS:
if (signature->settable_ctx_md_params != NULL)
break;
signature->settable_ctx_md_params
- = OSSL_get_OP_signature_settable_ctx_md_params(fns);
+ = OSSL_FUNC_signature_settable_ctx_md_params(fns);
smdparamfncnt++;
break;
}
* by calling "c_thread_start" which is a function pointer created during
* provider initialisation (i.e. OSSL_init_provider).
*/
-extern OSSL_core_thread_start_fn *c_thread_start;
+extern OSSL_FUNC_core_thread_start_fn *c_thread_start;
#endif
typedef struct thread_event_handler_st THREAD_EVENT_HANDLER;
#endif
/* Provider side functions */
- OSSL_provider_teardown_fn *teardown;
- OSSL_provider_gettable_params_fn *gettable_params;
- OSSL_provider_get_params_fn *get_params;
- OSSL_provider_get_capabilities_fn *get_capabilities;
- OSSL_provider_query_operation_fn *query_operation;
+ OSSL_FUNC_provider_teardown_fn *teardown;
+ OSSL_FUNC_provider_gettable_params_fn *gettable_params;
+ OSSL_FUNC_provider_get_params_fn *get_params;
+ OSSL_FUNC_provider_get_capabilities_fn *get_capabilities;
+ OSSL_FUNC_provider_query_operation_fn *query_operation;
/*
* Cache of bit to indicate of query_operation() has been called on
void *tmp_provctx = NULL; /* safety measure */
#ifndef OPENSSL_NO_ERR
# ifndef FIPS_MODULE
- OSSL_provider_get_reason_strings_fn *p_get_reason_strings = NULL;
+ OSSL_FUNC_provider_get_reason_strings_fn *p_get_reason_strings = NULL;
# endif
#endif
switch (provider_dispatch->function_id) {
case OSSL_FUNC_PROVIDER_TEARDOWN:
prov->teardown =
- OSSL_get_provider_teardown(provider_dispatch);
+ OSSL_FUNC_provider_teardown(provider_dispatch);
break;
case OSSL_FUNC_PROVIDER_GETTABLE_PARAMS:
prov->gettable_params =
- OSSL_get_provider_gettable_params(provider_dispatch);
+ OSSL_FUNC_provider_gettable_params(provider_dispatch);
break;
case OSSL_FUNC_PROVIDER_GET_PARAMS:
prov->get_params =
- OSSL_get_provider_get_params(provider_dispatch);
+ OSSL_FUNC_provider_get_params(provider_dispatch);
break;
case OSSL_FUNC_PROVIDER_GET_CAPABILITIES:
prov->get_capabilities =
- OSSL_get_provider_get_capabilities(provider_dispatch);
+ OSSL_FUNC_provider_get_capabilities(provider_dispatch);
break;
case OSSL_FUNC_PROVIDER_QUERY_OPERATION:
prov->query_operation =
- OSSL_get_provider_query_operation(provider_dispatch);
+ OSSL_FUNC_provider_query_operation(provider_dispatch);
break;
#ifndef OPENSSL_NO_ERR
# ifndef FIPS_MODULE
case OSSL_FUNC_PROVIDER_GET_REASON_STRINGS:
p_get_reason_strings =
- OSSL_get_provider_get_reason_strings(provider_dispatch);
+ OSSL_FUNC_provider_get_reason_strings(provider_dispatch);
break;
# endif
#endif
* This ensures that the compiler will complain if they aren't defined
* with the correct signature.
*/
-static OSSL_core_gettable_params_fn core_gettable_params;
-static OSSL_core_get_params_fn core_get_params;
-static OSSL_core_thread_start_fn core_thread_start;
-static OSSL_core_get_library_context_fn core_get_libctx;
+static OSSL_FUNC_core_gettable_params_fn core_gettable_params;
+static OSSL_FUNC_core_get_params_fn core_get_params;
+static OSSL_FUNC_core_thread_start_fn core_thread_start;
+static OSSL_FUNC_core_get_library_context_fn core_get_libctx;
#ifndef FIPS_MODULE
-static OSSL_core_new_error_fn core_new_error;
-static OSSL_core_set_error_debug_fn core_set_error_debug;
-static OSSL_core_vset_error_fn core_vset_error;
-static OSSL_core_set_error_mark_fn core_set_error_mark;
-static OSSL_core_clear_last_error_mark_fn core_clear_last_error_mark;
-static OSSL_core_pop_error_to_mark_fn core_pop_error_to_mark;
+static OSSL_FUNC_core_new_error_fn core_new_error;
+static OSSL_FUNC_core_set_error_debug_fn core_set_error_debug;
+static OSSL_FUNC_core_vset_error_fn core_vset_error;
+static OSSL_FUNC_core_set_error_mark_fn core_set_error_mark;
+static OSSL_FUNC_core_clear_last_error_mark_fn core_clear_last_error_mark;
+static OSSL_FUNC_core_pop_error_to_mark_fn core_pop_error_to_mark;
#endif
static const OSSL_PARAM *core_gettable_params(const OSSL_CORE_HANDLE *handle)
CRYPTO_REF_COUNT refcnt;
CRYPTO_RWLOCK *lock;
- OSSL_OP_serializer_newctx_fn *newctx;
- OSSL_OP_serializer_freectx_fn *freectx;
- OSSL_OP_serializer_set_ctx_params_fn *set_ctx_params;
- OSSL_OP_serializer_settable_ctx_params_fn *settable_ctx_params;
- OSSL_OP_serializer_serialize_data_fn *serialize_data;
- OSSL_OP_serializer_serialize_object_fn *serialize_object;
+ OSSL_FUNC_serializer_newctx_fn *newctx;
+ OSSL_FUNC_serializer_freectx_fn *freectx;
+ OSSL_FUNC_serializer_set_ctx_params_fn *set_ctx_params;
+ OSSL_FUNC_serializer_settable_ctx_params_fn *settable_ctx_params;
+ OSSL_FUNC_serializer_serialize_data_fn *serialize_data;
+ OSSL_FUNC_serializer_serialize_object_fn *serialize_object;
};
struct ossl_serializer_ctx_st {
case OSSL_FUNC_SERIALIZER_NEWCTX:
if (ser->newctx == NULL)
ser->newctx =
- OSSL_get_OP_serializer_newctx(fns);
+ OSSL_FUNC_serializer_newctx(fns);
break;
case OSSL_FUNC_SERIALIZER_FREECTX:
if (ser->freectx == NULL)
ser->freectx =
- OSSL_get_OP_serializer_freectx(fns);
+ OSSL_FUNC_serializer_freectx(fns);
break;
case OSSL_FUNC_SERIALIZER_SET_CTX_PARAMS:
if (ser->set_ctx_params == NULL)
ser->set_ctx_params =
- OSSL_get_OP_serializer_set_ctx_params(fns);
+ OSSL_FUNC_serializer_set_ctx_params(fns);
break;
case OSSL_FUNC_SERIALIZER_SETTABLE_CTX_PARAMS:
if (ser->settable_ctx_params == NULL)
ser->settable_ctx_params =
- OSSL_get_OP_serializer_settable_ctx_params(fns);
+ OSSL_FUNC_serializer_settable_ctx_params(fns);
break;
case OSSL_FUNC_SERIALIZER_SERIALIZE_DATA:
if (ser->serialize_data == NULL)
ser->serialize_data =
- OSSL_get_OP_serializer_serialize_data(fns);
+ OSSL_FUNC_serializer_serialize_data(fns);
break;
case OSSL_FUNC_SERIALIZER_SERIALIZE_OBJECT:
if (ser->serialize_object == NULL)
ser->serialize_object =
- OSSL_get_OP_serializer_serialize_object(fns);
+ OSSL_FUNC_serializer_serialize_object(fns);
break;
}
}
To begin with, let's assume something like this in
F<include/openssl/core_dispatch.h>:
- #define OSSL_OP_FOO 100
-
- #define OSSL_OP_FOO_NEWCTX_FUNC 2001
- #define OSSL_OP_FOO_INIT 2002
- #define OSSL_OP_FOO_OPERATE 2003
- #define OSSL_OP_FOO_CLEANCTX_FUNC 2004
- #define OSSL_OP_FOO_FREECTX_FUNC 2005
- OSSL_CORE_MAKE_FUNC(void *,OP_foo_newctx,(void))
- OSSL_CORE_MAKE_FUNC(int,OP_foo_init,(void *vctx))
- OSSL_CORE_MAKE_FUNC(int,OP_foo_operate,(void *vctx,
- unsigned char *out, size_t *out_l,
- unsigned char *in, size_t in_l))
- OSSL_CORE_MAKE_FUNC(void,OP_foo_cleanctx,(void *vctx))
- OSSL_CORE_MAKE_FUNC(void,OP_foo_freectx,(void *vctx))
+ #define OSSL_OP_FOO 100
+
+ #define OSSL_FUNC_FOO_NEWCTX_FUNC 2001
+ #define OSSL_FUNC_FOO_INIT 2002
+ #define OSSL_FUNC_FOO_OPERATE 2003
+ #define OSSL_FUNC_FOO_CLEANCTX_FUNC 2004
+ #define OSSL_FUNC_FOO_FREECTX_FUNC 2005
+
+ OSSL_CORE_MAKE_FUNC(void *, foo_newctx, (void))
+ OSSL_CORE_MAKE_FUNC(int, foo_init, (void *vctx))
+ OSSL_CORE_MAKE_FUNC(int, foo_operate, (void *vctx,
+ unsigned char *out, size_t *out_l,
+ unsigned char *in, size_t in_l))
+ OSSL_CORE_MAKE_FUNC(void, foo_cleanctx, (void *vctx))
+ OSSL_CORE_MAKE_FUNC(void, foo_freectx, (void *vctx))
And here's the implementation of the FOO method fetcher:
OSSL_PROVIDER *prov;
int name_id;
CRYPTO_REF_COUNT refcnt;
- OSSL_OP_foo_newctx_fn *newctx;
- OSSL_OP_foo_init_fn *init;
- OSSL_OP_foo_operate_fn *operate;
- OSSL_OP_foo_cleanctx_fn *cleanctx;
- OSSL_OP_foo_freectx_fn *freectx;
+ OSSL_FUNC_foo_newctx_fn *newctx;
+ OSSL_FUNC_foo_init_fn *init;
+ OSSL_FUNC_foo_operate_fn *operate;
+ OSSL_FUNC_foo_cleanctx_fn *cleanctx;
+ OSSL_FUNC_foo_freectx_fn *freectx;
};
/*
for (; fns->function_id != 0; fns++) {
switch (fns->function_id) {
- case OSSL_OP_FOO_NEWCTX_FUNC:
- foo->newctx = OSSL_get_OP_foo_newctx(fns);
+ case OSSL_FUNC_FOO_NEWCTX:
+ foo->newctx = OSSL_FUNC_foo_newctx(fns);
break;
- case OSSL_OP_FOO_INIT:
- foo->init = OSSL_get_OP_foo_init(fns);
+ case OSSL_FUNC_FOO_INIT:
+ foo->init = OSSL_FUNC_foo_init(fns);
break;
- case OSSL_OP_FOO_OPERATE:
- foo->operate = OSSL_get_OP_foo_operate(fns);
+ case OSSL_FUNC_FOO_OPERATE:
+ foo->operate = OSSL_FUNC_foo_operate(fns);
break;
- case OSSL_OP_FOO_CLEANCTX_FUNC:
- foo->cleanctx = OSSL_get_OP_foo_cleanctx(fns);
+ case OSSL_FUNC_FOO_CLEANCTX:
+ foo->cleanctx = OSSL_FUNC_foo_cleanctx(fns);
break;
- case OSSL_OP_FOO_FREECTX_FUNC:
- foo->freectx = OSSL_get_OP_foo_freectx(fns);
+ case OSSL_FUNC_FOO_FREECTX:
+ foo->freectx = OSSL_FUNC_foo_freectx(fns);
break;
}
}
=item "max_request" (B<OSSL_DRBG_PARAM_RESEED_REQUESTS>) <unsigned integer>
Specifies the maximum number of bytes that can be generated in a single
-call to OP_rand_generate.
+call to OSSL_FUNC_rand_generate.
=item "min_entropylen" (B<OSSL_DRBG_PARAM_MIN_ENTROPYLEN>) <unsigned integer>
*/
/* Context management */
- void *OP_asym_cipher_newctx(void *provctx);
- void OP_asym_cipher_freectx(void *ctx);
- void *OP_asym_cipher_dupctx(void *ctx);
+ void *OSSL_FUNC_asym_cipher_newctx(void *provctx);
+ void OSSL_FUNC_asym_cipher_freectx(void *ctx);
+ void *OSSL_FUNC_asym_cipher_dupctx(void *ctx);
/* Encryption */
- int OP_asym_cipher_encrypt_init(void *ctx, void *provkey);
- int OP_asym_cipher_encrypt(void *ctx, unsigned char *out, size_t *outlen,
- size_t outsize, const unsigned char *in,
- size_t inlen);
+ int OSSL_FUNC_asym_cipher_encrypt_init(void *ctx, void *provkey);
+ int OSSL_FUNC_asym_cipher_encrypt(void *ctx, unsigned char *out, size_t *outlen,
+ size_t outsize, const unsigned char *in,
+ size_t inlen);
/* Decryption */
- int OP_asym_cipher_decrypt_init(void *ctx, void *provkey);
- int OP_asym_cipher_decrypt(void *ctx, unsigned char *out, size_t *outlen,
- size_t outsize, const unsigned char *in,
- size_t inlen);
+ int OSSL_FUNC_asym_cipher_decrypt_init(void *ctx, void *provkey);
+ int OSSL_FUNC_asym_cipher_decrypt(void *ctx, unsigned char *out, size_t *outlen,
+ size_t outsize, const unsigned char *in,
+ size_t inlen);
/* Asymmetric Cipher parameters */
- int OP_asym_cipher_get_ctx_params(void *ctx, OSSL_PARAM params[]);
- const OSSL_PARAM *OP_asym_cipher_gettable_ctx_params(void);
- int OP_asym_cipher_set_ctx_params(void *ctx, const OSSL_PARAM params[]);
- const OSSL_PARAM *OP_asym_cipher_settable_ctx_params(void);
+ int OSSL_FUNC_asym_cipher_get_ctx_params(void *ctx, OSSL_PARAM params[]);
+ const OSSL_PARAM *OSSL_FUNC_asym_cipher_gettable_ctx_params(void);
+ int OSSL_FUNC_asym_cipher_set_ctx_params(void *ctx, const OSSL_PARAM params[]);
+ const OSSL_PARAM *OSSL_FUNC_asym_cipher_settable_ctx_params(void);
=head1 DESCRIPTION
All these "functions" have a corresponding function type definition
named B<OSSL_{name}_fn>, and a helper function to retrieve the
function pointer from an B<OSSL_DISPATCH> element named
-B<OSSL_get_{name}>.
-For example, the "function" OP_asym_cipher_newctx() has these:
+B<OSSL_FUNC_{name}>.
+For example, the "function" OSSL_FUNC_asym_cipher_newctx() has these:
- typedef void *(OSSL_OP_asym_cipher_newctx_fn)(void *provctx);
- static ossl_inline OSSL_OP_asym_cipher_newctx_fn
- OSSL_get_OP_asym_cipher_newctx(const OSSL_DISPATCH *opf);
+ typedef void *(OSSL_FUNC_asym_cipher_newctx_fn)(void *provctx);
+ static ossl_inline OSSL_FUNC_asym_cipher_newctx_fn
+ OSSL_FUNC_asym_cipher_newctx(const OSSL_DISPATCH *opf);
B<OSSL_DISPATCH> arrays are indexed by numbers that are provided as
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
- OP_asym_cipher_dupctx OSSL_FUNC_ASYM_CIPHER_DUPCTX
+ OSSL_FUNC_asym_cipher_newctx OSSL_FUNC_ASYM_CIPHER_NEWCTX
+ OSSL_FUNC_asym_cipher_freectx OSSL_FUNC_ASYM_CIPHER_FREECTX
+ OSSL_FUNC_asym_cipher_dupctx OSSL_FUNC_ASYM_CIPHER_DUPCTX
- OP_asym_cipher_encrypt_init OSSL_FUNC_ASYM_CIPHER_ENCRYPT_INIT
- OP_asym_cipher_encrypt OSSL_FUNC_ASYM_CIPHER_ENCRYPT
+ OSSL_FUNC_asym_cipher_encrypt_init OSSL_FUNC_ASYM_CIPHER_ENCRYPT_INIT
+ OSSL_FUNC_asym_cipher_encrypt OSSL_FUNC_ASYM_CIPHER_ENCRYPT
- OP_asym_cipher_decrypt_init OSSL_FUNC_ASYM_CIPHER_DECRYPT_INIT
- OP_asym_cipher_decrypt OSSL_FUNC_ASYM_CIPHER_DECRYPT
+ OSSL_FUNC_asym_cipher_decrypt_init OSSL_FUNC_ASYM_CIPHER_DECRYPT_INIT
+ OSSL_FUNC_asym_cipher_decrypt OSSL_FUNC_ASYM_CIPHER_DECRYPT
- OP_asym_cipher_get_ctx_params OSSL_FUNC_ASYM_CIPHER_GET_CTX_PARAMS
- OP_asym_cipher_gettable_ctx_params OSSL_FUNC_ASYM_CIPHER_GETTABLE_CTX_PARAMS
- OP_asym_cipher_set_ctx_params OSSL_FUNC_ASYM_CIPHER_SET_CTX_PARAMS
- OP_asym_cipher_settable_ctx_params OSSL_FUNC_ASYM_CIPHER_SETTABLE_CTX_PARAMS
+ OSSL_FUNC_asym_cipher_get_ctx_params OSSL_FUNC_ASYM_CIPHER_GET_CTX_PARAMS
+ OSSL_FUNC_asym_cipher_gettable_ctx_params OSSL_FUNC_ASYM_CIPHER_GETTABLE_CTX_PARAMS
+ OSSL_FUNC_asym_cipher_set_ctx_params OSSL_FUNC_ASYM_CIPHER_SET_CTX_PARAMS
+ OSSL_FUNC_asym_cipher_settable_ctx_params OSSL_FUNC_ASYM_CIPHER_SETTABLE_CTX_PARAMS
An asymmetric cipher algorithm implementation may not implement all of these
functions.
In order to be a consistent set of functions a provider must implement
-OP_asym_cipher_newctx and OP_asym_cipher_freectx.
-It must also implement both of OP_asym_cipher_encrypt_init and
-OP_asym_cipher_encrypt, or both of OP_asym_cipher_decrypt_init and
-OP_asym_cipher_decrypt.
-OP_asym_cipher_get_ctx_params is optional but if it is present then so must
-OP_asym_cipher_gettable_ctx_params.
-Similarly, OP_asym_cipher_set_ctx_params is optional but if it is present then
-so must OP_asym_cipher_settable_ctx_params.
+OSSL_FUNC_asym_cipher_newctx and OSSL_FUNC_asym_cipher_freectx.
+It must also implement both of OSSL_FUNC_asym_cipher_encrypt_init and
+OSSL_FUNC_asym_cipher_encrypt, or both of OSSL_FUNC_asym_cipher_decrypt_init and
+OSSL_FUNC_asym_cipher_decrypt.
+OSSL_FUNC_asym_cipher_get_ctx_params is optional but if it is present then so must
+OSSL_FUNC_asym_cipher_gettable_ctx_params.
+Similarly, OSSL_FUNC_asym_cipher_set_ctx_params is optional but if it is present then
+so must OSSL_FUNC_asym_cipher_settable_ctx_params.
An asymmetric cipher algorithm must also implement some mechanism for generating,
loading or importing keys via the key management (OSSL_OP_KEYMGMT) operation.
=head2 Context Management Functions
-OP_asym_cipher_newctx() should create and return a pointer to a provider side
+OSSL_FUNC_asym_cipher_newctx() should create and return a pointer to a provider side
structure for holding context information during an asymmetric cipher operation.
A pointer to this context will be passed back in a number of the other
asymmetric cipher operation function calls.
The parameter I<provctx> is the provider context generated during provider
initialisation (see L<provider(7)>).
-OP_asym_cipher_freectx() is passed a pointer to the provider side asymmetric
+OSSL_FUNC_asym_cipher_freectx() is passed a pointer to the provider side asymmetric
cipher context in the I<ctx> parameter.
This function should free any resources associated with that context.
-OP_asym_cipher_dupctx() should duplicate the provider side asymmetric cipher
+OSSL_FUNC_asym_cipher_dupctx() should duplicate the provider side asymmetric cipher
context in the I<ctx> parameter and return the duplicate copy.
=head2 Encryption Functions
-OP_asym_cipher_encrypt_init() initialises a context for an asymmetric encryption
+OSSL_FUNC_asym_cipher_encrypt_init() initialises a context for an asymmetric encryption
given a provider side asymmetric cipher context in the I<ctx> parameter, and a
pointer to a provider key object in the I<provkey> parameter.
The key object should have been previously generated, loaded or imported into
the provider using the key management (OSSL_OP_KEYMGMT) operation (see
provider-keymgmt(7)>.
-OP_asym_cipher_encrypt() performs the actual encryption itself.
+OSSL_FUNC_asym_cipher_encrypt() performs the actual encryption itself.
A previously initialised asymmetric cipher context is passed in the I<ctx>
parameter.
The data to be encrypted is pointed to by the I<in> parameter which is I<inlen>
=head2 Decryption Functions
-OP_asym_cipher_decrypt_init() initialises a context for an asymmetric decryption
+OSSL_FUNC_asym_cipher_decrypt_init() initialises a context for an asymmetric decryption
given a provider side asymmetric cipher context in the I<ctx> parameter, and a
pointer to a provider key object in the I<provkey> parameter.
The key object should have been previously generated, loaded or imported into
the provider using the key management (OSSL_OP_KEYMGMT) operation (see
provider-keymgmt(7)>.
-OP_asym_cipher_decrypt() performs the actual decryption itself.
+OSSL_FUNC_asym_cipher_decrypt() performs the actual decryption itself.
A previously initialised asymmetric cipher context is passed in the I<ctx>
parameter.
The data to be decrypted is pointed to by the I<in> parameter which is I<inlen>
=head2 Asymmetric Cipher Parameters
See L<OSSL_PARAM(3)> for further details on the parameters structure used by
-the OP_asym_cipher_get_ctx_params() and OP_asym_cipher_set_ctx_params()
+the OSSL_FUNC_asym_cipher_get_ctx_params() and OSSL_FUNC_asym_cipher_set_ctx_params()
functions.
-OP_asym_cipher_get_ctx_params() gets asymmetric cipher parameters associated
+OSSL_FUNC_asym_cipher_get_ctx_params() gets asymmetric cipher parameters associated
with the given provider side asymmetric cipher context I<ctx> and stores them in
I<params>.
-OP_asym_cipher_set_ctx_params() sets the asymmetric cipher parameters associated
+OSSL_FUNC_asym_cipher_set_ctx_params() sets the asymmetric cipher parameters associated
with the given provider side asymmetric cipher context I<ctx> to I<params>.
Any parameter settings are additional to any that were previously set.
=back
-OP_asym_cipher_gettable_ctx_params() and OP_asym_cipher_settable_ctx_params()
+OSSL_FUNC_asym_cipher_gettable_ctx_params() and OSSL_FUNC_asym_cipher_settable_ctx_params()
get a constant B<OSSL_PARAM> array that describes the gettable and settable
-parameters, i.e. parameters that can be used with OP_asym_cipherget_ctx_params()
-and OP_asym_cipher_set_ctx_params() respectively.
+parameters, i.e. parameters that can be used with OSSL_FUNC_asym_cipherget_ctx_params()
+and OSSL_FUNC_asym_cipher_set_ctx_params() respectively.
See L<OSSL_PARAM(3)> for the use of B<OSSL_PARAM> as parameter descriptor.
=head1 RETURN VALUES
-OP_asym_cipher_newctx() and OP_asym_cipher_dupctx() should return the newly
+OSSL_FUNC_asym_cipher_newctx() and OSSL_FUNC_asym_cipher_dupctx() should return the newly
created provider side asymmetric cipher context, or NULL on failure.
All other functions should return 1 for success or 0 on error.
All these "functions" have a corresponding function type definition
named B<OSSL_{name}_fn>, and a helper function to retrieve the
function pointer from a B<OSSL_DISPATCH> element named
-B<OSSL_get_{name}>.
+B<OSSL_FUNC_{name}>.
For example, the "function" core_gettable_params() has these:
typedef OSSL_PARAM *
- (OSSL_core_gettable_params_fn)(const OSSL_CORE_HANDLE *handle);
+ (OSSL_FUNC_core_gettable_params_fn)(const OSSL_CORE_HANDLE *handle);
static ossl_inline OSSL_NAME_core_gettable_params_fn
- OSSL_get_core_gettable_params(const OSSL_DISPATCH *opf);
+ OSSL_FUNC_core_gettable_params(const OSSL_DISPATCH *opf);
B<OSSL_DISPATCH> arrays are indexed by numbers that are provided as
macros in L<openssl-core_dispatch.h(7)>, as follows:
* To ensure we get the function signature right, forward declare
* them using function types provided by openssl/core_dispatch.h
*/
- OSSL_OP_bar_newctx_fn foo_newctx;
- OSSL_OP_bar_freectx_fn foo_freectx;
- OSSL_OP_bar_init_fn foo_init;
- OSSL_OP_bar_update_fn foo_update;
- OSSL_OP_bar_final_fn foo_final;
+ OSSL_FUNC_bar_newctx_fn foo_newctx;
+ OSSL_FUNC_bar_freectx_fn foo_freectx;
+ OSSL_FUNC_bar_init_fn foo_init;
+ OSSL_FUNC_bar_update_fn foo_update;
+ OSSL_FUNC_bar_final_fn foo_final;
- OSSL_provider_query_operation_fn p_query;
- OSSL_provider_get_reason_strings_fn p_reasons;
- OSSL_provider_teardown_fn p_teardown;
+ OSSL_FUNC_provider_query_operation_fn p_query;
+ OSSL_FUNC_provider_get_reason_strings_fn p_reasons;
+ OSSL_FUNC_provider_teardown_fn p_teardown;
OSSL_provider_init_fn OSSL_provider_init;
- OSSL_core_put_error *c_put_error = NULL;
+ OSSL_FUNC_core_put_error *c_put_error = NULL;
/* Provider context */
struct prov_ctx_st {
for (; in->function_id != 0; in++)
switch (in->function_id) {
case OSSL_FUNC_CORE_PUT_ERROR:
- c_put_error = OSSL_get_core_put_error(in);
+ c_put_error = OSSL_FUNC_core_put_error(in);
break;
}
#define OSSL_OP_BAR 4711
#define OSSL_FUNC_BAR_NEWCTX 1
- typedef void *(OSSL_OP_bar_newctx_fn)(void *provctx);
- static ossl_inline OSSL_get_bar_newctx(const OSSL_DISPATCH *opf)
- { return (OSSL_OP_bar_newctx_fn *)opf->function; }
+ typedef void *(OSSL_FUNC_bar_newctx_fn)(void *provctx);
+ static ossl_inline OSSL_FUNC_bar_newctx(const OSSL_DISPATCH *opf)
+ { return (OSSL_FUNC_bar_newctx_fn *)opf->function; }
#define OSSL_FUNC_BAR_FREECTX 2
- typedef void (OSSL_OP_bar_freectx_fn)(void *ctx);
- static ossl_inline OSSL_get_bar_newctx(const OSSL_DISPATCH *opf)
- { return (OSSL_OP_bar_freectx_fn *)opf->function; }
+ typedef void (OSSL_FUNC_bar_freectx_fn)(void *ctx);
+ static ossl_inline OSSL_FUNC_bar_newctx(const OSSL_DISPATCH *opf)
+ { return (OSSL_FUNC_bar_freectx_fn *)opf->function; }
#define OSSL_FUNC_BAR_INIT 3
- typedef void *(OSSL_OP_bar_init_fn)(void *ctx);
- static ossl_inline OSSL_get_bar_init(const OSSL_DISPATCH *opf)
- { return (OSSL_OP_bar_init_fn *)opf->function; }
+ typedef void *(OSSL_FUNC_bar_init_fn)(void *ctx);
+ static ossl_inline OSSL_FUNC_bar_init(const OSSL_DISPATCH *opf)
+ { return (OSSL_FUNC_bar_init_fn *)opf->function; }
#define OSSL_FUNC_BAR_UPDATE 4
- typedef void *(OSSL_OP_bar_update_fn)(void *ctx,
+ typedef void *(OSSL_FUNC_bar_update_fn)(void *ctx,
unsigned char *in, size_t inl);
- static ossl_inline OSSL_get_bar_update(const OSSL_DISPATCH *opf)
- { return (OSSL_OP_bar_update_fn *)opf->function; }
+ static ossl_inline OSSL_FUNC_bar_update(const OSSL_DISPATCH *opf)
+ { return (OSSL_FUNC_bar_update_fn *)opf->function; }
#define OSSL_FUNC_BAR_FINAL 5
- typedef void *(OSSL_OP_bar_final_fn)(void *ctx);
- static ossl_inline OSSL_get_bar_final(const OSSL_DISPATCH *opf)
- { return (OSSL_OP_bar_final_fn *)opf->function; }
+ typedef void *(OSSL_FUNC_bar_final_fn)(void *ctx);
+ static ossl_inline OSSL_FUNC_bar_final(const OSSL_DISPATCH *opf)
+ { return (OSSL_FUNC_bar_final_fn *)opf->function; }
=head1 SEE ALSO
*/
/* Context management */
- void *OP_cipher_newctx(void *provctx);
- void OP_cipher_freectx(void *cctx);
- void *OP_cipher_dupctx(void *cctx);
+ void *OSSL_FUNC_cipher_newctx(void *provctx);
+ void OSSL_FUNC_cipher_freectx(void *cctx);
+ void *OSSL_FUNC_cipher_dupctx(void *cctx);
/* Encryption/decryption */
- int OP_cipher_encrypt_init(void *cctx, const unsigned char *key,
- size_t keylen, const unsigned char *iv,
- size_t ivlen);
- int OP_cipher_decrypt_init(void *cctx, const unsigned char *key,
- size_t keylen, const unsigned char *iv,
- size_t ivlen);
- int OP_cipher_update(void *cctx, unsigned char *out, size_t *outl,
- size_t outsize, const unsigned char *in, size_t inl);
- int OP_cipher_final(void *cctx, unsigned char *out, size_t *outl,
- size_t outsize);
- int OP_cipher_cipher(void *cctx, unsigned char *out, size_t *outl,
- size_t outsize, const unsigned char *in, size_t inl);
+ int OSSL_FUNC_cipher_encrypt_init(void *cctx, const unsigned char *key,
+ size_t keylen, const unsigned char *iv,
+ size_t ivlen);
+ int OSSL_FUNC_cipher_decrypt_init(void *cctx, const unsigned char *key,
+ size_t keylen, const unsigned char *iv,
+ size_t ivlen);
+ int OSSL_FUNC_cipher_update(void *cctx, unsigned char *out, size_t *outl,
+ size_t outsize, const unsigned char *in, size_t inl);
+ int OSSL_FUNC_cipher_final(void *cctx, unsigned char *out, size_t *outl,
+ size_t outsize);
+ int OSSL_FUNC_cipher_cipher(void *cctx, unsigned char *out, size_t *outl,
+ size_t outsize, const unsigned char *in, size_t inl);
/* Cipher parameter descriptors */
- const OSSL_PARAM *OP_cipher_gettable_params(void);
+ const OSSL_PARAM *OSSL_FUNC_cipher_gettable_params(void);
/* Cipher operation parameter descriptors */
- const OSSL_PARAM *OP_cipher_gettable_ctx_params(void);
- const OSSL_PARAM *OP_cipher_settable_ctx_params(void);
+ const OSSL_PARAM *OSSL_FUNC_cipher_gettable_ctx_params(void);
+ const OSSL_PARAM *OSSL_FUNC_cipher_settable_ctx_params(void);
/* Cipher parameters */
- int OP_cipher_get_params(OSSL_PARAM params[]);
+ int OSSL_FUNC_cipher_get_params(OSSL_PARAM params[]);
/* Cipher operation parameters */
- int OP_cipher_get_ctx_params(void *cctx, OSSL_PARAM params[]);
- int OP_cipher_set_ctx_params(void *cctx, const OSSL_PARAM params[]);
+ int OSSL_FUNC_cipher_get_ctx_params(void *cctx, OSSL_PARAM params[]);
+ int OSSL_FUNC_cipher_set_ctx_params(void *cctx, const OSSL_PARAM params[]);
=head1 DESCRIPTION
All these "functions" have a corresponding function type definition
named B<OSSL_{name}_fn>, and a helper function to retrieve the
function pointer from an B<OSSL_DISPATCH> element named
-B<OSSL_get_{name}>.
-For example, the "function" OP_cipher_newctx() has these:
+B<OSSL_FUNC_{name}>.
+For example, the "function" OSSL_FUNC_cipher_newctx() has these:
- typedef void *(OSSL_OP_cipher_newctx_fn)(void *provctx);
- static ossl_inline OSSL_OP_cipher_newctx_fn
- OSSL_get_OP_cipher_newctx(const OSSL_DISPATCH *opf);
+ typedef void *(OSSL_OSSL_FUNC_cipher_newctx_fn)(void *provctx);
+ static ossl_inline OSSL_OSSL_FUNC_cipher_newctx_fn
+ OSSL_FUNC_cipher_newctx(const OSSL_DISPATCH *opf);
B<OSSL_DISPATCH> arrays are indexed by numbers that are provided as
macros in L<openssl-core_dispatch.h(7)>, as follows:
- OP_cipher_newctx OSSL_FUNC_CIPHER_NEWCTX
- OP_cipher_freectx OSSL_FUNC_CIPHER_FREECTX
- OP_cipher_dupctx OSSL_FUNC_CIPHER_DUPCTX
+ OSSL_FUNC_cipher_newctx OSSL_FUNC_CIPHER_NEWCTX
+ OSSL_FUNC_cipher_freectx OSSL_FUNC_CIPHER_FREECTX
+ OSSL_FUNC_cipher_dupctx OSSL_FUNC_CIPHER_DUPCTX
- OP_cipher_encrypt_init OSSL_FUNC_CIPHER_ENCRYPT_INIT
- OP_cipher_decrypt_init OSSL_FUNC_CIPHER_DECRYPT_INIT
- OP_cipher_update OSSL_FUNC_CIPHER_UPDATE
- OP_cipher_final OSSL_FUNC_CIPHER_FINAL
- OP_cipher_cipher OSSL_FUNC_CIPHER_CIPHER
+ OSSL_FUNC_cipher_encrypt_init OSSL_FUNC_CIPHER_ENCRYPT_INIT
+ OSSL_FUNC_cipher_decrypt_init OSSL_FUNC_CIPHER_DECRYPT_INIT
+ OSSL_FUNC_cipher_update OSSL_FUNC_CIPHER_UPDATE
+ OSSL_FUNC_cipher_final OSSL_FUNC_CIPHER_FINAL
+ OSSL_FUNC_cipher_cipher OSSL_FUNC_CIPHER_CIPHER
- OP_cipher_get_params OSSL_FUNC_CIPHER_GET_PARAMS
- OP_cipher_get_ctx_params OSSL_FUNC_CIPHER_GET_CTX_PARAMS
- OP_cipher_set_ctx_params OSSL_FUNC_CIPHER_SET_CTX_PARAMS
+ OSSL_FUNC_cipher_get_params OSSL_FUNC_CIPHER_GET_PARAMS
+ OSSL_FUNC_cipher_get_ctx_params OSSL_FUNC_CIPHER_GET_CTX_PARAMS
+ OSSL_FUNC_cipher_set_ctx_params OSSL_FUNC_CIPHER_SET_CTX_PARAMS
- OP_cipher_gettable_params OSSL_FUNC_CIPHER_GETTABLE_PARAMS
- OP_cipher_gettable_ctx_params OSSL_FUNC_CIPHER_GETTABLE_CTX_PARAMS
- OP_cipher_settable_ctx_params OSSL_FUNC_CIPHER_SETTABLE_CTX_PARAMS
+ OSSL_FUNC_cipher_gettable_params OSSL_FUNC_CIPHER_GETTABLE_PARAMS
+ OSSL_FUNC_cipher_gettable_ctx_params OSSL_FUNC_CIPHER_GETTABLE_CTX_PARAMS
+ OSSL_FUNC_cipher_settable_ctx_params OSSL_FUNC_CIPHER_SETTABLE_CTX_PARAMS
A cipher algorithm implementation may not implement all of these functions.
In order to be a consistent set of functions there must at least be a complete
set of "encrypt" functions, or a complete set of "decrypt" functions, or a
single "cipher" function.
-In all cases both the OP_cipher_newctx and OP_cipher_freectx functions must be
+In all cases both the OSSL_FUNC_cipher_newctx and OSSL_FUNC_cipher_freectx functions must be
present.
All other functions are optional.
=head2 Context Management Functions
-OP_cipher_newctx() should create and return a pointer to a provider side
+OSSL_FUNC_cipher_newctx() should create and return a pointer to a provider side
structure for holding context information during a cipher operation.
A pointer to this context will be passed back in a number of the other cipher
operation function calls.
The parameter I<provctx> is the provider context generated during provider
initialisation (see L<provider(7)>).
-OP_cipher_freectx() is passed a pointer to the provider side cipher context in
+OSSL_FUNC_cipher_freectx() is passed a pointer to the provider side cipher context in
the I<cctx> parameter.
This function should free any resources associated with that context.
-OP_cipher_dupctx() should duplicate the provider side cipher context in the
+OSSL_FUNC_cipher_dupctx() should duplicate the provider side cipher context in the
I<cctx> parameter and return the duplicate copy.
=head2 Encryption/Decryption Functions
-OP_cipher_encrypt_init() initialises a cipher operation for encryption given a
+OSSL_FUNC_cipher_encrypt_init() initialises a cipher operation for encryption given a
newly created provider side cipher context in the I<cctx> parameter.
The key to be used is given in I<key> which is I<keylen> bytes long.
The IV to be used is given in I<iv> which is I<ivlen> bytes long.
-OP_cipher_decrypt_init() is the same as OP_cipher_encrypt_init() except that it
+OSSL_FUNC_cipher_decrypt_init() is the same as OSSL_FUNC_cipher_encrypt_init() except that it
initialises the context for a decryption operation.
-OP_cipher_update() is called to supply data to be encrypted/decrypted as part of
+OSSL_FUNC_cipher_update() is called to supply data to be encrypted/decrypted as part of
a previously initialised cipher operation.
The I<cctx> parameter contains a pointer to a previously initialised provider
side context.
-OP_cipher_update() should encrypt/decrypt I<inl> bytes of data at the location
+OSSL_FUNC_cipher_update() should encrypt/decrypt I<inl> bytes of data at the location
pointed to by I<in>.
The encrypted data should be stored in I<out> and the amount of data written to
I<*outl> which should not exceed I<outsize> bytes.
-OP_cipher_update() may be called multiple times for a single cipher operation.
+OSSL_FUNC_cipher_update() may be called multiple times for a single cipher operation.
It is the responsibility of the cipher implementation to handle input lengths
that are not multiples of the block length.
In such cases a cipher implementation will typically cache partial blocks of
The same expectations apply to I<outsize> as documented for
L<EVP_EncryptUpdate(3)> and L<EVP_DecryptUpdate(3)>.
-OP_cipher_final() completes an encryption or decryption started through previous
-OP_cipher_encrypt_init() or OP_cipher_decrypt_init(), and OP_cipher_update()
+OSSL_FUNC_cipher_final() completes an encryption or decryption started through previous
+OSSL_FUNC_cipher_encrypt_init() or OSSL_FUNC_cipher_decrypt_init(), and OSSL_FUNC_cipher_update()
calls.
The I<cctx> parameter contains a pointer to the provider side context.
Any final encryption/decryption output should be written to I<out> and the
The same expectations apply to I<outsize> as documented for
L<EVP_EncryptFinal(3)> and L<EVP_DecryptFinal(3)>.
-OP_cipher_cipher() performs encryption/decryption using the provider side cipher
+OSSL_FUNC_cipher_cipher() performs encryption/decryption using the provider side cipher
context in the I<cctx> parameter that should have been previously initialised via
-a call to OP_cipher_encrypt_init() or OP_cipher_decrypt_init().
+a call to OSSL_FUNC_cipher_encrypt_init() or OSSL_FUNC_cipher_decrypt_init().
This should call the raw underlying cipher function without any padding.
This will be invoked in the provider as a result of the application calling
L<EVP_Cipher(3)>.
See L<OSSL_PARAM(3)> for further details on the parameters structure used by
these functions.
-OP_cipher_get_params() gets details of the algorithm implementation
+OSSL_FUNC_cipher_get_params() gets details of the algorithm implementation
and stores them in I<params>.
-OP_cipher_set_ctx_params() sets cipher operation parameters for the
+OSSL_FUNC_cipher_set_ctx_params() sets cipher operation parameters for the
provider side cipher context I<cctx> to I<params>.
Any parameter settings are additional to any that were previously set.
-OP_cipher_get_ctx_params() gets cipher operation details details from
+OSSL_FUNC_cipher_get_ctx_params() gets cipher operation details details from
the given provider side cipher context I<cctx> and stores them in I<params>.
-OP_cipher_gettable_params(), OP_cipher_gettable_ctx_params(), and
-OP_cipher_settable_ctx_params() all return constant B<OSSL_PARAM> arrays
-as descriptors of the parameters that OP_cipher_get_params(),
-OP_cipher_get_ctx_params(), and OP_cipher_set_ctx_params() can handle,
+OSSL_FUNC_cipher_gettable_params(), OSSL_FUNC_cipher_gettable_ctx_params(), and
+OSSL_FUNC_cipher_settable_ctx_params() all return constant B<OSSL_PARAM> arrays
+as descriptors of the parameters that OSSL_FUNC_cipher_get_params(),
+OSSL_FUNC_cipher_get_ctx_params(), and OSSL_FUNC_cipher_set_ctx_params() can handle,
respectively.
Parameters currently recognised by built-in ciphers are as follows. Not all
AEAD IVs in TLSv1.2 consist of an implicit "fixed" part and an explicit part
that varies with every record.
Setting a TLS fixed IV changes a cipher to encrypt/decrypt TLS records.
-TLS records are encrypted/decrypted using a single OP_cipher_cipher call per
+TLS records are encrypted/decrypted using a single OSSL_FUNC_cipher_cipher call per
record.
For a record decryption the first bytes of the input buffer will be the explicit
part of the IV and the final bytes of the input buffer will be the AEAD tag.
output buffer.
Whether encrypting or decrypting the value written to I<*outl> in the
-OP_cipher_cipher call should be the length of the payload excluding the explicit
+OSSL_FUNC_cipher_cipher call should be the length of the payload excluding the explicit
IV length and the tag length.
=item "ivlen" (B<OSSL_CIPHER_PARAM_AEAD_IVLEN>) <unsigned integer>
=head1 RETURN VALUES
-OP_cipher_newctx() and OP_cipher_dupctx() should return the newly created
+OSSL_FUNC_cipher_newctx() and OSSL_FUNC_cipher_dupctx() should return the newly created
provider side cipher context, or NULL on failure.
-OP_cipher_encrypt_init(), OP_cipher_decrypt_init(), OP_cipher_update(),
-OP_cipher_final(), OP_cipher_cipher(), OP_cipher_get_params(),
-OP_cipher_get_ctx_params() and OP_cipher_set_ctx_params() should return 1 for
+OSSL_FUNC_cipher_encrypt_init(), OSSL_FUNC_cipher_decrypt_init(), OSSL_FUNC_cipher_update(),
+OSSL_FUNC_cipher_final(), OSSL_FUNC_cipher_cipher(), OSSL_FUNC_cipher_get_params(),
+OSSL_FUNC_cipher_get_ctx_params() and OSSL_FUNC_cipher_set_ctx_params() should return 1 for
success or 0 on error.
-OP_cipher_gettable_params(), OP_cipher_gettable_ctx_params() and
-OP_cipher_settable_ctx_params() should return a constant B<OSSL_PARAM>
+OSSL_FUNC_cipher_gettable_params(), OSSL_FUNC_cipher_gettable_ctx_params() and
+OSSL_FUNC_cipher_settable_ctx_params() should return a constant B<OSSL_PARAM>
array, or NULL if none is offered.
=head1 SEE ALSO
*/
/* Context management */
- void *OP_digest_newctx(void *provctx);
- void OP_digest_freectx(void *dctx);
- void *OP_digest_dupctx(void *dctx);
+ void *OSSL_FUNC_digest_newctx(void *provctx);
+ void OSSL_FUNC_digest_freectx(void *dctx);
+ void *OSSL_FUNC_digest_dupctx(void *dctx);
/* Digest generation */
- int OP_digest_init(void *dctx);
- int OP_digest_update(void *dctx, const unsigned char *in, size_t inl);
- int OP_digest_final(void *dctx, unsigned char *out, size_t *outl,
- size_t outsz);
- int OP_digest_digest(void *provctx, const unsigned char *in, size_t inl,
- unsigned char *out, size_t *outl, size_t outsz);
+ int OSSL_FUNC_digest_init(void *dctx);
+ int OSSL_FUNC_digest_update(void *dctx, const unsigned char *in, size_t inl);
+ int OSSL_FUNC_digest_final(void *dctx, unsigned char *out, size_t *outl,
+ size_t outsz);
+ int OSSL_FUNC_digest_digest(void *provctx, const unsigned char *in, size_t inl,
+ unsigned char *out, size_t *outl, size_t outsz);
/* Digest parameter descriptors */
- const OSSL_PARAM *OP_digest_gettable_params(void);
+ const OSSL_PARAM *OSSL_FUNC_digest_gettable_params(void);
/* Digest operation parameter descriptors */
- const OSSL_PARAM *OP_digest_gettable_ctx_params(void);
- const OSSL_PARAM *OP_digest_settable_ctx_params(void);
+ const OSSL_PARAM *OSSL_FUNC_digest_gettable_ctx_params(void);
+ const OSSL_PARAM *OSSL_FUNC_digest_settable_ctx_params(void);
/* Digest parameters */
- int OP_digest_get_params(OSSL_PARAM params[]);
+ int OSSL_FUNC_digest_get_params(OSSL_PARAM params[]);
/* Digest operation parameters */
- int OP_digest_set_ctx_params(void *dctx, const OSSL_PARAM params[]);
- int OP_digest_get_ctx_params(void *dctx, OSSL_PARAM params[]);
+ int OSSL_FUNC_digest_set_ctx_params(void *dctx, const OSSL_PARAM params[]);
+ int OSSL_FUNC_digest_get_ctx_params(void *dctx, OSSL_PARAM params[]);
=head1 DESCRIPTION
All these "functions" have a corresponding function type definition
named B<OSSL_{name}_fn>, and a helper function to retrieve the
function pointer from an B<OSSL_DISPATCH> element named
-B<OSSL_get_{name}>.
-For example, the "function" OP_digest_newctx() has these:
+B<OSSL_FUNC_{name}>.
+For example, the "function" OSSL_FUNC_digest_newctx() has these:
- typedef void *(OSSL_OP_digest_newctx_fn)(void *provctx);
- static ossl_inline OSSL_OP_digest_newctx_fn
- OSSL_get_OP_digest_newctx(const OSSL_DISPATCH *opf);
+ typedef void *(OSSL_OSSL_FUNC_digest_newctx_fn)(void *provctx);
+ static ossl_inline OSSL_OSSL_FUNC_digest_newctx_fn
+ OSSL_FUNC_digest_newctx(const OSSL_DISPATCH *opf);
B<OSSL_DISPATCH> arrays are indexed by numbers that are provided as
macros in L<openssl-core_dispatch.h(7)>, as follows:
- OP_digest_newctx OSSL_FUNC_DIGEST_NEWCTX
- OP_digest_freectx OSSL_FUNC_DIGEST_FREECTX
- OP_digest_dupctx OSSL_FUNC_DIGEST_DUPCTX
+ OSSL_FUNC_digest_newctx OSSL_FUNC_DIGEST_NEWCTX
+ OSSL_FUNC_digest_freectx OSSL_FUNC_DIGEST_FREECTX
+ OSSL_FUNC_digest_dupctx OSSL_FUNC_DIGEST_DUPCTX
- OP_digest_init OSSL_FUNC_DIGEST_INIT
- OP_digest_update OSSL_FUNC_DIGEST_UPDATE
- OP_digest_final OSSL_FUNC_DIGEST_FINAL
- OP_digest_digest OSSL_FUNC_DIGEST_DIGEST
+ OSSL_FUNC_digest_init OSSL_FUNC_DIGEST_INIT
+ OSSL_FUNC_digest_update OSSL_FUNC_DIGEST_UPDATE
+ OSSL_FUNC_digest_final OSSL_FUNC_DIGEST_FINAL
+ OSSL_FUNC_digest_digest OSSL_FUNC_DIGEST_DIGEST
- OP_digest_get_params OSSL_FUNC_DIGEST_GET_PARAMS
- OP_digest_get_ctx_params OSSL_FUNC_DIGEST_GET_CTX_PARAMS
- OP_digest_set_ctx_params OSSL_FUNC_DIGEST_SET_CTX_PARAMS
+ OSSL_FUNC_digest_get_params OSSL_FUNC_DIGEST_GET_PARAMS
+ OSSL_FUNC_digest_get_ctx_params OSSL_FUNC_DIGEST_GET_CTX_PARAMS
+ OSSL_FUNC_digest_set_ctx_params OSSL_FUNC_DIGEST_SET_CTX_PARAMS
- OP_digest_gettable_params OSSL_FUNC_DIGEST_GETTABLE_PARAMS
- OP_digest_gettable_ctx_params OSSL_FUNC_DIGEST_GETTABLE_CTX_PARAMS
- OP_digest_settable_ctx_params OSSL_FUNC_DIGEST_SETTABLE_CTX_PARAMS
+ OSSL_FUNC_digest_gettable_params OSSL_FUNC_DIGEST_GETTABLE_PARAMS
+ OSSL_FUNC_digest_gettable_ctx_params OSSL_FUNC_DIGEST_GETTABLE_CTX_PARAMS
+ OSSL_FUNC_digest_settable_ctx_params OSSL_FUNC_DIGEST_SETTABLE_CTX_PARAMS
A digest algorithm implementation may not implement all of these functions.
-In order to be usable all or none of OP_digest_newctx, OP_digest_freectx,
-OP_digest_init, OP_digest_update and OP_digest_final should be implemented.
+In order to be usable all or none of OSSL_FUNC_digest_newctx, OSSL_FUNC_digest_freectx,
+OSSL_FUNC_digest_init, OSSL_FUNC_digest_update and OSSL_FUNC_digest_final should be implemented.
All other functions are optional.
=head2 Context Management Functions
-OP_digest_newctx() should create and return a pointer to a provider side
+OSSL_FUNC_digest_newctx() should create and return a pointer to a provider side
structure for holding context information during a digest operation.
A pointer to this context will be passed back in a number of the other digest
operation function calls.
The parameter I<provctx> is the provider context generated during provider
initialisation (see L<provider(7)>).
-OP_digest_freectx() is passed a pointer to the provider side digest context in
+OSSL_FUNC_digest_freectx() is passed a pointer to the provider side digest context in
the I<dctx> parameter.
This function should free any resources associated with that context.
-OP_digest_dupctx() should duplicate the provider side digest context in the
+OSSL_FUNC_digest_dupctx() should duplicate the provider side digest context in the
I<dctx> parameter and return the duplicate copy.
=head2 Digest Generation Functions
-OP_digest_init() initialises a digest operation given a newly created
+OSSL_FUNC_digest_init() initialises a digest operation given a newly created
provider side digest context in the I<dctx> parameter.
-OP_digest_update() is called to supply data to be digested as part of a
+OSSL_FUNC_digest_update() is called to supply data to be digested as part of a
previously initialised digest operation.
The I<dctx> parameter contains a pointer to a previously initialised provider
side context.
-OP_digest_update() should digest I<inl> bytes of data at the location pointed to
+OSSL_FUNC_digest_update() should digest I<inl> bytes of data at the location pointed to
by I<in>.
-OP_digest_update() may be called multiple times for a single digest operation.
+OSSL_FUNC_digest_update() may be called multiple times for a single digest operation.
-OP_digest_final() generates a digest started through previous OP_digest_init()
-and OP_digest_update() calls.
+OSSL_FUNC_digest_final() generates a digest started through previous OSSL_FUNC_digest_init()
+and OSSL_FUNC_digest_update() calls.
The I<dctx> parameter contains a pointer to the provider side context.
The digest should be written to I<*out> and the length of the digest to
I<*outl>.
The digest should not exceed I<outsz> bytes.
-OP_digest_digest() is a "oneshot" digest function.
+OSSL_FUNC_digest_digest() is a "oneshot" digest function.
No provider side digest context is used.
Instead the provider context that was created during provider initialisation is
passed in the I<provctx> parameter (see L<provider(7)>).
See L<OSSL_PARAM(3)> for further details on the parameters structure used by
these functions.
-OP_digest_get_params() gets details of the algorithm implementation
+OSSL_FUNC_digest_get_params() gets details of the algorithm implementation
and stores them in I<params>.
-OP_digest_set_ctx_params() sets digest operation parameters for the
+OSSL_FUNC_digest_set_ctx_params() sets digest operation parameters for the
provider side digest context I<dctx> to I<params>.
Any parameter settings are additional to any that were previously set.
-OP_digest_get_ctx_params() gets digest operation details details from
+OSSL_FUNC_digest_get_ctx_params() gets digest operation details details from
the given provider side digest context I<dctx> and stores them in I<params>.
-OP_digest_gettable_params(), OP_digest_gettable_ctx_params(), and
-OP_digest_settable_ctx_params() all return constant B<OSSL_PARAM> arrays
-as descriptors of the parameters that OP_digest_get_params(),
-OP_digest_get_ctx_params(), and OP_digest_set_ctx_params() can handle,
+OSSL_FUNC_digest_gettable_params(), OSSL_FUNC_digest_gettable_ctx_params(), and
+OSSL_FUNC_digest_settable_ctx_params() all return constant B<OSSL_PARAM> arrays
+as descriptors of the parameters that OSSL_FUNC_digest_get_params(),
+OSSL_FUNC_digest_get_ctx_params(), and OSSL_FUNC_digest_set_ctx_params() can handle,
respectively.
Parameters currently recognised by built-in digests with this function
=head2 Digest Context Parameters
-OP_digest_set_ctx_params() sets digest parameters associated with the
+OSSL_FUNC_digest_set_ctx_params() sets digest parameters associated with the
given provider side digest context I<dctx> to I<params>.
Any parameter settings are additional to any that were previously set.
See L<OSSL_PARAM(3)> for further details on the parameters structure.
-OP_digest_get_ctx_params() gets details of currently set parameters
+OSSL_FUNC_digest_get_ctx_params() gets details of currently set parameters
values associated with the give provider side digest context I<dctx>
and stores them in I<params>.
See L<OSSL_PARAM(3)> for further details on the parameters structure.
=head1 RETURN VALUES
-OP_digest_newctx() and OP_digest_dupctx() should return the newly created
+OSSL_FUNC_digest_newctx() and OSSL_FUNC_digest_dupctx() should return the newly created
provider side digest context, or NULL on failure.
-OP_digest_init(), OP_digest_update(), OP_digest_final(), OP_digest_digest(),
-OP_digest_set_params() and OP_digest_get_params() should return 1 for success or
+OSSL_FUNC_digest_init(), OSSL_FUNC_digest_update(), OSSL_FUNC_digest_final(), OSSL_FUNC_digest_digest(),
+OSSL_FUNC_digest_set_params() and OSSL_FUNC_digest_get_params() should return 1 for success or
0 on error.
-OP_digest_size() should return the digest size.
+OSSL_FUNC_digest_size() should return the digest size.
-OP_digest_block_size() should return the block size of the underlying digest
+OSSL_FUNC_digest_block_size() should return the block size of the underlying digest
algorithm.
=head1 SEE ALSO
*/
/* Context management */
- void *OP_keyexch_newctx(void *provctx);
- void OP_keyexch_freectx(void *ctx);
- void *OP_keyexch_dupctx(void *ctx);
+ void *OSSL_FUNC_keyexch_newctx(void *provctx);
+ void OSSL_FUNC_keyexch_freectx(void *ctx);
+ void *OSSL_FUNC_keyexch_dupctx(void *ctx);
/* Shared secret derivation */
- int OP_keyexch_init(void *ctx, void *provkey);
- int OP_keyexch_set_peer(void *ctx, void *provkey);
- int OP_keyexch_derive(void *ctx, unsigned char *secret, size_t *secretlen,
- size_t outlen);
+ int OSSL_FUNC_keyexch_init(void *ctx, void *provkey);
+ int OSSL_FUNC_keyexch_set_peer(void *ctx, void *provkey);
+ int OSSL_FUNC_keyexch_derive(void *ctx, unsigned char *secret, size_t *secretlen,
+ size_t outlen);
/* Key Exchange parameters */
- int OP_keyexch_set_ctx_params(void *ctx, const OSSL_PARAM params[]);
- const OSSL_PARAM *OP_keyexch_settable_ctx_params(void);
- int OP_keyexch_get_ctx_params(void *ctx, OSSL_PARAM params[]);
- const OSSL_PARAM *OP_keyexch_gettable_ctx_params(void);
+ int OSSL_FUNC_keyexch_set_ctx_params(void *ctx, const OSSL_PARAM params[]);
+ const OSSL_PARAM *OSSL_FUNC_keyexch_settable_ctx_params(void);
+ int OSSL_FUNC_keyexch_get_ctx_params(void *ctx, OSSL_PARAM params[]);
+ const OSSL_PARAM *OSSL_FUNC_keyexch_gettable_ctx_params(void);
=head1 DESCRIPTION
All these "functions" have a corresponding function type definition
named B<OSSL_{name}_fn>, and a helper function to retrieve the
function pointer from an B<OSSL_DISPATCH> element named
-B<OSSL_get_{name}>.
-For example, the "function" OP_keyexch_newctx() has these:
+B<OSSL_FUNC_{name}>.
+For example, the "function" OSSL_FUNC_keyexch_newctx() has these:
- typedef void *(OSSL_OP_keyexch_newctx_fn)(void *provctx);
- static ossl_inline OSSL_OP_keyexch_newctx_fn
- OSSL_get_OP_keyexch_newctx(const OSSL_DISPATCH *opf);
+ typedef void *(OSSL_FUNC_keyexch_newctx_fn)(void *provctx);
+ static ossl_inline OSSL_FUNC_keyexch_newctx_fn
+ OSSL_FUNC_keyexch_newctx(const OSSL_DISPATCH *opf);
B<OSSL_DISPATCH> arrays are indexed by numbers that are provided as
macros in L<openssl-core_dispatch.h(7)>, as follows:
- OP_keyexch_newctx OSSL_FUNC_KEYEXCH_NEWCTX
- OP_keyexch_freectx OSSL_FUNC_KEYEXCH_FREECTX
- OP_keyexch_dupctx OSSL_FUNC_KEYEXCH_DUPCTX
+ OSSL_FUNC_keyexch_newctx OSSL_FUNC_KEYEXCH_NEWCTX
+ OSSL_FUNC_keyexch_freectx OSSL_FUNC_KEYEXCH_FREECTX
+ OSSL_FUNC_keyexch_dupctx OSSL_FUNC_KEYEXCH_DUPCTX
- OP_keyexch_init OSSL_FUNC_KEYEXCH_INIT
- OP_keyexch_set_peer OSSL_FUNC_KEYEXCH_SET_PEER
- OP_keyexch_derive OSSL_FUNC_KEYEXCH_DERIVE
+ OSSL_FUNC_keyexch_init OSSL_FUNC_KEYEXCH_INIT
+ OSSL_FUNC_keyexch_set_peer OSSL_FUNC_KEYEXCH_SET_PEER
+ OSSL_FUNC_keyexch_derive OSSL_FUNC_KEYEXCH_DERIVE
- OP_keyexch_set_ctx_params OSSL_FUNC_KEYEXCH_SET_CTX_PARAMS
- OP_keyexch_settable_ctx_params OSSL_FUNC_KEYEXCH_SETTABLE_CTX_PARAMS
- OP_keyexch_get_ctx_params OSSL_FUNC_KEYEXCH_GET_CTX_PARAMS
- OP_keyexch_gettable_ctx_params OSSL_FUNC_KEYEXCH_GETTABLE_CTX_PARAMS
+ OSSL_FUNC_keyexch_set_ctx_params OSSL_FUNC_KEYEXCH_SET_CTX_PARAMS
+ OSSL_FUNC_keyexch_settable_ctx_params OSSL_FUNC_KEYEXCH_SETTABLE_CTX_PARAMS
+ OSSL_FUNC_keyexch_get_ctx_params OSSL_FUNC_KEYEXCH_GET_CTX_PARAMS
+ OSSL_FUNC_keyexch_gettable_ctx_params OSSL_FUNC_KEYEXCH_GETTABLE_CTX_PARAMS
A key exchange algorithm implementation may not implement all of these functions.
In order to be a consistent set of functions a provider must implement
-OP_keyexch_newctx, OP_keyexch_freectx, OP_keyexch_init and OP_keyexch_derive.
+OSSL_FUNC_keyexch_newctx, OSSL_FUNC_keyexch_freectx, OSSL_FUNC_keyexch_init and OSSL_FUNC_keyexch_derive.
All other functions are optional.
A key exchange algorithm must also implement some mechanism for generating,
=head2 Context Management Functions
-OP_keyexch_newctx() should create and return a pointer to a provider side
+OSSL_FUNC_keyexch_newctx() should create and return a pointer to a provider side
structure for holding context information during a key exchange operation.
A pointer to this context will be passed back in a number of the other key
exchange operation function calls.
The parameter I<provctx> is the provider context generated during provider
initialisation (see L<provider(7)>).
-OP_keyexch_freectx() is passed a pointer to the provider side key exchange
+OSSL_FUNC_keyexch_freectx() is passed a pointer to the provider side key exchange
context in the I<ctx> parameter.
This function should free any resources associated with that context.
-OP_keyexch_dupctx() should duplicate the provider side key exchange context in
+OSSL_FUNC_keyexch_dupctx() should duplicate the provider side key exchange context in
the I<ctx> parameter and return the duplicate copy.
=head2 Shared Secret Derivation Functions
-OP_keyexch_init() initialises a key exchange operation given a provider side key
+OSSL_FUNC_keyexch_init() initialises a key exchange operation given a provider side key
exchange context in the I<ctx> parameter, and a pointer to a provider key object
in the I<provkey> parameter. The key object should have been previously
generated, loaded or imported into the provider using the key management
(OSSL_OP_KEYMGMT) operation (see provider-keymgmt(7)>.
-OP_keyexch_set_peer() is called to supply the peer's public key (in the
+OSSL_FUNC_keyexch_set_peer() is called to supply the peer's public key (in the
I<provkey> parameter) to be used when deriving the shared secret.
It is also passed a previously initialised key exchange context in the I<ctx>
parameter.
the provider using the key management (OSSL_OP_KEYMGMT) operation (see
provider-keymgmt(7)>.
-OP_keyexch_derive() performs the actual key exchange itself by deriving a shared
+OSSL_FUNC_keyexch_derive() performs the actual key exchange itself by deriving a shared
secret.
A previously initialised key exchange context is passed in the I<ctx>
parameter.
=head2 Key Exchange Parameters Functions
-OP_keyexch_set_ctx_params() sets key exchange parameters associated with the
+OSSL_FUNC_keyexch_set_ctx_params() sets key exchange parameters associated with the
given provider side key exchange context I<ctx> to I<params>,
see L</Common Key Exchange parameters>.
Any parameter settings are additional to any that were previously set.
-OP_keyexch_get_ctx_params() gets key exchange parameters associated with the
+OSSL_FUNC_keyexch_get_ctx_params() gets key exchange parameters associated with the
given provider side key exchange context I<ctx> into I<params>,
see L</Common Key Exchange parameters>.
-OP_keyexch_settable_ctx_params() yields a constant B<OSSL_PARAM> array that
+OSSL_FUNC_keyexch_settable_ctx_params() yields a constant B<OSSL_PARAM> array that
describes the settable parameters, i.e. parameters that can be used with
OP_signature_set_ctx_params().
-If OP_keyexch_settable_ctx_params() is present, OP_keyexch_set_ctx_params() must
+If OSSL_FUNC_keyexch_settable_ctx_params() is present, OSSL_FUNC_keyexch_set_ctx_params() must
also be present, and vice versa.
-Similarly, OP_keyexch_gettable_ctx_params() yields a constant B<OSSL_PARAM>
+Similarly, OSSL_FUNC_keyexch_gettable_ctx_params() yields a constant B<OSSL_PARAM>
array that describes the gettable parameters, i.e. parameters that can be
handled by OP_signature_get_ctx_params().
-If OP_keyexch_gettable_ctx_params() is present, OP_keyexch_get_ctx_params() must
+If OSSL_FUNC_keyexch_gettable_ctx_params() is present, OSSL_FUNC_keyexch_get_ctx_params() must
also be present, and vice versa.
See L<OSSL_PARAM(3)> for the use of B<OSSL_PARAM> as parameter descriptor.
=head2 Common Key Exchange parameters
See L<OSSL_PARAM(3)> for further details on the parameters structure used by
-the OP_keyexch_set_ctx_params() and OP_keyexch_get_ctx_params() functions.
+the OSSL_FUNC_keyexch_set_ctx_params() and OSSL_FUNC_keyexch_get_ctx_params() functions.
Common parameters currently recognised by built-in key exchange algorithms are
as follows.
=head1 RETURN VALUES
-OP_keyexch_newctx() and OP_keyexch_dupctx() should return the newly created
+OSSL_FUNC_keyexch_newctx() and OSSL_FUNC_keyexch_dupctx() should return the newly created
provider side key exchange context, or NULL on failure.
-OP_keyexch_init(), OP_keyexch_set_peer(), OP_keyexch_derive(),
-OP_keyexch_set_params(), and OP_keyexch_get_params() should return 1 for success
+OSSL_FUNC_keyexch_init(), OSSL_FUNC_keyexch_set_peer(), OSSL_FUNC_keyexch_derive(),
+OSSL_FUNC_keyexch_set_params(), and OSSL_FUNC_keyexch_get_params() should return 1 for success
or 0 on error.
-OP_keyexch_settable_ctx_params() and OP_keyexch_gettable_ctx_params() should
+OSSL_FUNC_keyexch_settable_ctx_params() and OSSL_FUNC_keyexch_gettable_ctx_params() should
always return a constant B<OSSL_PARAM> array.
=head1 SEE ALSO
*/
/* Key object (keydata) creation and destruction */
- void *OP_keymgmt_new(void *provctx);
- void OP_keymgmt_free(void *keydata);
+ void *OSSL_FUNC_keymgmt_new(void *provctx);
+ void OSSL_FUNC_keymgmt_free(void *keydata);
- void *OP_keymgmt_gen_init(void *provctx, int selection);
- int OP_keymgmt_gen_set_template(void *genctx, void *template);
- int OP_keymgmt_gen_set_params(void *genctx, const OSSL_PARAM params[]);
- const OSSL_PARAM *OP_keymgmt_gen_settable_params(void *provctx);
- void *OP_keymgmt_gen(void *genctx, OSSL_CALLBACK *cb, void *cbarg);
- void OP_keymgmt_gen_cleanup(void *genctx);
+ void *OSSL_FUNC_keymgmt_gen_init(void *provctx, int selection);
+ int OSSL_FUNC_keymgmt_gen_set_template(void *genctx, void *template);
+ int OSSL_FUNC_keymgmt_gen_set_params(void *genctx, const OSSL_PARAM params[]);
+ const OSSL_PARAM *OSSL_FUNC_keymgmt_gen_settable_params(void *provctx);
+ void *OSSL_FUNC_keymgmt_gen(void *genctx, OSSL_CALLBACK *cb, void *cbarg);
+ void OSSL_FUNC_keymgmt_gen_cleanup(void *genctx);
/* Key object information */
- int OP_keymgmt_get_params(void *keydata, OSSL_PARAM params[]);
- const OSSL_PARAM *OP_keymgmt_gettable_params(void);
- int OP_keymgmt_set_params(void *keydata, const OSSL_PARAM params[]);
- const OSSL_PARAM *OP_keymgmt_settable_params(void);
+ int OSSL_FUNC_keymgmt_get_params(void *keydata, OSSL_PARAM params[]);
+ const OSSL_PARAM *OSSL_FUNC_keymgmt_gettable_params(void);
+ int OSSL_FUNC_keymgmt_set_params(void *keydata, const OSSL_PARAM params[]);
+ const OSSL_PARAM *OSSL_FUNC_keymgmt_settable_params(void);
/* Key object content checks */
- int OP_keymgmt_has(void *keydata, int selection);
- int OP_keymgmt_match(const void *keydata1, const void *keydata2,
- int selection);
+ int OSSL_FUNC_keymgmt_has(void *keydata, int selection);
+ int OSSL_FUNC_keymgmt_match(const void *keydata1, const void *keydata2,
+ int selection);
/* Discovery of supported operations */
- const char *OP_keymgmt_query_operation_name(int operation_id);
+ const char *OSSL_FUNC_keymgmt_query_operation_name(int operation_id);
/* Key object import and export functions */
- int OP_keymgmt_import(int selection, void *keydata, const OSSL_PARAM params[]);
- const OSSL_PARAM *OP_keymgmt_import_types(int selection);
- int OP_keymgmt_export(int selection, void *keydata,
- OSSL_CALLBACK *param_cb, void *cbarg);
- const OSSL_PARAM *OP_keymgmt_export_types(int selection);
+ int OSSL_FUNC_keymgmt_import(int selection, void *keydata, const OSSL_PARAM params[]);
+ const OSSL_PARAM *OSSL_FUNC_keymgmt_import_types(int selection);
+ int OSSL_FUNC_keymgmt_export(int selection, void *keydata,
+ OSSL_CALLBACK *param_cb, void *cbarg);
+ const OSSL_PARAM *OSSL_FUNC_keymgmt_export_types(int selection);
/* Key object copy */
- int OP_keymgmt_copy(void *keydata_to, const void *keydata_from, int selection);
+ int OSSL_FUNC_keymgmt_copy(void *keydata_to, const void *keydata_from, int selection);
/* Key object validation */
- int OP_keymgmt_validate(void *keydata, int selection);
+ int OSSL_FUNC_keymgmt_validate(void *keydata, int selection);
=head1 DESCRIPTION
All these "functions" have a corresponding function type definition
named B<OSSL_{name}_fn>, and a helper function to retrieve the
function pointer from a B<OSSL_DISPATCH> element named
-B<OSSL_get_{name}>.
-For example, the "function" OP_keymgmt_new() has these:
+B<OSSL_FUNC_{name}>.
+For example, the "function" OSSL_FUNC_keymgmt_new() has these:
- typedef void *(OSSL_OP_keymgmt_new_fn)(void *provctx);
- static ossl_inline OSSL_OP_keymgmt_new_fn
- OSSL_get_OP_keymgmt_new(const OSSL_DISPATCH *opf);
+ typedef void *(OSSL_FUNC_keymgmt_new_fn)(void *provctx);
+ static ossl_inline OSSL_FUNC_keymgmt_new_fn
+ OSSL_FUNC_keymgmt_new(const OSSL_DISPATCH *opf);
B<OSSL_DISPATCH> arrays are indexed by numbers that are provided as
macros in L<openssl-core_dispatch.h(7)>, as follows:
- OP_keymgmt_new OSSL_FUNC_KEYMGMT_NEW
- OP_keymgmt_free OSSL_FUNC_KEYMGMT_FREE
+ OSSL_FUNC_keymgmt_new OSSL_FUNC_KEYMGMT_NEW
+ OSSL_FUNC_keymgmt_free OSSL_FUNC_KEYMGMT_FREE
- OP_keymgmt_gen_init OSSL_FUNC_KEYMGMT_GEN_INIT
- OP_keymgmt_gen_set_template OSSL_FUNC_KEYMGMT_GEN_SET_TEMPLATE
- OP_keymgmt_gen_set_params OSSL_FUNC_KEYMGMT_GEN_SET_PARAMS
- OP_keymgmt_gen_settable_params OSSL_FUNC_KEYMGMT_GEN_SETTABLE_PARAMS
- OP_keymgmt_gen OSSL_FUNC_KEYMGMT_GEN
- OP_keymgmt_gen_cleanup OSSL_FUNC_KEYMGMT_GEN_CLEANUP
+ OSSL_FUNC_keymgmt_gen_init OSSL_FUNC_KEYMGMT_GEN_INIT
+ OSSL_FUNC_keymgmt_gen_set_template OSSL_FUNC_KEYMGMT_GEN_SET_TEMPLATE
+ OSSL_FUNC_keymgmt_gen_set_params OSSL_FUNC_KEYMGMT_GEN_SET_PARAMS
+ OSSL_FUNC_keymgmt_gen_settable_params OSSL_FUNC_KEYMGMT_GEN_SETTABLE_PARAMS
+ OSSL_FUNC_keymgmt_gen OSSL_FUNC_KEYMGMT_GEN
+ OSSL_FUNC_keymgmt_gen_cleanup OSSL_FUNC_KEYMGMT_GEN_CLEANUP
- OP_keymgmt_get_params OSSL_FUNC_KEYMGMT_GET_PARAMS
- OP_keymgmt_gettable_params OSSL_FUNC_KEYMGMT_GETTABLE_PARAMS
- OP_keymgmt_set_params OSSL_FUNC_KEYMGMT_SET_PARAMS
- OP_keymgmt_settable_params OSSL_FUNC_KEYMGMT_SETTABLE_PARAMS
+ OSSL_FUNC_keymgmt_get_params OSSL_FUNC_KEYMGMT_GET_PARAMS
+ OSSL_FUNC_keymgmt_gettable_params OSSL_FUNC_KEYMGMT_GETTABLE_PARAMS
+ OSSL_FUNC_keymgmt_set_params OSSL_FUNC_KEYMGMT_SET_PARAMS
+ OSSL_FUNC_keymgmt_settable_params OSSL_FUNC_KEYMGMT_SETTABLE_PARAMS
- OP_keymgmt_query_operation_name OSSL_FUNC_KEYMGMT_QUERY_OPERATION_NAME
+ OSSL_FUNC_keymgmt_query_operation_name OSSL_FUNC_KEYMGMT_QUERY_OPERATION_NAME
- OP_keymgmt_has OSSL_FUNC_KEYMGMT_HAS
- OP_keymgmt_validate OSSL_FUNC_KEYMGMT_VALIDATE
- OP_keymgmt_match OSSL_FUNC_KEYMGMT_MATCH
+ OSSL_FUNC_keymgmt_has OSSL_FUNC_KEYMGMT_HAS
+ OSSL_FUNC_keymgmt_validate OSSL_FUNC_KEYMGMT_VALIDATE
+ OSSL_FUNC_keymgmt_match OSSL_FUNC_KEYMGMT_MATCH
- OP_keymgmt_import OSSL_FUNC_KEYMGMT_IMPORT
- OP_keymgmt_import_types OSSL_FUNC_KEYMGMT_IMPORT_TYPES
- OP_keymgmt_export OSSL_FUNC_KEYMGMT_EXPORT
- OP_keymgmt_export_types OSSL_FUNC_KEYMGMT_EXPORT_TYPES
+ OSSL_FUNC_keymgmt_import OSSL_FUNC_KEYMGMT_IMPORT
+ OSSL_FUNC_keymgmt_import_types OSSL_FUNC_KEYMGMT_IMPORT_TYPES
+ OSSL_FUNC_keymgmt_export OSSL_FUNC_KEYMGMT_EXPORT
+ OSSL_FUNC_keymgmt_export_types OSSL_FUNC_KEYMGMT_EXPORT_TYPES
- OP_keymgmt_copy OSSL_FUNC_KEYMGMT_COPY
+ OSSL_FUNC_keymgmt_copy OSSL_FUNC_KEYMGMT_COPY
=head2 Key Objects
=head2 Constructing and Destructing Functions
-OP_keymgmt_new() should create a provider side key object. The
+OSSL_FUNC_keymgmt_new() should create a provider side key object. The
provider context I<provctx> is passed and may be incorporated in the
key object, but that is not mandatory.
-OP_keymgmt_free() should free the passed I<keydata>.
+OSSL_FUNC_keymgmt_free() should free the passed I<keydata>.
-OP_keymgmt_gen_init(), OP_keymgmt_gen_set_template(),
-OP_keymgmt_gen_set_params(), OP_keymgmt_gen_settable_params(),
-OP_keymgmt_gen() and OP_keymgmt_gen_cleanup() work together as a more
+OSSL_FUNC_keymgmt_gen_init(), OSSL_FUNC_keymgmt_gen_set_template(),
+OSSL_FUNC_keymgmt_gen_set_params(), OSSL_FUNC_keymgmt_gen_settable_params(),
+OSSL_FUNC_keymgmt_gen() and OSSL_FUNC_keymgmt_gen_cleanup() work together as a more
elaborate context based key object constructor.
-OP_keymgmt_gen_init() should create the key object generation context
+OSSL_FUNC_keymgmt_gen_init() should create the key object generation context
and initialize it with I<selections>, which will determine what kind
of contents the key object to be generated should get.
-OP_keymgmt_gen_set_template() should add I<template> to the context
+OSSL_FUNC_keymgmt_gen_set_template() should add I<template> to the context
I<genctx>. The I<template> is assumed to be a key object constructed
with the same KEYMGMT, and from which content that the implementation
chooses can be used as a template for the key object to be generated.
Typically, the generation of a DSA or DH key would get the domain
parameters from this I<template>.
-OP_keymgmt_gen_set_params() should set additional parameters from
+OSSL_FUNC_keymgmt_gen_set_params() should set additional parameters from
I<params> in the key object generation context I<genctx>.
-OP_keymgmt_gen_settable_params() should return a constant array of
-descriptor B<OSSL_PARAM>, for parameters that OP_keymgmt_gen_set_params()
+OSSL_FUNC_keymgmt_gen_settable_params() should return a constant array of
+descriptor B<OSSL_PARAM>, for parameters that OSSL_FUNC_keymgmt_gen_set_params()
can handle.
-OP_keymgmt_gen() should perform the key object generation itself, and
+OSSL_FUNC_keymgmt_gen() should perform the key object generation itself, and
return the result. The callback I<cb> should be called at regular
intervals with indications on how the key object generation
progresses.
-OP_keymgmt_gen_cleanup() should clean up and free the key object
+OSSL_FUNC_keymgmt_gen_cleanup() should clean up and free the key object
generation context I<genctx>
-At least one of OP_keymgmt_new() and OP_keymgmt_gen() are mandatory,
-as well as OP_keymgmt_free(). Additionally, if OP_keymgmt_gen() is
-present, OP_keymgmt_gen_init() and OP_keymgmt_gen_cleanup() must be
+At least one of OSSL_FUNC_keymgmt_new() and OSSL_FUNC_keymgmt_gen() are mandatory,
+as well as OSSL_FUNC_keymgmt_free(). Additionally, if OSSL_FUNC_keymgmt_gen() is
+present, OSSL_FUNC_keymgmt_gen_init() and OSSL_FUNC_keymgmt_gen_cleanup() must be
present as well.
=head2 Key Object Information Functions
-OP_keymgmt_get_params() should extract information data associated
+OSSL_FUNC_keymgmt_get_params() should extract information data associated
with the given I<keydata>, see L</Common Information Parameters>.
-OP_keymgmt_gettable_params() should return a constant array of
-descriptor B<OSSL_PARAM>, for parameters that OP_keymgmt_get_params()
+OSSL_FUNC_keymgmt_gettable_params() should return a constant array of
+descriptor B<OSSL_PARAM>, for parameters that OSSL_FUNC_keymgmt_get_params()
can handle.
-If OP_keymgmt_gettable_params() is present, OP_keymgmt_get_params()
+If OSSL_FUNC_keymgmt_gettable_params() is present, OSSL_FUNC_keymgmt_get_params()
must also be present, and vice versa.
-OP_keymgmt_set_params() should update information data associated
+OSSL_FUNC_keymgmt_set_params() should update information data associated
with the given I<keydata>, see L</Common Information Parameters>.
-OP_keymgmt_settable_params() should return a constant array of
-descriptor B<OSSL_PARAM>, for parameters that OP_keymgmt_set_params()
+OSSL_FUNC_keymgmt_settable_params() should return a constant array of
+descriptor B<OSSL_PARAM>, for parameters that OSSL_FUNC_keymgmt_set_params()
can handle.
-If OP_keymgmt_settable_params() is present, OP_keymgmt_set_params()
+If OSSL_FUNC_keymgmt_settable_params() is present, OSSL_FUNC_keymgmt_set_params()
must also be present, and vice versa.
=head2 Key Object Checking Functions
-OP_keymgmt_query_operation_name() should return the name of the
+OSSL_FUNC_keymgmt_query_operation_name() should return the name of the
supported algorithm for the operation I<operation_id>. This is
similar to provider_query_operation() (see L<provider-base(7)>),
but only works as an advisory. If this function is not present, or
from the same provider, of the same name as the one used to fetch the
keymgmt and try to use that.
-OP_keymgmt_has() should check whether the given I<keydata> contains the subsets
+OSSL_FUNC_keymgmt_has() should check whether the given I<keydata> contains the subsets
of data indicated by the I<selector>. A combination of several
selector bits must consider all those subsets, not just one. An
implementation is, however, free to consider an empty subset of data
to still be a valid subset.
-OP_keymgmt_validate() should check if the I<keydata> contains valid
+OSSL_FUNC_keymgmt_validate() should check if the I<keydata> contains valid
data subsets indicated by I<selection>. Some combined selections of
data subsets may cause validation of the combined data.
For example, the combination of B<OSSL_KEYMGMT_SELECT_PRIVATE_KEY> and
for short) is expected to check that the pairwise consistency of
I<keydata> is valid.
-OP_keymgmt_match() should check if the data subset indicated by
+OSSL_FUNC_keymgmt_match() should check if the data subset indicated by
I<selection> in I<keydata1> and I<keydata2> match. It is assumed that
the caller has ensured that I<keydata1> and I<keydata2> are both owned
by the implementation of this function.
=head2 Key Object Import, Export and Copy Functions
-OP_keymgmt_import() should import data indicated by I<selection> into
+OSSL_FUNC_keymgmt_import() should import data indicated by I<selection> into
I<keydata> with values taken from the B<OSSL_PARAM> array I<params>.
-OP_keymgmt_export() should extract values indicated by I<selection>
+OSSL_FUNC_keymgmt_export() should extract values indicated by I<selection>
from I<keydata>, create an B<OSSL_PARAM> array with them and call
I<param_cb> with that array as well as the given I<cbarg>.
-OP_keymgmt_import_types() should return a constant array of descriptor
+OSSL_FUNC_keymgmt_import_types() should return a constant array of descriptor
B<OSSL_PARAM> for data indicated by I<selection>, for parameters that
-OP_keymgmt_import() can handle.
+OSSL_FUNC_keymgmt_import() can handle.
-OP_keymgmt_export_types() should return a constant array of descriptor
+OSSL_FUNC_keymgmt_export_types() should return a constant array of descriptor
B<OSSL_PARAM> for data indicated by I<selection>, that the
-OP_keymgmt_export() callback can expect to receive.
+OSSL_FUNC_keymgmt_export() callback can expect to receive.
-OP_keymgmt_copy() should copy data subsets indicated by I<selection>
+OSSL_FUNC_keymgmt_copy() should copy data subsets indicated by I<selection>
from I<keydata_from> to I<keydata_to>. It is assumed that the caller
has ensured that I<keydata_to> and I<keydata_from> are both owned by
the implementation of this function.
=head1 RETURN VALUES
-OP_keymgmt_new() should return a valid reference to the newly created provider
+OSSL_FUNC_keymgmt_new() should return a valid reference to the newly created provider
side key object, or NULL on failure.
-OP_keymgmt_import(), OP_keymgmt_export(), OP_keymgmt_get_params() and
-OP_keymgmt_set_params() should return 1 for success or 0 on error.
+OSSL_FUNC_keymgmt_import(), OSSL_FUNC_keymgmt_export(), OSSL_FUNC_keymgmt_get_params() and
+OSSL_FUNC_keymgmt_set_params() should return 1 for success or 0 on error.
-OP_keymgmt_validate() should return 1 on successful validation, or 0 on
+OSSL_FUNC_keymgmt_validate() should return 1 on successful validation, or 0 on
failure.
-OP_keymgmt_has() should return 1 if all the selected data subsets are contained
+OSSL_FUNC_keymgmt_has() should return 1 if all the selected data subsets are contained
in the given I<keydata> or 0 otherwise.
-OP_keymgmt_query_operation_name() should return a pointer to a string matching
+OSSL_FUNC_keymgmt_query_operation_name() should return a pointer to a string matching
the requested operation, or NULL if the same name used to fetch the keymgmt
applies.
-OP_keymgmt_gettable_params() and OP_keymgmt_settable_params()
-OP_keymgmt_import_types(), OP_keymgmt_export_types()
+OSSL_FUNC_keymgmt_gettable_params() and OSSL_FUNC_keymgmt_settable_params()
+OSSL_FUNC_keymgmt_import_types(), OSSL_FUNC_keymgmt_export_types()
should
always return a constant B<OSSL_PARAM> array.
*/
/* Context management */
- void *OP_mac_newctx(void *provctx);
- void OP_mac_freectx(void *mctx);
- void *OP_mac_dupctx(void *src);
+ void *OSSL_FUNC_mac_newctx(void *provctx);
+ void OSSL_FUNC_mac_freectx(void *mctx);
+ void *OSSL_FUNC_mac_dupctx(void *src);
/* Encryption/decryption */
- int OP_mac_init(void *mctx);
- int OP_mac_update(void *mctx, const unsigned char *in, size_t inl);
- int OP_mac_final(void *mctx, unsigned char *out, size_t *outl, size_t outsize);
+ int OSSL_FUNC_mac_init(void *mctx);
+ int OSSL_FUNC_mac_update(void *mctx, const unsigned char *in, size_t inl);
+ int OSSL_FUNC_mac_final(void *mctx, unsigned char *out, size_t *outl, size_t outsize);
/* MAC parameter descriptors */
- const OSSL_PARAM *OP_mac_get_params(void);
- const OSSL_PARAM *OP_mac_get_ctx_params(void);
- const OSSL_PARAM *OP_mac_set_ctx_params(void);
+ const OSSL_PARAM *OSSL_FUNC_mac_get_params(void);
+ const OSSL_PARAM *OSSL_FUNC_mac_get_ctx_params(void);
+ const OSSL_PARAM *OSSL_FUNC_mac_set_ctx_params(void);
/* MAC parameters */
- int OP_mac_get_params(OSSL_PARAM params[]);
- int OP_mac_get_ctx_params(void *mctx, OSSL_PARAM params[]);
- int OP_mac_set_ctx_params(void *mctx, const OSSL_PARAM params[]);
+ int OSSL_FUNC_mac_get_params(OSSL_PARAM params[]);
+ int OSSL_FUNC_mac_get_ctx_params(void *mctx, OSSL_PARAM params[]);
+ int OSSL_FUNC_mac_set_ctx_params(void *mctx, const OSSL_PARAM params[]);
=head1 DESCRIPTION
All these "functions" have a corresponding function type definition
named B<OSSL_{name}_fn>, and a helper function to retrieve the
function pointer from an B<OSSL_DISPATCH> element named
-B<OSSL_get_{name}>.
-For example, the "function" OP_mac_newctx() has these:
+B<OSSL_FUNC_{name}>.
+For example, the "function" OSSL_FUNC_mac_newctx() has these:
- typedef void *(OSSL_OP_mac_newctx_fn)(void *provctx);
- static ossl_inline OSSL_OP_mac_newctx_fn
- OSSL_get_OP_mac_newctx(const OSSL_DISPATCH *opf);
+ typedef void *(OSSL_OSSL_FUNC_mac_newctx_fn)(void *provctx);
+ static ossl_inline OSSL_OSSL_FUNC_mac_newctx_fn
+ OSSL_FUNC_mac_newctx(const OSSL_DISPATCH *opf);
B<OSSL_DISPATCH> arrays are indexed by numbers that are provided as
macros in L<openssl-core_dispatch.h(7)>, as follows:
- OP_mac_newctx OSSL_FUNC_MAC_NEWCTX
- OP_mac_freectx OSSL_FUNC_MAC_FREECTX
- OP_mac_dupctx OSSL_FUNC_MAC_DUPCTX
+ OSSL_FUNC_mac_newctx OSSL_FUNC_MAC_NEWCTX
+ OSSL_FUNC_mac_freectx OSSL_FUNC_MAC_FREECTX
+ OSSL_FUNC_mac_dupctx OSSL_FUNC_MAC_DUPCTX
- OP_mac_init OSSL_FUNC_MAC_INIT
- OP_mac_update OSSL_FUNC_MAC_UPDATE
- OP_mac_final OSSL_FUNC_MAC_FINAL
+ OSSL_FUNC_mac_init OSSL_FUNC_MAC_INIT
+ OSSL_FUNC_mac_update OSSL_FUNC_MAC_UPDATE
+ OSSL_FUNC_mac_final OSSL_FUNC_MAC_FINAL
- OP_mac_get_params OSSL_FUNC_MAC_GET_PARAMS
- OP_mac_get_ctx_params OSSL_FUNC_MAC_GET_CTX_PARAMS
- OP_mac_set_ctx_params OSSL_FUNC_MAC_SET_CTX_PARAMS
+ OSSL_FUNC_mac_get_params OSSL_FUNC_MAC_GET_PARAMS
+ OSSL_FUNC_mac_get_ctx_params OSSL_FUNC_MAC_GET_CTX_PARAMS
+ OSSL_FUNC_mac_set_ctx_params OSSL_FUNC_MAC_SET_CTX_PARAMS
- OP_mac_gettable_params OSSL_FUNC_MAC_GETTABLE_PARAMS
- OP_mac_gettable_ctx_params OSSL_FUNC_MAC_GETTABLE_CTX_PARAMS
- OP_mac_settable_ctx_params OSSL_FUNC_MAC_SETTABLE_CTX_PARAMS
+ OSSL_FUNC_mac_gettable_params OSSL_FUNC_MAC_GETTABLE_PARAMS
+ OSSL_FUNC_mac_gettable_ctx_params OSSL_FUNC_MAC_GETTABLE_CTX_PARAMS
+ OSSL_FUNC_mac_settable_ctx_params OSSL_FUNC_MAC_SETTABLE_CTX_PARAMS
A mac algorithm implementation may not implement all of these functions.
In order to be a consistent set of functions, at least the following functions
-must be implemented: OP_mac_newctx(), OP_mac_freectx(), OP_mac_init(),
-OP_mac_update(), OP_mac_final().
+must be implemented: OSSL_FUNC_mac_newctx(), OSSL_FUNC_mac_freectx(), OSSL_FUNC_mac_init(),
+OSSL_FUNC_mac_update(), OSSL_FUNC_mac_final().
All other functions are optional.
=head2 Context Management Functions
-OP_mac_newctx() should create and return a pointer to a provider side
+OSSL_FUNC_mac_newctx() should create and return a pointer to a provider side
structure for holding context information during a mac operation.
A pointer to this context will be passed back in a number of the other mac
operation function calls.
The parameter I<provctx> is the provider context generated during provider
initialisation (see L<provider(7)>).
-OP_mac_freectx() is passed a pointer to the provider side mac context in
+OSSL_FUNC_mac_freectx() is passed a pointer to the provider side mac context in
the I<mctx> parameter.
If it receives NULL as I<mctx> value, it should not do anything other than
return.
This function should free any resources associated with that context.
-OP_mac_dupctx() should duplicate the provider side mac context in the
+OSSL_FUNC_mac_dupctx() should duplicate the provider side mac context in the
I<mctx> parameter and return the duplicate copy.
=head2 Encryption/Decryption Functions
-OP_mac_init() initialises a mac operation given a newly created provider
+OSSL_FUNC_mac_init() initialises a mac operation given a newly created provider
side mac context in the I<mctx> parameter.
-OP_mac_update() is called to supply data for MAC computation of a previously
+OSSL_FUNC_mac_update() is called to supply data for MAC computation of a previously
initialised mac operation.
The I<mctx> parameter contains a pointer to a previously initialised provider
side context.
-OP_mac_update() may be called multiple times for a single mac operation.
+OSSL_FUNC_mac_update() may be called multiple times for a single mac operation.
-OP_mac_final() completes the MAC computation started through previous
-OP_mac_init() and OP_mac_update() calls.
+OSSL_FUNC_mac_final() completes the MAC computation started through previous
+OSSL_FUNC_mac_init() and OSSL_FUNC_mac_update() calls.
The I<mctx> parameter contains a pointer to the provider side context.
The resulting MAC should be written to I<out> and the amount of data written
to I<*outl>, which should not exceed I<outsize> bytes.
See L<OSSL_PARAM(3)> for further details on the parameters structure used by
these functions.
-OP_mac_get_params() gets details of parameter values associated with the
+OSSL_FUNC_mac_get_params() gets details of parameter values associated with the
provider algorithm and stores them in I<params>.
-OP_mac_set_ctx_params() sets mac parameters associated with the given
+OSSL_FUNC_mac_set_ctx_params() sets mac parameters associated with the given
provider side mac context I<mctx> to I<params>.
Any parameter settings are additional to any that were previously set.
-OP_mac_get_ctx_params() gets details of currently set parameter values
+OSSL_FUNC_mac_get_ctx_params() gets details of currently set parameter values
associated with the given provider side mac context I<mctx> and stores them
in I<params>.
-OP_mac_gettable_params(), OP_mac_gettable_ctx_params(), and
-OP_mac_settable_ctx_params() all return constant B<OSSL_PARAM> arrays
-as descriptors of the parameters that OP_mac_get_params(),
-OP_mac_get_ctx_params(), and OP_mac_set_ctx_params() can handle,
+OSSL_FUNC_mac_gettable_params(), OSSL_FUNC_mac_gettable_ctx_params(), and
+OSSL_FUNC_mac_settable_ctx_params() all return constant B<OSSL_PARAM> arrays
+as descriptors of the parameters that OSSL_FUNC_mac_get_params(),
+OSSL_FUNC_mac_get_ctx_params(), and OSSL_FUNC_mac_set_ctx_params() can handle,
respectively.
Parameters currently recognised by built-in macs are as follows. Not all
=head1 RETURN VALUES
-OP_mac_newctx() and OP_mac_dupctx() should return the newly created
+OSSL_FUNC_mac_newctx() and OSSL_FUNC_mac_dupctx() should return the newly created
provider side mac context, or NULL on failure.
-OP_mac_init(), OP_mac_update(), OP_mac_final(), OP_mac_get_params(),
-OP_mac_get_ctx_params() and OP_mac_set_ctx_params() should return 1 for
+OSSL_FUNC_mac_init(), OSSL_FUNC_mac_update(), OSSL_FUNC_mac_final(), OSSL_FUNC_mac_get_params(),
+OSSL_FUNC_mac_get_ctx_params() and OSSL_FUNC_mac_set_ctx_params() should return 1 for
success or 0 on error.
-OP_mac_gettable_params(), OP_mac_gettable_ctx_params() and
-OP_mac_settable_ctx_params() should return a constant B<OSSL_PARAM>
+OSSL_FUNC_mac_gettable_params(), OSSL_FUNC_mac_gettable_ctx_params() and
+OSSL_FUNC_mac_settable_ctx_params() should return a constant B<OSSL_PARAM>
array, or NULL if none is offered.
=head1 SEE ALSO
=for openssl multiple includes
- #include <openssl/core_numbers.h>
+ #include <openssl/core_dispatch.h>
#include <openssl/core_names.h>
/*
*/
/* Context management */
- void *OP_rand_newctx(void *provctx, void *parent,
- const OSSL_DISPATCH *parent_calls);
- void OP_rand_freectx(void *ctx);
+ void *OSSL_FUNC_rand_newctx(void *provctx, void *parent,
+ const OSSL_DISPATCH *parent_calls);
+ void OSSL_FUNC_rand_freectx(void *ctx);
/* Random number generator functions: NIST */
- int OP_rand_instantiate(void *ctx, unsigned int strength,
- int prediction_resistance,
- const unsigned char *pstr, size_t pstr_len);
- int OP_rand_uninstantiate(void *ctx);
- int OP_rand_generate(void *ctx, unsigned char *out, size_t outlen,
- unsigned int strength, int prediction_resistance,
- const unsigned char *addin, size_t addin_len);
- int OP_rand_reseed(void *ctx, int prediction_resistance,
- const unsigned char *ent, size_t ent_len,
- const unsigned char *addin, size_t addin_len);
+ int OSSL_FUNC_rand_instantiate(void *ctx, unsigned int strength,
+ int prediction_resistance,
+ const unsigned char *pstr, size_t pstr_len);
+ int OSSL_FUNC_rand_uninstantiate(void *ctx);
+ int OSSL_FUNC_rand_generate(void *ctx, unsigned char *out, size_t outlen,
+ unsigned int strength, int prediction_resistance,
+ const unsigned char *addin, size_t addin_len);
+ int OSSL_FUNC_rand_reseed(void *ctx, int prediction_resistance,
+ const unsigned char *ent, size_t ent_len,
+ const unsigned char *addin, size_t addin_len);
/* Random number generator functions: additional */
- size_t OP_rand_nonce(void *ctx, unsigned char *out, size_t outlen,
- int strength, size_t min_noncelen, size_t max_noncelen);
- void OP_rand_set_callbacks(void *ctx, OSSL_CALLBACK *get_entropy,
- OSSL_CALLBACK *cleanup_entropy,
- OSSL_CALLBACK *get_nonce,
- OSSL_CALLBACK *cleanup_nonce, void *arg);
- int OP_rand_verify_zeroization(void *ctx);
+ size_t OSSL_FUNC_rand_nonce(void *ctx, unsigned char *out, size_t outlen,
+ int strength, size_t min_noncelen, size_t max_noncelen);
+ void OSSL_FUNC_rand_set_callbacks(void *ctx, OSSL_CALLBACK *get_entropy,
+ OSSL_CALLBACK *cleanup_entropy,
+ OSSL_CALLBACK *get_nonce,
+ OSSL_CALLBACK *cleanup_nonce, void *arg);
+ int OSSL_FUNC_rand_verify_zeroization(void *ctx);
/* Context Locking */
- int OP_rand_enable_locking(void *ctx);
- int OP_rand_lock(void *ctx);
- void OP_rand_unlock(void *ctx);
+ int OSSL_FUNC_rand_enable_locking(void *ctx);
+ int OSSL_FUNC_rand_lock(void *ctx);
+ void OSSL_FUNC_rand_unlock(void *ctx);
/* RAND parameter descriptors */
- const OSSL_PARAM *OP_rand_gettable_params(void);
- const OSSL_PARAM *OP_rand_gettable_ctx_params(void);
- const OSSL_PARAM *OP_rand_settable_ctx_params(void);
+ const OSSL_PARAM *OSSL_FUNC_rand_gettable_params(void);
+ const OSSL_PARAM *OSSL_FUNC_rand_gettable_ctx_params(void);
+ const OSSL_PARAM *OSSL_FUNC_rand_settable_ctx_params(void);
/* RAND parameters */
- int OP_rand_get_params(OSSL_PARAM params[]);
- int OP_rand_get_ctx_params(void *ctx, OSSL_PARAM params[]);
- int OP_rand_set_ctx_params(void *ctx, const OSSL_PARAM params[]);
+ int OSSL_FUNC_rand_get_params(OSSL_PARAM params[]);
+ int OSSL_FUNC_rand_get_ctx_params(void *ctx, OSSL_PARAM params[]);
+ int OSSL_FUNC_rand_set_ctx_params(void *ctx, const OSSL_PARAM params[]);
=head1 DESCRIPTION
=head2 Context Management Functions
-OP_rand_newctx() should create and return a pointer to a provider side
+OSSL_FUNC_rand_newctx() should create and return a pointer to a provider side
structure for holding context information during a rand operation.
A pointer to this context will be passed back in a number of the other rand
operation function calls.
The parameter I<parent_calls> points to the dispatch table for I<parent>.
Thus, the parent need not be from the same provider as the new instance.
-OP_rand_freectx() is passed a pointer to the provider side rand context in
+OSSL_FUNC_rand_freectx() is passed a pointer to the provider side rand context in
the I<mctx> parameter.
If it receives NULL as I<ctx> value, it should not do anything other than
return.
These functions correspond to those defined in NIST SP 800-90A and SP 800-90C.
-OP_rand_instantiate() is used to instantiate the DRBG I<ctx> at a requested
+OSSL_FUNC_rand_instantiate() is used to instantiate the DRBG I<ctx> at a requested
security I<strength>. In addition, I<prediction_resistance> can be requested.
Additional input I<addin> of length I<addin_len> bytes can optionally
be provided.
-OP_rand_uninstantiate() is used to uninstantiate the DRBG I<ctx>. After being
+OSSL_FUNC_rand_uninstantiate() is used to uninstantiate the DRBG I<ctx>. After being
uninstantiated, a DRBG is unable to produce output until it is instantiated
anew.
-OP_rand_generate() is used to generate random bytes from the DRBG I<ctx>.
+OSSL_FUNC_rand_generate() is used to generate random bytes from the DRBG I<ctx>.
It will generate I<outlen> bytes placing them into the buffer pointed to by
I<out>. The generated bytes will meet the specified security I<strength> and,
if I<prediction_resistance> is true, the bytes will be produced after reseeding
=head2 Random Number Generator Functions: Additional
-OP_rand_nonce() is used to generate a nonce of the given I<strength> with a
+OSSL_FUNC_rand_nonce() is used to generate a nonce of the given I<strength> with a
length from I<min_noncelen> to I<max_noncelen>. If the output buffer I<out> is
NULL, the length of the nonce should be returned.
-OP_rand_set_callbacks() is used to supply custom entropy and nonce callbacks.
+OSSL_FUNC_rand_set_callbacks() is used to supply custom entropy and nonce callbacks.
Instead of gathering seed material from its usual sources, the DRBG I<ctx>
should call these functions.
The I<get_entropy> and I<cleanup_entropy> callbacks obtain and release bytes
The I<get_nonce> and I<cleanup_nonce> functions obtain and release nonce bytes.
In all cases, the additional argument I<arg> is passed to the callbacks.
-OP_rand_verify_zeroization() is used to determine if the internal state of the
+OSSL_FUNC_rand_verify_zeroization() is used to determine if the internal state of the
DRBG is zero. This capability is mandated by NIST as part of the self
tests, it is unlikely to be useful in other circumstances.
ensure their proper operation. Because locking introduces an overhead, it
is disabled by default.
-OP_rand_enable_locking() allows locking to be turned on for a DRBG and all of
+OSSL_FUNC_rand_enable_locking() allows locking to be turned on for a DRBG and all of
its parent DRBGs. From this call onwards, the DRBG can be used in a thread
safe manner.
-OP_rand_lock() is used to lock a DRBG. Once locked, exclusive access
+OSSL_FUNC_rand_lock() is used to lock a DRBG. Once locked, exclusive access
is guaranteed.
-OP_rand_unlock() is used to unlock a DRBG.
+OSSL_FUNC_rand_unlock() is used to unlock a DRBG.
=head2 Rand Parameters
See L<OSSL_PARAM(3)> for further details on the parameters structure used by
these functions.
-OP_rand_get_params() gets details of parameter values associated with the
+OSSL_FUNC_rand_get_params() gets details of parameter values associated with the
provider algorithm and stores them in I<params>.
-OP_rand_set_ctx_params() sets rand parameters associated with the given
+OSSL_FUNC_rand_set_ctx_params() sets rand parameters associated with the given
provider side rand context I<ctx> to I<params>.
Any parameter settings are additional to any that were previously set.
-OP_rand_get_ctx_params() gets details of currently set parameter values
+OSSL_FUNC_rand_get_ctx_params() gets details of currently set parameter values
associated with the given provider side rand context I<ctx> and stores them
in I<params>.
-OP_rand_gettable_params(), OP_rand_gettable_ctx_params(), and
-OP_rand_settable_ctx_params() all return constant B<OSSL_PARAM> arrays
-as descriptors of the parameters that OP_rand_get_params(),
-OP_rand_get_ctx_params(), and OP_rand_set_ctx_params() can handle,
+OSSL_FUNC_rand_gettable_params(), OSSL_FUNC_rand_gettable_ctx_params(), and
+OSSL_FUNC_rand_settable_ctx_params() all return constant B<OSSL_PARAM> arrays
+as descriptors of the parameters that OSSL_FUNC_rand_get_params(),
+OSSL_FUNC_rand_get_ctx_params(), and OSSL_FUNC_rand_set_ctx_params() can handle,
respectively.
Parameters currently recognised by built-in rands are as follows. Not all
=item "max_request" (B<OSSL_DRBG_PARAM_RESEED_REQUESTS>) <unsigned integer>
Specifies the maximum number of bytes that can be generated in a single
-call to OP_rand_generate.
+call to OSSL_FUNC_rand_generate.
=item "min_entropylen" (B<OSSL_DRBG_PARAM_MIN_ENTROPYLEN>) <unsigned integer>
=head1 RETURN VALUES
-OP_rand_newctx() should return the newly created
+OSSL_FUNC_rand_newctx() should return the newly created
provider side rand context, or NULL on failure.
-OP_rand_gettable_params(), OP_rand_gettable_ctx_params() and
-OP_rand_settable_ctx_params() should return a constant B<OSSL_PARAM>
+OSSL_FUNC_rand_gettable_params(), OSSL_FUNC_rand_gettable_ctx_params() and
+OSSL_FUNC_rand_settable_ctx_params() should return a constant B<OSSL_PARAM>
array, or NULL if none is offered.
-OP_rand_nonce() returns the size of the generated nonce, or 0 on error.
+OSSL_FUNC_rand_nonce() returns the size of the generated nonce, or 0 on error.
All of the remaining functions should return 1 for success or 0 on error.
*/
/* Functions to construct / destruct / manipulate the serializer context */
- void *OP_serializer_newctx(void *provctx);
- void OP_serializer_freectx(void *ctx);
- int OP_serializer_set_ctx_params(void *ctx, const OSSL_PARAM params[]);
- const OSSL_PARAM *OP_serializer_settable_ctx_params(void)
+ void *OSSL_FUNC_serializer_newctx(void *provctx);
+ void OSSL_FUNC_serializer_freectx(void *ctx);
+ int OSSL_FUNC_serializer_set_ctx_params(void *ctx, const OSSL_PARAM params[]);
+ const OSSL_PARAM *OSSL_FUNC_serializer_settable_ctx_params(void)
/* Functions to serialize object data */
- int OP_serializer_serialize_data(void *ctx, const OSSL_PARAM *data,
- OSSL_CORE_BIO *out,
- OSSL_PASSPHRASE_CALLBACK *cb,
- void *cbarg);
- int OP_serializer_serialize_object(void *ctx, void *obj, OSSL_CORE_BIO *out,
- OSSL_PASSPHRASE_CALLBACK *cb,
- void *cbarg);
+ int OSSL_FUNC_serializer_serialize_data(void *ctx, const OSSL_PARAM *data,
+ OSSL_CORE_BIO *out,
+ OSSL_PASSPHRASE_CALLBACK *cb,
+ void *cbarg);
+ int OSSL_FUNC_serializer_serialize_object(void *ctx, void *obj, OSSL_CORE_BIO *out,
+ OSSL_PASSPHRASE_CALLBACK *cb,
+ void *cbarg);
=head1 DESCRIPTION
All these "functions" have a corresponding function type definition
named B<OSSL_{name}_fn>, and a helper function to retrieve the
function pointer from a B<OSSL_DISPATCH> element named
-B<OSSL_get_{name}>.
-For example, the "function" OP_serializer_serialize_data() has these:
+B<OSSL_FUNC_{name}>.
+For example, the "function" OSSL_FUNC_serializer_serialize_data() has these:
typedef int
- (OSSL_OP_serializer_serialize_data_fn)(void *provctx,
+ (OSSL_FUNC_serializer_serialize_data_fn)(void *provctx,
const OSSL_PARAM params[],
OSSL_CORE_BIO *out);
- static ossl_inline OSSL_OP_serializer_serialize_data_fn
- OSSL_get_OP_serializer_serialize_data(const OSSL_DISPATCH *opf);
+ static ossl_inline OSSL_FUNC_serializer_serialize_data_fn
+ OSSL_FUNC_serializer_serialize_data(const OSSL_DISPATCH *opf);
B<OSSL_DISPATCH> arrays are indexed by numbers that are provided as
macros in L<openssl-core_dispatch.h(7)>, as follows:
- OP_serializer_newctx OSSL_FUNC_SERIALIZER_NEWCTX
- OP_serializer_freectx OSSL_FUNC_SERIALIZER_FREECTX
- OP_serializer_set_ctx_params OSSL_FUNC_SERIALIZER_SET_CTX_PARAMS
- OP_serializer_settable_ctx_params OSSL_FUNC_SERIALIZER_SETTABLE_CTX_PARAMS
+ OSSL_FUNC_serializer_newctx OSSL_FUNC_SERIALIZER_NEWCTX
+ OSSL_FUNC_serializer_freectx OSSL_FUNC_SERIALIZER_FREECTX
+ OSSL_FUNC_serializer_set_ctx_params OSSL_FUNC_SERIALIZER_SET_CTX_PARAMS
+ OSSL_FUNC_serializer_settable_ctx_params OSSL_FUNC_SERIALIZER_SETTABLE_CTX_PARAMS
- OP_serializer_serialize_data OSSL_FUNC_SERIALIZER_SERIALIZE_DATA
- OP_serializer_serialize_object OSSL_FUNC_SERIALIZER_SERIALIZE_OBJECT
+ OSSL_FUNC_serializer_serialize_data OSSL_FUNC_SERIALIZER_SERIALIZE_DATA
+ OSSL_FUNC_serializer_serialize_object OSSL_FUNC_SERIALIZER_SERIALIZE_OBJECT
=head2 Names and properties
=head2 Context functions
-OP_serializer_newctx() returns a context to be used with the rest of
+OSSL_FUNC_serializer_newctx() returns a context to be used with the rest of
the functions.
-OP_serializer_freectx() frees the given I<ctx>, if it was created by
-OP_serializer_newctx().
+OSSL_FUNC_serializer_freectx() frees the given I<ctx>, if it was created by
+OSSL_FUNC_serializer_newctx().
-OP_serializer_set_ctx_params() sets context data according to
+OSSL_FUNC_serializer_set_ctx_params() sets context data according to
parameters from I<params> that it recognises. Unrecognised parameters
should be ignored.
-OP_serializer_settable_ctx_params() returns a constant B<OSSL_PARAM>
-array describing the parameters that OP_serializer_set_ctx_params()
+OSSL_FUNC_serializer_settable_ctx_params() returns a constant B<OSSL_PARAM>
+array describing the parameters that OSSL_FUNC_serializer_set_ctx_params()
can handle.
See L<OSSL_PARAM(3)> for further details on the parameters structure used
-by OP_serializer_set_ctx_params() and OP_serializer_settable_ctx_params().
+by OSSL_FUNC_serializer_set_ctx_params() and OSSL_FUNC_serializer_settable_ctx_params().
=head2 Serializing functions
=for comment There will be a "Deserializing functions" title as well
-OP_serializer_serialize_data() should take an array of B<OSSL_PARAM>,
+OSSL_FUNC_serializer_serialize_data() should take an array of B<OSSL_PARAM>,
I<data>, and if it contains the data necessary for the object type
that the implementation handles, it should output the object in
serialized form to the B<OSSL_CORE_BIO>.
-OP_serializer_serialize_object() should take a pointer to an object
+OSSL_FUNC_serializer_serialize_object() should take a pointer to an object
that it knows intimately, and output that object in serialized form to
the B<OSSL_CORE_BIO>. The caller I<must> ensure that this function is called
with a pointer that the provider of this function is familiar with.
If this name is invalid for the serialization implementation, the
implementation should refuse to perform the serialization, i.e.
-OP_serializer_serialize_data() and OP_serializer_serialize_object()
+OSSL_FUNC_serializer_serialize_data() and OSSL_FUNC_serializer_serialize_object()
should return an error.
=item "properties" (B<OSSL_SERIALIZER_PARAM_PROPERTIES>) <UTF8 string>
=head1 RETURN VALUES
-OP_serializer_newctx() returns a pointer to a context, or NULL on
+OSSL_FUNC_serializer_newctx() returns a pointer to a context, or NULL on
failure.
-OP_serializer_set_ctx_params() returns 1, unless a recognised
+OSSL_FUNC_serializer_set_ctx_params() returns 1, unless a recognised
parameters was invalid or caused an error, for which 0 is returned.
-OP_serializer_settable_ctx_params() returns a pointer to an array of
+OSSL_FUNC_serializer_settable_ctx_params() returns a pointer to an array of
constant B<OSSL_PARAM> elements.
-OP_serializer_serialize_data() and OP_serializer_serialize_object()
+OSSL_FUNC_serializer_serialize_data() and OSSL_FUNC_serializer_serialize_object()
return 1 on success, or 0 on failure.
=head1 SEE ALSO
*/
/* Context management */
- void *OP_signature_newctx(void *provctx);
- void OP_signature_freectx(void *ctx);
- void *OP_signature_dupctx(void *ctx);
+ void *OSSL_FUNC_signature_newctx(void *provctx);
+ void OSSL_FUNC_signature_freectx(void *ctx);
+ void *OSSL_FUNC_signature_dupctx(void *ctx);
/* Signing */
- int OP_signature_sign_init(void *ctx, void *provkey);
- int OP_signature_sign(void *ctx, unsigned char *sig, size_t *siglen,
- size_t sigsize, const unsigned char *tbs, size_t tbslen);
+ int OSSL_FUNC_signature_sign_init(void *ctx, void *provkey);
+ int OSSL_FUNC_signature_sign(void *ctx, unsigned char *sig, size_t *siglen,
+ size_t sigsize, const unsigned char *tbs, size_t tbslen);
/* Verifying */
- int OP_signature_verify_init(void *ctx, void *provkey);
- int OP_signature_verify(void *ctx, const unsigned char *sig, size_t siglen,
- const unsigned char *tbs, size_t tbslen);
+ int OSSL_FUNC_signature_verify_init(void *ctx, void *provkey);
+ int OSSL_FUNC_signature_verify(void *ctx, const unsigned char *sig, size_t siglen,
+ const unsigned char *tbs, size_t tbslen);
/* Verify Recover */
- int OP_signature_verify_recover_init(void *ctx, void *provkey);
- int OP_signature_verify_recover(void *ctx, unsigned char *rout,
- size_t *routlen, size_t routsize,
- const unsigned char *sig, size_t siglen);
+ int OSSL_FUNC_signature_verify_recover_init(void *ctx, void *provkey);
+ int OSSL_FUNC_signature_verify_recover(void *ctx, unsigned char *rout,
+ size_t *routlen, size_t routsize,
+ const unsigned char *sig, size_t siglen);
/* Digest Sign */
- int OP_signature_digest_sign_init(void *ctx, const char *mdname,
- const char *props, void *provkey);
- int OP_signature_digest_sign_update(void *ctx, const unsigned char *data,
+ int OSSL_FUNC_signature_digest_sign_init(void *ctx, const char *mdname,
+ const char *props, void *provkey);
+ int OSSL_FUNC_signature_digest_sign_update(void *ctx, const unsigned char *data,
size_t datalen);
- int OP_signature_digest_sign_final(void *ctx, unsigned char *sig,
- size_t *siglen, size_t sigsize);
- int OP_signature_digest_sign(void *ctx, unsigned char *sigret, size_t *siglen,
+ int OSSL_FUNC_signature_digest_sign_final(void *ctx, unsigned char *sig,
+ size_t *siglen, size_t sigsize);
+ int OSSL_FUNC_signature_digest_sign(void *ctx,
+ unsigned char *sigret, size_t *siglen,
size_t sigsize, const unsigned char *tbs,
size_t tbslen);
/* Digest Verify */
- int OP_signature_digest_verify_init(void *ctx, const char *mdname,
- const char *props, void *provkey);
- int OP_signature_digest_verify_update(void *ctx, const unsigned char *data,
- size_t datalen);
- int OP_signature_digest_verify_final(void *ctx, const unsigned char *sig,
+ int OSSL_FUNC_signature_digest_verify_init(void *ctx, const char *mdname,
+ const char *props, void *provkey);
+ int OSSL_FUNC_signature_digest_verify_update(void *ctx,
+ const unsigned char *data,
+ size_t datalen);
+ int OSSL_FUNC_signature_digest_verify_final(void *ctx, const unsigned char *sig,
size_t siglen);
- int OP_signature_digest_verify(void *ctx, const unsigned char *sig,
+ int OSSL_FUNC_signature_digest_verify(void *ctx, const unsigned char *sig,
size_t siglen, const unsigned char *tbs,
size_t tbslen);
/* Signature parameters */
- int OP_signature_get_ctx_params(void *ctx, OSSL_PARAM params[]);
- const OSSL_PARAM *OP_signature_gettable_ctx_params(void);
- int OP_signature_set_ctx_params(void *ctx, const OSSL_PARAM params[]);
- const OSSL_PARAM *OP_signature_settable_ctx_params(void);
+ int OSSL_FUNC_signature_get_ctx_params(void *ctx, OSSL_PARAM params[]);
+ const OSSL_PARAM *OSSL_FUNC_signature_gettable_ctx_params(void);
+ int OSSL_FUNC_signature_set_ctx_params(void *ctx, const OSSL_PARAM params[]);
+ const OSSL_PARAM *OSSL_FUNC_signature_settable_ctx_params(void);
/* MD parameters */
- int OP_signature_get_ctx_md_params(void *ctx, OSSL_PARAM params[]);
- const OSSL_PARAM * OP_signature_gettable_ctx_md_params(void *ctx);
- int OP_signature_set_ctx_md_params(void *ctx, const OSSL_PARAM params[]);
- const OSSL_PARAM * OP_signature_settable_ctx_md_params(void *ctx);
+ int OSSL_FUNC_signature_get_ctx_md_params(void *ctx, OSSL_PARAM params[]);
+ const OSSL_PARAM * OSSL_FUNC_signature_gettable_ctx_md_params(void *ctx);
+ int OSSL_FUNC_signature_set_ctx_md_params(void *ctx, const OSSL_PARAM params[]);
+ const OSSL_PARAM * OSSL_FUNC_signature_settable_ctx_md_params(void *ctx);
=head1 DESCRIPTION
All these "functions" have a corresponding function type definition
named B<OSSL_{name}_fn>, and a helper function to retrieve the
function pointer from an B<OSSL_DISPATCH> element named
-B<OSSL_get_{name}>.
-For example, the "function" OP_signature_newctx() has these:
+B<OSSL_FUNC_{name}>.
+For example, the "function" OSSL_FUNC_signature_newctx() has these:
- typedef void *(OSSL_OP_signature_newctx_fn)(void *provctx);
- static ossl_inline OSSL_OP_signature_newctx_fn
- OSSL_get_OP_signature_newctx(const OSSL_DISPATCH *opf);
+ typedef void *(OSSL_FUNC_signature_newctx_fn)(void *provctx);
+ static ossl_inline OSSL_FUNC_signature_newctx_fn
+ OSSL_FUNC_signature_newctx(const OSSL_DISPATCH *opf);
B<OSSL_DISPATCH> arrays are indexed by numbers that are provided as
macros in L<openssl-core_dispatch.h(7)>, as follows:
- OP_signature_newctx OSSL_FUNC_SIGNATURE_NEWCTX
- OP_signature_freectx OSSL_FUNC_SIGNATURE_FREECTX
- OP_signature_dupctx OSSL_FUNC_SIGNATURE_DUPCTX
+ OSSL_FUNC_signature_newctx OSSL_FUNC_SIGNATURE_NEWCTX
+ OSSL_FUNC_signature_freectx OSSL_FUNC_SIGNATURE_FREECTX
+ OSSL_FUNC_signature_dupctx OSSL_FUNC_SIGNATURE_DUPCTX
- OP_signature_sign_init OSSL_FUNC_SIGNATURE_SIGN_INIT
- OP_signature_sign OSSL_FUNC_SIGNATURE_SIGN
+ OSSL_FUNC_signature_sign_init OSSL_FUNC_SIGNATURE_SIGN_INIT
+ OSSL_FUNC_signature_sign OSSL_FUNC_SIGNATURE_SIGN
- OP_signature_verify_init OSSL_FUNC_SIGNATURE_VERIFY_INIT
- OP_signature_verify OSSL_FUNC_SIGNATURE_VERIFY
+ OSSL_FUNC_signature_verify_init OSSL_FUNC_SIGNATURE_VERIFY_INIT
+ OSSL_FUNC_signature_verify OSSL_FUNC_SIGNATURE_VERIFY
- OP_signature_verify_recover_init OSSL_FUNC_SIGNATURE_VERIFY_RECOVER_INIT
- OP_signature_verify_recover OSSL_FUNC_SIGNATURE_VERIFY_RECOVER
+ OSSL_FUNC_signature_verify_recover_init OSSL_FUNC_SIGNATURE_VERIFY_RECOVER_INIT
+ OSSL_FUNC_signature_verify_recover OSSL_FUNC_SIGNATURE_VERIFY_RECOVER
- OP_signature_digest_sign_init OSSL_FUNC_SIGNATURE_DIGEST_SIGN_INIT
- OP_signature_digest_sign_update OSSL_FUNC_SIGNATURE_DIGEST_SIGN_UPDATE
- OP_signature_digest_sign_final OSSL_FUNC_SIGNATURE_DIGEST_SIGN_FINAL
- OP_signature_digest_sign OSSL_FUNC_SIGNATURE_DIGEST_SIGN
+ OSSL_FUNC_signature_digest_sign_init OSSL_FUNC_SIGNATURE_DIGEST_SIGN_INIT
+ OSSL_FUNC_signature_digest_sign_update OSSL_FUNC_SIGNATURE_DIGEST_SIGN_UPDATE
+ OSSL_FUNC_signature_digest_sign_final OSSL_FUNC_SIGNATURE_DIGEST_SIGN_FINAL
+ OSSL_FUNC_signature_digest_sign OSSL_FUNC_SIGNATURE_DIGEST_SIGN
- OP_signature_digest_verify_init OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_INIT
- OP_signature_digest_verify_update OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_UPDATE
- OP_signature_digest_verify_final OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_FINAL
- OP_signature_digest_verify OSSL_FUNC_SIGNATURE_DIGEST_VERIFY
+ OSSL_FUNC_signature_digest_verify_init OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_INIT
+ OSSL_FUNC_signature_digest_verify_update OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_UPDATE
+ OSSL_FUNC_signature_digest_verify_final OSSL_FUNC_SIGNATURE_DIGEST_VERIFY_FINAL
+ OSSL_FUNC_signature_digest_verify OSSL_FUNC_SIGNATURE_DIGEST_VERIFY
- OP_signature_get_ctx_params OSSL_FUNC_SIGNATURE_GET_CTX_PARAMS
- OP_signature_gettable_ctx_params OSSL_FUNC_SIGNATURE_GETTABLE_CTX_PARAMS
- OP_signature_set_ctx_params OSSL_FUNC_SIGNATURE_SET_CTX_PARAMS
- OP_signature_settable_ctx_params OSSL_FUNC_SIGNATURE_SETTABLE_CTX_PARAMS
+ OSSL_FUNC_signature_get_ctx_params OSSL_FUNC_SIGNATURE_GET_CTX_PARAMS
+ OSSL_FUNC_signature_gettable_ctx_params OSSL_FUNC_SIGNATURE_GETTABLE_CTX_PARAMS
+ OSSL_FUNC_signature_set_ctx_params OSSL_FUNC_SIGNATURE_SET_CTX_PARAMS
+ OSSL_FUNC_signature_settable_ctx_params OSSL_FUNC_SIGNATURE_SETTABLE_CTX_PARAMS
- OP_signature_get_ctx_md_params OSSL_FUNC_SIGNATURE_GET_CTX_MD_PARAMS
- OP_signature_gettable_ctx_md_params OSSL_FUNC_SIGNATURE_GETTABLE_CTX_MD_PARAMS
- OP_signature_set_ctx_md_params OSSL_FUNC_SIGNATURE_SET_CTX_MD_PARAMS
- OP_signature_settable_ctx_md_params OSSL_FUNC_SIGNATURE_SETTABLE_CTX_MD_PARAMS
+ OSSL_FUNC_signature_get_ctx_md_params OSSL_FUNC_SIGNATURE_GET_CTX_MD_PARAMS
+ OSSL_FUNC_signature_gettable_ctx_md_params OSSL_FUNC_SIGNATURE_GETTABLE_CTX_MD_PARAMS
+ OSSL_FUNC_signature_set_ctx_md_params OSSL_FUNC_SIGNATURE_SET_CTX_MD_PARAMS
+ OSSL_FUNC_signature_settable_ctx_md_params OSSL_FUNC_SIGNATURE_SETTABLE_CTX_MD_PARAMS
A signature algorithm implementation may not implement all of these functions.
In order to be a consistent set of functions we must have at least a set of
-context functions (OP_signature_newctx and OP_signature_freectx) as well as a
+context functions (OSSL_FUNC_signature_newctx and OSSL_FUNC_signature_freectx) as well as a
set of "signature" functions, i.e. at least one of:
=over 4
-=item OP_signature_sign_init and OP_signature_sign
+=item OSSL_FUNC_signature_sign_init and OSSL_FUNC_signature_sign
-=item OP_signature_verify_init and OP_signature_verify
+=item OSSL_FUNC_signature_verify_init and OSSL_FUNC_signature_verify
-=item OP_signature_verify_recover_init and OP_signature_verify_init
+=item OSSL_FUNC_signature_verify_recover_init and OSSL_FUNC_signature_verify_init
-=item OP_signature_digest_sign_init, OP_signature_digest_sign_update and OP_signature_digest_sign_final
+=item OSSL_FUNC_signature_digest_sign_init, OSSL_FUNC_signature_digest_sign_update and OSSL_FUNC_signature_digest_sign_final
-=item OP_signature_digest_verify_init, OP_signature_digest_verify_update and OP_signature_digest_verify_final
+=item OSSL_FUNC_signature_digest_verify_init, OSSL_FUNC_signature_digest_verify_update and OSSL_FUNC_signature_digest_verify_final
-=item OP_signature_digest_sign_init and OP_signature_digest_sign
+=item OSSL_FUNC_signature_digest_sign_init and OSSL_FUNC_signature_digest_sign
-=item OP_signature_digest_verify_init and OP_signature_digest_verify
+=item OSSL_FUNC_signature_digest_verify_init and OSSL_FUNC_signature_digest_verify
=back
-OP_signature_set_ctx_params and OP_signature_settable_ctx_params are optional,
+OSSL_FUNC_signature_set_ctx_params and OSSL_FUNC_signature_settable_ctx_params are optional,
but if one of them is present then the other one must also be present. The same
-applies to OP_signature_get_ctx_params and OP_signature_gettable_ctx_params, as
-well as the "md_params" functions. The OP_signature_dupctx function is optional.
+applies to OSSL_FUNC_signature_get_ctx_params and OSSL_FUNC_signature_gettable_ctx_params, as
+well as the "md_params" functions. The OSSL_FUNC_signature_dupctx function is optional.
A signature algorithm must also implement some mechanism for generating,
loading or importing keys via the key management (OSSL_OP_KEYMGMT) operation.
=head2 Context Management Functions
-OP_signature_newctx() should create and return a pointer to a provider side
+OSSL_FUNC_signature_newctx() should create and return a pointer to a provider side
structure for holding context information during a signature operation.
A pointer to this context will be passed back in a number of the other signature
operation function calls.
The parameter I<provctx> is the provider context generated during provider
initialisation (see L<provider(7)>).
-OP_signature_freectx() is passed a pointer to the provider side signature
+OSSL_FUNC_signature_freectx() is passed a pointer to the provider side signature
context in the I<ctx> parameter.
This function should free any resources associated with that context.
-OP_signature_dupctx() should duplicate the provider side signature context in
+OSSL_FUNC_signature_dupctx() should duplicate the provider side signature context in
the I<ctx> parameter and return the duplicate copy.
=head2 Signing Functions
-OP_signature_sign_init() initialises a context for signing given a provider side
+OSSL_FUNC_signature_sign_init() initialises a context for signing given a provider side
signature context in the I<ctx> parameter, and a pointer to a provider key object
in the I<provkey> parameter.
The key object should have been previously generated, loaded or imported into
the provider using the key management (OSSL_OP_KEYMGMT) operation (see
provider-keymgmt(7)>.
-OP_signature_sign() performs the actual signing itself.
+OSSL_FUNC_signature_sign() performs the actual signing itself.
A previously initialised signature context is passed in the I<ctx>
parameter.
The data to be signed is pointed to be the I<tbs> parameter which is I<tbslen>
=head2 Verify Functions
-OP_signature_verify_init() initialises a context for verifying a signature given
+OSSL_FUNC_signature_verify_init() initialises a context for verifying a signature given
a provider side signature context in the I<ctx> parameter, and a pointer to a
provider key object in the I<provkey> parameter.
The key object should have been previously generated, loaded or imported into
the provider using the key management (OSSL_OP_KEYMGMT) operation (see
provider-keymgmt(7)>.
-OP_signature_verify() performs the actual verification itself.
+OSSL_FUNC_signature_verify() performs the actual verification itself.
A previously initialised signature context is passed in the I<ctx> parameter.
The data that the signature covers is pointed to be the I<tbs> parameter which
is I<tbslen> bytes long.
=head2 Verify Recover Functions
-OP_signature_verify_recover_init() initialises a context for recovering the
+OSSL_FUNC_signature_verify_recover_init() initialises a context for recovering the
signed data given a provider side signature context in the I<ctx> parameter, and
a pointer to a provider key object in the I<provkey> parameter.
The key object should have been previously generated, loaded or imported into
the provider using the key management (OSSL_OP_KEYMGMT) operation (see
provider-keymgmt(7)>.
-OP_signature_verify_recover() performs the actual verify recover itself.
+OSSL_FUNC_signature_verify_recover() performs the actual verify recover itself.
A previously initialised signature context is passed in the I<ctx> parameter.
The signature is pointed to by the I<sig> parameter which is I<siglen> bytes
long.
=head2 Digest Sign Functions
-OP_signature_digeset_sign_init() initialises a context for signing given a
+OSSL_FUNC_signature_digeset_sign_init() initialises a context for signing given a
provider side signature context in the I<ctx> parameter, and a pointer to a
provider key object in the I<provkey> parameter. The key object should have been
previously generated, loaded or imported into the provider using the
also be properties to be used in fetching the digest in the I<props> parameter,
although this may be ignored by providers.
-OP_signature_digest_sign_update() provides data to be signed in the I<data>
+OSSL_FUNC_signature_digest_sign_update() provides data to be signed in the I<data>
parameter which should be of length I<datalen>. A previously initialised
signature context is passed in the I<ctx> parameter. This function may be called
multiple times to cumulatively add data to be signed.
-OP_signature_digest_sign_final() finalises a signature operation previously
-started through OP_signature_digest_sign_init() and
-OP_signature_digest_sign_update() calls. Once finalised no more data will be
-added through OP_signature_digest_sign_update(). A previously initialised
+OSSL_FUNC_signature_digest_sign_final() finalises a signature operation previously
+started through OSSL_FUNC_signature_digest_sign_init() and
+OSSL_FUNC_signature_digest_sign_update() calls. Once finalised no more data will be
+added through OSSL_FUNC_signature_digest_sign_update(). A previously initialised
signature context is passed in the I<ctx> parameter. Unless I<sig> is NULL, the
signature should be written to the location pointed to by the I<sig> parameter
and it should not exceed I<sigsize> bytes in length. The length of the signature
should be written to I<*siglen>. If I<sig> is NULL then the maximum length of
the signature should be written to I<*siglen>.
-OP_signature_digest_sign() implements a "one shot" digest sign operation
-previously started through OP_signature_digeset_sign_init(). A previously
+OSSL_FUNC_signature_digest_sign() implements a "one shot" digest sign operation
+previously started through OSSL_FUNC_signature_digeset_sign_init(). A previously
initialised signature context is passed in the I<ctx> parameter. The data to be
signed is in I<tbs> which should be I<tbslen> bytes long. Unless I<sig> is NULL,
the signature should be written to the location pointed to by the I<sig>
=head2 Digest Verify Functions
-OP_signature_digeset_verify_init() initialises a context for verifying given a
+OSSL_FUNC_signature_digeset_verify_init() initialises a context for verifying given a
provider side verification context in the I<ctx> parameter, and a pointer to a
provider key object in the I<provkey> parameter. The key object should have been
previously generated, loaded or imported into the provider using the
also be properties to be used in fetching the digest in the I<props> parameter,
although this may be ignored by providers.
-OP_signature_digest_verify_update() provides data to be verified in the I<data>
+OSSL_FUNC_signature_digest_verify_update() provides data to be verified in the I<data>
parameter which should be of length I<datalen>. A previously initialised
verification context is passed in the I<ctx> parameter. This function may be
called multiple times to cumulatively add data to be verified.
-OP_signature_digest_verify_final() finalises a verification operation previously
-started through OP_signature_digest_verify_init() and
-OP_signature_digest_verify_update() calls. Once finalised no more data will be
-added through OP_signature_digest_verify_update(). A previously initialised
+OSSL_FUNC_signature_digest_verify_final() finalises a verification operation previously
+started through OSSL_FUNC_signature_digest_verify_init() and
+OSSL_FUNC_signature_digest_verify_update() calls. Once finalised no more data will be
+added through OSSL_FUNC_signature_digest_verify_update(). A previously initialised
verification context is passed in the I<ctx> parameter. The signature to be
verified is in I<sig> which is I<siglen> bytes long.
-OP_signature_digest_verify() implements a "one shot" digest verify operation
-previously started through OP_signature_digeset_verify_init(). A previously
+OSSL_FUNC_signature_digest_verify() implements a "one shot" digest verify operation
+previously started through OSSL_FUNC_signature_digeset_verify_init(). A previously
initialised verification context is passed in the I<ctx> parameter. The data to be
verified is in I<tbs> which should be I<tbslen> bytes long. The signature to be
verified is in I<sig> which is I<siglen> bytes long.
=head2 Signature parameters
See L<OSSL_PARAM(3)> for further details on the parameters structure used by
-the OP_signature_get_ctx_params() and OP_signature_set_ctx_params() functions.
+the OSSL_FUNC_signature_get_ctx_params() and OSSL_FUNC_signature_set_ctx_params() functions.
-OP_signature_get_ctx_params() gets signature parameters associated with the
+OSSL_FUNC_signature_get_ctx_params() gets signature parameters associated with the
given provider side signature context I<ctx> and stored them in I<params>.
-OP_signature_set_ctx_params() sets the signature parameters associated with the
+OSSL_FUNC_signature_set_ctx_params() sets the signature parameters associated with the
given provider side signature context I<ctx> to I<params>.
Any parameter settings are additional to any that were previously set.
=back
-OP_signature_gettable_ctx_params() and OP_signature_settable_ctx_params() get a
+OSSL_FUNC_signature_gettable_ctx_params() and OSSL_FUNC_signature_settable_ctx_params() get a
constant B<OSSL_PARAM> array that describes the gettable and settable parameters,
-i.e. parameters that can be used with OP_signature_get_ctx_params() and
-OP_signature_set_ctx_params() respectively.
+i.e. parameters that can be used with OSSL_FUNC_signature_get_ctx_params() and
+OSSL_FUNC_signature_set_ctx_params() respectively.
See L<OSSL_PARAM(3)> for the use of B<OSSL_PARAM> as parameter descriptor.
=head2 MD parameters
See L<OSSL_PARAM(3)> for further details on the parameters structure used by
-the OP_signature_get_md_ctx_params() and OP_signature_set_md_ctx_params()
+the OSSL_FUNC_signature_get_md_ctx_params() and OSSL_FUNC_signature_set_md_ctx_params()
functions.
-OP_signature_get_md_ctx_params() gets digest parameters associated with the
+OSSL_FUNC_signature_get_md_ctx_params() gets digest parameters associated with the
given provider side digest signature context I<ctx> and stores them in I<params>.
-OP_signature_set_ms_ctx_params() sets the digest parameters associated with the
+OSSL_FUNC_signature_set_ms_ctx_params() sets the digest parameters associated with the
given provider side digest signature context I<ctx> to I<params>.
Any parameter settings are additional to any that were previously set.
as those for built-in digest algorithms. See
L<provider-digest(7)/Digest Parameters> for further information.
-OP_signature_gettable_md_ctx_params() and OP_signature_settable_md_ctx_params()
+OSSL_FUNC_signature_gettable_md_ctx_params() and OSSL_FUNC_signature_settable_md_ctx_params()
get a constant B<OSSL_PARAM> array that describes the gettable and settable
digest parameters, i.e. parameters that can be used with
-OP_signature_get_md_ctx_params() and OP_signature_set_md_ctx_params()
+OSSL_FUNC_signature_get_md_ctx_params() and OSSL_FUNC_signature_set_md_ctx_params()
respectively. See L<OSSL_PARAM(3)> for the use of B<OSSL_PARAM> as parameter
descriptor.
=head1 RETURN VALUES
-OP_signature_newctx() and OP_signature_dupctx() should return the newly created
+OSSL_FUNC_signature_newctx() and OSSL_FUNC_signature_dupctx() should return the newly created
provider side signature, or NULL on failure.
-OP_signature_gettable_ctx_params(), OP_signature_settable_ctx_params(),
-OP_signature_gettable_md_ctx_params() and OP_signature_settable_md_ctx_params(),
+OSSL_FUNC_signature_gettable_ctx_params(), OSSL_FUNC_signature_settable_ctx_params(),
+OSSL_FUNC_signature_gettable_md_ctx_params() and OSSL_FUNC_signature_settable_md_ctx_params(),
return the gettable or settable parameters in a constant B<OSSL_PARAM> array.
All other functions should return 1 for success or 0 on error.
CRYPTO_REF_COUNT refcnt;
CRYPTO_RWLOCK *lock;
- OSSL_OP_mac_newctx_fn *newctx;
- OSSL_OP_mac_dupctx_fn *dupctx;
- OSSL_OP_mac_freectx_fn *freectx;
- OSSL_OP_mac_size_fn *size;
- OSSL_OP_mac_init_fn *init;
- OSSL_OP_mac_update_fn *update;
- OSSL_OP_mac_final_fn *final;
- OSSL_OP_mac_gettable_params_fn *gettable_params;
- OSSL_OP_mac_gettable_ctx_params_fn *gettable_ctx_params;
- OSSL_OP_mac_settable_ctx_params_fn *settable_ctx_params;
- OSSL_OP_mac_get_params_fn *get_params;
- OSSL_OP_mac_get_ctx_params_fn *get_ctx_params;
- OSSL_OP_mac_set_ctx_params_fn *set_ctx_params;
+ OSSL_FUNC_mac_newctx_fn *newctx;
+ OSSL_FUNC_mac_dupctx_fn *dupctx;
+ OSSL_FUNC_mac_freectx_fn *freectx;
+ OSSL_FUNC_mac_size_fn *size;
+ OSSL_FUNC_mac_init_fn *init;
+ OSSL_FUNC_mac_update_fn *update;
+ OSSL_FUNC_mac_final_fn *final;
+ OSSL_FUNC_mac_gettable_params_fn *gettable_params;
+ OSSL_FUNC_mac_gettable_ctx_params_fn *gettable_ctx_params;
+ OSSL_FUNC_mac_settable_ctx_params_fn *settable_ctx_params;
+ OSSL_FUNC_mac_get_params_fn *get_params;
+ OSSL_FUNC_mac_get_ctx_params_fn *get_ctx_params;
+ OSSL_FUNC_mac_set_ctx_params_fn *set_ctx_params;
};
struct evp_kdf_st {
CRYPTO_REF_COUNT refcnt;
CRYPTO_RWLOCK *lock;
- OSSL_OP_kdf_newctx_fn *newctx;
- OSSL_OP_kdf_dupctx_fn *dupctx;
- OSSL_OP_kdf_freectx_fn *freectx;
- OSSL_OP_kdf_reset_fn *reset;
- OSSL_OP_kdf_derive_fn *derive;
- OSSL_OP_kdf_gettable_params_fn *gettable_params;
- OSSL_OP_kdf_gettable_ctx_params_fn *gettable_ctx_params;
- OSSL_OP_kdf_settable_ctx_params_fn *settable_ctx_params;
- OSSL_OP_kdf_get_params_fn *get_params;
- OSSL_OP_kdf_get_ctx_params_fn *get_ctx_params;
- OSSL_OP_kdf_set_ctx_params_fn *set_ctx_params;
+ OSSL_FUNC_kdf_newctx_fn *newctx;
+ OSSL_FUNC_kdf_dupctx_fn *dupctx;
+ OSSL_FUNC_kdf_freectx_fn *freectx;
+ OSSL_FUNC_kdf_reset_fn *reset;
+ OSSL_FUNC_kdf_derive_fn *derive;
+ OSSL_FUNC_kdf_gettable_params_fn *gettable_params;
+ OSSL_FUNC_kdf_gettable_ctx_params_fn *gettable_ctx_params;
+ OSSL_FUNC_kdf_settable_ctx_params_fn *settable_ctx_params;
+ OSSL_FUNC_kdf_get_params_fn *get_params;
+ OSSL_FUNC_kdf_get_ctx_params_fn *get_ctx_params;
+ OSSL_FUNC_kdf_set_ctx_params_fn *set_ctx_params;
};
struct evp_md_st {
OSSL_PROVIDER *prov;
CRYPTO_REF_COUNT refcnt;
CRYPTO_RWLOCK *lock;
- OSSL_OP_digest_newctx_fn *newctx;
- OSSL_OP_digest_init_fn *dinit;
- OSSL_OP_digest_update_fn *dupdate;
- OSSL_OP_digest_final_fn *dfinal;
- OSSL_OP_digest_digest_fn *digest;
- OSSL_OP_digest_freectx_fn *freectx;
- OSSL_OP_digest_dupctx_fn *dupctx;
- OSSL_OP_digest_get_params_fn *get_params;
- OSSL_OP_digest_set_ctx_params_fn *set_ctx_params;
- OSSL_OP_digest_get_ctx_params_fn *get_ctx_params;
- OSSL_OP_digest_gettable_params_fn *gettable_params;
- OSSL_OP_digest_settable_ctx_params_fn *settable_ctx_params;
- OSSL_OP_digest_gettable_ctx_params_fn *gettable_ctx_params;
+ OSSL_FUNC_digest_newctx_fn *newctx;
+ OSSL_FUNC_digest_init_fn *dinit;
+ OSSL_FUNC_digest_update_fn *dupdate;
+ OSSL_FUNC_digest_final_fn *dfinal;
+ OSSL_FUNC_digest_digest_fn *digest;
+ OSSL_FUNC_digest_freectx_fn *freectx;
+ OSSL_FUNC_digest_dupctx_fn *dupctx;
+ OSSL_FUNC_digest_get_params_fn *get_params;
+ OSSL_FUNC_digest_set_ctx_params_fn *set_ctx_params;
+ OSSL_FUNC_digest_get_ctx_params_fn *get_ctx_params;
+ OSSL_FUNC_digest_gettable_params_fn *gettable_params;
+ OSSL_FUNC_digest_settable_ctx_params_fn *settable_ctx_params;
+ OSSL_FUNC_digest_gettable_ctx_params_fn *gettable_ctx_params;
} /* EVP_MD */ ;
OSSL_PROVIDER *prov;
CRYPTO_REF_COUNT refcnt;
CRYPTO_RWLOCK *lock;
- OSSL_OP_cipher_newctx_fn *newctx;
- OSSL_OP_cipher_encrypt_init_fn *einit;
- OSSL_OP_cipher_decrypt_init_fn *dinit;
- OSSL_OP_cipher_update_fn *cupdate;
- OSSL_OP_cipher_final_fn *cfinal;
- OSSL_OP_cipher_cipher_fn *ccipher;
- OSSL_OP_cipher_freectx_fn *freectx;
- OSSL_OP_cipher_dupctx_fn *dupctx;
- OSSL_OP_cipher_get_params_fn *get_params;
- OSSL_OP_cipher_get_ctx_params_fn *get_ctx_params;
- OSSL_OP_cipher_set_ctx_params_fn *set_ctx_params;
- OSSL_OP_cipher_gettable_params_fn *gettable_params;
- OSSL_OP_cipher_gettable_ctx_params_fn *gettable_ctx_params;
- OSSL_OP_cipher_settable_ctx_params_fn *settable_ctx_params;
+ OSSL_FUNC_cipher_newctx_fn *newctx;
+ OSSL_FUNC_cipher_encrypt_init_fn *einit;
+ OSSL_FUNC_cipher_decrypt_init_fn *dinit;
+ OSSL_FUNC_cipher_update_fn *cupdate;
+ OSSL_FUNC_cipher_final_fn *cfinal;
+ OSSL_FUNC_cipher_cipher_fn *ccipher;
+ OSSL_FUNC_cipher_freectx_fn *freectx;
+ OSSL_FUNC_cipher_dupctx_fn *dupctx;
+ OSSL_FUNC_cipher_get_params_fn *get_params;
+ OSSL_FUNC_cipher_get_ctx_params_fn *get_ctx_params;
+ OSSL_FUNC_cipher_set_ctx_params_fn *set_ctx_params;
+ OSSL_FUNC_cipher_gettable_params_fn *gettable_params;
+ OSSL_FUNC_cipher_gettable_ctx_params_fn *gettable_ctx_params;
+ OSSL_FUNC_cipher_settable_ctx_params_fn *settable_ctx_params;
} /* EVP_CIPHER */ ;
/* Macros to code block cipher wrappers */
* 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'
+ * - a function signature typedef with the name OSSL_FUNC_'foo'_fn
+ * - a function pointer extractor function with the name OSSL_FUNC_'foo'
*/
/*
* 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; \
+ typedef type (OSSL_FUNC_##name##_fn)args; \
static ossl_inline \
- OSSL_##name##_fn *OSSL_get_##name(const OSSL_DISPATCH *opf) \
+ OSSL_FUNC_##name##_fn *OSSL_FUNC_##name(const OSSL_DISPATCH *opf) \
{ \
- return (OSSL_##name##_fn *)opf->function; \
+ return (OSSL_FUNC_##name##_fn *)opf->function; \
}
/*
# 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,
+OSSL_CORE_MAKE_FUNC(void *, digest_newctx, (void *provctx))
+OSSL_CORE_MAKE_FUNC(int, digest_init, (void *dctx))
+OSSL_CORE_MAKE_FUNC(int, digest_update,
(void *dctx, const unsigned char *in, size_t inl))
-OSSL_CORE_MAKE_FUNC(int, OP_digest_final,
+OSSL_CORE_MAKE_FUNC(int, digest_final,
(void *dctx,
unsigned char *out, size_t *outl, size_t outsz))
-OSSL_CORE_MAKE_FUNC(int, OP_digest_digest,
+OSSL_CORE_MAKE_FUNC(int, 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(void, digest_freectx, (void *dctx))
+OSSL_CORE_MAKE_FUNC(void *, 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,
+OSSL_CORE_MAKE_FUNC(int, digest_get_params, (OSSL_PARAM params[]))
+OSSL_CORE_MAKE_FUNC(int, digest_set_ctx_params,
(void *vctx, const OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(int, OP_digest_get_ctx_params,
+OSSL_CORE_MAKE_FUNC(int, 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))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, digest_gettable_params, (void))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, digest_settable_ctx_params, (void))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, digest_gettable_ctx_params, (void))
/* Symmetric Ciphers */
# 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,
+OSSL_CORE_MAKE_FUNC(void *, cipher_newctx, (void *provctx))
+OSSL_CORE_MAKE_FUNC(int, 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,
+OSSL_CORE_MAKE_FUNC(int, 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,
+OSSL_CORE_MAKE_FUNC(int, 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,
+OSSL_CORE_MAKE_FUNC(int, cipher_final,
(void *cctx,
unsigned char *out, size_t *outl, size_t outsize))
-OSSL_CORE_MAKE_FUNC(int, OP_cipher_cipher,
+OSSL_CORE_MAKE_FUNC(int, 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_CORE_MAKE_FUNC(void, cipher_freectx, (void *cctx))
+OSSL_CORE_MAKE_FUNC(void *, cipher_dupctx, (void *cctx))
+OSSL_CORE_MAKE_FUNC(int, cipher_get_params, (OSSL_PARAM params[]))
+OSSL_CORE_MAKE_FUNC(int, cipher_get_ctx_params, (void *cctx,
OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(int, OP_cipher_set_ctx_params, (void *cctx,
+OSSL_CORE_MAKE_FUNC(int, 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))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, cipher_gettable_params, (void))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, cipher_settable_ctx_params, (void))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, cipher_gettable_ctx_params, (void))
/* MACs */
# 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,
+OSSL_CORE_MAKE_FUNC(void *, mac_newctx, (void *provctx))
+OSSL_CORE_MAKE_FUNC(void *, mac_dupctx, (void *src))
+OSSL_CORE_MAKE_FUNC(void, mac_freectx, (void *mctx))
+OSSL_CORE_MAKE_FUNC(size_t, mac_size, (void *mctx))
+OSSL_CORE_MAKE_FUNC(int, mac_init, (void *mctx))
+OSSL_CORE_MAKE_FUNC(int, mac_update,
(void *mctx, const unsigned char *in, size_t inl))
-OSSL_CORE_MAKE_FUNC(int, OP_mac_final,
+OSSL_CORE_MAKE_FUNC(int, 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,
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, mac_gettable_params, (void))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, mac_gettable_ctx_params, (void))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, mac_settable_ctx_params, (void))
+OSSL_CORE_MAKE_FUNC(int, mac_get_params, (OSSL_PARAM params[]))
+OSSL_CORE_MAKE_FUNC(int, mac_get_ctx_params,
(void *mctx, OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(int, OP_mac_set_ctx_params,
+OSSL_CORE_MAKE_FUNC(int, mac_set_ctx_params,
(void *mctx, const OSSL_PARAM params[]))
/* KDFs and PRFs */
# 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,
+OSSL_CORE_MAKE_FUNC(void *, kdf_newctx, (void *provctx))
+OSSL_CORE_MAKE_FUNC(void *, kdf_dupctx, (void *src))
+OSSL_CORE_MAKE_FUNC(void, kdf_freectx, (void *kctx))
+OSSL_CORE_MAKE_FUNC(void, kdf_reset, (void *kctx))
+OSSL_CORE_MAKE_FUNC(int, 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,
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, kdf_gettable_params, (void))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, kdf_gettable_ctx_params, (void))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, kdf_settable_ctx_params, (void))
+OSSL_CORE_MAKE_FUNC(int, kdf_get_params, (OSSL_PARAM params[]))
+OSSL_CORE_MAKE_FUNC(int, kdf_get_ctx_params,
(void *kctx, OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(int, OP_kdf_set_ctx_params,
+OSSL_CORE_MAKE_FUNC(int, kdf_set_ctx_params,
(void *kctx, const OSSL_PARAM params[]))
/* RAND */
# define OSSL_FUNC_RAND_SET_CALLBACKS 17
# define OSSL_FUNC_RAND_VERIFY_ZEROIZATION 18
-OSSL_CORE_MAKE_FUNC(void *, OP_rand_newctx,
+OSSL_CORE_MAKE_FUNC(void *,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,
+OSSL_CORE_MAKE_FUNC(void,rand_freectx, (void *vctx))
+OSSL_CORE_MAKE_FUNC(int,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,
+OSSL_CORE_MAKE_FUNC(int,rand_uninstantiate, (void *vdrbg))
+OSSL_CORE_MAKE_FUNC(int,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,
+OSSL_CORE_MAKE_FUNC(int,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,
+OSSL_CORE_MAKE_FUNC(size_t,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,
+OSSL_CORE_MAKE_FUNC(int,rand_enable_locking, (void *vctx))
+OSSL_CORE_MAKE_FUNC(int,rand_lock, (void *vctx))
+OSSL_CORE_MAKE_FUNC(void,rand_unlock, (void *vctx))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *,rand_gettable_params, (void))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *,rand_gettable_ctx_params, (void))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *,rand_settable_ctx_params, (void))
+OSSL_CORE_MAKE_FUNC(int,rand_get_params, (OSSL_PARAM params[]))
+OSSL_CORE_MAKE_FUNC(int,rand_get_ctx_params,
(void *vctx, OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(int, OP_rand_set_ctx_params,
+OSSL_CORE_MAKE_FUNC(int,rand_set_ctx_params,
(void *vctx, const OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(void, OP_rand_set_callbacks,
+OSSL_CORE_MAKE_FUNC(void,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,
+OSSL_CORE_MAKE_FUNC(int,rand_verify_zeroization,
(void *vctx))
/*-
* 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().
+ * Key objects are created with OSSL_FUNC_keymgmt_new() and destroyed with
+ * OSSL_FUNC_keymgmt_free(). Key objects can have data filled in with
+ * OSSL_FUNC_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(),
+ * present in a key object: OSSL_FUNC_keymgmt_has_parameters(),
+ * OSSL_FUNC_keymgmt_has_public_key(), and OSSL_FUNC_keymgmt_has_private_key(),
*/
/* Key data subset selection - individual bits */
/* Basic key object creation */
# define OSSL_FUNC_KEYMGMT_NEW 1
-OSSL_CORE_MAKE_FUNC(void *, OP_keymgmt_new, (void *provctx))
+OSSL_CORE_MAKE_FUNC(void *, keymgmt_new, (void *provctx))
/* Generation, a more complex constructor */
# define OSSL_FUNC_KEYMGMT_GEN_INIT 2
# 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,
+OSSL_CORE_MAKE_FUNC(void *, keymgmt_gen_init,
(void *provctx, int selection))
-OSSL_CORE_MAKE_FUNC(int, OP_keymgmt_gen_set_template,
+OSSL_CORE_MAKE_FUNC(int, keymgmt_gen_set_template,
(void *genctx, void *templ))
-OSSL_CORE_MAKE_FUNC(int, OP_keymgmt_gen_set_params,
+OSSL_CORE_MAKE_FUNC(int, 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,
+ keymgmt_gen_settable_params, (void *provctx))
+OSSL_CORE_MAKE_FUNC(int, 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,
+ keymgmt_gen_gettable_params, (void *provctx))
+OSSL_CORE_MAKE_FUNC(void *, keymgmt_gen,
(void *genctx, OSSL_CALLBACK *cb, void *cbarg))
-OSSL_CORE_MAKE_FUNC(void, OP_keymgmt_gen_cleanup, (void *genctx))
+OSSL_CORE_MAKE_FUNC(void, 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))
+OSSL_CORE_MAKE_FUNC(void, 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,
+OSSL_CORE_MAKE_FUNC(int, keymgmt_get_params,
(void *keydata, OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_keymgmt_gettable_params, (void))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, 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,
+OSSL_CORE_MAKE_FUNC(int, keymgmt_set_params,
(void *keydata, const OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_keymgmt_settable_params, (void))
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, 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,
+OSSL_CORE_MAKE_FUNC(const char *, 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))
+OSSL_CORE_MAKE_FUNC(int, 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))
+OSSL_CORE_MAKE_FUNC(int, keymgmt_validate, (void *keydata, int selection))
/* Key checks - matching */
# define OSSL_FUNC_KEYMGMT_MATCH 23
-OSSL_CORE_MAKE_FUNC(int, OP_keymgmt_match,
+OSSL_CORE_MAKE_FUNC(int, keymgmt_match,
(const void *keydata1, const void *keydata2,
int selection))
# 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,
+OSSL_CORE_MAKE_FUNC(int, keymgmt_import,
(void *keydata, int selection, const OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_keymgmt_import_types,
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, keymgmt_import_types,
(int selection))
-OSSL_CORE_MAKE_FUNC(int, OP_keymgmt_export,
+OSSL_CORE_MAKE_FUNC(int, keymgmt_export,
(void *keydata, int selection,
OSSL_CALLBACK *param_cb, void *cbarg))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_keymgmt_export_types,
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, 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,
+OSSL_CORE_MAKE_FUNC(int, keymgmt_copy,
( void *keydata_to, const void *keydata_from,
int selection))
# 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,
+OSSL_CORE_MAKE_FUNC(void *, keyexch_newctx, (void *provctx))
+OSSL_CORE_MAKE_FUNC(int, keyexch_init, (void *ctx, void *provkey))
+OSSL_CORE_MAKE_FUNC(int, 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,
+OSSL_CORE_MAKE_FUNC(int, keyexch_set_peer, (void *ctx, void *provkey))
+OSSL_CORE_MAKE_FUNC(void, keyexch_freectx, (void *ctx))
+OSSL_CORE_MAKE_FUNC(void *, keyexch_dupctx, (void *ctx))
+OSSL_CORE_MAKE_FUNC(int, keyexch_set_ctx_params, (void *ctx,
const OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_keyexch_settable_ctx_params,
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, keyexch_settable_ctx_params,
(void))
-OSSL_CORE_MAKE_FUNC(int, OP_keyexch_get_ctx_params, (void *ctx,
+OSSL_CORE_MAKE_FUNC(int, keyexch_get_ctx_params, (void *ctx,
OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_keyexch_gettable_ctx_params,
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, keyexch_gettable_ctx_params,
(void))
/* Signature */
# 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,
+OSSL_CORE_MAKE_FUNC(void *, 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,
+OSSL_CORE_MAKE_FUNC(int, signature_sign_init, (void *ctx, void *provkey))
+OSSL_CORE_MAKE_FUNC(int, 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,
+OSSL_CORE_MAKE_FUNC(int, signature_verify_init, (void *ctx, void *provkey))
+OSSL_CORE_MAKE_FUNC(int, 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,
+OSSL_CORE_MAKE_FUNC(int, signature_verify_recover_init, (void *ctx,
void *provkey))
-OSSL_CORE_MAKE_FUNC(int, OP_signature_verify_recover, (void *ctx,
+OSSL_CORE_MAKE_FUNC(int, 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,
+OSSL_CORE_MAKE_FUNC(int, signature_digest_sign_init,
(void *ctx, const char *mdname, void *provkey))
-OSSL_CORE_MAKE_FUNC(int, OP_signature_digest_sign_update,
+OSSL_CORE_MAKE_FUNC(int, signature_digest_sign_update,
(void *ctx, const unsigned char *data, size_t datalen))
-OSSL_CORE_MAKE_FUNC(int, OP_signature_digest_sign_final,
+OSSL_CORE_MAKE_FUNC(int, signature_digest_sign_final,
(void *ctx, unsigned char *sig, size_t *siglen,
size_t sigsize))
-OSSL_CORE_MAKE_FUNC(int, OP_signature_digest_sign,
+OSSL_CORE_MAKE_FUNC(int, 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,
+OSSL_CORE_MAKE_FUNC(int, signature_digest_verify_init,
(void *ctx, const char *mdname, void *provkey))
-OSSL_CORE_MAKE_FUNC(int, OP_signature_digest_verify_update,
+OSSL_CORE_MAKE_FUNC(int, signature_digest_verify_update,
(void *ctx, const unsigned char *data, size_t datalen))
-OSSL_CORE_MAKE_FUNC(int, OP_signature_digest_verify_final,
+OSSL_CORE_MAKE_FUNC(int, signature_digest_verify_final,
(void *ctx, const unsigned char *sig, size_t siglen))
-OSSL_CORE_MAKE_FUNC(int, OP_signature_digest_verify,
+OSSL_CORE_MAKE_FUNC(int, 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,
+OSSL_CORE_MAKE_FUNC(void, signature_freectx, (void *ctx))
+OSSL_CORE_MAKE_FUNC(void *, signature_dupctx, (void *ctx))
+OSSL_CORE_MAKE_FUNC(int, signature_get_ctx_params,
(void *ctx, OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_signature_gettable_ctx_params,
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, signature_gettable_ctx_params,
(void))
-OSSL_CORE_MAKE_FUNC(int, OP_signature_set_ctx_params,
+OSSL_CORE_MAKE_FUNC(int, signature_set_ctx_params,
(void *ctx, const OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_signature_settable_ctx_params,
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, signature_settable_ctx_params,
(void))
-OSSL_CORE_MAKE_FUNC(int, OP_signature_get_ctx_md_params,
+OSSL_CORE_MAKE_FUNC(int, signature_get_ctx_md_params,
(void *ctx, OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_signature_gettable_ctx_md_params,
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, signature_gettable_ctx_md_params,
(void *ctx))
-OSSL_CORE_MAKE_FUNC(int, OP_signature_set_ctx_md_params,
+OSSL_CORE_MAKE_FUNC(int, signature_set_ctx_md_params,
(void *ctx, const OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_signature_settable_ctx_md_params,
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, signature_settable_ctx_md_params,
(void *ctx))
# 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,
+OSSL_CORE_MAKE_FUNC(void *, asym_cipher_newctx, (void *provctx))
+OSSL_CORE_MAKE_FUNC(int, asym_cipher_encrypt_init, (void *ctx, void *provkey))
+OSSL_CORE_MAKE_FUNC(int, 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,
+OSSL_CORE_MAKE_FUNC(int, asym_cipher_decrypt_init, (void *ctx, void *provkey))
+OSSL_CORE_MAKE_FUNC(int, 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,
+OSSL_CORE_MAKE_FUNC(void, asym_cipher_freectx, (void *ctx))
+OSSL_CORE_MAKE_FUNC(void *, asym_cipher_dupctx, (void *ctx))
+OSSL_CORE_MAKE_FUNC(int, asym_cipher_get_ctx_params,
(void *ctx, OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_asym_cipher_gettable_ctx_params,
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, asym_cipher_gettable_ctx_params,
(void))
-OSSL_CORE_MAKE_FUNC(int, OP_asym_cipher_set_ctx_params,
+OSSL_CORE_MAKE_FUNC(int, asym_cipher_set_ctx_params,
(void *ctx, const OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_asym_cipher_settable_ctx_params,
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, asym_cipher_settable_ctx_params,
(void))
/* Serializers */
# 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,
+OSSL_CORE_MAKE_FUNC(void *, serializer_newctx, (void *provctx))
+OSSL_CORE_MAKE_FUNC(void, serializer_freectx, (void *ctx))
+OSSL_CORE_MAKE_FUNC(int, serializer_set_ctx_params,
(void *ctx, const OSSL_PARAM params[]))
-OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, OP_serializer_settable_ctx_params,
+OSSL_CORE_MAKE_FUNC(const OSSL_PARAM *, serializer_settable_ctx_params,
(void))
-OSSL_CORE_MAKE_FUNC(int, OP_serializer_serialize_data,
+OSSL_CORE_MAKE_FUNC(int, 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,
+OSSL_CORE_MAKE_FUNC(int, serializer_serialize_object,
(void *ctx, void *obj, OSSL_CORE_BIO *out,
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg))
#include "internal/cryptlib.h"
#include "prov/bio.h"
-static OSSL_BIO_new_file_fn *c_bio_new_file = NULL;
-static OSSL_BIO_new_membuf_fn *c_bio_new_membuf = NULL;
-static OSSL_BIO_read_ex_fn *c_bio_read_ex = NULL;
-static OSSL_BIO_write_ex_fn *c_bio_write_ex = NULL;
-static OSSL_BIO_free_fn *c_bio_free = NULL;
-static OSSL_BIO_vprintf_fn *c_bio_vprintf = NULL;
+static OSSL_FUNC_BIO_new_file_fn *c_bio_new_file = NULL;
+static OSSL_FUNC_BIO_new_membuf_fn *c_bio_new_membuf = NULL;
+static OSSL_FUNC_BIO_read_ex_fn *c_bio_read_ex = NULL;
+static OSSL_FUNC_BIO_write_ex_fn *c_bio_write_ex = NULL;
+static OSSL_FUNC_BIO_free_fn *c_bio_free = NULL;
+static OSSL_FUNC_BIO_vprintf_fn *c_bio_vprintf = NULL;
int ossl_prov_bio_from_dispatch(const OSSL_DISPATCH *fns)
{
switch (fns->function_id) {
case OSSL_FUNC_BIO_NEW_FILE:
if (c_bio_new_file == NULL)
- c_bio_new_file = OSSL_get_BIO_new_file(fns);
+ c_bio_new_file = OSSL_FUNC_BIO_new_file(fns);
break;
case OSSL_FUNC_BIO_NEW_MEMBUF:
if (c_bio_new_membuf == NULL)
- c_bio_new_membuf = OSSL_get_BIO_new_membuf(fns);
+ c_bio_new_membuf = OSSL_FUNC_BIO_new_membuf(fns);
break;
case OSSL_FUNC_BIO_READ_EX:
if (c_bio_read_ex == NULL)
- c_bio_read_ex = OSSL_get_BIO_read_ex(fns);
+ c_bio_read_ex = OSSL_FUNC_BIO_read_ex(fns);
break;
case OSSL_FUNC_BIO_WRITE_EX:
if (c_bio_write_ex == NULL)
- c_bio_write_ex = OSSL_get_BIO_write_ex(fns);
+ c_bio_write_ex = OSSL_FUNC_BIO_write_ex(fns);
break;
case OSSL_FUNC_BIO_FREE:
if (c_bio_free == NULL)
- c_bio_free = OSSL_get_BIO_free(fns);
+ c_bio_free = OSSL_FUNC_BIO_free(fns);
break;
case OSSL_FUNC_BIO_VPRINTF:
if (c_bio_vprintf == NULL)
- c_bio_vprintf = OSSL_get_BIO_vprintf(fns);
+ c_bio_vprintf = OSSL_FUNC_BIO_vprintf(fns);
break;
}
}
int cipher_capable_aes_cbc_hmac_sha1(void);
int cipher_capable_aes_cbc_hmac_sha256(void);
-OSSL_provider_get_capabilities_fn provider_get_capabilities;
+OSSL_FUNC_provider_get_capabilities_fn provider_get_capabilities;
* Forward declarations to ensure that interface functions are correctly
* defined.
*/
-static OSSL_provider_gettable_params_fn deflt_gettable_params;
-static OSSL_provider_get_params_fn deflt_get_params;
-static OSSL_provider_query_operation_fn deflt_query;
+static OSSL_FUNC_provider_gettable_params_fn deflt_gettable_params;
+static OSSL_FUNC_provider_get_params_fn deflt_get_params;
+static OSSL_FUNC_provider_query_operation_fn deflt_query;
#define ALGC(NAMES, FUNC, CHECK) { { NAMES, "provider=default", FUNC }, CHECK }
#define ALG(NAMES, FUNC) ALGC(NAMES, FUNC, NULL)
/* Functions provided by the core */
-static OSSL_core_gettable_params_fn *c_gettable_params = NULL;
-static OSSL_core_get_params_fn *c_get_params = NULL;
+static OSSL_FUNC_core_gettable_params_fn *c_gettable_params = NULL;
+static OSSL_FUNC_core_get_params_fn *c_get_params = NULL;
/* Parameters we provide to the core */
static const OSSL_PARAM deflt_param_types[] = {
const OSSL_DISPATCH **out,
void **provctx)
{
- OSSL_core_get_library_context_fn *c_get_libctx = NULL;
+ OSSL_FUNC_core_get_library_context_fn *c_get_libctx = NULL;
BIO_METHOD *corebiometh;
if (!ossl_prov_bio_from_dispatch(in))
for (; in->function_id != 0; in++) {
switch (in->function_id) {
case OSSL_FUNC_CORE_GETTABLE_PARAMS:
- c_gettable_params = OSSL_get_core_gettable_params(in);
+ c_gettable_params = OSSL_FUNC_core_gettable_params(in);
break;
case OSSL_FUNC_CORE_GET_PARAMS:
- c_get_params = OSSL_get_core_get_params(in);
+ c_get_params = OSSL_FUNC_core_get_params(in);
break;
case OSSL_FUNC_CORE_GET_LIBRARY_CONTEXT:
- c_get_libctx = OSSL_get_core_get_library_context(in);
+ c_get_libctx = OSSL_FUNC_core_get_library_context(in);
break;
default:
/* Just ignore anything we don't understand */
* Forward declarations to ensure that interface functions are correctly
* defined.
*/
-static OSSL_provider_teardown_fn fips_teardown;
-static OSSL_provider_gettable_params_fn fips_gettable_params;
-static OSSL_provider_get_params_fn fips_get_params;
-static OSSL_provider_query_operation_fn fips_query;
+static OSSL_FUNC_provider_teardown_fn fips_teardown;
+static OSSL_FUNC_provider_gettable_params_fn fips_gettable_params;
+static OSSL_FUNC_provider_get_params_fn fips_get_params;
+static OSSL_FUNC_provider_query_operation_fn fips_query;
#define ALGC(NAMES, FUNC, CHECK) { { NAMES, "provider=fips,fips=yes", FUNC }, CHECK }
#define ALG(NAMES, FUNC) ALGC(NAMES, FUNC, NULL)
-extern OSSL_core_thread_start_fn *c_thread_start;
+extern OSSL_FUNC_core_thread_start_fn *c_thread_start;
/*
* TODO(3.0): Should these be stored in the provider side provctx? Could they
static SELF_TEST_POST_PARAMS selftest_params;
/* Functions provided by the core */
-static OSSL_core_gettable_params_fn *c_gettable_params;
-static OSSL_core_get_params_fn *c_get_params;
-OSSL_core_thread_start_fn *c_thread_start;
-static OSSL_core_new_error_fn *c_new_error;
-static OSSL_core_set_error_debug_fn *c_set_error_debug;
-static OSSL_core_vset_error_fn *c_vset_error;
-static OSSL_core_set_error_mark_fn *c_set_error_mark;
-static OSSL_core_clear_last_error_mark_fn *c_clear_last_error_mark;
-static OSSL_core_pop_error_to_mark_fn *c_pop_error_to_mark;
-static OSSL_CRYPTO_malloc_fn *c_CRYPTO_malloc;
-static OSSL_CRYPTO_zalloc_fn *c_CRYPTO_zalloc;
-static OSSL_CRYPTO_free_fn *c_CRYPTO_free;
-static OSSL_CRYPTO_clear_free_fn *c_CRYPTO_clear_free;
-static OSSL_CRYPTO_realloc_fn *c_CRYPTO_realloc;
-static OSSL_CRYPTO_clear_realloc_fn *c_CRYPTO_clear_realloc;
-static OSSL_CRYPTO_secure_malloc_fn *c_CRYPTO_secure_malloc;
-static OSSL_CRYPTO_secure_zalloc_fn *c_CRYPTO_secure_zalloc;
-static OSSL_CRYPTO_secure_free_fn *c_CRYPTO_secure_free;
-static OSSL_CRYPTO_secure_clear_free_fn *c_CRYPTO_secure_clear_free;
-static OSSL_CRYPTO_secure_allocated_fn *c_CRYPTO_secure_allocated;
-static OSSL_BIO_vsnprintf_fn *c_BIO_vsnprintf;
+static OSSL_FUNC_core_gettable_params_fn *c_gettable_params;
+static OSSL_FUNC_core_get_params_fn *c_get_params;
+OSSL_FUNC_core_thread_start_fn *c_thread_start;
+static OSSL_FUNC_core_new_error_fn *c_new_error;
+static OSSL_FUNC_core_set_error_debug_fn *c_set_error_debug;
+static OSSL_FUNC_core_vset_error_fn *c_vset_error;
+static OSSL_FUNC_core_set_error_mark_fn *c_set_error_mark;
+static OSSL_FUNC_core_clear_last_error_mark_fn *c_clear_last_error_mark;
+static OSSL_FUNC_core_pop_error_to_mark_fn *c_pop_error_to_mark;
+static OSSL_FUNC_CRYPTO_malloc_fn *c_CRYPTO_malloc;
+static OSSL_FUNC_CRYPTO_zalloc_fn *c_CRYPTO_zalloc;
+static OSSL_FUNC_CRYPTO_free_fn *c_CRYPTO_free;
+static OSSL_FUNC_CRYPTO_clear_free_fn *c_CRYPTO_clear_free;
+static OSSL_FUNC_CRYPTO_realloc_fn *c_CRYPTO_realloc;
+static OSSL_FUNC_CRYPTO_clear_realloc_fn *c_CRYPTO_clear_realloc;
+static OSSL_FUNC_CRYPTO_secure_malloc_fn *c_CRYPTO_secure_malloc;
+static OSSL_FUNC_CRYPTO_secure_zalloc_fn *c_CRYPTO_secure_zalloc;
+static OSSL_FUNC_CRYPTO_secure_free_fn *c_CRYPTO_secure_free;
+static OSSL_FUNC_CRYPTO_secure_clear_free_fn *c_CRYPTO_secure_clear_free;
+static OSSL_FUNC_CRYPTO_secure_allocated_fn *c_CRYPTO_secure_allocated;
+static OSSL_FUNC_BIO_vsnprintf_fn *c_BIO_vsnprintf;
typedef struct fips_global_st {
const OSSL_CORE_HANDLE *handle;
{
FIPS_GLOBAL *fgbl;
OPENSSL_CTX *libctx = NULL;
- OSSL_self_test_cb_fn *stcbfn = NULL;
- OSSL_core_get_library_context_fn *c_get_libctx = NULL;
+ OSSL_FUNC_self_test_cb_fn *stcbfn = NULL;
+ OSSL_FUNC_core_get_library_context_fn *c_get_libctx = NULL;
for (; in->function_id != 0; in++) {
switch (in->function_id) {
case OSSL_FUNC_CORE_GET_LIBRARY_CONTEXT:
- c_get_libctx = OSSL_get_core_get_library_context(in);
+ c_get_libctx = OSSL_FUNC_core_get_library_context(in);
break;
case OSSL_FUNC_CORE_GETTABLE_PARAMS:
- c_gettable_params = OSSL_get_core_gettable_params(in);
+ c_gettable_params = OSSL_FUNC_core_gettable_params(in);
break;
case OSSL_FUNC_CORE_GET_PARAMS:
- c_get_params = OSSL_get_core_get_params(in);
+ c_get_params = OSSL_FUNC_core_get_params(in);
break;
case OSSL_FUNC_CORE_THREAD_START:
- c_thread_start = OSSL_get_core_thread_start(in);
+ c_thread_start = OSSL_FUNC_core_thread_start(in);
break;
case OSSL_FUNC_CORE_NEW_ERROR:
- c_new_error = OSSL_get_core_new_error(in);
+ c_new_error = OSSL_FUNC_core_new_error(in);
break;
case OSSL_FUNC_CORE_SET_ERROR_DEBUG:
- c_set_error_debug = OSSL_get_core_set_error_debug(in);
+ c_set_error_debug = OSSL_FUNC_core_set_error_debug(in);
break;
case OSSL_FUNC_CORE_VSET_ERROR:
- c_vset_error = OSSL_get_core_vset_error(in);
+ c_vset_error = OSSL_FUNC_core_vset_error(in);
break;
case OSSL_FUNC_CORE_SET_ERROR_MARK:
- c_set_error_mark = OSSL_get_core_set_error_mark(in);
+ c_set_error_mark = OSSL_FUNC_core_set_error_mark(in);
break;
case OSSL_FUNC_CORE_CLEAR_LAST_ERROR_MARK:
- c_clear_last_error_mark = OSSL_get_core_clear_last_error_mark(in);
+ c_clear_last_error_mark = OSSL_FUNC_core_clear_last_error_mark(in);
break;
case OSSL_FUNC_CORE_POP_ERROR_TO_MARK:
- c_pop_error_to_mark = OSSL_get_core_pop_error_to_mark(in);
+ c_pop_error_to_mark = OSSL_FUNC_core_pop_error_to_mark(in);
break;
case OSSL_FUNC_CRYPTO_MALLOC:
- c_CRYPTO_malloc = OSSL_get_CRYPTO_malloc(in);
+ c_CRYPTO_malloc = OSSL_FUNC_CRYPTO_malloc(in);
break;
case OSSL_FUNC_CRYPTO_ZALLOC:
- c_CRYPTO_zalloc = OSSL_get_CRYPTO_zalloc(in);
+ c_CRYPTO_zalloc = OSSL_FUNC_CRYPTO_zalloc(in);
break;
case OSSL_FUNC_CRYPTO_FREE:
- c_CRYPTO_free = OSSL_get_CRYPTO_free(in);
+ c_CRYPTO_free = OSSL_FUNC_CRYPTO_free(in);
break;
case OSSL_FUNC_CRYPTO_CLEAR_FREE:
- c_CRYPTO_clear_free = OSSL_get_CRYPTO_clear_free(in);
+ c_CRYPTO_clear_free = OSSL_FUNC_CRYPTO_clear_free(in);
break;
case OSSL_FUNC_CRYPTO_REALLOC:
- c_CRYPTO_realloc = OSSL_get_CRYPTO_realloc(in);
+ c_CRYPTO_realloc = OSSL_FUNC_CRYPTO_realloc(in);
break;
case OSSL_FUNC_CRYPTO_CLEAR_REALLOC:
- c_CRYPTO_clear_realloc = OSSL_get_CRYPTO_clear_realloc(in);
+ c_CRYPTO_clear_realloc = OSSL_FUNC_CRYPTO_clear_realloc(in);
break;
case OSSL_FUNC_CRYPTO_SECURE_MALLOC:
- c_CRYPTO_secure_malloc = OSSL_get_CRYPTO_secure_malloc(in);
+ c_CRYPTO_secure_malloc = OSSL_FUNC_CRYPTO_secure_malloc(in);
break;
case OSSL_FUNC_CRYPTO_SECURE_ZALLOC:
- c_CRYPTO_secure_zalloc = OSSL_get_CRYPTO_secure_zalloc(in);
+ c_CRYPTO_secure_zalloc = OSSL_FUNC_CRYPTO_secure_zalloc(in);
break;
case OSSL_FUNC_CRYPTO_SECURE_FREE:
- c_CRYPTO_secure_free = OSSL_get_CRYPTO_secure_free(in);
+ c_CRYPTO_secure_free = OSSL_FUNC_CRYPTO_secure_free(in);
break;
case OSSL_FUNC_CRYPTO_SECURE_CLEAR_FREE:
- c_CRYPTO_secure_clear_free = OSSL_get_CRYPTO_secure_clear_free(in);
+ c_CRYPTO_secure_clear_free = OSSL_FUNC_CRYPTO_secure_clear_free(in);
break;
case OSSL_FUNC_CRYPTO_SECURE_ALLOCATED:
- c_CRYPTO_secure_allocated = OSSL_get_CRYPTO_secure_allocated(in);
+ c_CRYPTO_secure_allocated = OSSL_FUNC_CRYPTO_secure_allocated(in);
break;
case OSSL_FUNC_BIO_NEW_FILE:
- selftest_params.bio_new_file_cb = OSSL_get_BIO_new_file(in);
+ selftest_params.bio_new_file_cb = OSSL_FUNC_BIO_new_file(in);
break;
case OSSL_FUNC_BIO_NEW_MEMBUF:
- selftest_params.bio_new_buffer_cb = OSSL_get_BIO_new_membuf(in);
+ selftest_params.bio_new_buffer_cb = OSSL_FUNC_BIO_new_membuf(in);
break;
case OSSL_FUNC_BIO_READ_EX:
- selftest_params.bio_read_ex_cb = OSSL_get_BIO_read_ex(in);
+ selftest_params.bio_read_ex_cb = OSSL_FUNC_BIO_read_ex(in);
break;
case OSSL_FUNC_BIO_FREE:
- selftest_params.bio_free_cb = OSSL_get_BIO_free(in);
+ selftest_params.bio_free_cb = OSSL_FUNC_BIO_free(in);
break;
case OSSL_FUNC_BIO_VSNPRINTF:
- c_BIO_vsnprintf = OSSL_get_BIO_vsnprintf(in);
+ c_BIO_vsnprintf = OSSL_FUNC_BIO_vsnprintf(in);
break;
case OSSL_FUNC_SELF_TEST_CB: {
- stcbfn = OSSL_get_self_test_cb(in);
+ stcbfn = OSSL_FUNC_self_test_cb(in);
break;
}
default:
const OSSL_DISPATCH **out,
void **provctx)
{
- OSSL_core_get_library_context_fn *c_get_libctx = NULL;
+ OSSL_FUNC_core_get_library_context_fn *c_get_libctx = NULL;
for (; in->function_id != 0; in++) {
switch (in->function_id) {
case OSSL_FUNC_CORE_GET_LIBRARY_CONTEXT:
- c_get_libctx = OSSL_get_core_get_library_context(in);
+ c_get_libctx = OSSL_FUNC_core_get_library_context(in);
break;
default:
break;
* the result matches the expected value.
* Return 1 if verified, or 0 if it fails.
*/
-static int verify_integrity(OSSL_CORE_BIO *bio, OSSL_BIO_read_ex_fn read_ex_cb,
+static int verify_integrity(OSSL_CORE_BIO *bio, OSSL_FUNC_BIO_read_ex_fn read_ex_cb,
unsigned char *expected, size_t expected_len,
OPENSSL_CTX *libctx, OSSL_SELF_TEST *ev,
const char *event_type)
const char *indicator_checksum_data; /* Expected MAC integrity value */
/* BIO callbacks supplied to the FIPS provider */
- OSSL_BIO_new_file_fn *bio_new_file_cb;
- OSSL_BIO_new_membuf_fn *bio_new_buffer_cb;
- OSSL_BIO_read_ex_fn *bio_read_ex_cb;
- OSSL_BIO_free_fn *bio_free_cb;
+ OSSL_FUNC_BIO_new_file_fn *bio_new_file_cb;
+ OSSL_FUNC_BIO_new_membuf_fn *bio_new_buffer_cb;
+ OSSL_FUNC_BIO_read_ex_fn *bio_read_ex_cb;
+ OSSL_FUNC_BIO_free_fn *bio_free_cb;
OSSL_CALLBACK *cb;
void *cb_arg;
OPENSSL_CTX *libctx;
#include <stdlib.h>
-static OSSL_OP_asym_cipher_newctx_fn rsa_newctx;
-static OSSL_OP_asym_cipher_encrypt_init_fn rsa_init;
-static OSSL_OP_asym_cipher_encrypt_fn rsa_encrypt;
-static OSSL_OP_asym_cipher_decrypt_init_fn rsa_init;
-static OSSL_OP_asym_cipher_decrypt_fn rsa_decrypt;
-static OSSL_OP_asym_cipher_freectx_fn rsa_freectx;
-static OSSL_OP_asym_cipher_dupctx_fn rsa_dupctx;
-static OSSL_OP_asym_cipher_get_ctx_params_fn rsa_get_ctx_params;
-static OSSL_OP_asym_cipher_gettable_ctx_params_fn rsa_gettable_ctx_params;
-static OSSL_OP_asym_cipher_set_ctx_params_fn rsa_set_ctx_params;
-static OSSL_OP_asym_cipher_settable_ctx_params_fn rsa_settable_ctx_params;
+static OSSL_FUNC_asym_cipher_newctx_fn rsa_newctx;
+static OSSL_FUNC_asym_cipher_encrypt_init_fn rsa_init;
+static OSSL_FUNC_asym_cipher_encrypt_fn rsa_encrypt;
+static OSSL_FUNC_asym_cipher_decrypt_init_fn rsa_init;
+static OSSL_FUNC_asym_cipher_decrypt_fn rsa_decrypt;
+static OSSL_FUNC_asym_cipher_freectx_fn rsa_freectx;
+static OSSL_FUNC_asym_cipher_dupctx_fn rsa_dupctx;
+static OSSL_FUNC_asym_cipher_get_ctx_params_fn rsa_get_ctx_params;
+static OSSL_FUNC_asym_cipher_gettable_ctx_params_fn rsa_gettable_ctx_params;
+static OSSL_FUNC_asym_cipher_set_ctx_params_fn rsa_set_ctx_params;
+static OSSL_FUNC_asym_cipher_settable_ctx_params_fn rsa_settable_ctx_params;
static OSSL_ITEM padding_item[] = {
{ RSA_PKCS1_PADDING, OSSL_PKEY_RSA_PAD_MODE_PKCSV15 },
#include "cipher_aes.h"
#include "prov/implementations.h"
-static OSSL_OP_cipher_freectx_fn aes_freectx;
-static OSSL_OP_cipher_dupctx_fn aes_dupctx;
+static OSSL_FUNC_cipher_freectx_fn aes_freectx;
+static OSSL_FUNC_cipher_dupctx_fn aes_dupctx;
static void aes_freectx(void *vctx)
{
| EVP_CIPH_FLAG_AEAD_CIPHER \
| EVP_CIPH_FLAG_TLS1_1_MULTIBLOCK)
-static OSSL_OP_cipher_freectx_fn aes_cbc_hmac_sha1_freectx;
-static OSSL_OP_cipher_freectx_fn aes_cbc_hmac_sha256_freectx;
-static OSSL_OP_cipher_get_ctx_params_fn aes_get_ctx_params;
-static OSSL_OP_cipher_gettable_ctx_params_fn aes_gettable_ctx_params;
-static OSSL_OP_cipher_set_ctx_params_fn aes_set_ctx_params;
-static OSSL_OP_cipher_settable_ctx_params_fn aes_settable_ctx_params;
+static OSSL_FUNC_cipher_freectx_fn aes_cbc_hmac_sha1_freectx;
+static OSSL_FUNC_cipher_freectx_fn aes_cbc_hmac_sha256_freectx;
+static OSSL_FUNC_cipher_get_ctx_params_fn aes_get_ctx_params;
+static OSSL_FUNC_cipher_gettable_ctx_params_fn aes_gettable_ctx_params;
+static OSSL_FUNC_cipher_set_ctx_params_fn aes_set_ctx_params;
+static OSSL_FUNC_cipher_settable_ctx_params_fn aes_settable_ctx_params;
# define aes_gettable_params cipher_generic_gettable_params
# define aes_einit cipher_generic_einit
# define aes_dinit cipher_generic_dinit
OPENSSL_clear_free(ctx, sizeof(*ctx));
}
-# define IMPLEMENT_CIPHER(nm, sub, kbits, blkbits, ivbits, flags) \
-static OSSL_OP_cipher_newctx_fn nm##_##kbits##_##sub##_newctx; \
+# define IMPLEMENT_CIPHER(nm, sub, kbits, blkbits, ivbits, flags) \
+static OSSL_FUNC_cipher_newctx_fn nm##_##kbits##_##sub##_newctx; \
static void *nm##_##kbits##_##sub##_newctx(void *provctx) \
{ \
return nm##_##sub##_newctx(provctx, kbits, blkbits, ivbits, flags); \
} \
-static OSSL_OP_cipher_get_params_fn nm##_##kbits##_##sub##_get_params; \
+static OSSL_FUNC_cipher_get_params_fn nm##_##kbits##_##sub##_get_params; \
static int nm##_##kbits##_##sub##_get_params(OSSL_PARAM params[]) \
{ \
return cipher_generic_get_params(params, EVP_CIPH_CBC_MODE, \
return ctx;
}
-static OSSL_OP_cipher_freectx_fn aes_ccm_freectx;
+static OSSL_FUNC_cipher_freectx_fn aes_ccm_freectx;
static void aes_ccm_freectx(void *vctx)
{
PROV_AES_CCM_CTX *ctx = (PROV_AES_CCM_CTX *)vctx;
return ctx;
}
-static OSSL_OP_cipher_freectx_fn aes_gcm_freectx;
+static OSSL_FUNC_cipher_freectx_fn aes_gcm_freectx;
static void aes_gcm_freectx(void *vctx)
{
PROV_AES_GCM_CTX *ctx = (PROV_AES_GCM_CTX *)vctx;
const unsigned char *in, unsigned char *out,
size_t nextblock));
/* forward declarations */
-static OSSL_OP_cipher_encrypt_init_fn aes_ocb_einit;
-static OSSL_OP_cipher_decrypt_init_fn aes_ocb_dinit;
-static OSSL_OP_cipher_update_fn aes_ocb_block_update;
-static OSSL_OP_cipher_final_fn aes_ocb_block_final;
-static OSSL_OP_cipher_cipher_fn aes_ocb_cipher;
-static OSSL_OP_cipher_freectx_fn aes_ocb_freectx;
-static OSSL_OP_cipher_dupctx_fn aes_ocb_dupctx;
-static OSSL_OP_cipher_get_ctx_params_fn aes_ocb_get_ctx_params;
-static OSSL_OP_cipher_set_ctx_params_fn aes_ocb_set_ctx_params;
+static OSSL_FUNC_cipher_encrypt_init_fn aes_ocb_einit;
+static OSSL_FUNC_cipher_decrypt_init_fn aes_ocb_dinit;
+static OSSL_FUNC_cipher_update_fn aes_ocb_block_update;
+static OSSL_FUNC_cipher_final_fn aes_ocb_block_final;
+static OSSL_FUNC_cipher_cipher_fn aes_ocb_cipher;
+static OSSL_FUNC_cipher_freectx_fn aes_ocb_freectx;
+static OSSL_FUNC_cipher_dupctx_fn aes_ocb_dupctx;
+static OSSL_FUNC_cipher_get_ctx_params_fn aes_ocb_get_ctx_params;
+static OSSL_FUNC_cipher_set_ctx_params_fn aes_ocb_set_ctx_params;
/*
* The following methods could be moved into PROV_AES_OCB_HW if
}
#define IMPLEMENT_cipher(mode, UCMODE, flags, kbits, blkbits, ivbits) \
-static OSSL_OP_cipher_get_params_fn aes_##kbits##_##mode##_get_params; \
+static OSSL_FUNC_cipher_get_params_fn aes_##kbits##_##mode##_get_params; \
static int aes_##kbits##_##mode##_get_params(OSSL_PARAM params[]) \
{ \
return cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
flags, kbits, blkbits, ivbits); \
} \
-static OSSL_OP_cipher_newctx_fn aes_##kbits##_##mode##_newctx; \
+static OSSL_FUNC_cipher_newctx_fn aes_##kbits##_##mode##_newctx; \
static void *aes_##kbits##_##mode##_newctx(void *provctx) \
{ \
return aes_##mode##_newctx(provctx, kbits, blkbits, ivbits, \
}
#define IMPLEMENT_cipher(alg, lc, UCMODE, flags, kbits, blkbits, ivbits) \
-static OSSL_OP_cipher_get_params_fn alg##_##kbits##_##lc##_get_params; \
+static OSSL_FUNC_cipher_get_params_fn alg##_##kbits##_##lc##_get_params; \
static int alg##_##kbits##_##lc##_get_params(OSSL_PARAM params[]) \
{ \
return cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
flags, 2*kbits, blkbits, ivbits); \
} \
-static OSSL_OP_cipher_newctx_fn alg##kbits##lc##_newctx; \
+static OSSL_FUNC_cipher_newctx_fn alg##kbits##lc##_newctx; \
static void * alg##kbits##lc##_newctx(void *provctx) \
{ \
return alg##_##lc##_newctx(provctx, 2*kbits, EVP_CIPH_##UCMODE##_MODE, \
unsigned char *out, const unsigned char *in,
size_t inlen, block128_f block);
-static OSSL_OP_cipher_encrypt_init_fn aes_wrap_einit;
-static OSSL_OP_cipher_decrypt_init_fn aes_wrap_dinit;
-static OSSL_OP_cipher_update_fn aes_wrap_cipher;
-static OSSL_OP_cipher_final_fn aes_wrap_final;
-static OSSL_OP_cipher_freectx_fn aes_wrap_freectx;
+static OSSL_FUNC_cipher_encrypt_init_fn aes_wrap_einit;
+static OSSL_FUNC_cipher_decrypt_init_fn aes_wrap_dinit;
+static OSSL_FUNC_cipher_update_fn aes_wrap_cipher;
+static OSSL_FUNC_cipher_final_fn aes_wrap_final;
+static OSSL_FUNC_cipher_freectx_fn aes_wrap_freectx;
typedef struct prov_aes_wrap_ctx_st {
PROV_CIPHER_CTX base;
}
#define IMPLEMENT_cipher(mode, fname, UCMODE, flags, kbits, blkbits, ivbits) \
- static OSSL_OP_cipher_get_params_fn aes_##kbits##_##fname##_get_params; \
+ static OSSL_FUNC_cipher_get_params_fn aes_##kbits##_##fname##_get_params; \
static int aes_##kbits##_##fname##_get_params(OSSL_PARAM params[]) \
{ \
return cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
flags, kbits, blkbits, ivbits); \
} \
- static OSSL_OP_cipher_newctx_fn aes_##kbits##fname##_newctx; \
+ static OSSL_FUNC_cipher_newctx_fn aes_##kbits##fname##_newctx; \
static void *aes_##kbits##fname##_newctx(void *provctx) \
{ \
return aes_##mode##_newctx(kbits, blkbits, ivbits, \
#define AES_XTS_BLOCK_BITS 8
/* forward declarations */
-static OSSL_OP_cipher_encrypt_init_fn aes_xts_einit;
-static OSSL_OP_cipher_decrypt_init_fn aes_xts_dinit;
-static OSSL_OP_cipher_update_fn aes_xts_stream_update;
-static OSSL_OP_cipher_final_fn aes_xts_stream_final;
-static OSSL_OP_cipher_cipher_fn aes_xts_cipher;
-static OSSL_OP_cipher_freectx_fn aes_xts_freectx;
-static OSSL_OP_cipher_dupctx_fn aes_xts_dupctx;
-static OSSL_OP_cipher_set_ctx_params_fn aes_xts_set_ctx_params;
-static OSSL_OP_cipher_settable_ctx_params_fn aes_xts_settable_ctx_params;
+static OSSL_FUNC_cipher_encrypt_init_fn aes_xts_einit;
+static OSSL_FUNC_cipher_decrypt_init_fn aes_xts_dinit;
+static OSSL_FUNC_cipher_update_fn aes_xts_stream_update;
+static OSSL_FUNC_cipher_final_fn aes_xts_stream_final;
+static OSSL_FUNC_cipher_cipher_fn aes_xts_cipher;
+static OSSL_FUNC_cipher_freectx_fn aes_xts_freectx;
+static OSSL_FUNC_cipher_dupctx_fn aes_xts_dupctx;
+static OSSL_FUNC_cipher_set_ctx_params_fn aes_xts_set_ctx_params;
+static OSSL_FUNC_cipher_settable_ctx_params_fn aes_xts_settable_ctx_params;
/*
* Verify that the two keys are different.
}
#define IMPLEMENT_cipher(lcmode, UCMODE, kbits, flags) \
-static OSSL_OP_cipher_get_params_fn aes_##kbits##_##lcmode##_get_params; \
+static OSSL_FUNC_cipher_get_params_fn aes_##kbits##_##lcmode##_get_params; \
static int aes_##kbits##_##lcmode##_get_params(OSSL_PARAM params[]) \
{ \
return cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
flags, 2 * kbits, AES_XTS_BLOCK_BITS, \
AES_XTS_IV_BITS); \
} \
-static OSSL_OP_cipher_newctx_fn aes_##kbits##_xts_newctx; \
+static OSSL_FUNC_cipher_newctx_fn aes_##kbits##_xts_newctx; \
static void *aes_##kbits##_xts_newctx(void *provctx) \
{ \
return aes_xts_newctx(provctx, EVP_CIPH_##UCMODE##_MODE, flags, 2 * kbits, \
#include "cipher_aria.h"
#include "prov/implementations.h"
-static OSSL_OP_cipher_freectx_fn aria_freectx;
-static OSSL_OP_cipher_dupctx_fn aria_dupctx;
+static OSSL_FUNC_cipher_freectx_fn aria_freectx;
+static OSSL_FUNC_cipher_dupctx_fn aria_dupctx;
static void aria_freectx(void *vctx)
{
#include "cipher_aria_ccm.h"
#include "prov/implementations.h"
-static OSSL_OP_cipher_freectx_fn aria_ccm_freectx;
+static OSSL_FUNC_cipher_freectx_fn aria_ccm_freectx;
static void *aria_ccm_newctx(void *provctx, size_t keybits)
{
return ctx;
}
-static OSSL_OP_cipher_freectx_fn aria_gcm_freectx;
+static OSSL_FUNC_cipher_freectx_fn aria_gcm_freectx;
static void aria_gcm_freectx(void *vctx)
{
PROV_ARIA_GCM_CTX *ctx = (PROV_ARIA_GCM_CTX *)vctx;
#define BF_FLAGS (EVP_CIPH_VARIABLE_LENGTH)
-static OSSL_OP_cipher_freectx_fn blowfish_freectx;
-static OSSL_OP_cipher_dupctx_fn blowfish_dupctx;
+static OSSL_FUNC_cipher_freectx_fn blowfish_freectx;
+static OSSL_FUNC_cipher_dupctx_fn blowfish_dupctx;
static void blowfish_freectx(void *vctx)
{
#include "cipher_camellia.h"
#include "prov/implementations.h"
-static OSSL_OP_cipher_freectx_fn camellia_freectx;
-static OSSL_OP_cipher_dupctx_fn camellia_dupctx;
+static OSSL_FUNC_cipher_freectx_fn camellia_freectx;
+static OSSL_FUNC_cipher_dupctx_fn camellia_dupctx;
static void camellia_freectx(void *vctx)
{
#define CAST5_FLAGS (EVP_CIPH_VARIABLE_LENGTH)
-static OSSL_OP_cipher_freectx_fn cast5_freectx;
-static OSSL_OP_cipher_dupctx_fn cast5_dupctx;
+static OSSL_FUNC_cipher_freectx_fn cast5_freectx;
+static OSSL_FUNC_cipher_dupctx_fn cast5_dupctx;
static void cast5_freectx(void *vctx)
{
/* TODO(3.0) Figure out what flags are required */
#define CHACHA20_FLAGS (EVP_CIPH_CUSTOM_IV | EVP_CIPH_ALWAYS_CALL_INIT)
-static OSSL_OP_cipher_newctx_fn chacha20_newctx;
-static OSSL_OP_cipher_freectx_fn chacha20_freectx;
-static OSSL_OP_cipher_get_params_fn chacha20_get_params;
-static OSSL_OP_cipher_get_ctx_params_fn chacha20_get_ctx_params;
-static OSSL_OP_cipher_set_ctx_params_fn chacha20_set_ctx_params;
-static OSSL_OP_cipher_gettable_ctx_params_fn chacha20_gettable_ctx_params;
-static OSSL_OP_cipher_settable_ctx_params_fn chacha20_settable_ctx_params;
+static OSSL_FUNC_cipher_newctx_fn chacha20_newctx;
+static OSSL_FUNC_cipher_freectx_fn chacha20_freectx;
+static OSSL_FUNC_cipher_get_params_fn chacha20_get_params;
+static OSSL_FUNC_cipher_get_ctx_params_fn chacha20_get_ctx_params;
+static OSSL_FUNC_cipher_set_ctx_params_fn chacha20_set_ctx_params;
+static OSSL_FUNC_cipher_gettable_ctx_params_fn chacha20_gettable_ctx_params;
+static OSSL_FUNC_cipher_settable_ctx_params_fn chacha20_settable_ctx_params;
#define chacha20_cipher cipher_generic_cipher
#define chacha20_update cipher_generic_stream_update
#define chacha20_final cipher_generic_stream_final
const PROV_CIPHER_HW *PROV_CIPHER_HW_chacha20(size_t keybits);
-OSSL_OP_cipher_encrypt_init_fn chacha20_einit;
-OSSL_OP_cipher_decrypt_init_fn chacha20_dinit;
+OSSL_FUNC_cipher_encrypt_init_fn chacha20_einit;
+OSSL_FUNC_cipher_decrypt_init_fn chacha20_dinit;
void chacha20_initctx(PROV_CHACHA20_CTX *ctx);
| EVP_CIPH_CUSTOM_IV \
| EVP_CIPH_CUSTOM_IV_LENGTH)
-static OSSL_OP_cipher_newctx_fn chacha20_poly1305_newctx;
-static OSSL_OP_cipher_freectx_fn chacha20_poly1305_freectx;
-static OSSL_OP_cipher_encrypt_init_fn chacha20_poly1305_einit;
-static OSSL_OP_cipher_decrypt_init_fn chacha20_poly1305_dinit;
-static OSSL_OP_cipher_get_params_fn chacha20_poly1305_get_params;
-static OSSL_OP_cipher_get_ctx_params_fn chacha20_poly1305_get_ctx_params;
-static OSSL_OP_cipher_set_ctx_params_fn chacha20_poly1305_set_ctx_params;
-static OSSL_OP_cipher_cipher_fn chacha20_poly1305_cipher;
-static OSSL_OP_cipher_final_fn chacha20_poly1305_final;
-static OSSL_OP_cipher_gettable_ctx_params_fn chacha20_poly1305_gettable_ctx_params;
+static OSSL_FUNC_cipher_newctx_fn chacha20_poly1305_newctx;
+static OSSL_FUNC_cipher_freectx_fn chacha20_poly1305_freectx;
+static OSSL_FUNC_cipher_encrypt_init_fn chacha20_poly1305_einit;
+static OSSL_FUNC_cipher_decrypt_init_fn chacha20_poly1305_dinit;
+static OSSL_FUNC_cipher_get_params_fn chacha20_poly1305_get_params;
+static OSSL_FUNC_cipher_get_ctx_params_fn chacha20_poly1305_get_ctx_params;
+static OSSL_FUNC_cipher_set_ctx_params_fn chacha20_poly1305_set_ctx_params;
+static OSSL_FUNC_cipher_cipher_fn chacha20_poly1305_cipher;
+static OSSL_FUNC_cipher_final_fn chacha20_poly1305_final;
+static OSSL_FUNC_cipher_gettable_ctx_params_fn chacha20_poly1305_gettable_ctx_params;
#define chacha20_poly1305_settable_ctx_params cipher_aead_settable_ctx_params
#define chacha20_poly1305_gettable_params cipher_generic_gettable_params
#define chacha20_poly1305_update chacha20_poly1305_cipher
/* TODO(3.0) Figure out what flags need to be here */
#define DES_FLAGS (EVP_CIPH_RAND_KEY)
-static OSSL_OP_cipher_freectx_fn des_freectx;
-static OSSL_OP_cipher_encrypt_init_fn des_einit;
-static OSSL_OP_cipher_decrypt_init_fn des_dinit;
-static OSSL_OP_cipher_get_ctx_params_fn des_get_ctx_params;
-static OSSL_OP_cipher_gettable_ctx_params_fn des_gettable_ctx_params;
+static OSSL_FUNC_cipher_freectx_fn des_freectx;
+static OSSL_FUNC_cipher_encrypt_init_fn des_einit;
+static OSSL_FUNC_cipher_decrypt_init_fn des_dinit;
+static OSSL_FUNC_cipher_get_ctx_params_fn des_get_ctx_params;
+static OSSL_FUNC_cipher_gettable_ctx_params_fn des_gettable_ctx_params;
static void *des_newctx(void *provctx, size_t kbits, size_t blkbits,
size_t ivbits, unsigned int mode, uint64_t flags,
#define IMPLEMENT_des_cipher(type, lcmode, UCMODE, flags, \
kbits, blkbits, ivbits, block) \
-static OSSL_OP_cipher_newctx_fn type##_##lcmode##_newctx; \
+static OSSL_FUNC_cipher_newctx_fn type##_##lcmode##_newctx; \
static void *des_##lcmode##_newctx(void *provctx) \
{ \
return des_newctx(provctx, kbits, blkbits, ivbits, \
EVP_CIPH_##UCMODE##_MODE, flags, \
PROV_CIPHER_HW_des_##lcmode()); \
} \
-static OSSL_OP_cipher_get_params_fn des_##lcmode##_get_params; \
+static OSSL_FUNC_cipher_get_params_fn des_##lcmode##_get_params; \
static int des_##lcmode##_get_params(OSSL_PARAM params[]) \
{ \
return cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, flags, \
#include "cipher_idea.h"
#include "prov/implementations.h"
-static OSSL_OP_cipher_freectx_fn idea_freectx;
-static OSSL_OP_cipher_dupctx_fn idea_dupctx;
+static OSSL_FUNC_cipher_freectx_fn idea_freectx;
+static OSSL_FUNC_cipher_dupctx_fn idea_dupctx;
static void idea_freectx(void *vctx)
{
#include "prov/ciphercommon.h"
#include "prov/providercommonerr.h"
-static OSSL_OP_cipher_newctx_fn null_newctx;
+static OSSL_FUNC_cipher_newctx_fn null_newctx;
static void *null_newctx(void *provctx)
{
static int dummy = 0;
return &dummy;
}
-static OSSL_OP_cipher_freectx_fn null_freectx;
+static OSSL_FUNC_cipher_freectx_fn null_freectx;
static void null_freectx(void *vctx)
{
}
-static OSSL_OP_cipher_encrypt_init_fn null_init;
+static OSSL_FUNC_cipher_encrypt_init_fn null_init;
static int null_init(void *vctx, const unsigned char *key, size_t keylen,
const unsigned char *iv, size_t ivlen)
{
return 1;
}
-static OSSL_OP_cipher_cipher_fn null_cipher;
+static OSSL_FUNC_cipher_cipher_fn null_cipher;
static int null_cipher(void *vctx, unsigned char *out, size_t *outl,
size_t outsize, const unsigned char *in, size_t inl)
{
return 1;
}
-static OSSL_OP_cipher_final_fn null_final;
+static OSSL_FUNC_cipher_final_fn null_final;
static int null_final(void *vctx, unsigned char *out, size_t *outl,
size_t outsize)
{
return 1;
}
-static OSSL_OP_cipher_get_params_fn null_get_params;
+static OSSL_FUNC_cipher_get_params_fn null_get_params;
static int null_get_params(OSSL_PARAM params[])
{
return cipher_generic_get_params(params, 0, 0, 0, 8, 0);
OSSL_PARAM_END
};
-static OSSL_OP_cipher_gettable_ctx_params_fn null_gettable_ctx_params;
+static OSSL_FUNC_cipher_gettable_ctx_params_fn null_gettable_ctx_params;
static const OSSL_PARAM *null_gettable_ctx_params(void)
{
return null_known_gettable_ctx_params;
}
-static OSSL_OP_cipher_get_ctx_params_fn null_get_ctx_params;
+static OSSL_FUNC_cipher_get_ctx_params_fn null_get_ctx_params;
static int null_get_ctx_params(void *vctx, OSSL_PARAM params[])
{
OSSL_PARAM *p;
#define RC2_64_MAGIC 0x78
#define RC2_128_MAGIC 0x3a
-static OSSL_OP_cipher_freectx_fn rc2_freectx;
-static OSSL_OP_cipher_dupctx_fn rc2_dupctx;
-static OSSL_OP_cipher_gettable_ctx_params_fn rc2_gettable_ctx_params;
-static OSSL_OP_cipher_settable_ctx_params_fn rc2_settable_ctx_params;
+static OSSL_FUNC_cipher_freectx_fn rc2_freectx;
+static OSSL_FUNC_cipher_dupctx_fn rc2_dupctx;
+static OSSL_FUNC_cipher_gettable_ctx_params_fn rc2_gettable_ctx_params;
+static OSSL_FUNC_cipher_settable_ctx_params_fn rc2_settable_ctx_params;
static void rc2_freectx(void *vctx)
{
#define IMPLEMENT_cipher(alg, UCALG, lcmode, UCMODE, flags, kbits, blkbits, \
ivbits, typ) \
-static OSSL_OP_cipher_get_params_fn alg##_##kbits##_##lcmode##_get_params; \
+static OSSL_FUNC_cipher_get_params_fn alg##_##kbits##_##lcmode##_get_params; \
static int alg##_##kbits##_##lcmode##_get_params(OSSL_PARAM params[]) \
{ \
return cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, flags, \
kbits, blkbits, ivbits); \
} \
-static OSSL_OP_cipher_newctx_fn alg##_##kbits##_##lcmode##_newctx; \
+static OSSL_FUNC_cipher_newctx_fn alg##_##kbits##_##lcmode##_newctx; \
static void * alg##_##kbits##_##lcmode##_newctx(void *provctx) \
{ \
PROV_##UCALG##_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx)); \
/* TODO (3.0) Figure out what flags are required */
#define RC4_FLAGS EVP_CIPH_FLAG_DEFAULT_ASN1
-static OSSL_OP_cipher_freectx_fn rc4_freectx;
-static OSSL_OP_cipher_dupctx_fn rc4_dupctx;
+static OSSL_FUNC_cipher_freectx_fn rc4_freectx;
+static OSSL_FUNC_cipher_dupctx_fn rc4_dupctx;
static void rc4_freectx(void *vctx)
{
}
#define IMPLEMENT_cipher(alg, UCALG, flags, kbits, blkbits, ivbits, typ) \
-static OSSL_OP_cipher_get_params_fn alg##_##kbits##_get_params; \
+static OSSL_FUNC_cipher_get_params_fn alg##_##kbits##_get_params; \
static int alg##_##kbits##_get_params(OSSL_PARAM params[]) \
{ \
return cipher_generic_get_params(params, 0, flags, \
kbits, blkbits, ivbits); \
} \
-static OSSL_OP_cipher_newctx_fn alg##_##kbits##_newctx; \
+static OSSL_FUNC_cipher_newctx_fn alg##_##kbits##_newctx; \
static void * alg##_##kbits##_newctx(void *provctx) \
{ \
PROV_##UCALG##_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx)); \
#define GET_HW(ctx) ((PROV_CIPHER_HW_RC4_HMAC_MD5 *)ctx->base.hw)
-static OSSL_OP_cipher_newctx_fn rc4_hmac_md5_newctx;
-static OSSL_OP_cipher_freectx_fn rc4_hmac_md5_freectx;
-static OSSL_OP_cipher_get_ctx_params_fn rc4_hmac_md5_get_ctx_params;
-static OSSL_OP_cipher_gettable_ctx_params_fn rc4_hmac_md5_gettable_ctx_params;
-static OSSL_OP_cipher_set_ctx_params_fn rc4_hmac_md5_set_ctx_params;
-static OSSL_OP_cipher_settable_ctx_params_fn rc4_hmac_md5_settable_ctx_params;
-static OSSL_OP_cipher_get_params_fn rc4_hmac_md5_get_params;
+static OSSL_FUNC_cipher_newctx_fn rc4_hmac_md5_newctx;
+static OSSL_FUNC_cipher_freectx_fn rc4_hmac_md5_freectx;
+static OSSL_FUNC_cipher_get_ctx_params_fn rc4_hmac_md5_get_ctx_params;
+static OSSL_FUNC_cipher_gettable_ctx_params_fn rc4_hmac_md5_gettable_ctx_params;
+static OSSL_FUNC_cipher_set_ctx_params_fn rc4_hmac_md5_set_ctx_params;
+static OSSL_FUNC_cipher_settable_ctx_params_fn rc4_hmac_md5_settable_ctx_params;
+static OSSL_FUNC_cipher_get_params_fn rc4_hmac_md5_get_params;
#define rc4_hmac_md5_gettable_params cipher_generic_gettable_params
#define rc4_hmac_md5_einit cipher_generic_einit
#define rc4_hmac_md5_dinit cipher_generic_dinit
#include "prov/implementations.h"
#include "prov/providercommonerr.h"
-static OSSL_OP_cipher_freectx_fn rc5_freectx;
-static OSSL_OP_cipher_dupctx_fn rc5_dupctx;
-OSSL_OP_cipher_gettable_ctx_params_fn rc5_gettable_ctx_params;
-OSSL_OP_cipher_settable_ctx_params_fn rc5_settable_ctx_params;
+static OSSL_FUNC_cipher_freectx_fn rc5_freectx;
+static OSSL_FUNC_cipher_dupctx_fn rc5_dupctx;
+OSSL_FUNC_cipher_gettable_ctx_params_fn rc5_gettable_ctx_params;
+OSSL_FUNC_cipher_settable_ctx_params_fn rc5_settable_ctx_params;
static void rc5_freectx(void *vctx)
{
#define IMPLEMENT_cipher(alg, UCALG, lcmode, UCMODE, flags, kbits, \
blkbits, ivbits, typ) \
-static OSSL_OP_cipher_get_params_fn alg##_##kbits##_##lcmode##_get_params; \
+static OSSL_FUNC_cipher_get_params_fn alg##_##kbits##_##lcmode##_get_params; \
static int alg##_##kbits##_##lcmode##_get_params(OSSL_PARAM params[]) \
{ \
return cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, flags, \
kbits, blkbits, ivbits); \
} \
-static OSSL_OP_cipher_newctx_fn alg##_##kbits##_##lcmode##_newctx; \
+static OSSL_FUNC_cipher_newctx_fn alg##_##kbits##_##lcmode##_newctx; \
static void * alg##_##kbits##_##lcmode##_newctx(void *provctx) \
{ \
PROV_##UCALG##_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx)); \
#include "cipher_seed.h"
#include "prov/implementations.h"
-static OSSL_OP_cipher_freectx_fn seed_freectx;
-static OSSL_OP_cipher_dupctx_fn seed_dupctx;
+static OSSL_FUNC_cipher_freectx_fn seed_freectx;
+static OSSL_FUNC_cipher_dupctx_fn seed_dupctx;
static void seed_freectx(void *vctx)
{
#include "cipher_sm4.h"
#include "prov/implementations.h"
-static OSSL_OP_cipher_freectx_fn sm4_freectx;
-static OSSL_OP_cipher_dupctx_fn sm4_dupctx;
+static OSSL_FUNC_cipher_freectx_fn sm4_freectx;
+static OSSL_FUNC_cipher_dupctx_fn sm4_dupctx;
static void sm4_freectx(void *vctx)
{
#define IMPLEMENT_tdes_cipher(type, UCTYPE, lcmode, UCMODE, flags, \
kbits, blkbits, ivbits, block) \
-static OSSL_OP_cipher_newctx_fn tdes_##type##_##lcmode##_newctx; \
+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());\
} \
-static OSSL_OP_cipher_get_params_fn tdes_##type##_##lcmode##_get_params; \
+static OSSL_FUNC_cipher_get_params_fn tdes_##type##_##lcmode##_get_params; \
static int tdes_##type##_##lcmode##_get_params(OSSL_PARAM params[]) \
{ \
return cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, flags, \
void *tdes_newctx(void *provctx, int mode, size_t kbits, size_t blkbits,
size_t ivbits, uint64_t flags, const PROV_CIPHER_HW *hw);
-OSSL_OP_cipher_dupctx_fn tdes_dupctx;
-OSSL_OP_cipher_freectx_fn tdes_freectx;
-OSSL_OP_cipher_encrypt_init_fn tdes_einit;
-OSSL_OP_cipher_decrypt_init_fn tdes_dinit;
-OSSL_OP_cipher_get_ctx_params_fn tdes_get_ctx_params;
-OSSL_OP_cipher_gettable_ctx_params_fn tdes_gettable_ctx_params;
+OSSL_FUNC_cipher_dupctx_fn tdes_dupctx;
+OSSL_FUNC_cipher_freectx_fn tdes_freectx;
+OSSL_FUNC_cipher_encrypt_init_fn tdes_einit;
+OSSL_FUNC_cipher_decrypt_init_fn tdes_dinit;
+OSSL_FUNC_cipher_get_ctx_params_fn tdes_get_ctx_params;
+OSSL_FUNC_cipher_gettable_ctx_params_fn tdes_gettable_ctx_params;
#define PROV_CIPHER_HW_tdes_mode(type, mode) \
static const PROV_CIPHER_HW type##_##mode = { \
#define TDES_WRAP_FLAGS (EVP_CIPH_WRAP_MODE | EVP_CIPH_CUSTOM_IV)
-static OSSL_OP_cipher_update_fn tdes_wrap_update;
-static OSSL_OP_cipher_cipher_fn tdes_wrap_cipher;
+static OSSL_FUNC_cipher_update_fn tdes_wrap_update;
+static OSSL_FUNC_cipher_cipher_fn tdes_wrap_cipher;
static const unsigned char wrap_iv[8] =
{
# define IMPLEMENT_WRAP_CIPHER(flags, kbits, blkbits, ivbits) \
-static OSSL_OP_cipher_newctx_fn tdes_wrap_newctx; \
+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()); \
} \
-static OSSL_OP_cipher_get_params_fn tdes_wrap_get_params; \
+static OSSL_FUNC_cipher_get_params_fn tdes_wrap_get_params; \
static int tdes_wrap_get_params(OSSL_PARAM params[]) \
{ \
return cipher_generic_get_params(params, EVP_CIPH_WRAP_MODE, flags, \
#include "prov/digestcommon.h"
#include "prov/implementations.h"
-OSSL_OP_digest_init_fn blake2s256_init;
-OSSL_OP_digest_init_fn blake2b512_init;
+OSSL_FUNC_digest_init_fn blake2s256_init;
+OSSL_FUNC_digest_init_fn blake2b512_init;
int blake2s256_init(void *ctx)
{
#include "prov/digestcommon.h"
#include "prov/implementations.h"
-static OSSL_OP_digest_set_ctx_params_fn md5_sha1_set_ctx_params;
-static OSSL_OP_digest_settable_ctx_params_fn md5_sha1_settable_ctx_params;
+static OSSL_FUNC_digest_set_ctx_params_fn md5_sha1_set_ctx_params;
+static OSSL_FUNC_digest_settable_ctx_params_fn md5_sha1_settable_ctx_params;
static const OSSL_PARAM known_md5_sha1_settable_ctx_params[] = {
{OSSL_DIGEST_PARAM_SSL3_MS, OSSL_PARAM_OCTET_STRING, NULL, 0, 0},
#include "prov/implementations.h"
#include "prov/providercommonerr.h"
-static OSSL_OP_digest_set_ctx_params_fn mdc2_set_ctx_params;
-static OSSL_OP_digest_settable_ctx_params_fn mdc2_settable_ctx_params;
+static OSSL_FUNC_digest_set_ctx_params_fn mdc2_set_ctx_params;
+static OSSL_FUNC_digest_settable_ctx_params_fn mdc2_settable_ctx_params;
static const OSSL_PARAM known_mdc2_settable_ctx_params[] = {
OSSL_PARAM_uint(OSSL_DIGEST_PARAM_PAD_TYPE, NULL),
#include "prov/implementations.h"
#include "crypto/sha.h"
-static OSSL_OP_digest_set_ctx_params_fn sha1_set_ctx_params;
-static OSSL_OP_digest_settable_ctx_params_fn sha1_settable_ctx_params;
+static OSSL_FUNC_digest_set_ctx_params_fn sha1_set_ctx_params;
+static OSSL_FUNC_digest_settable_ctx_params_fn sha1_settable_ctx_params;
static const OSSL_PARAM known_sha1_settable_ctx_params[] = {
{OSSL_DIGEST_PARAM_SSL3_MS, OSSL_PARAM_OCTET_STRING, NULL, 0, 0},
* necessary for the compiler, but provides an assurance that the signatures
* of the functions in the dispatch table are correct.
*/
-static OSSL_OP_digest_init_fn keccak_init;
-static OSSL_OP_digest_update_fn keccak_update;
-static OSSL_OP_digest_final_fn keccak_final;
-static OSSL_OP_digest_freectx_fn keccak_freectx;
-static OSSL_OP_digest_dupctx_fn keccak_dupctx;
-static OSSL_OP_digest_set_ctx_params_fn shake_set_ctx_params;
-static OSSL_OP_digest_settable_ctx_params_fn shake_settable_ctx_params;
+static OSSL_FUNC_digest_init_fn keccak_init;
+static OSSL_FUNC_digest_update_fn keccak_update;
+static OSSL_FUNC_digest_final_fn keccak_final;
+static OSSL_FUNC_digest_freectx_fn keccak_freectx;
+static OSSL_FUNC_digest_dupctx_fn keccak_dupctx;
+static OSSL_FUNC_digest_set_ctx_params_fn shake_set_ctx_params;
+static OSSL_FUNC_digest_settable_ctx_params_fn shake_settable_ctx_params;
static sha3_absorb_fn generic_sha3_absorb;
static sha3_final_fn generic_sha3_final;
#endif /* S390_SHA3 */
#define SHA3_newctx(typ, uname, name, bitlen, pad) \
-static OSSL_OP_digest_newctx_fn name##_newctx; \
+static OSSL_FUNC_digest_newctx_fn name##_newctx; \
static void *name##_newctx(void *provctx) \
{ \
KECCAK1600_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx)); \
}
#define KMAC_newctx(uname, bitlen, pad) \
-static OSSL_OP_digest_newctx_fn uname##_newctx; \
+static OSSL_FUNC_digest_newctx_fn uname##_newctx; \
static void *uname##_newctx(void *provctx) \
{ \
KECCAK1600_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx)); \
#include "prov/provider_ctx.h"
#include "crypto/dh.h"
-static OSSL_OP_keyexch_newctx_fn dh_newctx;
-static OSSL_OP_keyexch_init_fn dh_init;
-static OSSL_OP_keyexch_set_peer_fn dh_set_peer;
-static OSSL_OP_keyexch_derive_fn dh_derive;
-static OSSL_OP_keyexch_freectx_fn dh_freectx;
-static OSSL_OP_keyexch_dupctx_fn dh_dupctx;
-static OSSL_OP_keyexch_set_ctx_params_fn dh_set_ctx_params;
-static OSSL_OP_keyexch_settable_ctx_params_fn dh_settable_ctx_params;
+static OSSL_FUNC_keyexch_newctx_fn dh_newctx;
+static OSSL_FUNC_keyexch_init_fn dh_init;
+static OSSL_FUNC_keyexch_set_peer_fn dh_set_peer;
+static OSSL_FUNC_keyexch_derive_fn dh_derive;
+static OSSL_FUNC_keyexch_freectx_fn dh_freectx;
+static OSSL_FUNC_keyexch_dupctx_fn dh_dupctx;
+static OSSL_FUNC_keyexch_set_ctx_params_fn dh_set_ctx_params;
+static OSSL_FUNC_keyexch_settable_ctx_params_fn dh_settable_ctx_params;
/*
* What's passed as an actual key is defined by the KEYMGMT interface.
#include "prov/implementations.h"
#include "crypto/ec.h" /* ecdh_KDF_X9_63() */
-static OSSL_OP_keyexch_newctx_fn ecdh_newctx;
-static OSSL_OP_keyexch_init_fn ecdh_init;
-static OSSL_OP_keyexch_set_peer_fn ecdh_set_peer;
-static OSSL_OP_keyexch_derive_fn ecdh_derive;
-static OSSL_OP_keyexch_freectx_fn ecdh_freectx;
-static OSSL_OP_keyexch_dupctx_fn ecdh_dupctx;
-static OSSL_OP_keyexch_set_ctx_params_fn ecdh_set_ctx_params;
-static OSSL_OP_keyexch_settable_ctx_params_fn ecdh_settable_ctx_params;
-static OSSL_OP_keyexch_get_ctx_params_fn ecdh_get_ctx_params;
-static OSSL_OP_keyexch_gettable_ctx_params_fn ecdh_gettable_ctx_params;
+static OSSL_FUNC_keyexch_newctx_fn ecdh_newctx;
+static OSSL_FUNC_keyexch_init_fn ecdh_init;
+static OSSL_FUNC_keyexch_set_peer_fn ecdh_set_peer;
+static OSSL_FUNC_keyexch_derive_fn ecdh_derive;
+static OSSL_FUNC_keyexch_freectx_fn ecdh_freectx;
+static OSSL_FUNC_keyexch_dupctx_fn ecdh_dupctx;
+static OSSL_FUNC_keyexch_set_ctx_params_fn ecdh_set_ctx_params;
+static OSSL_FUNC_keyexch_settable_ctx_params_fn ecdh_settable_ctx_params;
+static OSSL_FUNC_keyexch_get_ctx_params_fn ecdh_get_ctx_params;
+static OSSL_FUNC_keyexch_gettable_ctx_params_fn ecdh_gettable_ctx_params;
enum kdf_type {
PROV_ECDH_KDF_NONE = 0,
# include "s390x_arch.h"
#endif
-static OSSL_OP_keyexch_newctx_fn x25519_newctx;
-static OSSL_OP_keyexch_newctx_fn x448_newctx;
-static OSSL_OP_keyexch_init_fn ecx_init;
-static OSSL_OP_keyexch_set_peer_fn ecx_set_peer;
-static OSSL_OP_keyexch_derive_fn ecx_derive;
-static OSSL_OP_keyexch_freectx_fn ecx_freectx;
-static OSSL_OP_keyexch_dupctx_fn ecx_dupctx;
+static OSSL_FUNC_keyexch_newctx_fn x25519_newctx;
+static OSSL_FUNC_keyexch_newctx_fn x448_newctx;
+static OSSL_FUNC_keyexch_init_fn ecx_init;
+static OSSL_FUNC_keyexch_set_peer_fn ecx_set_peer;
+static OSSL_FUNC_keyexch_derive_fn ecx_derive;
+static OSSL_FUNC_keyexch_freectx_fn ecx_freectx;
+static OSSL_FUNC_keyexch_dupctx_fn ecx_dupctx;
/*
* What's passed as an actual key is defined by the KEYMGMT interface.
void (*copyctx)(PROV_CIPHER_CTX *dst, const PROV_CIPHER_CTX *src);
};
-OSSL_OP_cipher_encrypt_init_fn cipher_generic_einit;
-OSSL_OP_cipher_decrypt_init_fn cipher_generic_dinit;
-OSSL_OP_cipher_update_fn cipher_generic_block_update;
-OSSL_OP_cipher_final_fn cipher_generic_block_final;
-OSSL_OP_cipher_update_fn cipher_generic_stream_update;
-OSSL_OP_cipher_final_fn cipher_generic_stream_final;
-OSSL_OP_cipher_cipher_fn cipher_generic_cipher;
-OSSL_OP_cipher_get_ctx_params_fn cipher_generic_get_ctx_params;
-OSSL_OP_cipher_set_ctx_params_fn cipher_generic_set_ctx_params;
-OSSL_OP_cipher_gettable_params_fn cipher_generic_gettable_params;
-OSSL_OP_cipher_gettable_ctx_params_fn cipher_generic_gettable_ctx_params;
-OSSL_OP_cipher_settable_ctx_params_fn cipher_generic_settable_ctx_params;
-OSSL_OP_cipher_set_ctx_params_fn cipher_var_keylen_set_ctx_params;
-OSSL_OP_cipher_settable_ctx_params_fn cipher_var_keylen_settable_ctx_params;
-OSSL_OP_cipher_gettable_ctx_params_fn cipher_aead_gettable_ctx_params;
-OSSL_OP_cipher_settable_ctx_params_fn cipher_aead_settable_ctx_params;
+OSSL_FUNC_cipher_encrypt_init_fn cipher_generic_einit;
+OSSL_FUNC_cipher_decrypt_init_fn cipher_generic_dinit;
+OSSL_FUNC_cipher_update_fn cipher_generic_block_update;
+OSSL_FUNC_cipher_final_fn cipher_generic_block_final;
+OSSL_FUNC_cipher_update_fn cipher_generic_stream_update;
+OSSL_FUNC_cipher_final_fn cipher_generic_stream_final;
+OSSL_FUNC_cipher_cipher_fn cipher_generic_cipher;
+OSSL_FUNC_cipher_get_ctx_params_fn cipher_generic_get_ctx_params;
+OSSL_FUNC_cipher_set_ctx_params_fn cipher_generic_set_ctx_params;
+OSSL_FUNC_cipher_gettable_params_fn cipher_generic_gettable_params;
+OSSL_FUNC_cipher_gettable_ctx_params_fn cipher_generic_gettable_ctx_params;
+OSSL_FUNC_cipher_settable_ctx_params_fn cipher_generic_settable_ctx_params;
+OSSL_FUNC_cipher_set_ctx_params_fn cipher_var_keylen_set_ctx_params;
+OSSL_FUNC_cipher_settable_ctx_params_fn cipher_var_keylen_settable_ctx_params;
+OSSL_FUNC_cipher_gettable_ctx_params_fn cipher_aead_gettable_ctx_params;
+OSSL_FUNC_cipher_settable_ctx_params_fn cipher_aead_settable_ctx_params;
int cipher_generic_get_params(OSSL_PARAM params[], unsigned int md,
unsigned long flags,
size_t kbits, size_t blkbits, size_t ivbits);
#define IMPLEMENT_generic_cipher_genfn(alg, UCALG, lcmode, UCMODE, flags, \
kbits, blkbits, ivbits, typ) \
-static OSSL_OP_cipher_get_params_fn alg##_##kbits##_##lcmode##_get_params; \
+static OSSL_FUNC_cipher_get_params_fn alg##_##kbits##_##lcmode##_get_params; \
static int alg##_##kbits##_##lcmode##_get_params(OSSL_PARAM params[]) \
{ \
return cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, flags, \
kbits, blkbits, ivbits); \
} \
-static OSSL_OP_cipher_newctx_fn alg##_##kbits##_##lcmode##_newctx; \
+static OSSL_FUNC_cipher_newctx_fn alg##_##kbits##_##lcmode##_newctx; \
static void * alg##_##kbits##_##lcmode##_newctx(void *provctx) \
{ \
PROV_##UCALG##_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx)); \
| EVP_CIPH_CUSTOM_COPY)
#define IMPLEMENT_aead_cipher(alg, lc, UCMODE, flags, kbits, blkbits, ivbits) \
-static OSSL_OP_cipher_get_params_fn alg##_##kbits##_##lc##_get_params; \
+static OSSL_FUNC_cipher_get_params_fn alg##_##kbits##_##lc##_get_params; \
static int alg##_##kbits##_##lc##_get_params(OSSL_PARAM params[]) \
{ \
return cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \
flags, kbits, blkbits, ivbits); \
} \
-static OSSL_OP_cipher_newctx_fn alg##kbits##lc##_newctx; \
+static OSSL_FUNC_cipher_newctx_fn alg##kbits##lc##_newctx; \
static void * alg##kbits##lc##_newctx(void *provctx) \
{ \
return alg##_##lc##_newctx(provctx, kbits); \
OSSL_CCM_gettag_fn gettag;
};
-OSSL_OP_cipher_encrypt_init_fn ccm_einit;
-OSSL_OP_cipher_decrypt_init_fn ccm_dinit;
-OSSL_OP_cipher_get_ctx_params_fn ccm_get_ctx_params;
-OSSL_OP_cipher_set_ctx_params_fn ccm_set_ctx_params;
-OSSL_OP_cipher_update_fn ccm_stream_update;
-OSSL_OP_cipher_final_fn ccm_stream_final;
-OSSL_OP_cipher_cipher_fn ccm_cipher;
+OSSL_FUNC_cipher_encrypt_init_fn ccm_einit;
+OSSL_FUNC_cipher_decrypt_init_fn ccm_dinit;
+OSSL_FUNC_cipher_get_ctx_params_fn ccm_get_ctx_params;
+OSSL_FUNC_cipher_set_ctx_params_fn ccm_set_ctx_params;
+OSSL_FUNC_cipher_update_fn ccm_stream_update;
+OSSL_FUNC_cipher_final_fn ccm_stream_final;
+OSSL_FUNC_cipher_cipher_fn ccm_cipher;
void ccm_initctx(PROV_CCM_CTX *ctx, size_t keybits, const PROV_CCM_HW *hw);
int ccm_generic_setiv(PROV_CCM_CTX *ctx, const unsigned char *nonce,
OSSL_GCM_oneshot_fn oneshot;
};
-OSSL_OP_cipher_encrypt_init_fn gcm_einit;
-OSSL_OP_cipher_decrypt_init_fn gcm_dinit;
-OSSL_OP_cipher_get_ctx_params_fn gcm_get_ctx_params;
-OSSL_OP_cipher_set_ctx_params_fn gcm_set_ctx_params;
-OSSL_OP_cipher_cipher_fn gcm_cipher;
-OSSL_OP_cipher_update_fn gcm_stream_update;
-OSSL_OP_cipher_final_fn gcm_stream_final;
+OSSL_FUNC_cipher_encrypt_init_fn gcm_einit;
+OSSL_FUNC_cipher_decrypt_init_fn gcm_dinit;
+OSSL_FUNC_cipher_get_ctx_params_fn gcm_get_ctx_params;
+OSSL_FUNC_cipher_set_ctx_params_fn gcm_set_ctx_params;
+OSSL_FUNC_cipher_cipher_fn gcm_cipher;
+OSSL_FUNC_cipher_update_fn gcm_stream_update;
+OSSL_FUNC_cipher_final_fn gcm_stream_final;
void gcm_initctx(void *provctx, PROV_GCM_CTX *ctx, size_t keybits,
const PROV_GCM_HW *hw, size_t ivlen_min);
# endif
#define PROV_FUNC_DIGEST_GET_PARAM(name, blksize, dgstsize, flags) \
-static OSSL_OP_digest_get_params_fn name##_get_params; \
+static OSSL_FUNC_digest_get_params_fn name##_get_params; \
static int name##_get_params(OSSL_PARAM params[]) \
{ \
return digest_default_get_params(params, blksize, dgstsize, flags); \
# define PROV_DISPATCH_FUNC_DIGEST_CONSTRUCT_START( \
name, CTX, blksize, dgstsize, flags, init, upd, fin) \
-static OSSL_OP_digest_newctx_fn name##_newctx; \
-static OSSL_OP_digest_freectx_fn name##_freectx; \
-static OSSL_OP_digest_dupctx_fn name##_dupctx; \
+static OSSL_FUNC_digest_newctx_fn name##_newctx; \
+static OSSL_FUNC_digest_freectx_fn name##_freectx; \
+static OSSL_FUNC_digest_dupctx_fn name##_dupctx; \
static void *name##_newctx(void *prov_ctx) \
{ \
CTX *ctx = OPENSSL_zalloc(sizeof(*ctx)); \
*ret = *in; \
return ret; \
} \
-static OSSL_OP_digest_final_fn name##_internal_final; \
+static OSSL_FUNC_digest_final_fn name##_internal_final; \
static int name##_internal_final(void *ctx, unsigned char *out, size_t *outl, \
size_t outsz) \
{ \
#define HKDF_MAXBUF 1024
-static OSSL_OP_kdf_newctx_fn kdf_hkdf_new;
-static OSSL_OP_kdf_freectx_fn kdf_hkdf_free;
-static OSSL_OP_kdf_reset_fn kdf_hkdf_reset;
-static OSSL_OP_kdf_derive_fn kdf_hkdf_derive;
-static OSSL_OP_kdf_settable_ctx_params_fn kdf_hkdf_settable_ctx_params;
-static OSSL_OP_kdf_set_ctx_params_fn kdf_hkdf_set_ctx_params;
-static OSSL_OP_kdf_gettable_ctx_params_fn kdf_hkdf_gettable_ctx_params;
-static OSSL_OP_kdf_get_ctx_params_fn kdf_hkdf_get_ctx_params;
+static OSSL_FUNC_kdf_newctx_fn kdf_hkdf_new;
+static OSSL_FUNC_kdf_freectx_fn kdf_hkdf_free;
+static OSSL_FUNC_kdf_reset_fn kdf_hkdf_reset;
+static OSSL_FUNC_kdf_derive_fn kdf_hkdf_derive;
+static OSSL_FUNC_kdf_settable_ctx_params_fn kdf_hkdf_settable_ctx_params;
+static OSSL_FUNC_kdf_set_ctx_params_fn kdf_hkdf_set_ctx_params;
+static OSSL_FUNC_kdf_gettable_ctx_params_fn kdf_hkdf_gettable_ctx_params;
+static OSSL_FUNC_kdf_get_ctx_params_fn kdf_hkdf_get_ctx_params;
static int HKDF(const EVP_MD *evp_md,
const unsigned char *salt, size_t salt_len,
} KBKDF;
/* Definitions needed for typechecking. */
-static OSSL_OP_kdf_newctx_fn kbkdf_new;
-static OSSL_OP_kdf_freectx_fn kbkdf_free;
-static OSSL_OP_kdf_reset_fn kbkdf_reset;
-static OSSL_OP_kdf_derive_fn kbkdf_derive;
-static OSSL_OP_kdf_settable_ctx_params_fn kbkdf_settable_ctx_params;
-static OSSL_OP_kdf_set_ctx_params_fn kbkdf_set_ctx_params;
+static OSSL_FUNC_kdf_newctx_fn kbkdf_new;
+static OSSL_FUNC_kdf_freectx_fn kbkdf_free;
+static OSSL_FUNC_kdf_reset_fn kbkdf_reset;
+static OSSL_FUNC_kdf_derive_fn kbkdf_derive;
+static OSSL_FUNC_kdf_settable_ctx_params_fn kbkdf_settable_ctx_params;
+static OSSL_FUNC_kdf_set_ctx_params_fn kbkdf_set_ctx_params;
/* Not all platforms have htobe32(). */
static uint32_t be32(uint32_t host)
/* KRB5 KDF defined in RFC 3961, Section 5.1 */
-static OSSL_OP_kdf_newctx_fn krb5kdf_new;
-static OSSL_OP_kdf_freectx_fn krb5kdf_free;
-static OSSL_OP_kdf_reset_fn krb5kdf_reset;
-static OSSL_OP_kdf_derive_fn krb5kdf_derive;
-static OSSL_OP_kdf_settable_ctx_params_fn krb5kdf_settable_ctx_params;
-static OSSL_OP_kdf_set_ctx_params_fn krb5kdf_set_ctx_params;
-static OSSL_OP_kdf_gettable_ctx_params_fn krb5kdf_gettable_ctx_params;
-static OSSL_OP_kdf_get_ctx_params_fn krb5kdf_get_ctx_params;
+static OSSL_FUNC_kdf_newctx_fn krb5kdf_new;
+static OSSL_FUNC_kdf_freectx_fn krb5kdf_free;
+static OSSL_FUNC_kdf_reset_fn krb5kdf_reset;
+static OSSL_FUNC_kdf_derive_fn krb5kdf_derive;
+static OSSL_FUNC_kdf_settable_ctx_params_fn krb5kdf_settable_ctx_params;
+static OSSL_FUNC_kdf_set_ctx_params_fn krb5kdf_set_ctx_params;
+static OSSL_FUNC_kdf_gettable_ctx_params_fn krb5kdf_gettable_ctx_params;
+static OSSL_FUNC_kdf_get_ctx_params_fn krb5kdf_get_ctx_params;
static int KRB5KDF(const EVP_CIPHER *cipher, ENGINE *engine,
const unsigned char *key, size_t key_len,
#define KDF_PBKDF2_MIN_ITERATIONS 1000
#define KDF_PBKDF2_MIN_SALT_LEN (128 / 8)
-static OSSL_OP_kdf_newctx_fn kdf_pbkdf2_new;
-static OSSL_OP_kdf_freectx_fn kdf_pbkdf2_free;
-static OSSL_OP_kdf_reset_fn kdf_pbkdf2_reset;
-static OSSL_OP_kdf_derive_fn kdf_pbkdf2_derive;
-static OSSL_OP_kdf_settable_ctx_params_fn kdf_pbkdf2_settable_ctx_params;
-static OSSL_OP_kdf_set_ctx_params_fn kdf_pbkdf2_set_ctx_params;
+static OSSL_FUNC_kdf_newctx_fn kdf_pbkdf2_new;
+static OSSL_FUNC_kdf_freectx_fn kdf_pbkdf2_free;
+static OSSL_FUNC_kdf_reset_fn kdf_pbkdf2_reset;
+static OSSL_FUNC_kdf_derive_fn kdf_pbkdf2_derive;
+static OSSL_FUNC_kdf_settable_ctx_params_fn kdf_pbkdf2_settable_ctx_params;
+static OSSL_FUNC_kdf_set_ctx_params_fn kdf_pbkdf2_set_ctx_params;
static int pbkdf2_derive(const char *pass, size_t passlen,
const unsigned char *salt, int saltlen, uint64_t iter,
#ifndef OPENSSL_NO_SCRYPT
-static OSSL_OP_kdf_newctx_fn kdf_scrypt_new;
-static OSSL_OP_kdf_freectx_fn kdf_scrypt_free;
-static OSSL_OP_kdf_reset_fn kdf_scrypt_reset;
-static OSSL_OP_kdf_derive_fn kdf_scrypt_derive;
-static OSSL_OP_kdf_settable_ctx_params_fn kdf_scrypt_settable_ctx_params;
-static OSSL_OP_kdf_set_ctx_params_fn kdf_scrypt_set_ctx_params;
+static OSSL_FUNC_kdf_newctx_fn kdf_scrypt_new;
+static OSSL_FUNC_kdf_freectx_fn kdf_scrypt_free;
+static OSSL_FUNC_kdf_reset_fn kdf_scrypt_reset;
+static OSSL_FUNC_kdf_derive_fn kdf_scrypt_derive;
+static OSSL_FUNC_kdf_settable_ctx_params_fn kdf_scrypt_settable_ctx_params;
+static OSSL_FUNC_kdf_set_ctx_params_fn kdf_scrypt_set_ctx_params;
static int scrypt_alg(const char *pass, size_t passlen,
const unsigned char *salt, size_t saltlen,
# include "prov/provider_util.h"
/* See RFC 4253, Section 7.2 */
-static OSSL_OP_kdf_newctx_fn kdf_sshkdf_new;
-static OSSL_OP_kdf_freectx_fn kdf_sshkdf_free;
-static OSSL_OP_kdf_reset_fn kdf_sshkdf_reset;
-static OSSL_OP_kdf_derive_fn kdf_sshkdf_derive;
-static OSSL_OP_kdf_settable_ctx_params_fn kdf_sshkdf_settable_ctx_params;
-static OSSL_OP_kdf_set_ctx_params_fn kdf_sshkdf_set_ctx_params;
-static OSSL_OP_kdf_gettable_ctx_params_fn kdf_sshkdf_gettable_ctx_params;
-static OSSL_OP_kdf_get_ctx_params_fn kdf_sshkdf_get_ctx_params;
+static OSSL_FUNC_kdf_newctx_fn kdf_sshkdf_new;
+static OSSL_FUNC_kdf_freectx_fn kdf_sshkdf_free;
+static OSSL_FUNC_kdf_reset_fn kdf_sshkdf_reset;
+static OSSL_FUNC_kdf_derive_fn kdf_sshkdf_derive;
+static OSSL_FUNC_kdf_settable_ctx_params_fn kdf_sshkdf_settable_ctx_params;
+static OSSL_FUNC_kdf_set_ctx_params_fn kdf_sshkdf_set_ctx_params;
+static OSSL_FUNC_kdf_gettable_ctx_params_fn kdf_sshkdf_gettable_ctx_params;
+static OSSL_FUNC_kdf_get_ctx_params_fn kdf_sshkdf_get_ctx_params;
static int SSHKDF(const EVP_MD *evp_md,
const unsigned char *key, size_t key_len,
/* KMAC uses a Customisation string of 'KDF' */
static const unsigned char kmac_custom_str[] = { 0x4B, 0x44, 0x46 };
-static OSSL_OP_kdf_newctx_fn sskdf_new;
-static OSSL_OP_kdf_freectx_fn sskdf_free;
-static OSSL_OP_kdf_reset_fn sskdf_reset;
-static OSSL_OP_kdf_derive_fn sskdf_derive;
-static OSSL_OP_kdf_derive_fn x963kdf_derive;
-static OSSL_OP_kdf_settable_ctx_params_fn sskdf_settable_ctx_params;
-static OSSL_OP_kdf_set_ctx_params_fn sskdf_set_ctx_params;
-static OSSL_OP_kdf_gettable_ctx_params_fn sskdf_gettable_ctx_params;
-static OSSL_OP_kdf_get_ctx_params_fn sskdf_get_ctx_params;
+static OSSL_FUNC_kdf_newctx_fn sskdf_new;
+static OSSL_FUNC_kdf_freectx_fn sskdf_free;
+static OSSL_FUNC_kdf_reset_fn sskdf_reset;
+static OSSL_FUNC_kdf_derive_fn sskdf_derive;
+static OSSL_FUNC_kdf_derive_fn x963kdf_derive;
+static OSSL_FUNC_kdf_settable_ctx_params_fn sskdf_settable_ctx_params;
+static OSSL_FUNC_kdf_set_ctx_params_fn sskdf_set_ctx_params;
+static OSSL_FUNC_kdf_gettable_ctx_params_fn sskdf_gettable_ctx_params;
+static OSSL_FUNC_kdf_get_ctx_params_fn sskdf_get_ctx_params;
/*
* Refer to https://csrc.nist.gov/publications/detail/sp/800-56c/rev-1/final
#include "prov/provider_util.h"
#include "e_os.h"
-static OSSL_OP_kdf_newctx_fn kdf_tls1_prf_new;
-static OSSL_OP_kdf_freectx_fn kdf_tls1_prf_free;
-static OSSL_OP_kdf_reset_fn kdf_tls1_prf_reset;
-static OSSL_OP_kdf_derive_fn kdf_tls1_prf_derive;
-static OSSL_OP_kdf_settable_ctx_params_fn kdf_tls1_prf_settable_ctx_params;
-static OSSL_OP_kdf_set_ctx_params_fn kdf_tls1_prf_set_ctx_params;
+static OSSL_FUNC_kdf_newctx_fn kdf_tls1_prf_new;
+static OSSL_FUNC_kdf_freectx_fn kdf_tls1_prf_free;
+static OSSL_FUNC_kdf_reset_fn kdf_tls1_prf_reset;
+static OSSL_FUNC_kdf_derive_fn kdf_tls1_prf_derive;
+static OSSL_FUNC_kdf_settable_ctx_params_fn kdf_tls1_prf_settable_ctx_params;
+static OSSL_FUNC_kdf_set_ctx_params_fn kdf_tls1_prf_set_ctx_params;
static int tls1_prf_alg(EVP_MAC_CTX *mdctx, EVP_MAC_CTX *sha1ctx,
const unsigned char *sec, size_t slen,
# define X942KDF_MAX_INLEN (1 << 30)
-static OSSL_OP_kdf_newctx_fn x942kdf_new;
-static OSSL_OP_kdf_freectx_fn x942kdf_free;
-static OSSL_OP_kdf_reset_fn x942kdf_reset;
-static OSSL_OP_kdf_derive_fn x942kdf_derive;
-static OSSL_OP_kdf_settable_ctx_params_fn x942kdf_settable_ctx_params;
-static OSSL_OP_kdf_set_ctx_params_fn x942kdf_set_ctx_params;
-static OSSL_OP_kdf_gettable_ctx_params_fn x942kdf_gettable_ctx_params;
-static OSSL_OP_kdf_get_ctx_params_fn x942kdf_get_ctx_params;
+static OSSL_FUNC_kdf_newctx_fn x942kdf_new;
+static OSSL_FUNC_kdf_freectx_fn x942kdf_free;
+static OSSL_FUNC_kdf_reset_fn x942kdf_reset;
+static OSSL_FUNC_kdf_derive_fn x942kdf_derive;
+static OSSL_FUNC_kdf_settable_ctx_params_fn x942kdf_settable_ctx_params;
+static OSSL_FUNC_kdf_set_ctx_params_fn x942kdf_set_ctx_params;
+static OSSL_FUNC_kdf_gettable_ctx_params_fn x942kdf_gettable_ctx_params;
+static OSSL_FUNC_kdf_get_ctx_params_fn x942kdf_get_ctx_params;
typedef struct {
void *provctx;
#include "internal/nelem.h"
#include "internal/param_build_set.h"
-static OSSL_OP_keymgmt_new_fn dh_newdata;
-static OSSL_OP_keymgmt_free_fn dh_freedata;
-static OSSL_OP_keymgmt_gen_init_fn dh_gen_init;
-static OSSL_OP_keymgmt_gen_set_template_fn dh_gen_set_template;
-static OSSL_OP_keymgmt_gen_set_params_fn dh_gen_set_params;
-static OSSL_OP_keymgmt_gen_settable_params_fn dh_gen_settable_params;
-static OSSL_OP_keymgmt_gen_fn dh_gen;
-static OSSL_OP_keymgmt_gen_cleanup_fn dh_gen_cleanup;
-static OSSL_OP_keymgmt_get_params_fn dh_get_params;
-static OSSL_OP_keymgmt_gettable_params_fn dh_gettable_params;
-static OSSL_OP_keymgmt_set_params_fn dh_set_params;
-static OSSL_OP_keymgmt_settable_params_fn dh_settable_params;
-static OSSL_OP_keymgmt_has_fn dh_has;
-static OSSL_OP_keymgmt_match_fn dh_match;
-static OSSL_OP_keymgmt_validate_fn dh_validate;
-static OSSL_OP_keymgmt_import_fn dh_import;
-static OSSL_OP_keymgmt_import_types_fn dh_import_types;
-static OSSL_OP_keymgmt_export_fn dh_export;
-static OSSL_OP_keymgmt_export_types_fn dh_export_types;
+static OSSL_FUNC_keymgmt_new_fn dh_newdata;
+static OSSL_FUNC_keymgmt_free_fn dh_freedata;
+static OSSL_FUNC_keymgmt_gen_init_fn dh_gen_init;
+static OSSL_FUNC_keymgmt_gen_set_template_fn dh_gen_set_template;
+static OSSL_FUNC_keymgmt_gen_set_params_fn dh_gen_set_params;
+static OSSL_FUNC_keymgmt_gen_settable_params_fn dh_gen_settable_params;
+static OSSL_FUNC_keymgmt_gen_fn dh_gen;
+static OSSL_FUNC_keymgmt_gen_cleanup_fn dh_gen_cleanup;
+static OSSL_FUNC_keymgmt_get_params_fn dh_get_params;
+static OSSL_FUNC_keymgmt_gettable_params_fn dh_gettable_params;
+static OSSL_FUNC_keymgmt_set_params_fn dh_set_params;
+static OSSL_FUNC_keymgmt_settable_params_fn dh_settable_params;
+static OSSL_FUNC_keymgmt_has_fn dh_has;
+static OSSL_FUNC_keymgmt_match_fn dh_match;
+static OSSL_FUNC_keymgmt_validate_fn dh_validate;
+static OSSL_FUNC_keymgmt_import_fn dh_import;
+static OSSL_FUNC_keymgmt_import_types_fn dh_import_types;
+static OSSL_FUNC_keymgmt_export_fn dh_export;
+static OSSL_FUNC_keymgmt_export_types_fn dh_export_types;
#define DH_POSSIBLE_SELECTIONS \
(OSSL_KEYMGMT_SELECT_KEYPAIR | OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS)
#include "internal/nelem.h"
#include "internal/param_build_set.h"
-static OSSL_OP_keymgmt_new_fn dsa_newdata;
-static OSSL_OP_keymgmt_free_fn dsa_freedata;
-static OSSL_OP_keymgmt_gen_init_fn dsa_gen_init;
-static OSSL_OP_keymgmt_gen_set_template_fn dsa_gen_set_template;
-static OSSL_OP_keymgmt_gen_set_params_fn dsa_gen_set_params;
-static OSSL_OP_keymgmt_gen_settable_params_fn dsa_gen_settable_params;
-static OSSL_OP_keymgmt_gen_fn dsa_gen;
-static OSSL_OP_keymgmt_gen_cleanup_fn dsa_gen_cleanup;
-static OSSL_OP_keymgmt_get_params_fn dsa_get_params;
-static OSSL_OP_keymgmt_gettable_params_fn dsa_gettable_params;
-static OSSL_OP_keymgmt_has_fn dsa_has;
-static OSSL_OP_keymgmt_match_fn dsa_match;
-static OSSL_OP_keymgmt_validate_fn dsa_validate;
-static OSSL_OP_keymgmt_import_fn dsa_import;
-static OSSL_OP_keymgmt_import_types_fn dsa_import_types;
-static OSSL_OP_keymgmt_export_fn dsa_export;
-static OSSL_OP_keymgmt_export_types_fn dsa_export_types;
+static OSSL_FUNC_keymgmt_new_fn dsa_newdata;
+static OSSL_FUNC_keymgmt_free_fn dsa_freedata;
+static OSSL_FUNC_keymgmt_gen_init_fn dsa_gen_init;
+static OSSL_FUNC_keymgmt_gen_set_template_fn dsa_gen_set_template;
+static OSSL_FUNC_keymgmt_gen_set_params_fn dsa_gen_set_params;
+static OSSL_FUNC_keymgmt_gen_settable_params_fn dsa_gen_settable_params;
+static OSSL_FUNC_keymgmt_gen_fn dsa_gen;
+static OSSL_FUNC_keymgmt_gen_cleanup_fn dsa_gen_cleanup;
+static OSSL_FUNC_keymgmt_get_params_fn dsa_get_params;
+static OSSL_FUNC_keymgmt_gettable_params_fn dsa_gettable_params;
+static OSSL_FUNC_keymgmt_has_fn dsa_has;
+static OSSL_FUNC_keymgmt_match_fn dsa_match;
+static OSSL_FUNC_keymgmt_validate_fn dsa_validate;
+static OSSL_FUNC_keymgmt_import_fn dsa_import;
+static OSSL_FUNC_keymgmt_import_types_fn dsa_import_types;
+static OSSL_FUNC_keymgmt_export_fn dsa_export;
+static OSSL_FUNC_keymgmt_export_types_fn dsa_export_types;
#define DSA_DEFAULT_MD "SHA256"
#define DSA_POSSIBLE_SELECTIONS \
#include "prov/provider_ctx.h"
#include "internal/param_build_set.h"
-static OSSL_OP_keymgmt_new_fn ec_newdata;
-static OSSL_OP_keymgmt_gen_init_fn ec_gen_init;
-static OSSL_OP_keymgmt_gen_set_template_fn ec_gen_set_template;
-static OSSL_OP_keymgmt_gen_set_params_fn ec_gen_set_params;
-static OSSL_OP_keymgmt_gen_settable_params_fn ec_gen_settable_params;
-static OSSL_OP_keymgmt_gen_fn ec_gen;
-static OSSL_OP_keymgmt_gen_cleanup_fn ec_gen_cleanup;
-static OSSL_OP_keymgmt_free_fn ec_freedata;
-static OSSL_OP_keymgmt_get_params_fn ec_get_params;
-static OSSL_OP_keymgmt_gettable_params_fn ec_gettable_params;
-static OSSL_OP_keymgmt_set_params_fn ec_set_params;
-static OSSL_OP_keymgmt_settable_params_fn ec_settable_params;
-static OSSL_OP_keymgmt_has_fn ec_has;
-static OSSL_OP_keymgmt_match_fn ec_match;
-static OSSL_OP_keymgmt_validate_fn ec_validate;
-static OSSL_OP_keymgmt_import_fn ec_import;
-static OSSL_OP_keymgmt_import_types_fn ec_import_types;
-static OSSL_OP_keymgmt_export_fn ec_export;
-static OSSL_OP_keymgmt_export_types_fn ec_export_types;
-static OSSL_OP_keymgmt_query_operation_name_fn ec_query_operation_name;
+static OSSL_FUNC_keymgmt_new_fn ec_newdata;
+static OSSL_FUNC_keymgmt_gen_init_fn ec_gen_init;
+static OSSL_FUNC_keymgmt_gen_set_template_fn ec_gen_set_template;
+static OSSL_FUNC_keymgmt_gen_set_params_fn ec_gen_set_params;
+static OSSL_FUNC_keymgmt_gen_settable_params_fn ec_gen_settable_params;
+static OSSL_FUNC_keymgmt_gen_fn ec_gen;
+static OSSL_FUNC_keymgmt_gen_cleanup_fn ec_gen_cleanup;
+static OSSL_FUNC_keymgmt_free_fn ec_freedata;
+static OSSL_FUNC_keymgmt_get_params_fn ec_get_params;
+static OSSL_FUNC_keymgmt_gettable_params_fn ec_gettable_params;
+static OSSL_FUNC_keymgmt_set_params_fn ec_set_params;
+static OSSL_FUNC_keymgmt_settable_params_fn ec_settable_params;
+static OSSL_FUNC_keymgmt_has_fn ec_has;
+static OSSL_FUNC_keymgmt_match_fn ec_match;
+static OSSL_FUNC_keymgmt_validate_fn ec_validate;
+static OSSL_FUNC_keymgmt_import_fn ec_import;
+static OSSL_FUNC_keymgmt_import_types_fn ec_import_types;
+static OSSL_FUNC_keymgmt_export_fn ec_export;
+static OSSL_FUNC_keymgmt_export_types_fn ec_export_types;
+static OSSL_FUNC_keymgmt_query_operation_name_fn ec_query_operation_name;
#define EC_DEFAULT_MD "SHA256"
#define EC_POSSIBLE_SELECTIONS \
# include <openssl/sha.h> /* For SHA512_DIGEST_LENGTH */
#endif
-static OSSL_OP_keymgmt_new_fn x25519_new_key;
-static OSSL_OP_keymgmt_new_fn x448_new_key;
-static OSSL_OP_keymgmt_new_fn ed25519_new_key;
-static OSSL_OP_keymgmt_new_fn ed448_new_key;
-static OSSL_OP_keymgmt_gen_init_fn x25519_gen_init;
-static OSSL_OP_keymgmt_gen_init_fn x448_gen_init;
-static OSSL_OP_keymgmt_gen_init_fn ed25519_gen_init;
-static OSSL_OP_keymgmt_gen_init_fn ed448_gen_init;
-static OSSL_OP_keymgmt_gen_fn x25519_gen;
-static OSSL_OP_keymgmt_gen_fn x448_gen;
-static OSSL_OP_keymgmt_gen_fn ed25519_gen;
-static OSSL_OP_keymgmt_gen_fn ed448_gen;
-static OSSL_OP_keymgmt_gen_cleanup_fn ecx_gen_cleanup;
-static OSSL_OP_keymgmt_get_params_fn x25519_get_params;
-static OSSL_OP_keymgmt_get_params_fn x448_get_params;
-static OSSL_OP_keymgmt_get_params_fn ed25519_get_params;
-static OSSL_OP_keymgmt_get_params_fn ed448_get_params;
-static OSSL_OP_keymgmt_gettable_params_fn x25519_gettable_params;
-static OSSL_OP_keymgmt_gettable_params_fn x448_gettable_params;
-static OSSL_OP_keymgmt_gettable_params_fn ed25519_gettable_params;
-static OSSL_OP_keymgmt_gettable_params_fn ed448_gettable_params;
-static OSSL_OP_keymgmt_set_params_fn x25519_set_params;
-static OSSL_OP_keymgmt_set_params_fn x448_set_params;
-static OSSL_OP_keymgmt_set_params_fn ed25519_set_params;
-static OSSL_OP_keymgmt_set_params_fn ed448_set_params;
-static OSSL_OP_keymgmt_settable_params_fn x25519_settable_params;
-static OSSL_OP_keymgmt_settable_params_fn x448_settable_params;
-static OSSL_OP_keymgmt_settable_params_fn ed25519_settable_params;
-static OSSL_OP_keymgmt_settable_params_fn ed448_settable_params;
-static OSSL_OP_keymgmt_has_fn ecx_has;
-static OSSL_OP_keymgmt_match_fn ecx_match;
-static OSSL_OP_keymgmt_import_fn ecx_import;
-static OSSL_OP_keymgmt_import_types_fn ecx_imexport_types;
-static OSSL_OP_keymgmt_export_fn ecx_export;
-static OSSL_OP_keymgmt_export_types_fn ecx_imexport_types;
+static OSSL_FUNC_keymgmt_new_fn x25519_new_key;
+static OSSL_FUNC_keymgmt_new_fn x448_new_key;
+static OSSL_FUNC_keymgmt_new_fn ed25519_new_key;
+static OSSL_FUNC_keymgmt_new_fn ed448_new_key;
+static OSSL_FUNC_keymgmt_gen_init_fn x25519_gen_init;
+static OSSL_FUNC_keymgmt_gen_init_fn x448_gen_init;
+static OSSL_FUNC_keymgmt_gen_init_fn ed25519_gen_init;
+static OSSL_FUNC_keymgmt_gen_init_fn ed448_gen_init;
+static OSSL_FUNC_keymgmt_gen_fn x25519_gen;
+static OSSL_FUNC_keymgmt_gen_fn x448_gen;
+static OSSL_FUNC_keymgmt_gen_fn ed25519_gen;
+static OSSL_FUNC_keymgmt_gen_fn ed448_gen;
+static OSSL_FUNC_keymgmt_gen_cleanup_fn ecx_gen_cleanup;
+static OSSL_FUNC_keymgmt_get_params_fn x25519_get_params;
+static OSSL_FUNC_keymgmt_get_params_fn x448_get_params;
+static OSSL_FUNC_keymgmt_get_params_fn ed25519_get_params;
+static OSSL_FUNC_keymgmt_get_params_fn ed448_get_params;
+static OSSL_FUNC_keymgmt_gettable_params_fn x25519_gettable_params;
+static OSSL_FUNC_keymgmt_gettable_params_fn x448_gettable_params;
+static OSSL_FUNC_keymgmt_gettable_params_fn ed25519_gettable_params;
+static OSSL_FUNC_keymgmt_gettable_params_fn ed448_gettable_params;
+static OSSL_FUNC_keymgmt_set_params_fn x25519_set_params;
+static OSSL_FUNC_keymgmt_set_params_fn x448_set_params;
+static OSSL_FUNC_keymgmt_set_params_fn ed25519_set_params;
+static OSSL_FUNC_keymgmt_set_params_fn ed448_set_params;
+static OSSL_FUNC_keymgmt_settable_params_fn x25519_settable_params;
+static OSSL_FUNC_keymgmt_settable_params_fn x448_settable_params;
+static OSSL_FUNC_keymgmt_settable_params_fn ed25519_settable_params;
+static OSSL_FUNC_keymgmt_settable_params_fn ed448_settable_params;
+static OSSL_FUNC_keymgmt_has_fn ecx_has;
+static OSSL_FUNC_keymgmt_match_fn ecx_match;
+static OSSL_FUNC_keymgmt_import_fn ecx_import;
+static OSSL_FUNC_keymgmt_import_types_fn ecx_imexport_types;
+static OSSL_FUNC_keymgmt_export_fn ecx_export;
+static OSSL_FUNC_keymgmt_export_types_fn ecx_imexport_types;
#define ECX_POSSIBLE_SELECTIONS (OSSL_KEYMGMT_SELECT_KEYPAIR)
#include "crypto/rsa.h"
#include "internal/param_build_set.h"
-static OSSL_OP_keymgmt_new_fn rsa_newdata;
-static OSSL_OP_keymgmt_new_fn rsapss_newdata;
-static OSSL_OP_keymgmt_gen_init_fn rsa_gen_init;
-static OSSL_OP_keymgmt_gen_init_fn rsapss_gen_init;
-static OSSL_OP_keymgmt_gen_set_params_fn rsa_gen_set_params;
-static OSSL_OP_keymgmt_gen_settable_params_fn rsa_gen_settable_params;
-static OSSL_OP_keymgmt_gen_settable_params_fn rsapss_gen_settable_params;
-static OSSL_OP_keymgmt_gen_fn rsa_gen;
-static OSSL_OP_keymgmt_gen_cleanup_fn rsa_gen_cleanup;
-static OSSL_OP_keymgmt_free_fn rsa_freedata;
-static OSSL_OP_keymgmt_get_params_fn rsa_get_params;
-static OSSL_OP_keymgmt_gettable_params_fn rsa_gettable_params;
-static OSSL_OP_keymgmt_has_fn rsa_has;
-static OSSL_OP_keymgmt_match_fn rsa_match;
-static OSSL_OP_keymgmt_validate_fn rsa_validate;
-static OSSL_OP_keymgmt_import_fn rsa_import;
-static OSSL_OP_keymgmt_import_types_fn rsa_import_types;
-static OSSL_OP_keymgmt_export_fn rsa_export;
-static OSSL_OP_keymgmt_export_types_fn rsa_export_types;
-static OSSL_OP_keymgmt_query_operation_name_fn rsapss_query_operation_name;
+static OSSL_FUNC_keymgmt_new_fn rsa_newdata;
+static OSSL_FUNC_keymgmt_new_fn rsapss_newdata;
+static OSSL_FUNC_keymgmt_gen_init_fn rsa_gen_init;
+static OSSL_FUNC_keymgmt_gen_init_fn rsapss_gen_init;
+static OSSL_FUNC_keymgmt_gen_set_params_fn rsa_gen_set_params;
+static OSSL_FUNC_keymgmt_gen_settable_params_fn rsa_gen_settable_params;
+static OSSL_FUNC_keymgmt_gen_settable_params_fn rsapss_gen_settable_params;
+static OSSL_FUNC_keymgmt_gen_fn rsa_gen;
+static OSSL_FUNC_keymgmt_gen_cleanup_fn rsa_gen_cleanup;
+static OSSL_FUNC_keymgmt_free_fn rsa_freedata;
+static OSSL_FUNC_keymgmt_get_params_fn rsa_get_params;
+static OSSL_FUNC_keymgmt_gettable_params_fn rsa_gettable_params;
+static OSSL_FUNC_keymgmt_has_fn rsa_has;
+static OSSL_FUNC_keymgmt_match_fn rsa_match;
+static OSSL_FUNC_keymgmt_validate_fn rsa_validate;
+static OSSL_FUNC_keymgmt_import_fn rsa_import;
+static OSSL_FUNC_keymgmt_import_types_fn rsa_import_types;
+static OSSL_FUNC_keymgmt_export_fn rsa_export;
+static OSSL_FUNC_keymgmt_export_types_fn rsa_export_types;
+static OSSL_FUNC_keymgmt_query_operation_name_fn rsapss_query_operation_name;
#define RSA_DEFAULT_MD "SHA256"
#define RSA_PSS_DEFAULT_MD OSSL_DIGEST_NAME_SHA1
* necessary for the compiler, but provides an assurance that the signatures
* of the functions in the dispatch table are correct.
*/
-static OSSL_OP_mac_newctx_fn blake2_mac_new;
-static OSSL_OP_mac_dupctx_fn blake2_mac_dup;
-static OSSL_OP_mac_freectx_fn blake2_mac_free;
-static OSSL_OP_mac_gettable_ctx_params_fn blake2_gettable_ctx_params;
-static OSSL_OP_mac_get_ctx_params_fn blake2_get_ctx_params;
-static OSSL_OP_mac_settable_ctx_params_fn blake2_mac_settable_ctx_params;
-static OSSL_OP_mac_set_ctx_params_fn blake2_mac_set_ctx_params;
-static OSSL_OP_mac_init_fn blake2_mac_init;
-static OSSL_OP_mac_update_fn blake2_mac_update;
-static OSSL_OP_mac_final_fn blake2_mac_final;
+static OSSL_FUNC_mac_newctx_fn blake2_mac_new;
+static OSSL_FUNC_mac_dupctx_fn blake2_mac_dup;
+static OSSL_FUNC_mac_freectx_fn blake2_mac_free;
+static OSSL_FUNC_mac_gettable_ctx_params_fn blake2_gettable_ctx_params;
+static OSSL_FUNC_mac_get_ctx_params_fn blake2_get_ctx_params;
+static OSSL_FUNC_mac_settable_ctx_params_fn blake2_mac_settable_ctx_params;
+static OSSL_FUNC_mac_set_ctx_params_fn blake2_mac_set_ctx_params;
+static OSSL_FUNC_mac_init_fn blake2_mac_init;
+static OSSL_FUNC_mac_update_fn blake2_mac_update;
+static OSSL_FUNC_mac_final_fn blake2_mac_final;
struct blake2_mac_data_st {
BLAKE2_CTX ctx;
* necessary for the compiler, but provides an assurance that the signatures
* of the functions in the dispatch table are correct.
*/
-static OSSL_OP_mac_newctx_fn cmac_new;
-static OSSL_OP_mac_dupctx_fn cmac_dup;
-static OSSL_OP_mac_freectx_fn cmac_free;
-static OSSL_OP_mac_gettable_ctx_params_fn cmac_gettable_ctx_params;
-static OSSL_OP_mac_get_ctx_params_fn cmac_get_ctx_params;
-static OSSL_OP_mac_settable_ctx_params_fn cmac_settable_ctx_params;
-static OSSL_OP_mac_set_ctx_params_fn cmac_set_ctx_params;
-static OSSL_OP_mac_init_fn cmac_init;
-static OSSL_OP_mac_update_fn cmac_update;
-static OSSL_OP_mac_final_fn cmac_final;
+static OSSL_FUNC_mac_newctx_fn cmac_new;
+static OSSL_FUNC_mac_dupctx_fn cmac_dup;
+static OSSL_FUNC_mac_freectx_fn cmac_free;
+static OSSL_FUNC_mac_gettable_ctx_params_fn cmac_gettable_ctx_params;
+static OSSL_FUNC_mac_get_ctx_params_fn cmac_get_ctx_params;
+static OSSL_FUNC_mac_settable_ctx_params_fn cmac_settable_ctx_params;
+static OSSL_FUNC_mac_set_ctx_params_fn cmac_set_ctx_params;
+static OSSL_FUNC_mac_init_fn cmac_init;
+static OSSL_FUNC_mac_update_fn cmac_update;
+static OSSL_FUNC_mac_final_fn cmac_final;
/* local CMAC data */
* necessary for the compiler, but provides an assurance that the signatures
* of the functions in the dispatch table are correct.
*/
-static OSSL_OP_mac_newctx_fn gmac_new;
-static OSSL_OP_mac_dupctx_fn gmac_dup;
-static OSSL_OP_mac_freectx_fn gmac_free;
-static OSSL_OP_mac_gettable_params_fn gmac_gettable_params;
-static OSSL_OP_mac_get_params_fn gmac_get_params;
-static OSSL_OP_mac_settable_ctx_params_fn gmac_settable_ctx_params;
-static OSSL_OP_mac_set_ctx_params_fn gmac_set_ctx_params;
-static OSSL_OP_mac_init_fn gmac_init;
-static OSSL_OP_mac_update_fn gmac_update;
-static OSSL_OP_mac_final_fn gmac_final;
+static OSSL_FUNC_mac_newctx_fn gmac_new;
+static OSSL_FUNC_mac_dupctx_fn gmac_dup;
+static OSSL_FUNC_mac_freectx_fn gmac_free;
+static OSSL_FUNC_mac_gettable_params_fn gmac_gettable_params;
+static OSSL_FUNC_mac_get_params_fn gmac_get_params;
+static OSSL_FUNC_mac_settable_ctx_params_fn gmac_settable_ctx_params;
+static OSSL_FUNC_mac_set_ctx_params_fn gmac_set_ctx_params;
+static OSSL_FUNC_mac_init_fn gmac_init;
+static OSSL_FUNC_mac_update_fn gmac_update;
+static OSSL_FUNC_mac_final_fn gmac_final;
/* local GMAC pkey structure */
* necessary for the compiler, but provides an assurance that the signatures
* of the functions in the dispatch table are correct.
*/
-static OSSL_OP_mac_newctx_fn hmac_new;
-static OSSL_OP_mac_dupctx_fn hmac_dup;
-static OSSL_OP_mac_freectx_fn hmac_free;
-static OSSL_OP_mac_gettable_ctx_params_fn hmac_gettable_ctx_params;
-static OSSL_OP_mac_get_ctx_params_fn hmac_get_ctx_params;
-static OSSL_OP_mac_settable_ctx_params_fn hmac_settable_ctx_params;
-static OSSL_OP_mac_set_ctx_params_fn hmac_set_ctx_params;
-static OSSL_OP_mac_init_fn hmac_init;
-static OSSL_OP_mac_update_fn hmac_update;
-static OSSL_OP_mac_final_fn hmac_final;
+static OSSL_FUNC_mac_newctx_fn hmac_new;
+static OSSL_FUNC_mac_dupctx_fn hmac_dup;
+static OSSL_FUNC_mac_freectx_fn hmac_free;
+static OSSL_FUNC_mac_gettable_ctx_params_fn hmac_gettable_ctx_params;
+static OSSL_FUNC_mac_get_ctx_params_fn hmac_get_ctx_params;
+static OSSL_FUNC_mac_settable_ctx_params_fn hmac_settable_ctx_params;
+static OSSL_FUNC_mac_set_ctx_params_fn hmac_set_ctx_params;
+static OSSL_FUNC_mac_init_fn hmac_init;
+static OSSL_FUNC_mac_update_fn hmac_update;
+static OSSL_FUNC_mac_final_fn hmac_final;
/* local HMAC context structure */
* necessary for the compiler, but provides an assurance that the signatures
* of the functions in the dispatch table are correct.
*/
-static OSSL_OP_mac_newctx_fn kmac128_new;
-static OSSL_OP_mac_newctx_fn kmac256_new;
-static OSSL_OP_mac_dupctx_fn kmac_dup;
-static OSSL_OP_mac_freectx_fn kmac_free;
-static OSSL_OP_mac_gettable_ctx_params_fn kmac_gettable_ctx_params;
-static OSSL_OP_mac_get_ctx_params_fn kmac_get_ctx_params;
-static OSSL_OP_mac_settable_ctx_params_fn kmac_settable_ctx_params;
-static OSSL_OP_mac_set_ctx_params_fn kmac_set_ctx_params;
-static OSSL_OP_mac_size_fn kmac_size;
-static OSSL_OP_mac_init_fn kmac_init;
-static OSSL_OP_mac_update_fn kmac_update;
-static OSSL_OP_mac_final_fn kmac_final;
+static OSSL_FUNC_mac_newctx_fn kmac128_new;
+static OSSL_FUNC_mac_newctx_fn kmac256_new;
+static OSSL_FUNC_mac_dupctx_fn kmac_dup;
+static OSSL_FUNC_mac_freectx_fn kmac_free;
+static OSSL_FUNC_mac_gettable_ctx_params_fn kmac_gettable_ctx_params;
+static OSSL_FUNC_mac_get_ctx_params_fn kmac_get_ctx_params;
+static OSSL_FUNC_mac_settable_ctx_params_fn kmac_settable_ctx_params;
+static OSSL_FUNC_mac_set_ctx_params_fn kmac_set_ctx_params;
+static OSSL_FUNC_mac_size_fn kmac_size;
+static OSSL_FUNC_mac_init_fn kmac_init;
+static OSSL_FUNC_mac_update_fn kmac_update;
+static OSSL_FUNC_mac_final_fn kmac_final;
#define KMAC_MAX_BLOCKSIZE ((1600 - 128*2) / 8) /* 168 */
#define KMAC_MIN_BLOCKSIZE ((1600 - 256*2) / 8) /* 136 */
* necessary for the compiler, but provides an assurance that the signatures
* of the functions in the dispatch table are correct.
*/
-static OSSL_OP_mac_newctx_fn poly1305_new;
-static OSSL_OP_mac_dupctx_fn poly1305_dup;
-static OSSL_OP_mac_freectx_fn poly1305_free;
-static OSSL_OP_mac_gettable_params_fn poly1305_gettable_params;
-static OSSL_OP_mac_get_params_fn poly1305_get_params;
-static OSSL_OP_mac_settable_ctx_params_fn poly1305_settable_ctx_params;
-static OSSL_OP_mac_set_ctx_params_fn poly1305_set_ctx_params;
-static OSSL_OP_mac_init_fn poly1305_init;
-static OSSL_OP_mac_update_fn poly1305_update;
-static OSSL_OP_mac_final_fn poly1305_final;
+static OSSL_FUNC_mac_newctx_fn poly1305_new;
+static OSSL_FUNC_mac_dupctx_fn poly1305_dup;
+static OSSL_FUNC_mac_freectx_fn poly1305_free;
+static OSSL_FUNC_mac_gettable_params_fn poly1305_gettable_params;
+static OSSL_FUNC_mac_get_params_fn poly1305_get_params;
+static OSSL_FUNC_mac_settable_ctx_params_fn poly1305_settable_ctx_params;
+static OSSL_FUNC_mac_set_ctx_params_fn poly1305_set_ctx_params;
+static OSSL_FUNC_mac_init_fn poly1305_init;
+static OSSL_FUNC_mac_update_fn poly1305_update;
+static OSSL_FUNC_mac_final_fn poly1305_final;
struct poly1305_data_st {
void *provctx;
* necessary for the compiler, but provides an assurance that the signatures
* of the functions in the dispatch table are correct.
*/
-static OSSL_OP_mac_newctx_fn siphash_new;
-static OSSL_OP_mac_dupctx_fn siphash_dup;
-static OSSL_OP_mac_freectx_fn siphash_free;
-static OSSL_OP_mac_gettable_ctx_params_fn siphash_gettable_ctx_params;
-static OSSL_OP_mac_get_ctx_params_fn siphash_get_ctx_params;
-static OSSL_OP_mac_settable_ctx_params_fn siphash_settable_params;
-static OSSL_OP_mac_set_ctx_params_fn siphash_set_params;
-static OSSL_OP_mac_size_fn siphash_size;
-static OSSL_OP_mac_init_fn siphash_init;
-static OSSL_OP_mac_update_fn siphash_update;
-static OSSL_OP_mac_final_fn siphash_final;
+static OSSL_FUNC_mac_newctx_fn siphash_new;
+static OSSL_FUNC_mac_dupctx_fn siphash_dup;
+static OSSL_FUNC_mac_freectx_fn siphash_free;
+static OSSL_FUNC_mac_gettable_ctx_params_fn siphash_gettable_ctx_params;
+static OSSL_FUNC_mac_get_ctx_params_fn siphash_get_ctx_params;
+static OSSL_FUNC_mac_settable_ctx_params_fn siphash_settable_params;
+static OSSL_FUNC_mac_set_ctx_params_fn siphash_set_params;
+static OSSL_FUNC_mac_size_fn siphash_size;
+static OSSL_FUNC_mac_init_fn siphash_init;
+static OSSL_FUNC_mac_update_fn siphash_update;
+static OSSL_FUNC_mac_final_fn siphash_final;
struct siphash_data_st {
void *provctx;
#include <string.h>
#include <openssl/evp.h>
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
#include <openssl/params.h>
#include "prov/providercommon.h"
#include "prov/provider_ctx.h"
/* Extract parent's functions */
drbg->parent = parent;
if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_ENABLE_LOCKING)) != NULL)
- drbg->parent_enable_locking = OSSL_get_OP_rand_enable_locking(pfunc);
+ drbg->parent_enable_locking = OSSL_FUNC_rand_enable_locking(pfunc);
if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_LOCK)) != NULL)
- drbg->parent_lock = OSSL_get_OP_rand_lock(pfunc);
+ drbg->parent_lock = OSSL_FUNC_rand_lock(pfunc);
if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_UNLOCK)) != NULL)
- drbg->parent_unlock = OSSL_get_OP_rand_unlock(pfunc);
+ drbg->parent_unlock = OSSL_FUNC_rand_unlock(pfunc);
if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_GET_CTX_PARAMS)) != NULL)
- drbg->parent_get_ctx_params = OSSL_get_OP_rand_get_ctx_params(pfunc);
+ drbg->parent_get_ctx_params = OSSL_FUNC_rand_get_ctx_params(pfunc);
if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_GENERATE)) != NULL)
- drbg->parent_generate = OSSL_get_OP_rand_generate(pfunc);
+ drbg->parent_generate = OSSL_FUNC_rand_generate(pfunc);
if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_NONCE)) != NULL)
- drbg->parent_nonce = OSSL_get_OP_rand_nonce(pfunc);
+ drbg->parent_nonce = OSSL_FUNC_rand_nonce(pfunc);
/* Set some default maximums up */
drbg->max_entropylen = DRBG_MAX_LENGTH;
#include "prov/providercommonerr.h"
#include "drbg_local.h"
-static OSSL_OP_rand_newctx_fn drbg_ctr_new_wrapper;
-static OSSL_OP_rand_freectx_fn drbg_ctr_free;
-static OSSL_OP_rand_instantiate_fn drbg_ctr_instantiate_wrapper;
-static OSSL_OP_rand_uninstantiate_fn drbg_ctr_uninstantiate_wrapper;
-static OSSL_OP_rand_generate_fn drbg_ctr_generate_wrapper;
-static OSSL_OP_rand_reseed_fn drbg_ctr_reseed_wrapper;
-static OSSL_OP_rand_settable_ctx_params_fn drbg_ctr_settable_ctx_params;
-static OSSL_OP_rand_set_ctx_params_fn drbg_ctr_set_ctx_params;
-static OSSL_OP_rand_gettable_ctx_params_fn drbg_ctr_gettable_ctx_params;
-static OSSL_OP_rand_get_ctx_params_fn drbg_ctr_get_ctx_params;
-static OSSL_OP_rand_verify_zeroization_fn drbg_ctr_verify_zeroization;
+static OSSL_FUNC_rand_newctx_fn drbg_ctr_new_wrapper;
+static OSSL_FUNC_rand_freectx_fn drbg_ctr_free;
+static OSSL_FUNC_rand_instantiate_fn drbg_ctr_instantiate_wrapper;
+static OSSL_FUNC_rand_uninstantiate_fn drbg_ctr_uninstantiate_wrapper;
+static OSSL_FUNC_rand_generate_fn drbg_ctr_generate_wrapper;
+static OSSL_FUNC_rand_reseed_fn drbg_ctr_reseed_wrapper;
+static OSSL_FUNC_rand_settable_ctx_params_fn drbg_ctr_settable_ctx_params;
+static OSSL_FUNC_rand_set_ctx_params_fn drbg_ctr_set_ctx_params;
+static OSSL_FUNC_rand_gettable_ctx_params_fn drbg_ctr_gettable_ctx_params;
+static OSSL_FUNC_rand_get_ctx_params_fn drbg_ctr_get_ctx_params;
+static OSSL_FUNC_rand_verify_zeroization_fn drbg_ctr_verify_zeroization;
/*
* The state of a DRBG AES-CTR.
#include <openssl/crypto.h>
#include <openssl/err.h>
#include <openssl/rand.h>
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
#include "internal/thread_once.h"
#include "prov/providercommon.h"
#include "prov/provider_ctx.h"
#include "prov/providercommonerr.h"
#include "drbg_local.h"
-static OSSL_OP_rand_newctx_fn drbg_hash_new_wrapper;
-static OSSL_OP_rand_freectx_fn drbg_hash_free;
-static OSSL_OP_rand_instantiate_fn drbg_hash_instantiate_wrapper;
-static OSSL_OP_rand_uninstantiate_fn drbg_hash_uninstantiate_wrapper;
-static OSSL_OP_rand_generate_fn drbg_hash_generate_wrapper;
-static OSSL_OP_rand_reseed_fn drbg_hash_reseed_wrapper;
-static OSSL_OP_rand_settable_ctx_params_fn drbg_hash_settable_ctx_params;
-static OSSL_OP_rand_set_ctx_params_fn drbg_hash_set_ctx_params;
-static OSSL_OP_rand_gettable_ctx_params_fn drbg_hash_gettable_ctx_params;
-static OSSL_OP_rand_get_ctx_params_fn drbg_hash_get_ctx_params;
-static OSSL_OP_rand_verify_zeroization_fn drbg_hash_verify_zeroization;
+static OSSL_FUNC_rand_newctx_fn drbg_hash_new_wrapper;
+static OSSL_FUNC_rand_freectx_fn drbg_hash_free;
+static OSSL_FUNC_rand_instantiate_fn drbg_hash_instantiate_wrapper;
+static OSSL_FUNC_rand_uninstantiate_fn drbg_hash_uninstantiate_wrapper;
+static OSSL_FUNC_rand_generate_fn drbg_hash_generate_wrapper;
+static OSSL_FUNC_rand_reseed_fn drbg_hash_reseed_wrapper;
+static OSSL_FUNC_rand_settable_ctx_params_fn drbg_hash_settable_ctx_params;
+static OSSL_FUNC_rand_set_ctx_params_fn drbg_hash_set_ctx_params;
+static OSSL_FUNC_rand_gettable_ctx_params_fn drbg_hash_gettable_ctx_params;
+static OSSL_FUNC_rand_get_ctx_params_fn drbg_hash_get_ctx_params;
+static OSSL_FUNC_rand_verify_zeroization_fn drbg_hash_verify_zeroization;
/* 888 bits from SP800-90Ar1 10.1 table 2 */
#define HASH_PRNG_MAX_SEEDLEN (888/8)
#include "prov/provider_ctx.h"
#include "drbg_local.h"
-static OSSL_OP_rand_newctx_fn drbg_hmac_new_wrapper;
-static OSSL_OP_rand_freectx_fn drbg_hmac_free;
-static OSSL_OP_rand_instantiate_fn drbg_hmac_instantiate_wrapper;
-static OSSL_OP_rand_uninstantiate_fn drbg_hmac_uninstantiate_wrapper;
-static OSSL_OP_rand_generate_fn drbg_hmac_generate_wrapper;
-static OSSL_OP_rand_reseed_fn drbg_hmac_reseed_wrapper;
-static OSSL_OP_rand_settable_ctx_params_fn drbg_hmac_settable_ctx_params;
-static OSSL_OP_rand_set_ctx_params_fn drbg_hmac_set_ctx_params;
-static OSSL_OP_rand_gettable_ctx_params_fn drbg_hmac_gettable_ctx_params;
-static OSSL_OP_rand_get_ctx_params_fn drbg_hmac_get_ctx_params;
-static OSSL_OP_rand_verify_zeroization_fn drbg_hmac_verify_zeroization;
+static OSSL_FUNC_rand_newctx_fn drbg_hmac_new_wrapper;
+static OSSL_FUNC_rand_freectx_fn drbg_hmac_free;
+static OSSL_FUNC_rand_instantiate_fn drbg_hmac_instantiate_wrapper;
+static OSSL_FUNC_rand_uninstantiate_fn drbg_hmac_uninstantiate_wrapper;
+static OSSL_FUNC_rand_generate_fn drbg_hmac_generate_wrapper;
+static OSSL_FUNC_rand_reseed_fn drbg_hmac_reseed_wrapper;
+static OSSL_FUNC_rand_settable_ctx_params_fn drbg_hmac_settable_ctx_params;
+static OSSL_FUNC_rand_set_ctx_params_fn drbg_hmac_set_ctx_params;
+static OSSL_FUNC_rand_gettable_ctx_params_fn drbg_hmac_gettable_ctx_params;
+static OSSL_FUNC_rand_get_ctx_params_fn drbg_hmac_get_ctx_params;
+static OSSL_FUNC_rand_verify_zeroization_fn drbg_hmac_verify_zeroization;
typedef struct rand_drbg_hmac_st {
EVP_MAC_CTX *ctx; /* H(x) = HMAC_hash OR H(x) = KMAC */
# define OSSL_CRYPTO_PROV_LOCAL_H
# include <openssl/evp.h>
-# include <openssl/core_numbers.h>
+# include <openssl/core_dispatch.h>
# include <openssl/core_names.h>
# include <openssl/params.h>
# include "internal/tsan_assist.h"
/* Parent PROV_RAND and its dispatch table functions */
void *parent;
- OSSL_OP_rand_enable_locking_fn *parent_enable_locking;
- OSSL_OP_rand_lock_fn *parent_lock;
- OSSL_OP_rand_unlock_fn *parent_unlock;
- OSSL_OP_rand_get_ctx_params_fn *parent_get_ctx_params;
- OSSL_OP_rand_generate_fn *parent_generate;
- OSSL_OP_rand_nonce_fn *parent_nonce;
+ OSSL_FUNC_rand_enable_locking_fn *parent_enable_locking;
+ OSSL_FUNC_rand_lock_fn *parent_lock;
+ OSSL_FUNC_rand_unlock_fn *parent_unlock;
+ OSSL_FUNC_rand_get_ctx_params_fn *parent_get_ctx_params;
+ OSSL_FUNC_rand_generate_fn *parent_generate;
+ OSSL_FUNC_rand_nonce_fn *parent_nonce;
const OSSL_DISPATCH *parent_dispatch;
}
/* locking api */
-OSSL_OP_rand_enable_locking_fn drbg_enable_locking;
-OSSL_OP_rand_lock_fn drbg_lock;
-OSSL_OP_rand_unlock_fn drbg_unlock;
+OSSL_FUNC_rand_enable_locking_fn drbg_enable_locking;
+OSSL_FUNC_rand_lock_fn drbg_lock;
+OSSL_FUNC_rand_unlock_fn drbg_unlock;
/* Common parameters for all of our DRBGs */
int drbg_get_ctx_params(PROV_DRBG *drbg, OSSL_PARAM params[]);
*/
#include <string.h>
-#include <openssl/core_numbers.h>
+#include <openssl/core_dispatch.h>
#include <openssl/e_os2.h>
#include <openssl/params.h>
#include "prov/providercommon.h"
#include "prov/implementations.h"
#include "drbg_local.h"
-static OSSL_OP_rand_newctx_fn test_rng_new_wrapper;
-static OSSL_OP_rand_freectx_fn test_rng_free;
-static OSSL_OP_rand_instantiate_fn test_rng_instantiate_wrapper;
-static OSSL_OP_rand_uninstantiate_fn test_rng_uninstantiate_wrapper;
-static OSSL_OP_rand_generate_fn test_rng_generate_wrapper;
-static OSSL_OP_rand_reseed_fn test_rng_reseed_wrapper;
-static OSSL_OP_rand_nonce_fn test_rng_nonce;
-static OSSL_OP_rand_settable_ctx_params_fn test_rng_settable_ctx_params;
-static OSSL_OP_rand_set_ctx_params_fn test_rng_set_ctx_params;
-static OSSL_OP_rand_gettable_ctx_params_fn test_rng_gettable_ctx_params;
-static OSSL_OP_rand_get_ctx_params_fn test_rng_get_ctx_params;
-static OSSL_OP_rand_verify_zeroization_fn test_rng_verify_zeroization;
+static OSSL_FUNC_rand_newctx_fn test_rng_new_wrapper;
+static OSSL_FUNC_rand_freectx_fn test_rng_free;
+static OSSL_FUNC_rand_instantiate_fn test_rng_instantiate_wrapper;
+static OSSL_FUNC_rand_uninstantiate_fn test_rng_uninstantiate_wrapper;
+static OSSL_FUNC_rand_generate_fn test_rng_generate_wrapper;
+static OSSL_FUNC_rand_reseed_fn test_rng_reseed_wrapper;
+static OSSL_FUNC_rand_nonce_fn test_rng_nonce;
+static OSSL_FUNC_rand_settable_ctx_params_fn test_rng_settable_ctx_params;
+static OSSL_FUNC_rand_set_ctx_params_fn test_rng_set_ctx_params;
+static OSSL_FUNC_rand_gettable_ctx_params_fn test_rng_gettable_ctx_params;
+static OSSL_FUNC_rand_get_ctx_params_fn test_rng_get_ctx_params;
+static OSSL_FUNC_rand_verify_zeroization_fn test_rng_verify_zeroization;
typedef struct {
unsigned char *entropy, *nonce;
return xpk;
}
-OSSL_OP_keymgmt_new_fn *ossl_prov_get_keymgmt_new(const OSSL_DISPATCH *fns)
+OSSL_FUNC_keymgmt_new_fn *ossl_prov_get_keymgmt_new(const OSSL_DISPATCH *fns)
{
/* Pilfer the keymgmt dispatch table */
for (; fns->function_id != 0; fns++)
if (fns->function_id == OSSL_FUNC_KEYMGMT_NEW)
- return OSSL_get_OP_keymgmt_new(fns);
+ return OSSL_FUNC_keymgmt_new(fns);
return NULL;
}
-OSSL_OP_keymgmt_free_fn *ossl_prov_get_keymgmt_free(const OSSL_DISPATCH *fns)
+OSSL_FUNC_keymgmt_free_fn *ossl_prov_get_keymgmt_free(const OSSL_DISPATCH *fns)
{
/* Pilfer the keymgmt dispatch table */
for (; fns->function_id != 0; fns++)
if (fns->function_id == OSSL_FUNC_KEYMGMT_FREE)
- return OSSL_get_OP_keymgmt_free(fns);
+ return OSSL_FUNC_keymgmt_free(fns);
return NULL;
}
-OSSL_OP_keymgmt_import_fn *ossl_prov_get_keymgmt_import(const OSSL_DISPATCH *fns)
+OSSL_FUNC_keymgmt_import_fn *ossl_prov_get_keymgmt_import(const OSSL_DISPATCH *fns)
{
/* Pilfer the keymgmt dispatch table */
for (; fns->function_id != 0; fns++)
if (fns->function_id == OSSL_FUNC_KEYMGMT_IMPORT)
- return OSSL_get_OP_keymgmt_import(fns);
+ return OSSL_FUNC_keymgmt_import(fns);
return NULL;
}
#include "crypto/dh.h"
#include "serializer_local.h"
-OSSL_OP_keymgmt_new_fn *ossl_prov_get_keymgmt_dh_new(void)
+OSSL_FUNC_keymgmt_new_fn *ossl_prov_get_keymgmt_dh_new(void)
{
return ossl_prov_get_keymgmt_new(dh_keymgmt_functions);
}
-OSSL_OP_keymgmt_free_fn *ossl_prov_get_keymgmt_dh_free(void)
+OSSL_FUNC_keymgmt_free_fn *ossl_prov_get_keymgmt_dh_free(void)
{
return ossl_prov_get_keymgmt_free(dh_keymgmt_functions);
}
-OSSL_OP_keymgmt_import_fn *ossl_prov_get_keymgmt_dh_import(void)
+OSSL_FUNC_keymgmt_import_fn *ossl_prov_get_keymgmt_dh_import(void)
{
return ossl_prov_get_keymgmt_import(dh_keymgmt_functions);
}
#include "prov/provider_ctx.h"
#include "serializer_local.h"
-static OSSL_OP_serializer_newctx_fn dh_param_newctx;
-static OSSL_OP_serializer_freectx_fn dh_param_freectx;
-static OSSL_OP_serializer_serialize_data_fn dh_param_der_data;
-static OSSL_OP_serializer_serialize_object_fn dh_param_der;
-static OSSL_OP_serializer_serialize_data_fn dh_param_pem_data;
-static OSSL_OP_serializer_serialize_object_fn dh_param_pem;
+static OSSL_FUNC_serializer_newctx_fn dh_param_newctx;
+static OSSL_FUNC_serializer_freectx_fn dh_param_freectx;
+static OSSL_FUNC_serializer_serialize_data_fn dh_param_der_data;
+static OSSL_FUNC_serializer_serialize_object_fn dh_param_der;
+static OSSL_FUNC_serializer_serialize_data_fn dh_param_pem_data;
+static OSSL_FUNC_serializer_serialize_object_fn dh_param_pem;
-static OSSL_OP_serializer_serialize_data_fn dh_param_print_data;
-static OSSL_OP_serializer_serialize_object_fn dh_param_print;
+static OSSL_FUNC_serializer_serialize_data_fn dh_param_print_data;
+static OSSL_FUNC_serializer_serialize_object_fn dh_param_print;
/* Parameters : context */
OSSL_CORE_BIO *out,
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg)
{
- OSSL_OP_keymgmt_new_fn *dh_new = ossl_prov_get_keymgmt_dh_new();
- OSSL_OP_keymgmt_free_fn *dh_free = ossl_prov_get_keymgmt_dh_free();
- OSSL_OP_keymgmt_import_fn *dh_import = ossl_prov_get_keymgmt_dh_import();
+ OSSL_FUNC_keymgmt_new_fn *dh_new = ossl_prov_get_keymgmt_dh_new();
+ OSSL_FUNC_keymgmt_free_fn *dh_free = ossl_prov_get_keymgmt_dh_free();
+ OSSL_FUNC_keymgmt_import_fn *dh_import = ossl_prov_get_keymgmt_dh_import();
int ok = 0;
if (dh_import != NULL) {
OSSL_CORE_BIO *out,
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg)
{
- OSSL_OP_keymgmt_new_fn *dh_new = ossl_prov_get_keymgmt_dh_new();
- OSSL_OP_keymgmt_free_fn *dh_free = ossl_prov_get_keymgmt_dh_free();
- OSSL_OP_keymgmt_import_fn *dh_import = ossl_prov_get_keymgmt_dh_import();
+ OSSL_FUNC_keymgmt_new_fn *dh_new = ossl_prov_get_keymgmt_dh_new();
+ OSSL_FUNC_keymgmt_free_fn *dh_free = ossl_prov_get_keymgmt_dh_free();
+ OSSL_FUNC_keymgmt_import_fn *dh_import = ossl_prov_get_keymgmt_dh_import();
int ok = 0;
if (dh_import != NULL) {
OSSL_CORE_BIO *out,
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg)
{
- OSSL_OP_keymgmt_new_fn *dh_new = ossl_prov_get_keymgmt_dh_new();
- OSSL_OP_keymgmt_free_fn *dh_free = ossl_prov_get_keymgmt_dh_free();
- OSSL_OP_keymgmt_import_fn *dh_import = ossl_prov_get_keymgmt_dh_import();
+ OSSL_FUNC_keymgmt_new_fn *dh_new = ossl_prov_get_keymgmt_dh_new();
+ OSSL_FUNC_keymgmt_free_fn *dh_free = ossl_prov_get_keymgmt_dh_free();
+ OSSL_FUNC_keymgmt_import_fn *dh_import = ossl_prov_get_keymgmt_dh_import();
int ok = 0;
if (dh_import != NULL) {
#include "prov/provider_ctx.h"
#include "serializer_local.h"
-static OSSL_OP_serializer_newctx_fn dh_priv_newctx;
-static OSSL_OP_serializer_freectx_fn dh_priv_freectx;
-static OSSL_OP_serializer_set_ctx_params_fn dh_priv_set_ctx_params;
-static OSSL_OP_serializer_settable_ctx_params_fn dh_priv_settable_ctx_params;
-static OSSL_OP_serializer_serialize_data_fn dh_priv_der_data;
-static OSSL_OP_serializer_serialize_object_fn dh_priv_der;
-static OSSL_OP_serializer_serialize_data_fn dh_pem_priv_data;
-static OSSL_OP_serializer_serialize_object_fn dh_pem_priv;
-
-static OSSL_OP_serializer_newctx_fn dh_print_newctx;
-static OSSL_OP_serializer_freectx_fn dh_print_freectx;
-static OSSL_OP_serializer_serialize_data_fn dh_priv_print_data;
-static OSSL_OP_serializer_serialize_object_fn dh_priv_print;
+static OSSL_FUNC_serializer_newctx_fn dh_priv_newctx;
+static OSSL_FUNC_serializer_freectx_fn dh_priv_freectx;
+static OSSL_FUNC_serializer_set_ctx_params_fn dh_priv_set_ctx_params;
+static OSSL_FUNC_serializer_settable_ctx_params_fn dh_priv_settable_ctx_params;
+static OSSL_FUNC_serializer_serialize_data_fn dh_priv_der_data;
+static OSSL_FUNC_serializer_serialize_object_fn dh_priv_der;
+static OSSL_FUNC_serializer_serialize_data_fn dh_pem_priv_data;
+static OSSL_FUNC_serializer_serialize_object_fn dh_pem_priv;
+
+static OSSL_FUNC_serializer_newctx_fn dh_print_newctx;
+static OSSL_FUNC_serializer_freectx_fn dh_print_freectx;
+static OSSL_FUNC_serializer_serialize_data_fn dh_priv_print_data;
+static OSSL_FUNC_serializer_serialize_object_fn dh_priv_print;
/*
* Context used for private key serialization.
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg)
{
struct dh_priv_ctx_st *ctx = vctx;
- OSSL_OP_keymgmt_new_fn *dh_new = ossl_prov_get_keymgmt_dh_new();
- OSSL_OP_keymgmt_free_fn *dh_free = ossl_prov_get_keymgmt_dh_free();
- OSSL_OP_keymgmt_import_fn *dh_import = ossl_prov_get_keymgmt_dh_import();
+ OSSL_FUNC_keymgmt_new_fn *dh_new = ossl_prov_get_keymgmt_dh_new();
+ OSSL_FUNC_keymgmt_free_fn *dh_free = ossl_prov_get_keymgmt_dh_free();
+ OSSL_FUNC_keymgmt_import_fn *dh_import = ossl_prov_get_keymgmt_dh_import();
int ok = 0;
if (dh_import != NULL) {
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg)
{
struct dh_priv_ctx_st *ctx = vctx;
- OSSL_OP_keymgmt_new_fn *dh_new = ossl_prov_get_keymgmt_dh_new();
- OSSL_OP_keymgmt_free_fn *dh_free = ossl_prov_get_keymgmt_dh_free();
- OSSL_OP_keymgmt_import_fn *dh_import = ossl_prov_get_keymgmt_dh_import();
+ OSSL_FUNC_keymgmt_new_fn *dh_new = ossl_prov_get_keymgmt_dh_new();
+ OSSL_FUNC_keymgmt_free_fn *dh_free = ossl_prov_get_keymgmt_dh_free();
+ OSSL_FUNC_keymgmt_import_fn *dh_import = ossl_prov_get_keymgmt_dh_import();
int ok = 0;
if (dh_import != NULL) {
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg)
{
struct dh_priv_ctx_st *ctx = vctx;
- OSSL_OP_keymgmt_new_fn *dh_new = ossl_prov_get_keymgmt_dh_new();
- OSSL_OP_keymgmt_free_fn *dh_free = ossl_prov_get_keymgmt_dh_free();
- OSSL_OP_keymgmt_import_fn *dh_import = ossl_prov_get_keymgmt_dh_import();
+ OSSL_FUNC_keymgmt_new_fn *dh_new = ossl_prov_get_keymgmt_dh_new();
+ OSSL_FUNC_keymgmt_free_fn *dh_free = ossl_prov_get_keymgmt_dh_free();
+ OSSL_FUNC_keymgmt_import_fn *dh_import = ossl_prov_get_keymgmt_dh_import();
int ok = 0;
if (dh_import != NULL) {
#include "prov/provider_ctx.h"
#include "serializer_local.h"
-static OSSL_OP_serializer_newctx_fn dh_pub_newctx;
-static OSSL_OP_serializer_freectx_fn dh_pub_freectx;
-static OSSL_OP_serializer_serialize_data_fn dh_pub_der_data;
-static OSSL_OP_serializer_serialize_object_fn dh_pub_der;
-static OSSL_OP_serializer_serialize_data_fn dh_pub_pem_data;
-static OSSL_OP_serializer_serialize_object_fn dh_pub_pem;
+static OSSL_FUNC_serializer_newctx_fn dh_pub_newctx;
+static OSSL_FUNC_serializer_freectx_fn dh_pub_freectx;
+static OSSL_FUNC_serializer_serialize_data_fn dh_pub_der_data;
+static OSSL_FUNC_serializer_serialize_object_fn dh_pub_der;
+static OSSL_FUNC_serializer_serialize_data_fn dh_pub_pem_data;
+static OSSL_FUNC_serializer_serialize_object_fn dh_pub_pem;
-static OSSL_OP_serializer_serialize_data_fn dh_pub_print_data;
-static OSSL_OP_serializer_serialize_object_fn dh_pub_print;
+static OSSL_FUNC_serializer_serialize_data_fn dh_pub_print_data;
+static OSSL_FUNC_serializer_serialize_object_fn dh_pub_print;
/* Public key : context */
OSSL_CORE_BIO *out,
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg)
{
- OSSL_OP_keymgmt_new_fn *dh_new = ossl_prov_get_keymgmt_dh_new();
- OSSL_OP_keymgmt_free_fn *dh_free = ossl_prov_get_keymgmt_dh_free();
- OSSL_OP_keymgmt_import_fn *dh_import = ossl_prov_get_keymgmt_dh_import();
+ OSSL_FUNC_keymgmt_new_fn *dh_new = ossl_prov_get_keymgmt_dh_new();
+ OSSL_FUNC_keymgmt_free_fn *dh_free = ossl_prov_get_keymgmt_dh_free();
+ OSSL_FUNC_keymgmt_import_fn *dh_import = ossl_prov_get_keymgmt_dh_import();
int ok = 0;
if (dh_import != NULL) {
OSSL_CORE_BIO *out,
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg)
{
- OSSL_OP_keymgmt_new_fn *dh_new = ossl_prov_get_keymgmt_dh_new();
- OSSL_OP_keymgmt_free_fn *dh_free = ossl_prov_get_keymgmt_dh_free();
- OSSL_OP_keymgmt_import_fn *dh_import = ossl_prov_get_keymgmt_dh_import();
+ OSSL_FUNC_keymgmt_new_fn *dh_new = ossl_prov_get_keymgmt_dh_new();
+ OSSL_FUNC_keymgmt_free_fn *dh_free = ossl_prov_get_keymgmt_dh_free();
+ OSSL_FUNC_keymgmt_import_fn *dh_import = ossl_prov_get_keymgmt_dh_import();
int ok = 0;
if (dh_import != NULL) {
OSSL_CORE_BIO *out,
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg)
{
- OSSL_OP_keymgmt_new_fn *dh_new = ossl_prov_get_keymgmt_dh_new();
- OSSL_OP_keymgmt_free_fn *dh_free = ossl_prov_get_keymgmt_dh_free();
- OSSL_OP_keymgmt_import_fn *dh_import = ossl_prov_get_keymgmt_dh_import();
+ OSSL_FUNC_keymgmt_new_fn *dh_new = ossl_prov_get_keymgmt_dh_new();
+ OSSL_FUNC_keymgmt_free_fn *dh_free = ossl_prov_get_keymgmt_dh_free();
+ OSSL_FUNC_keymgmt_import_fn *dh_import = ossl_prov_get_keymgmt_dh_import();
int ok = 0;
if (dh_import != NULL) {
#include "internal/ffc.h"
#include "crypto/dsa.h"
-OSSL_OP_keymgmt_new_fn *ossl_prov_get_keymgmt_dsa_new(void)
+OSSL_FUNC_keymgmt_new_fn *ossl_prov_get_keymgmt_dsa_new(void)
{
return ossl_prov_get_keymgmt_new(dsa_keymgmt_functions);
}
-OSSL_OP_keymgmt_free_fn *ossl_prov_get_keymgmt_dsa_free(void)
+OSSL_FUNC_keymgmt_free_fn *ossl_prov_get_keymgmt_dsa_free(void)
{
return ossl_prov_get_keymgmt_free(dsa_keymgmt_functions);
}
-OSSL_OP_keymgmt_import_fn *ossl_prov_get_keymgmt_dsa_import(void)
+OSSL_FUNC_keymgmt_import_fn *ossl_prov_get_keymgmt_dsa_import(void)
{
return ossl_prov_get_keymgmt_import(dsa_keymgmt_functions);
}
#include "prov/provider_ctx.h"
#include "serializer_local.h"
-static OSSL_OP_serializer_newctx_fn dsa_param_newctx;
-static OSSL_OP_serializer_freectx_fn dsa_param_freectx;
-static OSSL_OP_serializer_serialize_data_fn dsa_param_der_data;
-static OSSL_OP_serializer_serialize_object_fn dsa_param_der;
-static OSSL_OP_serializer_serialize_data_fn dsa_param_pem_data;
-static OSSL_OP_serializer_serialize_object_fn dsa_param_pem;
+static OSSL_FUNC_serializer_newctx_fn dsa_param_newctx;
+static OSSL_FUNC_serializer_freectx_fn dsa_param_freectx;
+static OSSL_FUNC_serializer_serialize_data_fn dsa_param_der_data;
+static OSSL_FUNC_serializer_serialize_object_fn dsa_param_der;
+static OSSL_FUNC_serializer_serialize_data_fn dsa_param_pem_data;
+static OSSL_FUNC_serializer_serialize_object_fn dsa_param_pem;
-static OSSL_OP_serializer_serialize_data_fn dsa_param_print_data;
-static OSSL_OP_serializer_serialize_object_fn dsa_param_print;
+static OSSL_FUNC_serializer_serialize_data_fn dsa_param_print_data;
+static OSSL_FUNC_serializer_serialize_object_fn dsa_param_print;
/* Parameters : context */
OSSL_CORE_BIO *out,
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg)
{
- OSSL_OP_keymgmt_new_fn *dsa_new = ossl_prov_get_keymgmt_dsa_new();
- OSSL_OP_keymgmt_free_fn *dsa_free = ossl_prov_get_keymgmt_dsa_free();
- OSSL_OP_keymgmt_import_fn *dsa_import = ossl_prov_get_keymgmt_dsa_import();
+ OSSL_FUNC_keymgmt_new_fn *dsa_new = ossl_prov_get_keymgmt_dsa_new();
+ OSSL_FUNC_keymgmt_free_fn *dsa_free = ossl_prov_get_keymgmt_dsa_free();
+ OSSL_FUNC_keymgmt_import_fn *dsa_import = ossl_prov_get_keymgmt_dsa_import();
int ok = 0;
if (dsa_import != NULL) {
OSSL_CORE_BIO *out,
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg)
{
- OSSL_OP_keymgmt_new_fn *dsa_new = ossl_prov_get_keymgmt_dsa_new();
- OSSL_OP_keymgmt_free_fn *dsa_free = ossl_prov_get_keymgmt_dsa_free();
- OSSL_OP_keymgmt_import_fn *dsa_import = ossl_prov_get_keymgmt_dsa_import();
+ OSSL_FUNC_keymgmt_new_fn *dsa_new = ossl_prov_get_keymgmt_dsa_new();
+ OSSL_FUNC_keymgmt_free_fn *dsa_free = ossl_prov_get_keymgmt_dsa_free();
+ OSSL_FUNC_keymgmt_import_fn *dsa_import = ossl_prov_get_keymgmt_dsa_import();
int ok = 0;
if (dsa_import != NULL) {
OSSL_CORE_BIO *out,
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg)
{
- OSSL_OP_keymgmt_new_fn *dsa_new = ossl_prov_get_keymgmt_dsa_new();
- OSSL_OP_keymgmt_free_fn *dsa_free = ossl_prov_get_keymgmt_dsa_free();
- OSSL_OP_keymgmt_import_fn *dsa_import = ossl_prov_get_keymgmt_dsa_import();
+ OSSL_FUNC_keymgmt_new_fn *dsa_new = ossl_prov_get_keymgmt_dsa_new();
+ OSSL_FUNC_keymgmt_free_fn *dsa_free = ossl_prov_get_keymgmt_dsa_free();
+ OSSL_FUNC_keymgmt_import_fn *dsa_import = ossl_prov_get_keymgmt_dsa_import();
int ok = 0;
if (dsa_import != NULL) {
#include "prov/provider_ctx.h"
#include "serializer_local.h"
-static OSSL_OP_serializer_newctx_fn dsa_priv_newctx;
-static OSSL_OP_serializer_freectx_fn dsa_priv_freectx;
-static OSSL_OP_serializer_set_ctx_params_fn dsa_priv_set_ctx_params;
-static OSSL_OP_serializer_settable_ctx_params_fn dsa_priv_settable_ctx_params;
-static OSSL_OP_serializer_serialize_data_fn dsa_priv_der_data;
-static OSSL_OP_serializer_serialize_object_fn dsa_priv_der;
-static OSSL_OP_serializer_serialize_data_fn dsa_pem_priv_data;
-static OSSL_OP_serializer_serialize_object_fn dsa_pem_priv;
-
-static OSSL_OP_serializer_newctx_fn dsa_print_newctx;
-static OSSL_OP_serializer_freectx_fn dsa_print_freectx;
-static OSSL_OP_serializer_serialize_data_fn dsa_priv_print_data;
-static OSSL_OP_serializer_serialize_object_fn dsa_priv_print;
+static OSSL_FUNC_serializer_newctx_fn dsa_priv_newctx;
+static OSSL_FUNC_serializer_freectx_fn dsa_priv_freectx;
+static OSSL_FUNC_serializer_set_ctx_params_fn dsa_priv_set_ctx_params;
+static OSSL_FUNC_serializer_settable_ctx_params_fn dsa_priv_settable_ctx_params;
+static OSSL_FUNC_serializer_serialize_data_fn dsa_priv_der_data;
+static OSSL_FUNC_serializer_serialize_object_fn dsa_priv_der;
+static OSSL_FUNC_serializer_serialize_data_fn dsa_pem_priv_data;
+static OSSL_FUNC_serializer_serialize_object_fn dsa_pem_priv;
+
+static OSSL_FUNC_serializer_newctx_fn dsa_print_newctx;
+static OSSL_FUNC_serializer_freectx_fn dsa_print_freectx;
+static OSSL_FUNC_serializer_serialize_data_fn dsa_priv_print_data;
+static OSSL_FUNC_serializer_serialize_object_fn dsa_priv_print;
/*
* Context used for private key serialization.
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg)
{
struct dsa_priv_ctx_st *ctx = vctx;
- OSSL_OP_keymgmt_new_fn *dsa_new = ossl_prov_get_keymgmt_dsa_new();
- OSSL_OP_keymgmt_free_fn *dsa_free = ossl_prov_get_keymgmt_dsa_free();
- OSSL_OP_keymgmt_import_fn *dsa_import = ossl_prov_get_keymgmt_dsa_import();
+ OSSL_FUNC_keymgmt_new_fn *dsa_new = ossl_prov_get_keymgmt_dsa_new();
+ OSSL_FUNC_keymgmt_free_fn *dsa_free = ossl_prov_get_keymgmt_dsa_free();
+ OSSL_FUNC_keymgmt_import_fn *dsa_import = ossl_prov_get_keymgmt_dsa_import();
int ok = 0;
if (dsa_import != NULL) {
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg)
{
struct dsa_priv_ctx_st *ctx = vctx;
- OSSL_OP_keymgmt_new_fn *dsa_new = ossl_prov_get_keymgmt_dsa_new();
- OSSL_OP_keymgmt_free_fn *dsa_free = ossl_prov_get_keymgmt_dsa_free();
- OSSL_OP_keymgmt_import_fn *dsa_import = ossl_prov_get_keymgmt_dsa_import();
+ OSSL_FUNC_keymgmt_new_fn *dsa_new = ossl_prov_get_keymgmt_dsa_new();
+ OSSL_FUNC_keymgmt_free_fn *dsa_free = ossl_prov_get_keymgmt_dsa_free();
+ OSSL_FUNC_keymgmt_import_fn *dsa_import = ossl_prov_get_keymgmt_dsa_import();
int ok = 0;
if (dsa_import != NULL) {
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg)
{
struct dsa_priv_ctx_st *ctx = vctx;
- OSSL_OP_keymgmt_new_fn *dsa_new = ossl_prov_get_keymgmt_dsa_new();
- OSSL_OP_keymgmt_free_fn *dsa_free = ossl_prov_get_keymgmt_dsa_free();
- OSSL_OP_keymgmt_import_fn *dsa_import = ossl_prov_get_keymgmt_dsa_import();
+ OSSL_FUNC_keymgmt_new_fn *dsa_new = ossl_prov_get_keymgmt_dsa_new();
+ OSSL_FUNC_keymgmt_free_fn *dsa_free = ossl_prov_get_keymgmt_dsa_free();
+ OSSL_FUNC_keymgmt_import_fn *dsa_import = ossl_prov_get_keymgmt_dsa_import();
int ok = 0;
if (dsa_import != NULL) {
#include "prov/provider_ctx.h"
#include "serializer_local.h"
-static OSSL_OP_serializer_newctx_fn dsa_pub_newctx;
-static OSSL_OP_serializer_freectx_fn dsa_pub_freectx;
-static OSSL_OP_serializer_serialize_data_fn dsa_pub_der_data;
-static OSSL_OP_serializer_serialize_object_fn dsa_pub_der;
-static OSSL_OP_serializer_serialize_data_fn dsa_pub_pem_data;
-static OSSL_OP_serializer_serialize_object_fn dsa_pub_pem;
+static OSSL_FUNC_serializer_newctx_fn dsa_pub_newctx;
+static OSSL_FUNC_serializer_freectx_fn dsa_pub_freectx;
+static OSSL_FUNC_serializer_serialize_data_fn dsa_pub_der_data;
+static OSSL_FUNC_serializer_serialize_object_fn dsa_pub_der;
+static OSSL_FUNC_serializer_serialize_data_fn dsa_pub_pem_data;
+static OSSL_FUNC_serializer_serialize_object_fn dsa_pub_pem;
-static OSSL_OP_serializer_serialize_data_fn dsa_pub_print_data;
-static OSSL_OP_serializer_serialize_object_fn dsa_pub_print;
+static OSSL_FUNC_serializer_serialize_data_fn dsa_pub_print_data;
+static OSSL_FUNC_serializer_serialize_object_fn dsa_pub_print;
/* Public key : context */
OSSL_CORE_BIO *out,
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg)
{
- OSSL_OP_keymgmt_new_fn *dsa_new = ossl_prov_get_keymgmt_dsa_new();
- OSSL_OP_keymgmt_free_fn *dsa_free = ossl_prov_get_keymgmt_dsa_free();
- OSSL_OP_keymgmt_import_fn *dsa_import = ossl_prov_get_keymgmt_dsa_import();
+ OSSL_FUNC_keymgmt_new_fn *dsa_new = ossl_prov_get_keymgmt_dsa_new();
+ OSSL_FUNC_keymgmt_free_fn *dsa_free = ossl_prov_get_keymgmt_dsa_free();
+ OSSL_FUNC_keymgmt_import_fn *dsa_import = ossl_prov_get_keymgmt_dsa_import();
int ok = 0;
if (dsa_import != NULL) {
OSSL_CORE_BIO *out,
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg)
{
- OSSL_OP_keymgmt_new_fn *dsa_new = ossl_prov_get_keymgmt_dsa_new();
- OSSL_OP_keymgmt_free_fn *dsa_free = ossl_prov_get_keymgmt_dsa_free();
- OSSL_OP_keymgmt_import_fn *dsa_import = ossl_prov_get_keymgmt_dsa_import();
+ OSSL_FUNC_keymgmt_new_fn *dsa_new = ossl_prov_get_keymgmt_dsa_new();
+ OSSL_FUNC_keymgmt_free_fn *dsa_free = ossl_prov_get_keymgmt_dsa_free();
+ OSSL_FUNC_keymgmt_import_fn *dsa_import = ossl_prov_get_keymgmt_dsa_import();
int ok = 0;
if (dsa_import != NULL) {
OSSL_CORE_BIO *out,
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg)
{
- OSSL_OP_keymgmt_new_fn *dsa_new = ossl_prov_get_keymgmt_dsa_new();
- OSSL_OP_keymgmt_free_fn *dsa_free = ossl_prov_get_keymgmt_dsa_free();
- OSSL_OP_keymgmt_import_fn *dsa_import = ossl_prov_get_keymgmt_dsa_import();
+ OSSL_FUNC_keymgmt_new_fn *dsa_new = ossl_prov_get_keymgmt_dsa_new();
+ OSSL_FUNC_keymgmt_free_fn *dsa_free = ossl_prov_get_keymgmt_dsa_free();
+ OSSL_FUNC_keymgmt_import_fn *dsa_import = ossl_prov_get_keymgmt_dsa_import();
int ok = 0;
if (dsa_import != NULL) {
#include "prov/implementations.h" /* ec_keymgmt_functions */
#include "serializer_local.h"
-void ec_get_new_free_import(OSSL_OP_keymgmt_new_fn **ec_new,
- OSSL_OP_keymgmt_free_fn **ec_free,
- OSSL_OP_keymgmt_import_fn **ec_import)
+void ec_get_new_free_import(OSSL_FUNC_keymgmt_new_fn **ec_new,
+ OSSL_FUNC_keymgmt_free_fn **ec_free,
+ OSSL_FUNC_keymgmt_import_fn **ec_import)
{
*ec_new = ossl_prov_get_keymgmt_new(ec_keymgmt_functions);
*ec_free = ossl_prov_get_keymgmt_free(ec_keymgmt_functions);
#include "prov/provider_ctx.h"
#include "serializer_local.h"
-static OSSL_OP_serializer_newctx_fn ec_param_newctx;
-static OSSL_OP_serializer_freectx_fn ec_param_freectx;
-static OSSL_OP_serializer_serialize_data_fn ec_param_der_data;
-static OSSL_OP_serializer_serialize_object_fn ec_param_der;
-static OSSL_OP_serializer_serialize_data_fn ec_param_pem_data;
-static OSSL_OP_serializer_serialize_object_fn ec_param_pem;
+static OSSL_FUNC_serializer_newctx_fn ec_param_newctx;
+static OSSL_FUNC_serializer_freectx_fn ec_param_freectx;
+static OSSL_FUNC_serializer_serialize_data_fn ec_param_der_data;
+static OSSL_FUNC_serializer_serialize_object_fn ec_param_der;
+static OSSL_FUNC_serializer_serialize_data_fn ec_param_pem_data;
+static OSSL_FUNC_serializer_serialize_object_fn ec_param_pem;
-static OSSL_OP_serializer_serialize_data_fn ec_param_print_data;
-static OSSL_OP_serializer_serialize_object_fn ec_param_print;
+static OSSL_FUNC_serializer_serialize_data_fn ec_param_print_data;
+static OSSL_FUNC_serializer_serialize_object_fn ec_param_print;
/* There is no specific implementation context, so use the provider context */
OSSL_CORE_BIO *out,
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg)
{
- OSSL_OP_keymgmt_new_fn *ec_new;
- OSSL_OP_keymgmt_free_fn *ec_free;
- OSSL_OP_keymgmt_import_fn *ec_import;
+ OSSL_FUNC_keymgmt_new_fn *ec_new;
+ OSSL_FUNC_keymgmt_free_fn *ec_free;
+ OSSL_FUNC_keymgmt_import_fn *ec_import;
int ok = 0;
ec_get_new_free_import(&ec_new, &ec_free, &ec_import);
OSSL_CORE_BIO *out,
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg)
{
- OSSL_OP_keymgmt_new_fn *ec_new;
- OSSL_OP_keymgmt_free_fn *ec_free;
- OSSL_OP_keymgmt_import_fn *ec_import;
+ OSSL_FUNC_keymgmt_new_fn *ec_new;
+ OSSL_FUNC_keymgmt_free_fn *ec_free;
+ OSSL_FUNC_keymgmt_import_fn *ec_import;
int ok = 0;
ec_get_new_free_import(&ec_new, &ec_free, &ec_import);
OSSL_CORE_BIO *out,
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg)
{
- OSSL_OP_keymgmt_new_fn *ec_new;
- OSSL_OP_keymgmt_free_fn *ec_free;
- OSSL_OP_keymgmt_import_fn *ec_import;
+ OSSL_FUNC_keymgmt_new_fn *ec_new;
+ OSSL_FUNC_keymgmt_free_fn *ec_free;
+ OSSL_FUNC_keymgmt_import_fn *ec_import;
int ok = 0;
ec_get_new_free_import(&ec_new, &ec_free, &ec_import);
#include "prov/provider_ctx.h"
#include "serializer_local.h"
-static OSSL_OP_serializer_newctx_fn ec_priv_newctx;
-static OSSL_OP_serializer_freectx_fn ec_priv_freectx;
-static OSSL_OP_serializer_set_ctx_params_fn ec_priv_set_ctx_params;
-static OSSL_OP_serializer_settable_ctx_params_fn ec_priv_settable_ctx_params;
-static OSSL_OP_serializer_serialize_data_fn ec_priv_der_data;
-static OSSL_OP_serializer_serialize_object_fn ec_priv_der;
-static OSSL_OP_serializer_serialize_data_fn ec_pem_priv_data;
-static OSSL_OP_serializer_serialize_object_fn ec_pem_priv;
-
-static OSSL_OP_serializer_newctx_fn ec_print_newctx;
-static OSSL_OP_serializer_freectx_fn ec_print_freectx;
-static OSSL_OP_serializer_serialize_data_fn ec_priv_print_data;
-static OSSL_OP_serializer_serialize_object_fn ec_priv_print;
+static OSSL_FUNC_serializer_newctx_fn ec_priv_newctx;
+static OSSL_FUNC_serializer_freectx_fn ec_priv_freectx;
+static OSSL_FUNC_serializer_set_ctx_params_fn ec_priv_set_ctx_params;
+static OSSL_FUNC_serializer_settable_ctx_params_fn ec_priv_settable_ctx_params;
+static OSSL_FUNC_serializer_serialize_data_fn ec_priv_der_data;
+static OSSL_FUNC_serializer_serialize_object_fn ec_priv_der;
+static OSSL_FUNC_serializer_serialize_data_fn ec_pem_priv_data;
+static OSSL_FUNC_serializer_serialize_object_fn ec_pem_priv;
+
+static OSSL_FUNC_serializer_newctx_fn ec_print_newctx;
+static OSSL_FUNC_serializer_freectx_fn ec_print_freectx;
+static OSSL_FUNC_serializer_serialize_data_fn ec_priv_print_data;
+static OSSL_FUNC_serializer_serialize_object_fn ec_priv_print;
/*
* Context used for private key serialization.
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg)
{
struct ec_priv_ctx_st *ctx = vctx;
- OSSL_OP_keymgmt_new_fn *ec_new;
- OSSL_OP_keymgmt_free_fn *ec_free;
- OSSL_OP_keymgmt_import_fn *ec_import;
+ OSSL_FUNC_keymgmt_new_fn *ec_new;
+ OSSL_FUNC_keymgmt_free_fn *ec_free;
+ OSSL_FUNC_keymgmt_import_fn *ec_import;
int ok = 0;
ec_get_new_free_import(&ec_new, &ec_free, &ec_import);
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg)
{
struct ec_priv_ctx_st *ctx = vctx;
- OSSL_OP_keymgmt_new_fn *ec_new;
- OSSL_OP_keymgmt_free_fn *ec_free;
- OSSL_OP_keymgmt_import_fn *ec_import;
+ OSSL_FUNC_keymgmt_new_fn *ec_new;
+ OSSL_FUNC_keymgmt_free_fn *ec_free;
+ OSSL_FUNC_keymgmt_import_fn *ec_import;
int ok = 0;
ec_get_new_free_import(&ec_new, &ec_free, &ec_import);
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg)
{
struct ec_priv_ctx_st *ctx = vctx;
- OSSL_OP_keymgmt_new_fn *ec_new;
- OSSL_OP_keymgmt_free_fn *ec_free;
- OSSL_OP_keymgmt_import_fn *ec_import;
+ OSSL_FUNC_keymgmt_new_fn *ec_new;
+ OSSL_FUNC_keymgmt_free_fn *ec_free;
+ OSSL_FUNC_keymgmt_import_fn *ec_import;
int ok = 0;
ec_get_new_free_import(&ec_new, &ec_free, &ec_import);
#include "prov/provider_ctx.h"
#include "serializer_local.h"
-static OSSL_OP_serializer_newctx_fn ec_pub_newctx;
-static OSSL_OP_serializer_freectx_fn ec_pub_freectx;
-static OSSL_OP_serializer_serialize_data_fn ec_pub_der_data;
-static OSSL_OP_serializer_serialize_object_fn ec_pub_der;
-static OSSL_OP_serializer_serialize_data_fn ec_pub_pem_data;
-static OSSL_OP_serializer_serialize_object_fn ec_pub_pem;
+static OSSL_FUNC_serializer_newctx_fn ec_pub_newctx;
+static OSSL_FUNC_serializer_freectx_fn ec_pub_freectx;
+static OSSL_FUNC_serializer_serialize_data_fn ec_pub_der_data;
+static OSSL_FUNC_serializer_serialize_object_fn ec_pub_der;
+static OSSL_FUNC_serializer_serialize_data_fn ec_pub_pem_data;
+static OSSL_FUNC_serializer_serialize_object_fn ec_pub_pem;
-static OSSL_OP_serializer_serialize_data_fn ec_pub_print_data;
-static OSSL_OP_serializer_serialize_object_fn ec_pub_print;
+static OSSL_FUNC_serializer_serialize_data_fn ec_pub_print_data;
+static OSSL_FUNC_serializer_serialize_object_fn ec_pub_print;
/* Public key : context */
OSSL_CORE_BIO *out,
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg)
{
- OSSL_OP_keymgmt_new_fn *ec_new;
- OSSL_OP_keymgmt_free_fn *ec_free;
- OSSL_OP_keymgmt_import_fn *ec_import;
+ OSSL_FUNC_keymgmt_new_fn *ec_new;
+ OSSL_FUNC_keymgmt_free_fn *ec_free;
+ OSSL_FUNC_keymgmt_import_fn *ec_import;
int ok = 0;
ec_get_new_free_import(&ec_new, &ec_free, &ec_import);
OSSL_CORE_BIO *out,
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg)
{
- OSSL_OP_keymgmt_new_fn *ec_new;
- OSSL_OP_keymgmt_free_fn *ec_free;
- OSSL_OP_keymgmt_import_fn *ec_import;
+ OSSL_FUNC_keymgmt_new_fn *ec_new;
+ OSSL_FUNC_keymgmt_free_fn *ec_free;
+ OSSL_FUNC_keymgmt_import_fn *ec_import;
int ok = 0;
ec_get_new_free_import(&ec_new, &ec_free, &ec_import);
OSSL_CORE_BIO *out,
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg)
{
- OSSL_OP_keymgmt_new_fn *ec_new;
- OSSL_OP_keymgmt_free_fn *ec_free;
- OSSL_OP_keymgmt_import_fn *ec_import;
+ OSSL_FUNC_keymgmt_new_fn *ec_new;
+ OSSL_FUNC_keymgmt_free_fn *ec_free;
+ OSSL_FUNC_keymgmt_import_fn *ec_import;
int ok = 0;
ec_get_new_free_import(&ec_new, &ec_free, &ec_import);
#include "serializer_local.h"
void ecx_get_new_free_import(ECX_KEY_TYPE type,
- OSSL_OP_keymgmt_new_fn **ecx_new,
- OSSL_OP_keymgmt_free_fn **ecx_free,
- OSSL_OP_keymgmt_import_fn **ecx_import)
+ OSSL_FUNC_keymgmt_new_fn **ecx_new,
+ OSSL_FUNC_keymgmt_free_fn **ecx_free,
+ OSSL_FUNC_keymgmt_import_fn **ecx_import)
{
if (type == ECX_KEY_TYPE_X25519) {
*ecx_new = ossl_prov_get_keymgmt_new(x25519_keymgmt_functions);
#include "prov/provider_ctx.h"
#include "serializer_local.h"
-static OSSL_OP_serializer_newctx_fn x25519_priv_newctx;
-static OSSL_OP_serializer_newctx_fn x448_priv_newctx;
-static OSSL_OP_serializer_newctx_fn ed25519_priv_newctx;
-static OSSL_OP_serializer_newctx_fn ed448_priv_newctx;
-static OSSL_OP_serializer_freectx_fn ecx_priv_freectx;
-static OSSL_OP_serializer_set_ctx_params_fn ecx_priv_set_ctx_params;
-static OSSL_OP_serializer_settable_ctx_params_fn ecx_priv_settable_ctx_params;
-static OSSL_OP_serializer_serialize_data_fn ecx_priv_der_data;
-static OSSL_OP_serializer_serialize_object_fn ecx_priv_der;
-static OSSL_OP_serializer_serialize_data_fn ecx_priv_pem_data;
-static OSSL_OP_serializer_serialize_object_fn ecx_priv_pem;
-
-static OSSL_OP_serializer_serialize_data_fn ecx_priv_print_data;
-static OSSL_OP_serializer_serialize_object_fn ecx_priv_print;
+static OSSL_FUNC_serializer_newctx_fn x25519_priv_newctx;
+static OSSL_FUNC_serializer_newctx_fn x448_priv_newctx;
+static OSSL_FUNC_serializer_newctx_fn ed25519_priv_newctx;
+static OSSL_FUNC_serializer_newctx_fn ed448_priv_newctx;
+static OSSL_FUNC_serializer_freectx_fn ecx_priv_freectx;
+static OSSL_FUNC_serializer_set_ctx_params_fn ecx_priv_set_ctx_params;
+static OSSL_FUNC_serializer_settable_ctx_params_fn ecx_priv_settable_ctx_params;
+static OSSL_FUNC_serializer_serialize_data_fn ecx_priv_der_data;
+static OSSL_FUNC_serializer_serialize_object_fn ecx_priv_der;
+static OSSL_FUNC_serializer_serialize_data_fn ecx_priv_pem_data;
+static OSSL_FUNC_serializer_serialize_object_fn ecx_priv_pem;
+
+static OSSL_FUNC_serializer_serialize_data_fn ecx_priv_print_data;
+static OSSL_FUNC_serializer_serialize_object_fn ecx_priv_print;
/*
* Context used for private key serialization.
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg)
{
struct ecx_priv_ctx_st *ctx = vctx;
- OSSL_OP_keymgmt_new_fn *ecx_new;
- OSSL_OP_keymgmt_free_fn *ecx_free;
- OSSL_OP_keymgmt_import_fn *ecx_import;
+ OSSL_FUNC_keymgmt_new_fn *ecx_new;
+ OSSL_FUNC_keymgmt_free_fn *ecx_free;
+ OSSL_FUNC_keymgmt_import_fn *ecx_import;
int ok = 0;
ecx_get_new_free_import(ctx->type, &ecx_new, &ecx_free, &ecx_import);
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg)
{
struct ecx_priv_ctx_st *ctx = vctx;
- OSSL_OP_keymgmt_new_fn *ecx_new;
- OSSL_OP_keymgmt_free_fn *ecx_free;
- OSSL_OP_keymgmt_import_fn *ecx_import;
+ OSSL_FUNC_keymgmt_new_fn *ecx_new;
+ OSSL_FUNC_keymgmt_free_fn *ecx_free;
+ OSSL_FUNC_keymgmt_import_fn *ecx_import;
int ok = 0;
ecx_get_new_free_import(ctx->type, &ecx_new, &ecx_free, &ecx_import);
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg)
{
struct ecx_priv_ctx_st *ctx = vctx;
- OSSL_OP_keymgmt_new_fn *ecx_new;
- OSSL_OP_keymgmt_free_fn *ecx_free;
- OSSL_OP_keymgmt_import_fn *ecx_import;
+ OSSL_FUNC_keymgmt_new_fn *ecx_new;
+ OSSL_FUNC_keymgmt_free_fn *ecx_free;
+ OSSL_FUNC_keymgmt_import_fn *ecx_import;
int ok = 0;
ecx_get_new_free_import(ctx->type, &ecx_new, &ecx_free, &ecx_import);
#include "prov/provider_ctx.h"
#include "serializer_local.h"
-static OSSL_OP_serializer_newctx_fn x25519_pub_newctx;
-static OSSL_OP_serializer_newctx_fn x448_pub_newctx;
-static OSSL_OP_serializer_newctx_fn ed25519_pub_newctx;
-static OSSL_OP_serializer_newctx_fn ed448_pub_newctx;
-static OSSL_OP_serializer_freectx_fn ecx_pub_freectx;
-static OSSL_OP_serializer_serialize_data_fn ecx_pub_der_data;
-static OSSL_OP_serializer_serialize_object_fn ecx_pub_der;
-static OSSL_OP_serializer_serialize_data_fn ecx_pub_pem_data;
-static OSSL_OP_serializer_serialize_object_fn ecx_pub_pem;
-
-static OSSL_OP_serializer_serialize_data_fn ecx_pub_print_data;
-static OSSL_OP_serializer_serialize_object_fn ecx_pub_print;
+static OSSL_FUNC_serializer_newctx_fn x25519_pub_newctx;
+static OSSL_FUNC_serializer_newctx_fn x448_pub_newctx;
+static OSSL_FUNC_serializer_newctx_fn ed25519_pub_newctx;
+static OSSL_FUNC_serializer_newctx_fn ed448_pub_newctx;
+static OSSL_FUNC_serializer_freectx_fn ecx_pub_freectx;
+static OSSL_FUNC_serializer_serialize_data_fn ecx_pub_der_data;
+static OSSL_FUNC_serializer_serialize_object_fn ecx_pub_der;
+static OSSL_FUNC_serializer_serialize_data_fn ecx_pub_pem_data;
+static OSSL_FUNC_serializer_serialize_object_fn ecx_pub_pem;
+
+static OSSL_FUNC_serializer_serialize_data_fn ecx_pub_print_data;
+static OSSL_FUNC_serializer_serialize_object_fn ecx_pub_print;
/*
* Context used for public key serialization.
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg)
{
struct ecx_pub_ctx_st *ctx = vctx;
- OSSL_OP_keymgmt_new_fn *ecx_new;
- OSSL_OP_keymgmt_free_fn *ecx_free;
- OSSL_OP_keymgmt_import_fn *ecx_import;
+ OSSL_FUNC_keymgmt_new_fn *ecx_new;
+ OSSL_FUNC_keymgmt_free_fn *ecx_free;
+ OSSL_FUNC_keymgmt_import_fn *ecx_import;
int ok = 0;
ecx_get_new_free_import(ctx->type, &ecx_new, &ecx_free, &ecx_import);
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg)
{
struct ecx_pub_ctx_st *ctx = vctx;
- OSSL_OP_keymgmt_new_fn *ecx_new;
- OSSL_OP_keymgmt_free_fn *ecx_free;
- OSSL_OP_keymgmt_import_fn *ecx_import;
+ OSSL_FUNC_keymgmt_new_fn *ecx_new;
+ OSSL_FUNC_keymgmt_free_fn *ecx_free;
+ OSSL_FUNC_keymgmt_import_fn *ecx_import;
int ok = 0;
ecx_get_new_free_import(ctx->type, &ecx_new, &ecx_free, &ecx_import);
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg)
{
struct ecx_pub_ctx_st *ctx = vctx;
- OSSL_OP_keymgmt_new_fn *ecx_new;
- OSSL_OP_keymgmt_free_fn *ecx_free;
- OSSL_OP_keymgmt_import_fn *ecx_import;
+ OSSL_FUNC_keymgmt_new_fn *ecx_new;
+ OSSL_FUNC_keymgmt_free_fn *ecx_free;
+ OSSL_FUNC_keymgmt_import_fn *ecx_import;
int ok = 0;
ecx_get_new_free_import(ctx->type, &ecx_new, &ecx_free, &ecx_import);
void *cbarg;
};
-OSSL_OP_keymgmt_new_fn *ossl_prov_get_keymgmt_new(const OSSL_DISPATCH *fns);
-OSSL_OP_keymgmt_free_fn *ossl_prov_get_keymgmt_free(const OSSL_DISPATCH *fns);
-OSSL_OP_keymgmt_import_fn *ossl_prov_get_keymgmt_import(const OSSL_DISPATCH *fns);
-
-OSSL_OP_keymgmt_new_fn *ossl_prov_get_keymgmt_rsa_new(void);
-OSSL_OP_keymgmt_free_fn *ossl_prov_get_keymgmt_rsa_free(void);
-OSSL_OP_keymgmt_import_fn *ossl_prov_get_keymgmt_rsa_import(void);
-OSSL_OP_keymgmt_new_fn *ossl_prov_get_keymgmt_dh_new(void);
-OSSL_OP_keymgmt_free_fn *ossl_prov_get_keymgmt_dh_free(void);
-OSSL_OP_keymgmt_import_fn *ossl_prov_get_keymgmt_dh_import(void);
-OSSL_OP_keymgmt_new_fn *ossl_prov_get_keymgmt_dsa_new(void);
-OSSL_OP_keymgmt_free_fn *ossl_prov_get_keymgmt_dsa_free(void);
-OSSL_OP_keymgmt_import_fn *ossl_prov_get_keymgmt_dsa_import(void);
-
-void ec_get_new_free_import(OSSL_OP_keymgmt_new_fn **ec_new,
- OSSL_OP_keymgmt_free_fn **ec_free,
- OSSL_OP_keymgmt_import_fn **ec_import);
+OSSL_FUNC_keymgmt_new_fn *ossl_prov_get_keymgmt_new(const OSSL_DISPATCH *fns);
+OSSL_FUNC_keymgmt_free_fn *ossl_prov_get_keymgmt_free(const OSSL_DISPATCH *fns);
+OSSL_FUNC_keymgmt_import_fn *ossl_prov_get_keymgmt_import(const OSSL_DISPATCH *fns);
+
+OSSL_FUNC_keymgmt_new_fn *ossl_prov_get_keymgmt_rsa_new(void);
+OSSL_FUNC_keymgmt_free_fn *ossl_prov_get_keymgmt_rsa_free(void);
+OSSL_FUNC_keymgmt_import_fn *ossl_prov_get_keymgmt_rsa_import(void);
+OSSL_FUNC_keymgmt_new_fn *ossl_prov_get_keymgmt_dh_new(void);
+OSSL_FUNC_keymgmt_free_fn *ossl_prov_get_keymgmt_dh_free(void);
+OSSL_FUNC_keymgmt_import_fn *ossl_prov_get_keymgmt_dh_import(void);
+OSSL_FUNC_keymgmt_new_fn *ossl_prov_get_keymgmt_dsa_new(void);
+OSSL_FUNC_keymgmt_free_fn *ossl_prov_get_keymgmt_dsa_free(void);
+OSSL_FUNC_keymgmt_import_fn *ossl_prov_get_keymgmt_dsa_import(void);
+
+void ec_get_new_free_import(OSSL_FUNC_keymgmt_new_fn **ec_new,
+ OSSL_FUNC_keymgmt_free_fn **ec_free,
+ OSSL_FUNC_keymgmt_import_fn **ec_import);
int ossl_prov_prepare_ec_params(const void *eckey, int nid,
void **pstr, int *pstrtype);
#ifndef OPENSSL_NO_EC
void ecx_get_new_free_import(ECX_KEY_TYPE type,
- OSSL_OP_keymgmt_new_fn **ecx_new,
- OSSL_OP_keymgmt_free_fn **ecx_free,
- OSSL_OP_keymgmt_import_fn **ecx_import);
+ OSSL_FUNC_keymgmt_new_fn **ecx_new,
+ OSSL_FUNC_keymgmt_free_fn **ecx_free,
+ OSSL_FUNC_keymgmt_import_fn **ecx_import);
int ossl_prov_ecx_pub_to_der(const void *ecxkey, unsigned char **pder);
int ossl_prov_ecx_priv_to_der(const void *ecxkey, unsigned char **pder);
#endif
DEFINE_SPECIAL_STACK_OF_CONST(BIGNUM_const, BIGNUM)
-OSSL_OP_keymgmt_new_fn *ossl_prov_get_keymgmt_rsa_new(void)
+OSSL_FUNC_keymgmt_new_fn *ossl_prov_get_keymgmt_rsa_new(void)
{
return ossl_prov_get_keymgmt_new(rsa_keymgmt_functions);
}
-OSSL_OP_keymgmt_free_fn *ossl_prov_get_keymgmt_rsa_free(void)
+OSSL_FUNC_keymgmt_free_fn *ossl_prov_get_keymgmt_rsa_free(void)
{
return ossl_prov_get_keymgmt_free(rsa_keymgmt_functions);
}
-OSSL_OP_keymgmt_import_fn *ossl_prov_get_keymgmt_rsa_import(void)
+OSSL_FUNC_keymgmt_import_fn *ossl_prov_get_keymgmt_rsa_import(void)
{
return ossl_prov_get_keymgmt_import(rsa_keymgmt_functions);
}
#include "prov/provider_ctx.h"
#include "serializer_local.h"
-static OSSL_OP_serializer_newctx_fn rsa_priv_newctx;
-static OSSL_OP_serializer_freectx_fn rsa_priv_freectx;
-static OSSL_OP_serializer_set_ctx_params_fn rsa_priv_set_ctx_params;
-static OSSL_OP_serializer_settable_ctx_params_fn rsa_priv_settable_ctx_params;
-static OSSL_OP_serializer_serialize_data_fn rsa_priv_der_data;
-static OSSL_OP_serializer_serialize_object_fn rsa_priv_der;
-static OSSL_OP_serializer_serialize_data_fn rsa_pem_priv_data;
-static OSSL_OP_serializer_serialize_object_fn rsa_pem_priv;
-
-static OSSL_OP_serializer_newctx_fn rsa_print_newctx;
-static OSSL_OP_serializer_freectx_fn rsa_print_freectx;
-static OSSL_OP_serializer_serialize_data_fn rsa_priv_print_data;
-static OSSL_OP_serializer_serialize_object_fn rsa_priv_print;
+static OSSL_FUNC_serializer_newctx_fn rsa_priv_newctx;
+static OSSL_FUNC_serializer_freectx_fn rsa_priv_freectx;
+static OSSL_FUNC_serializer_set_ctx_params_fn rsa_priv_set_ctx_params;
+static OSSL_FUNC_serializer_settable_ctx_params_fn rsa_priv_settable_ctx_params;
+static OSSL_FUNC_serializer_serialize_data_fn rsa_priv_der_data;
+static OSSL_FUNC_serializer_serialize_object_fn rsa_priv_der;
+static OSSL_FUNC_serializer_serialize_data_fn rsa_pem_priv_data;
+static OSSL_FUNC_serializer_serialize_object_fn rsa_pem_priv;
+
+static OSSL_FUNC_serializer_newctx_fn rsa_print_newctx;
+static OSSL_FUNC_serializer_freectx_fn rsa_print_freectx;
+static OSSL_FUNC_serializer_serialize_data_fn rsa_priv_print_data;
+static OSSL_FUNC_serializer_serialize_object_fn rsa_priv_print;
/*
* Context used for private key serialization.
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg)
{
struct rsa_priv_ctx_st *ctx = vctx;
- OSSL_OP_keymgmt_new_fn *rsa_new = ossl_prov_get_keymgmt_rsa_new();
- OSSL_OP_keymgmt_free_fn *rsa_free = ossl_prov_get_keymgmt_rsa_free();
- OSSL_OP_keymgmt_import_fn *rsa_import = ossl_prov_get_keymgmt_rsa_import();
+ OSSL_FUNC_keymgmt_new_fn *rsa_new = ossl_prov_get_keymgmt_rsa_new();
+ OSSL_FUNC_keymgmt_free_fn *rsa_free = ossl_prov_get_keymgmt_rsa_free();
+ OSSL_FUNC_keymgmt_import_fn *rsa_import = ossl_prov_get_keymgmt_rsa_import();
int ok = 0;
if (rsa_import != NULL) {
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg)
{
struct rsa_priv_ctx_st *ctx = vctx;
- OSSL_OP_keymgmt_new_fn *rsa_new = ossl_prov_get_keymgmt_rsa_new();
- OSSL_OP_keymgmt_free_fn *rsa_free = ossl_prov_get_keymgmt_rsa_free();
- OSSL_OP_keymgmt_import_fn *rsa_import = ossl_prov_get_keymgmt_rsa_import();
+ OSSL_FUNC_keymgmt_new_fn *rsa_new = ossl_prov_get_keymgmt_rsa_new();
+ OSSL_FUNC_keymgmt_free_fn *rsa_free = ossl_prov_get_keymgmt_rsa_free();
+ OSSL_FUNC_keymgmt_import_fn *rsa_import = ossl_prov_get_keymgmt_rsa_import();
int ok = 0;
if (rsa_import != NULL) {
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg)
{
struct rsa_priv_ctx_st *ctx = vctx;
- OSSL_OP_keymgmt_new_fn *rsa_new = ossl_prov_get_keymgmt_rsa_new();
- OSSL_OP_keymgmt_free_fn *rsa_free = ossl_prov_get_keymgmt_rsa_free();
- OSSL_OP_keymgmt_import_fn *rsa_import = ossl_prov_get_keymgmt_rsa_import();
+ OSSL_FUNC_keymgmt_new_fn *rsa_new = ossl_prov_get_keymgmt_rsa_new();
+ OSSL_FUNC_keymgmt_free_fn *rsa_free = ossl_prov_get_keymgmt_rsa_free();
+ OSSL_FUNC_keymgmt_import_fn *rsa_import = ossl_prov_get_keymgmt_rsa_import();
int ok = 0;
if (rsa_import != NULL) {
#include "prov/provider_ctx.h"
#include "serializer_local.h"
-static OSSL_OP_serializer_newctx_fn rsa_pub_newctx;
-static OSSL_OP_serializer_freectx_fn rsa_pub_freectx;
-static OSSL_OP_serializer_serialize_data_fn rsa_pub_der_data;
-static OSSL_OP_serializer_serialize_object_fn rsa_pub_der;
-static OSSL_OP_serializer_serialize_data_fn rsa_pub_pem_data;
-static OSSL_OP_serializer_serialize_object_fn rsa_pub_pem;
+static OSSL_FUNC_serializer_newctx_fn rsa_pub_newctx;
+static OSSL_FUNC_serializer_freectx_fn rsa_pub_freectx;
+static OSSL_FUNC_serializer_serialize_data_fn rsa_pub_der_data;
+static OSSL_FUNC_serializer_serialize_object_fn rsa_pub_der;
+static OSSL_FUNC_serializer_serialize_data_fn rsa_pub_pem_data;
+static OSSL_FUNC_serializer_serialize_object_fn rsa_pub_pem;
-static OSSL_OP_serializer_serialize_data_fn rsa_pub_print_data;
-static OSSL_OP_serializer_serialize_object_fn rsa_pub_print;
+static OSSL_FUNC_serializer_serialize_data_fn rsa_pub_print_data;
+static OSSL_FUNC_serializer_serialize_object_fn rsa_pub_print;
/* Public key : context */
OSSL_CORE_BIO *out,
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg)
{
- OSSL_OP_keymgmt_new_fn *rsa_new = ossl_prov_get_keymgmt_rsa_new();
- OSSL_OP_keymgmt_free_fn *rsa_free = ossl_prov_get_keymgmt_rsa_free();
- OSSL_OP_keymgmt_import_fn *rsa_import = ossl_prov_get_keymgmt_rsa_import();
+ OSSL_FUNC_keymgmt_new_fn *rsa_new = ossl_prov_get_keymgmt_rsa_new();
+ OSSL_FUNC_keymgmt_free_fn *rsa_free = ossl_prov_get_keymgmt_rsa_free();
+ OSSL_FUNC_keymgmt_import_fn *rsa_import = ossl_prov_get_keymgmt_rsa_import();
int ok = 0;
if (rsa_import != NULL) {
OSSL_CORE_BIO *out,
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg)
{
- OSSL_OP_keymgmt_new_fn *rsa_new = ossl_prov_get_keymgmt_rsa_new();
- OSSL_OP_keymgmt_free_fn *rsa_free = ossl_prov_get_keymgmt_rsa_free();
- OSSL_OP_keymgmt_import_fn *rsa_import = ossl_prov_get_keymgmt_rsa_import();
+ OSSL_FUNC_keymgmt_new_fn *rsa_new = ossl_prov_get_keymgmt_rsa_new();
+ OSSL_FUNC_keymgmt_free_fn *rsa_free = ossl_prov_get_keymgmt_rsa_free();
+ OSSL_FUNC_keymgmt_import_fn *rsa_import = ossl_prov_get_keymgmt_rsa_import();
int ok = 0;
if (rsa_import != NULL) {
OSSL_CORE_BIO *out,
OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg)
{
- OSSL_OP_keymgmt_new_fn *rsa_new = ossl_prov_get_keymgmt_rsa_new();
- OSSL_OP_keymgmt_free_fn *rsa_free = ossl_prov_get_keymgmt_rsa_free();
- OSSL_OP_keymgmt_import_fn *rsa_import = ossl_prov_get_keymgmt_rsa_import();
+ OSSL_FUNC_keymgmt_new_fn *rsa_new = ossl_prov_get_keymgmt_rsa_new();
+ OSSL_FUNC_keymgmt_free_fn *rsa_free = ossl_prov_get_keymgmt_rsa_free();
+ OSSL_FUNC_keymgmt_import_fn *rsa_import = ossl_prov_get_keymgmt_rsa_import();
int ok = 0;
if (rsa_import != NULL) {
#include "crypto/dsa.h"
#include "prov/der_dsa.h"
-static OSSL_OP_signature_newctx_fn dsa_newctx;
-static OSSL_OP_signature_sign_init_fn dsa_signature_init;
-static OSSL_OP_signature_verify_init_fn dsa_signature_init;
-static OSSL_OP_signature_sign_fn dsa_sign;
-static OSSL_OP_signature_verify_fn dsa_verify;
-static OSSL_OP_signature_digest_sign_init_fn dsa_digest_signverify_init;
-static OSSL_OP_signature_digest_sign_update_fn dsa_digest_signverify_update;
-static OSSL_OP_signature_digest_sign_final_fn dsa_digest_sign_final;
-static OSSL_OP_signature_digest_verify_init_fn dsa_digest_signverify_init;
-static OSSL_OP_signature_digest_verify_update_fn dsa_digest_signverify_update;
-static OSSL_OP_signature_digest_verify_final_fn dsa_digest_verify_final;
-static OSSL_OP_signature_freectx_fn dsa_freectx;
-static OSSL_OP_signature_dupctx_fn dsa_dupctx;
-static OSSL_OP_signature_get_ctx_params_fn dsa_get_ctx_params;
-static OSSL_OP_signature_gettable_ctx_params_fn dsa_gettable_ctx_params;
-static OSSL_OP_signature_set_ctx_params_fn dsa_set_ctx_params;
-static OSSL_OP_signature_settable_ctx_params_fn dsa_settable_ctx_params;
-static OSSL_OP_signature_get_ctx_md_params_fn dsa_get_ctx_md_params;
-static OSSL_OP_signature_gettable_ctx_md_params_fn dsa_gettable_ctx_md_params;
-static OSSL_OP_signature_set_ctx_md_params_fn dsa_set_ctx_md_params;
-static OSSL_OP_signature_settable_ctx_md_params_fn dsa_settable_ctx_md_params;
+static OSSL_FUNC_signature_newctx_fn dsa_newctx;
+static OSSL_FUNC_signature_sign_init_fn dsa_signature_init;
+static OSSL_FUNC_signature_verify_init_fn dsa_signature_init;
+static OSSL_FUNC_signature_sign_fn dsa_sign;
+static OSSL_FUNC_signature_verify_fn dsa_verify;
+static OSSL_FUNC_signature_digest_sign_init_fn dsa_digest_signverify_init;
+static OSSL_FUNC_signature_digest_sign_update_fn dsa_digest_signverify_update;
+static OSSL_FUNC_signature_digest_sign_final_fn dsa_digest_sign_final;
+static OSSL_FUNC_signature_digest_verify_init_fn dsa_digest_signverify_init;
+static OSSL_FUNC_signature_digest_verify_update_fn dsa_digest_signverify_update;
+static OSSL_FUNC_signature_digest_verify_final_fn dsa_digest_verify_final;
+static OSSL_FUNC_signature_freectx_fn dsa_freectx;
+static OSSL_FUNC_signature_dupctx_fn dsa_dupctx;
+static OSSL_FUNC_signature_get_ctx_params_fn dsa_get_ctx_params;
+static OSSL_FUNC_signature_gettable_ctx_params_fn dsa_gettable_ctx_params;
+static OSSL_FUNC_signature_set_ctx_params_fn dsa_set_ctx_params;
+static OSSL_FUNC_signature_settable_ctx_params_fn dsa_settable_ctx_params;
+static OSSL_FUNC_signature_get_ctx_md_params_fn dsa_get_ctx_md_params;
+static OSSL_FUNC_signature_gettable_ctx_md_params_fn dsa_gettable_ctx_md_params;
+static OSSL_FUNC_signature_set_ctx_md_params_fn dsa_set_ctx_md_params;
+static OSSL_FUNC_signature_settable_ctx_md_params_fn dsa_settable_ctx_md_params;
/*
* What's passed as an actual key is defined by the KEYMGMT interface.
#include "crypto/ec.h"
#include "prov/der_ec.h"
-static OSSL_OP_signature_newctx_fn ecdsa_newctx;
-static OSSL_OP_signature_sign_init_fn ecdsa_signature_init;
-static OSSL_OP_signature_verify_init_fn ecdsa_signature_init;
-static OSSL_OP_signature_sign_fn ecdsa_sign;
-static OSSL_OP_signature_verify_fn ecdsa_verify;
-static OSSL_OP_signature_digest_sign_init_fn ecdsa_digest_signverify_init;
-static OSSL_OP_signature_digest_sign_update_fn ecdsa_digest_signverify_update;
-static OSSL_OP_signature_digest_sign_final_fn ecdsa_digest_sign_final;
-static OSSL_OP_signature_digest_verify_init_fn ecdsa_digest_signverify_init;
-static OSSL_OP_signature_digest_verify_update_fn ecdsa_digest_signverify_update;
-static OSSL_OP_signature_digest_verify_final_fn ecdsa_digest_verify_final;
-static OSSL_OP_signature_freectx_fn ecdsa_freectx;
-static OSSL_OP_signature_dupctx_fn ecdsa_dupctx;
-static OSSL_OP_signature_get_ctx_params_fn ecdsa_get_ctx_params;
-static OSSL_OP_signature_gettable_ctx_params_fn ecdsa_gettable_ctx_params;
-static OSSL_OP_signature_set_ctx_params_fn ecdsa_set_ctx_params;
-static OSSL_OP_signature_settable_ctx_params_fn ecdsa_settable_ctx_params;
-static OSSL_OP_signature_get_ctx_md_params_fn ecdsa_get_ctx_md_params;
-static OSSL_OP_signature_gettable_ctx_md_params_fn ecdsa_gettable_ctx_md_params;
-static OSSL_OP_signature_set_ctx_md_params_fn ecdsa_set_ctx_md_params;
-static OSSL_OP_signature_settable_ctx_md_params_fn ecdsa_settable_ctx_md_params;
+static OSSL_FUNC_signature_newctx_fn ecdsa_newctx;
+static OSSL_FUNC_signature_sign_init_fn ecdsa_signature_init;
+static OSSL_FUNC_signature_verify_init_fn ecdsa_signature_init;
+static OSSL_FUNC_signature_sign_fn ecdsa_sign;
+static OSSL_FUNC_signature_verify_fn ecdsa_verify;
+static OSSL_FUNC_signature_digest_sign_init_fn ecdsa_digest_signverify_init;
+static OSSL_FUNC_signature_digest_sign_update_fn ecdsa_digest_signverify_update;
+static OSSL_FUNC_signature_digest_sign_final_fn ecdsa_digest_sign_final;
+static OSSL_FUNC_signature_digest_verify_init_fn ecdsa_digest_signverify_init;
+static OSSL_FUNC_signature_digest_verify_update_fn ecdsa_digest_signverify_update;
+static OSSL_FUNC_signature_digest_verify_final_fn ecdsa_digest_verify_final;
+static OSSL_FUNC_signature_freectx_fn ecdsa_freectx;
+static OSSL_FUNC_signature_dupctx_fn ecdsa_dupctx;
+static OSSL_FUNC_signature_get_ctx_params_fn ecdsa_get_ctx_params;
+static OSSL_FUNC_signature_gettable_ctx_params_fn ecdsa_gettable_ctx_params;
+static OSSL_FUNC_signature_set_ctx_params_fn ecdsa_set_ctx_params;
+static OSSL_FUNC_signature_settable_ctx_params_fn ecdsa_settable_ctx_params;
+static OSSL_FUNC_signature_get_ctx_md_params_fn ecdsa_get_ctx_md_params;
+static OSSL_FUNC_signature_gettable_ctx_md_params_fn ecdsa_gettable_ctx_md_params;
+static OSSL_FUNC_signature_set_ctx_md_params_fn ecdsa_set_ctx_md_params;
+static OSSL_FUNC_signature_settable_ctx_md_params_fn ecdsa_settable_ctx_md_params;
/*
* What's passed as an actual key is defined by the KEYMGMT interface.
#include "prov/provider_ctx.h"
#include "crypto/ecx.h"
-static OSSL_OP_signature_newctx_fn eddsa_newctx;
-static OSSL_OP_signature_digest_sign_init_fn eddsa_digest_signverify_init;
-static OSSL_OP_signature_digest_sign_fn ed25519_digest_sign;
-static OSSL_OP_signature_digest_sign_fn ed448_digest_sign;
-static OSSL_OP_signature_digest_verify_fn ed25519_digest_verify;
-static OSSL_OP_signature_digest_verify_fn ed448_digest_verify;
-static OSSL_OP_signature_freectx_fn eddsa_freectx;
-static OSSL_OP_signature_dupctx_fn eddsa_dupctx;
+static OSSL_FUNC_signature_newctx_fn eddsa_newctx;
+static OSSL_FUNC_signature_digest_sign_init_fn eddsa_digest_signverify_init;
+static OSSL_FUNC_signature_digest_sign_fn ed25519_digest_sign;
+static OSSL_FUNC_signature_digest_sign_fn ed448_digest_sign;
+static OSSL_FUNC_signature_digest_verify_fn ed25519_digest_verify;
+static OSSL_FUNC_signature_digest_verify_fn ed448_digest_verify;
+static OSSL_FUNC_signature_freectx_fn eddsa_freectx;
+static OSSL_FUNC_signature_dupctx_fn eddsa_dupctx;
typedef struct {
OPENSSL_CTX *libctx;
#include "prov/provider_ctx.h"
#include "prov/der_rsa.h"
-static OSSL_OP_signature_newctx_fn rsa_newctx;
-static OSSL_OP_signature_sign_init_fn rsa_sign_init;
-static OSSL_OP_signature_verify_init_fn rsa_verify_init;
-static OSSL_OP_signature_verify_recover_init_fn rsa_verify_recover_init;
-static OSSL_OP_signature_sign_fn rsa_sign;
-static OSSL_OP_signature_verify_fn rsa_verify;
-static OSSL_OP_signature_verify_recover_fn rsa_verify_recover;
-static OSSL_OP_signature_digest_sign_init_fn rsa_digest_sign_init;
-static OSSL_OP_signature_digest_sign_update_fn rsa_digest_signverify_update;
-static OSSL_OP_signature_digest_sign_final_fn rsa_digest_sign_final;
-static OSSL_OP_signature_digest_verify_init_fn rsa_digest_verify_init;
-static OSSL_OP_signature_digest_verify_update_fn rsa_digest_signverify_update;
-static OSSL_OP_signature_digest_verify_final_fn rsa_digest_verify_final;
-static OSSL_OP_signature_freectx_fn rsa_freectx;
-static OSSL_OP_signature_dupctx_fn rsa_dupctx;
-static OSSL_OP_signature_get_ctx_params_fn rsa_get_ctx_params;
-static OSSL_OP_signature_gettable_ctx_params_fn rsa_gettable_ctx_params;
-static OSSL_OP_signature_set_ctx_params_fn rsa_set_ctx_params;
-static OSSL_OP_signature_settable_ctx_params_fn rsa_settable_ctx_params;
-static OSSL_OP_signature_get_ctx_md_params_fn rsa_get_ctx_md_params;
-static OSSL_OP_signature_gettable_ctx_md_params_fn rsa_gettable_ctx_md_params;
-static OSSL_OP_signature_set_ctx_md_params_fn rsa_set_ctx_md_params;
-static OSSL_OP_signature_settable_ctx_md_params_fn rsa_settable_ctx_md_params;
+static OSSL_FUNC_signature_newctx_fn rsa_newctx;
+static OSSL_FUNC_signature_sign_init_fn rsa_sign_init;
+static OSSL_FUNC_signature_verify_init_fn rsa_verify_init;
+static OSSL_FUNC_signature_verify_recover_init_fn rsa_verify_recover_init;
+static OSSL_FUNC_signature_sign_fn rsa_sign;
+static OSSL_FUNC_signature_verify_fn rsa_verify;
+static OSSL_FUNC_signature_verify_recover_fn rsa_verify_recover;
+static OSSL_FUNC_signature_digest_sign_init_fn rsa_digest_sign_init;
+static OSSL_FUNC_signature_digest_sign_update_fn rsa_digest_signverify_update;
+static OSSL_FUNC_signature_digest_sign_final_fn rsa_digest_sign_final;
+static OSSL_FUNC_signature_digest_verify_init_fn rsa_digest_verify_init;
+static OSSL_FUNC_signature_digest_verify_update_fn rsa_digest_signverify_update;
+static OSSL_FUNC_signature_digest_verify_final_fn rsa_digest_verify_final;
+static OSSL_FUNC_signature_freectx_fn rsa_freectx;
+static OSSL_FUNC_signature_dupctx_fn rsa_dupctx;
+static OSSL_FUNC_signature_get_ctx_params_fn rsa_get_ctx_params;
+static OSSL_FUNC_signature_gettable_ctx_params_fn rsa_gettable_ctx_params;
+static OSSL_FUNC_signature_set_ctx_params_fn rsa_set_ctx_params;
+static OSSL_FUNC_signature_settable_ctx_params_fn rsa_settable_ctx_params;
+static OSSL_FUNC_signature_get_ctx_md_params_fn rsa_get_ctx_md_params;
+static OSSL_FUNC_signature_gettable_ctx_md_params_fn rsa_gettable_ctx_md_params;
+static OSSL_FUNC_signature_set_ctx_md_params_fn rsa_set_ctx_md_params;
+static OSSL_FUNC_signature_settable_ctx_md_params_fn rsa_settable_ctx_md_params;
static OSSL_ITEM padding_item[] = {
{ RSA_PKCS1_PADDING, OSSL_PKEY_RSA_PAD_MODE_PKCSV15 },
* Forward declarations to ensure that interface functions are correctly
* defined.
*/
-static OSSL_provider_gettable_params_fn legacy_gettable_params;
-static OSSL_provider_get_params_fn legacy_get_params;
-static OSSL_provider_query_operation_fn legacy_query;
+static OSSL_FUNC_provider_gettable_params_fn legacy_gettable_params;
+static OSSL_FUNC_provider_get_params_fn legacy_get_params;
+static OSSL_FUNC_provider_query_operation_fn legacy_query;
#define ALG(NAMES, FUNC) { NAMES, "provider=legacy", FUNC }
#endif
/* Functions provided by the core */
-static OSSL_core_gettable_params_fn *c_gettable_params = NULL;
-static OSSL_core_get_params_fn *c_get_params = NULL;
+static OSSL_FUNC_core_gettable_params_fn *c_gettable_params = NULL;
+static OSSL_FUNC_core_get_params_fn *c_get_params = NULL;
/* Parameters we provide to the core */
static const OSSL_PARAM legacy_param_types[] = {
const OSSL_DISPATCH **out,
void **provctx)
{
- OSSL_core_get_library_context_fn *c_get_libctx = NULL;
+ OSSL_FUNC_core_get_library_context_fn *c_get_libctx = NULL;
OPENSSL_CTX *libctx = NULL;
for (; in->function_id != 0; in++) {
switch (in->function_id) {
case OSSL_FUNC_CORE_GETTABLE_PARAMS:
- c_gettable_params = OSSL_get_core_gettable_params(in);
+ c_gettable_params = OSSL_FUNC_core_gettable_params(in);
break;
case OSSL_FUNC_CORE_GET_PARAMS:
- c_get_params = OSSL_get_core_get_params(in);
+ c_get_params = OSSL_FUNC_core_get_params(in);
break;
case OSSL_FUNC_CORE_GET_LIBRARY_CONTEXT:
- c_get_libctx = OSSL_get_core_get_library_context(in);
+ c_get_libctx = OSSL_FUNC_core_get_library_context(in);
break;
/* Just ignore anything we don't understand */
default:
return &ourglobals;
}
-static OSSL_provider_gettable_params_fn filter_gettable_params;
-static OSSL_provider_get_params_fn filter_get_params;
-static OSSL_provider_query_operation_fn filter_query;
-static OSSL_provider_teardown_fn filter_teardown;
+static OSSL_FUNC_provider_gettable_params_fn filter_gettable_params;
+static OSSL_FUNC_provider_get_params_fn filter_get_params;
+static OSSL_FUNC_provider_query_operation_fn filter_query;
+static OSSL_FUNC_provider_teardown_fn filter_teardown;
static const OSSL_PARAM *filter_gettable_params(void *provctx)
{
#include <openssl/core.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;
+static OSSL_FUNC_core_gettable_params_fn *c_gettable_params = NULL;
+static OSSL_FUNC_core_get_params_fn *c_get_params = NULL;
/* Tell the core what params we provide and what type they are */
static const OSSL_PARAM p_param_types[] = {
};
/* This is a trick to ensure we define the provider functions correctly */
-static OSSL_provider_gettable_params_fn p_gettable_params;
-static OSSL_provider_get_params_fn p_get_params;
-static OSSL_provider_get_reason_strings_fn p_get_reason_strings;
+static OSSL_FUNC_provider_gettable_params_fn p_gettable_params;
+static OSSL_FUNC_provider_get_params_fn p_get_params;
+static OSSL_FUNC_provider_get_reason_strings_fn p_get_reason_strings;
static const OSSL_PARAM *p_gettable_params(void *_)
{
for (; in->function_id != 0; in++) {
switch (in->function_id) {
case OSSL_FUNC_CORE_GETTABLE_PARAMS:
- c_gettable_params = OSSL_get_core_gettable_params(in);
+ c_gettable_params = OSSL_FUNC_core_gettable_params(in);
break;
case OSSL_FUNC_CORE_GET_PARAMS:
- c_get_params = OSSL_get_core_get_params(in);
+ c_get_params = OSSL_FUNC_core_get_params(in);
break;
default:
/* Just ignore anything we don't understand */
* together. Don't use this!
*/
-static OSSL_OP_keyexch_newctx_fn xor_newctx;
-static OSSL_OP_keyexch_init_fn xor_init;
-static OSSL_OP_keyexch_set_peer_fn xor_set_peer;
-static OSSL_OP_keyexch_derive_fn xor_derive;
-static OSSL_OP_keyexch_freectx_fn xor_freectx;
-static OSSL_OP_keyexch_dupctx_fn xor_dupctx;
+static OSSL_FUNC_keyexch_newctx_fn xor_newctx;
+static OSSL_FUNC_keyexch_init_fn xor_init;
+static OSSL_FUNC_keyexch_set_peer_fn xor_set_peer;
+static OSSL_FUNC_keyexch_derive_fn xor_derive;
+static OSSL_FUNC_keyexch_freectx_fn xor_freectx;
+static OSSL_FUNC_keyexch_dupctx_fn xor_dupctx;
typedef struct {
XORKEY *key;
/* Key Management for the dummy XOR key exchange algorithm */
-static OSSL_OP_keymgmt_new_fn xor_newdata;
-static OSSL_OP_keymgmt_free_fn xor_freedata;
-static OSSL_OP_keymgmt_has_fn xor_has;
-static OSSL_OP_keymgmt_copy_fn xor_copy;
-static OSSL_OP_keymgmt_gen_init_fn xor_gen_init;
-static OSSL_OP_keymgmt_gen_set_params_fn xor_gen_set_params;
-static OSSL_OP_keymgmt_gen_settable_params_fn xor_gen_settable_params;
-static OSSL_OP_keymgmt_gen_fn xor_gen;
-static OSSL_OP_keymgmt_gen_cleanup_fn xor_gen_cleanup;
-static OSSL_OP_keymgmt_get_params_fn xor_get_params;
-static OSSL_OP_keymgmt_gettable_params_fn xor_gettable_params;
-static OSSL_OP_keymgmt_set_params_fn xor_set_params;
-static OSSL_OP_keymgmt_settable_params_fn xor_settable_params;
+static OSSL_FUNC_keymgmt_new_fn xor_newdata;
+static OSSL_FUNC_keymgmt_free_fn xor_freedata;
+static OSSL_FUNC_keymgmt_has_fn xor_has;
+static OSSL_FUNC_keymgmt_copy_fn xor_copy;
+static OSSL_FUNC_keymgmt_gen_init_fn xor_gen_init;
+static OSSL_FUNC_keymgmt_gen_set_params_fn xor_gen_set_params;
+static OSSL_FUNC_keymgmt_gen_settable_params_fn xor_gen_settable_params;
+static OSSL_FUNC_keymgmt_gen_fn xor_gen;
+static OSSL_FUNC_keymgmt_gen_cleanup_fn xor_gen_cleanup;
+static OSSL_FUNC_keymgmt_get_params_fn xor_get_params;
+static OSSL_FUNC_keymgmt_gettable_params_fn xor_gettable_params;
+static OSSL_FUNC_keymgmt_set_params_fn xor_set_params;
+static OSSL_FUNC_keymgmt_settable_params_fn xor_settable_params;
static void *xor_newdata(void *provctx)
{