CRYPTO_DOWN_REF(&decoder->base.refcnt, &ref, decoder->base.lock);
if (ref > 0)
return;
+ OPENSSL_free(decoder->base.name);
ossl_provider_free(decoder->base.prov);
CRYPTO_THREAD_lock_free(decoder->base.lock);
OPENSSL_free(decoder);
if ((decoder = ossl_decoder_new()) == NULL)
return NULL;
decoder->base.id = id;
+ if ((decoder->base.name = ossl_algorithm_get1_first_name(algodef)) == NULL) {
+ OSSL_DECODER_free(decoder);
+ return NULL;
+ }
decoder->base.propdef = algodef->property_definition;
decoder->base.description = algodef->algorithm_description;
return decoder->base.id;
}
+const char *OSSL_DECODER_name(const OSSL_DECODER *decoder)
+{
+ return decoder->base.name;
+}
+
const char *OSSL_DECODER_description(const OSSL_DECODER *decoder)
{
return decoder->base.description;
struct ossl_endecode_base_st {
OSSL_PROVIDER *prov;
int id;
+ char *name;
const char *propdef;
const char *description;
CRYPTO_DOWN_REF(&encoder->base.refcnt, &ref, encoder->base.lock);
if (ref > 0)
return;
+ OPENSSL_free(encoder->base.name);
ossl_provider_free(encoder->base.prov);
CRYPTO_THREAD_lock_free(encoder->base.lock);
OPENSSL_free(encoder);
if ((encoder = ossl_encoder_new()) == NULL)
return NULL;
encoder->base.id = id;
+ if ((encoder->base.name = ossl_algorithm_get1_first_name(algodef)) == NULL) {
+ OSSL_ENCODER_free(encoder);
+ return NULL;
+ }
encoder->base.propdef = algodef->property_definition;
encoder->base.description = algodef->algorithm_description;
return encoder->base.id;
}
+const char *OSSL_ENCODER_name(const OSSL_ENCODER *encoder)
+{
+ return encoder->base.name;
+}
+
const char *OSSL_ENCODER_description(const OSSL_ENCODER *encoder)
{
return encoder->base.description;
const OSSL_PROVIDER *OSSL_DECODER_provider(const OSSL_DECODER *encoder);
const char *OSSL_DECODER_properties(const OSSL_DECODER *encoder);
int OSSL_DECODER_number(const OSSL_DECODER *encoder);
+const char *OSSL_DECODER_name(const OSSL_DECODER *decoder);
const char *OSSL_DECODER_description(const OSSL_DECODER *decoder);
int OSSL_DECODER_is_a(const OSSL_DECODER *encoder, const char *name);
const OSSL_PROVIDER *OSSL_ENCODER_provider(const OSSL_ENCODER *encoder);
const char *OSSL_ENCODER_properties(const OSSL_ENCODER *encoder);
int OSSL_ENCODER_number(const OSSL_ENCODER *encoder);
+const char *OSSL_ENCODER_name(const OSSL_ENCODER *kdf);
const char *OSSL_ENCODER_description(const OSSL_ENCODER *kdf);
int OSSL_ENCODER_is_a(const OSSL_ENCODER *encoder, const char *name);