Crypt-OpenSSL3
view release on metacpan or search on metacpan
lib/Crypt/OpenSSL3.xs view on Meta::CPAN
Crypt::OpenSSL3::ASN1::String ASN1_STRING_dup(Crypt::OpenSSL3::ASN1::String a)
int ASN1_STRING_cmp(Crypt::OpenSSL3::ASN1::String a, Crypt::OpenSSL3::ASN1::String b)
bool ASN1_STRING_set(Crypt::OpenSSL3::ASN1::String str, const char *data, int length(data))
int ASN1_STRING_type(Crypt::OpenSSL3::ASN1::String x)
SV* ASN1_STRING_to_UTF8(Crypt::OpenSSL3::ASN1::String in)
CODE:
unsigned char* out = NULL;
int result = ASN1_STRING_to_UTF8(&out, in);
if (result > 0) {
RETVAL = newSVpvn_utf8((char*)out, result, 1);
OPENSSL_free(out);
} else
RETVAL = &PL_sv_undef;
OUTPUT: RETVAL
bool ASN1_STRING_print(Crypt::OpenSSL3::BIO out, Crypt::OpenSSL3::ASN1::String str)
PrintRet ASN1_STRING_print_ex(Crypt::OpenSSL3::BIO out, Crypt::OpenSSL3::ASN1::String str, unsigned long flags)
MODULE = Crypt::OpenSSL3 PACKAGE = Crypt::OpenSSL3::ASN1::Time PREFIX = ASN1_TIME_
Crypt::OpenSSL3::ASN1::Time ASN1_TIME_new(class)
C_ARGS:
Crypt::OpenSSL3::ASN1::Time ASN1_TIME_dup(Crypt::OpenSSL3::ASN1::Time t);
bool ASN1_TIME_set(Crypt::OpenSSL3::ASN1::Time s, time_t t)
bool ASN1_TIME_adj(Crypt::OpenSSL3::ASN1::Time s, time_t t, int offset_day, long offset_sec)
bool ASN1_TIME_set_string(Crypt::OpenSSL3::ASN1::Time s, const char *str)
bool ASN1_TIME_set_string_X509(Crypt::OpenSSL3::ASN1::Time s, const char *str)
bool ASN1_TIME_normalize(Crypt::OpenSSL3::ASN1::Time s)
bool ASN1_TIME_check(Crypt::OpenSSL3::ASN1::Time t)
bool ASN1_TIME_print(Crypt::OpenSSL3::BIO b, Crypt::OpenSSL3::ASN1::Time s)
PrintRet ASN1_TIME_print_ex(Crypt::OpenSSL3::BIO bp, Crypt::OpenSSL3::ASN1::Time tm, unsigned long flags)
NO_OUTPUT bool ASN1_TIME_diff(Crypt::OpenSSL3::ASN1::Time from, Crypt::OpenSSL3::ASN1::Time to, OUTLIST int pday, OUTLIST int psec)
C_ARGS: &pday, &psec, from, to
POSTCALL:
if (!RETVAL)
XSRETURN_EMPTY;
int ASN1_TIME_cmp_time(Crypt::OpenSSL3::ASN1::Time s, time_t t)
int ASN1_TIME_compare(Crypt::OpenSSL3::ASN1::Time a, Crypt::OpenSSL3::ASN1::Time b)
POSTCALL:
if (RETVAL == -2)
XSRETURN_UNDEF;
void ASN1_TIME_to_tm(Crypt::OpenSSL3::ASN1::Time s)
PPCODE:
struct tm tm;
if (ASN1_TIME_to_tm(s, &tm)) {
EXTEND(SP, 9);
mPUSHi(tm.tm_sec);
mPUSHi(tm.tm_min);
mPUSHi(tm.tm_hour);
mPUSHi(tm.tm_mday);
mPUSHi(tm.tm_mon);
mPUSHi(tm.tm_year);
mPUSHi(tm.tm_wday);
mPUSHi(tm.tm_yday);
mPUSHi(tm.tm_isdst);
}
Crypt::OpenSSL3::ASN1::Time::Generalized ASN1_TIME_to_generalizedtime(Crypt::OpenSSL3::ASN1::Time t)
C_ARGS: t, NULL
POSTCALL:
if (!RETVAL)
XSRETURN_UNDEF;
MODULE = Crypt::OpenSSL3 PACKAGE = Crypt::OpenSSL3::ASN1::Time::Generalized PREFIX = ASN1_GENERALIZEDTIME_
Crypt::OpenSSL3::ASN1::Time::Generalized ASN1_GENERALIZEDTIME_new(class)
C_ARGS:
Crypt::OpenSSL3::ASN1::Time::Generalized ASN1_GENERALIZEDTIME_dup(Crypt::OpenSSL3::ASN1::Time::Generalized t);
bool ASN1_GENERALIZEDTIME_set(Crypt::OpenSSL3::ASN1::Time::Generalized s, time_t t)
bool ASN1_GENERALIZEDTIME_adj(Crypt::OpenSSL3::ASN1::Time::Generalized s, time_t t, int offset_day, long offset_sec)
bool ASN1_GENERALIZEDTIME_set_string(Crypt::OpenSSL3::ASN1::Time::Generalized s, const char *str)
bool ASN1_GENERALIZEDTIME_check(Crypt::OpenSSL3::ASN1::Time::Generalized t)
bool ASN1_GENERALIZEDTIME_print(Crypt::OpenSSL3::BIO b, Crypt::OpenSSL3::ASN1::Time::Generalized s)
MODULE = Crypt::OpenSSL3 PACKAGE = Crypt::OpenSSL3::ASN1::Time::UTC PREFIX = ASN1_UTCTIME_
Crypt::OpenSSL3::ASN1::Time::UTC ASN1_UTCTIME_new(class)
C_ARGS:
Crypt::OpenSSL3::ASN1::Time::UTC ASN1_UTCTIME_dup(Crypt::OpenSSL3::ASN1::Time::UTC t);
bool ASN1_UTCTIME_set(Crypt::OpenSSL3::ASN1::Time::UTC s, time_t t)
bool ASN1_UTCTIME_adj(Crypt::OpenSSL3::ASN1::Time::UTC s, time_t t, int offset_day, long offset_sec)
bool ASN1_UTCTIME_set_string(Crypt::OpenSSL3::ASN1::Time::UTC s, const char *str)
int ASN1_UTCTIME_cmp_time_t(Crypt::OpenSSL3::ASN1::Time::UTC s, time_t t)
bool ASN1_UTCTIME_check(Crypt::OpenSSL3::ASN1::Time::UTC t)
bool ASN1_UTCTIME_print(Crypt::OpenSSL3::BIO b, Crypt::OpenSSL3::ASN1::Time::UTC s)
MODULE = Crypt::OpenSSL3 PACKAGE = Crypt::OpenSSL3::X509 PREFIX = X509_
lib/Crypt/OpenSSL3.xs view on Meta::CPAN
bool SSL_SESSION_set_cipher(Crypt::OpenSSL3::SSL::Session s, Crypt::OpenSSL3::SSL::Cipher cipher)
bool SSL_SESSION_has_ticket(Crypt::OpenSSL3::SSL::Session s)
unsigned long SSL_SESSION_get_ticket_lifetime_hint(Crypt::OpenSSL3::SSL::Session s)
void SSL_SESSION_get_ticket(Crypt::OpenSSL3::SSL::Session s, OUTLIST SV* result)
const unsigned char* ptr = NULL;
size_t len = 0;
C_ARGS: s, &ptr, &len
POSTCALL:
result = newSVpvn((char*)ptr, len);
unsigned SSL_SESSION_get_max_early_data(Crypt::OpenSSL3::SSL::Session s)
bool SSL_SESSION_set_max_early_data(Crypt::OpenSSL3::SSL::Session s, unsigned max_early_data)
Crypt::OpenSSL3::X509 SSL_SESSION_get_peer(Crypt::OpenSSL3::SSL::Session session)
POSTCALL:
if (RETVAL)
X509_up_ref(RETVAL);
else
XSRETURN_UNDEF;
bool SSL_SESSION_set_id_context(Crypt::OpenSSL3::SSL::Session s, const unsigned char *sid_ctx, unsigned int length(sid_ctx))
bool SSL_SESSION_set_id(Crypt::OpenSSL3::SSL::Session s, const unsigned char *sid, unsigned int length(sid))
bool SSL_SESSION_is_resumable(Crypt::OpenSSL3::SSL::Session s)
NO_OUTPUT const unsigned char *SSL_SESSION_get_id(Crypt::OpenSSL3::SSL::Session s, OUTLIST SV* result)
INTERFACE: SSL_SESSION_get_id SSL_SESSION_get_id_context
INIT:
unsigned int len = 0;
C_ARGS: s, &len
POSTCALL:
result = newSVpvn((char*)RETVAL, len);
unsigned int SSL_SESSION_get_compress_id(Crypt::OpenSSL3::SSL::Session s)
bool SSL_SESSION_print(Crypt::OpenSSL3::BIO fp, Crypt::OpenSSL3::SSL::Session ses)
bool SSL_SESSION_print_keylog(Crypt::OpenSSL3::BIO bp, Crypt::OpenSSL3::SSL::Session x)
MODULE = Crypt::OpenSSL3 PACKAGE = Crypt::OpenSSL3::Random PREFIX = EVP_RAND_
Crypt::OpenSSL3::Random EVP_RAND_fetch(classname, const char* algorithm, const char* properties = "")
C_ARGS: NULL, algorithm, properties
POSTCALL:
if (RETVAL == NULL)
XSRETURN_UNDEF;
bool EVP_RAND_is_a(Crypt::OpenSSL3::Random rand, const char *name)
const char *EVP_RAND_get_name(Crypt::OpenSSL3::Random rand)
const char *EVP_RAND_get_description(Crypt::OpenSSL3::Random rand)
void EVP_RAND_names_list_all(Crypt::OpenSSL3::Random rand)
PPCODE:
PUTBACK;
EVP_RAND_names_do_all(rand, EVP_name_callback, iTHX);
SPAGAIN;
void EVP_RAND_list_all_provided(classname)
PPCODE:
PUTBACK;
EVP_RAND_do_all_provided(NULL, EVP_RAND_provided_callback, iTHX);
SPAGAIN;
SV* EVP_RAND_get_param(Crypt::OpenSSL3::Random rand, const char* name)
CODE:
GENERATE_GET_PARAM(EVP_RAND, rand, name)
OUTPUT: RETVAL
MODULE = Crypt::OpenSSL3 PACKAGE = Crypt::OpenSSL3::Random PREFIX = RAND_
NO_OUTPUT int RAND_bytes(classname, OUTLIST SV* buffer, int num)
INTERFACE: RAND_bytes RAND_priv_bytes
INIT:
unsigned char* ptr = make_buffer(&buffer, num);
C_ARGS: ptr, num
POSTCALL:
if (RETVAL > 0)
set_buffer_length(buffer, num);
Crypt::OpenSSL3::Random::Context RAND_get_primary(classname)
INTERFACE: RAND_get_primary RAND_get_public RAND_get_private
C_ARGS: NULL
POSTCALL:
EVP_RAND_CTX_up_ref(RETVAL);
#if OPENSSL_VERSION_PREREQ(3, 2)
Bool RAND_set_public(classname, Crypt::OpenSSL3::Random::Context rand)
INTERFACE: RAND_set_public RAND_set_private
C_ARGS: NULL, rand
POSTCALL:
if (RETVAL)
EVP_RAND_CTX_up_ref(rand);
#endif
MODULE = Crypt::OpenSSL3 PACKAGE = Crypt::OpenSSL3::Random::Context PREFIX = EVP_RAND_CTX_
Crypt::OpenSSL3::Random::Context EVP_RAND_CTX_new(classname, Crypt::OpenSSL3::Random type, Crypt::OpenSSL3::Random::Context parent = NULL)
C_ARGS: type, parent
Crypt::OpenSSL3::Random EVP_RAND_CTX_get_rand(Crypt::OpenSSL3::Random::Context ctx)
POSTCALL:
EVP_RAND_up_ref(RETVAL);
MODULE = Crypt::OpenSSL3 PACKAGE = Crypt::OpenSSL3::Random::Context PREFIX = EVP_RAND_
bool EVP_RAND_instantiate(Crypt::OpenSSL3::Random::Context ctx, unsigned int strength, int prediction_resistance, const unsigned char *pstr, size_t length(pstr), PARAMS(EVP_RAND_CTX) params = NULL)
bool EVP_RAND_uninstantiate(Crypt::OpenSSL3::Random::Context ctx)
NO_OUTPUT int EVP_RAND_generate(Crypt::OpenSSL3::Random::Context ctx, OUTLIST SV* buffer, size_t outlen, unsigned int strength, int prediction_resistance, const unsigned char *addin, size_t length(addin))
INIT:
unsigned char* ptr = make_buffer(&buffer, outlen);
C_ARGS: ctx, ptr, outlen, strength, prediction_resistance, addin, XSauto_length_of_addin
POSTCALL:
if (RETVAL)
set_buffer_length(buffer, outlen);
int EVP_RAND_reseed(Crypt::OpenSSL3::Random::Context ctx, int prediction_resistance, const unsigned char *ent, size_t length(ent), const unsigned char *addin, size_t addin_len)
NO_OUTPUT int EVP_RAND_nonce(Crypt::OpenSSL3::Random::Context ctx, OUTLIST SV* buffer, size_t outlen)
INIT:
unsigned char* ptr = make_buffer(&buffer, outlen);
C_ARGS: ctx, ptr, outlen
POSTCALL:
set_buffer_length(buffer, RETVAL);
bool EVP_RAND_enable_locking(Crypt::OpenSSL3::Random::Context ctx)
bool EVP_RAND_verify_zeroization(Crypt::OpenSSL3::Random::Context ctx)
unsigned int EVP_RAND_get_strength(Crypt::OpenSSL3::Random::Context ctx)
int EVP_RAND_get_state(Crypt::OpenSSL3::Random::Context ctx)
MODULE = Crypt::OpenSSL3 PACKAGE = Crypt::OpenSSL3::Cipher PREFIX = EVP_CIPHER_
Crypt::OpenSSL3::Cipher EVP_CIPHER_fetch(classname, const char* algorithm, const char* properties = "")
C_ARGS: NULL, algorithm, properties
POSTCALL:
if (RETVAL == NULL)
XSRETURN_UNDEF;
int EVP_CIPHER_get_nid(Crypt::OpenSSL3::Cipher e)
int EVP_CIPHER_get_block_size(Crypt::OpenSSL3::Cipher e)
int EVP_CIPHER_get_key_length(Crypt::OpenSSL3::Cipher e)
int EVP_CIPHER_get_iv_length(Crypt::OpenSSL3::Cipher e)
unsigned long EVP_CIPHER_get_mode(Crypt::OpenSSL3::Cipher e)
int EVP_CIPHER_get_type(Crypt::OpenSSL3::Cipher cipher)
bool EVP_CIPHER_is_a(Crypt::OpenSSL3::Cipher cipher, const char *name)
const char *EVP_CIPHER_get_name(Crypt::OpenSSL3::Cipher cipher)
const char *EVP_CIPHER_get_description(Crypt::OpenSSL3::Cipher cipher)
void EVP_CIPHER_names_list_all(Crypt::OpenSSL3::Cipher cipher)
PPCODE:
PUTBACK;
EVP_CIPHER_names_do_all(cipher, EVP_name_callback, iTHX);
SPAGAIN;
void EVP_CIPHER_list_all_provided(classname)
PPCODE:
PUTBACK;
EVP_CIPHER_do_all_provided(NULL, EVP_CIPHER_provided_callback, iTHX);
SPAGAIN;
SV* EVP_CIPHER_get_param(Crypt::OpenSSL3::Cipher cipher, const char* name)
CODE:
GENERATE_GET_PARAM(EVP_CIPHER, cipher, name)
OUTPUT: RETVAL
MODULE = Crypt::OpenSSL3 PACKAGE = Crypt::OpenSSL3::Cipher::Context PREFIX = EVP_CIPHER_CTX_
Crypt::OpenSSL3::Cipher::Context EVP_CIPHER_CTX_new(classname)
C_ARGS:
Crypt::OpenSSL3::Cipher::Context EVP_CIPHER_CTX_dup(Crypt::OpenSSL3::Cipher::Context ctx)
bool EVP_CIPHER_CTX_copy(Crypt::OpenSSL3::Cipher::Context self, Crypt::OpenSSL3::Cipher::Context other)
bool EVP_CIPHER_CTX_reset(Crypt::OpenSSL3::Cipher::Context ctx)
bool EVP_CIPHER_CTX_init(Crypt::OpenSSL3::Cipher::Context ctx, Crypt::OpenSSL3::Cipher type, const unsigned char* key, int length(key), const unsigned char* iv, int length(iv), bool enc, CTX_PARAMS(EVP_CIPHER) params = NULL)
INIT:
if (XSauto_length_of_key != EVP_CIPHER_get_key_length(type) || XSauto_length_of_iv != EVP_CIPHER_get_iv_length(type))
XSRETURN_NO;
C_ARGS: ctx, type, key, iv, enc, params
NO_OUTPUT int EVP_CIPHER_CTX_update(Crypt::OpenSSL3::Cipher::Context ctx, const unsigned char* input, size_t length(input), OUTLIST SV* output)
INIT:
int outl = XSauto_length_of_input + EVP_CIPHER_CTX_get_block_size(ctx);
unsigned char* ptr = make_buffer(&output, outl);
C_ARGS: ctx, ptr, &outl, input, XSauto_length_of_input
POSTCALL:
if (RETVAL)
set_buffer_length(output, outl);
NO_OUTPUT int EVP_CIPHER_CTX_final(Crypt::OpenSSL3::Cipher::Context ctx, OUTLIST SV* output)
INIT:
int size = EVP_CIPHER_CTX_get_block_size(ctx);
unsigned char* ptr = make_buffer(&output, size);
C_ARGS: ctx, ptr, &size
POSTCALL:
if (RETVAL)
set_buffer_length(output, size);
bool EVP_CIPHER_CTX_set_params(Crypt::OpenSSL3::Cipher::Context ctx, PARAMS(EVP_CIPHER_CTX) params = NULL)
SV* EVP_CIPHER_CTX_get_param(Crypt::OpenSSL3::Cipher::Context ctx, const char* name)
CODE:
GENERATE_GET_PARAM(EVP_CIPHER_CTX, ctx, name)
OUTPUT: RETVAL
int EVP_CIPHER_CTX_get_nid(Crypt::OpenSSL3::Cipher::Context e)
int EVP_CIPHER_CTX_get_block_size(Crypt::OpenSSL3::Cipher::Context e)
int EVP_CIPHER_CTX_get_key_length(Crypt::OpenSSL3::Cipher::Context e)
int EVP_CIPHER_CTX_get_iv_length(Crypt::OpenSSL3::Cipher::Context e)
unsigned long EVP_CIPHER_CTX_get_mode(Crypt::OpenSSL3::Cipher::Context e)
int EVP_CIPHER_CTX_type(Crypt::OpenSSL3::Cipher::Context ctx)
bool EVP_CIPHER_CTX_set_padding(Crypt::OpenSSL3::Cipher::Context ctx, int padding)
bool EVP_CIPHER_CTX_set_key_length(Crypt::OpenSSL3::Cipher::Context ctx, int keylen)
int EVP_CIPHER_CTX_ctrl(Crypt::OpenSSL3::Cipher::Context ctx, int cmd, int p1, char *p2)
NO_OUTPUT int EVP_CIPHER_CTX_rand_key(Crypt::OpenSSL3::Cipher::Context ctx, OUTLIST SV* key)
INIT:
size_t size = EVP_CIPHER_CTX_key_length(ctx);
unsigned char* ptr = make_buffer(&key, size);
C_ARGS: ctx, ptr
POSTCALL:
if (RETVAL > 0)
set_buffer_length(key, size);
Crypt::OpenSSL3::Cipher EVP_CIPHER_CTX_get_cipher(Crypt::OpenSSL3::Cipher::Context ctx)
const char *EVP_CIPHER_CTX_get_name(Crypt::OpenSSL3::Cipher::Context ctx)
bool EVP_CIPHER_CTX_is_encrypting(Crypt::OpenSSL3::Cipher::Context ctx)
bool EVP_CIPHER_CTX_set_aead_ivlen(Crypt::OpenSSL3::Cipher::Context ctx, int length)
NO_OUTPUT bool EVP_CIPHER_CTX_get_aead_tag(Crypt::OpenSSL3::Cipher::Context ctx, OUTLIST SV* tag)
INIT:
int length = EVP_CIPHER_CTX_get_tag_length(ctx);
unsigned char* ptr = make_buffer(&tag, length);
C_ARGS: ctx, ptr, length
POSTCALL:
if (RETVAL)
set_buffer_length(tag, length);
bool EVP_CIPHER_CTX_set_aead_tag(Crypt::OpenSSL3::Cipher::Context ctx, char* ptr, int length(ptr))
MODULE = Crypt::OpenSSL3 PACKAGE = Crypt::OpenSSL3::MD PREFIX = EVP_MD_
Crypt::OpenSSL3::MD EVP_MD_fetch(classname, const char* algorithm, const char* properties = "")
C_ARGS: NULL, algorithm, properties
POSTCALL:
if (RETVAL == NULL)
XSRETURN_UNDEF;
const char *EVP_MD_get_name(Crypt::OpenSSL3::MD md)
const char *EVP_MD_get_description(Crypt::OpenSSL3::MD md)
bool EVP_MD_is_a(Crypt::OpenSSL3::MD md, const char *name)
void EVP_MD_names_list_all(Crypt::OpenSSL3::MD md)
PPCODE:
PUTBACK;
EVP_MD_names_do_all(md, EVP_name_callback, iTHX);
SPAGAIN;
void EVP_MD_list_all_provided(classname)
PPCODE:
PUTBACK;
EVP_MD_do_all_provided(NULL, EVP_MD_provided_callback, iTHX);
SPAGAIN;
int EVP_MD_get_type(Crypt::OpenSSL3::MD md)
int EVP_MD_get_pkey_type(Crypt::OpenSSL3::MD md)
int EVP_MD_get_size(Crypt::OpenSSL3::MD md)
int EVP_MD_get_block_size(Crypt::OpenSSL3::MD md)
unsigned long EVP_MD_get_flags(Crypt::OpenSSL3::MD md)
#if OPENSSL_VERSION_PREREQ(3, 4)
bool EVP_MD_xof(Crypt::OpenSSL3::MD md)
#endif
SV* EVP_MD_get_param(Crypt::OpenSSL3::MD md, const char* name)
CODE:
GENERATE_GET_PARAM(EVP_MD, md, name)
OUTPUT: RETVAL
NO_OUTPUT bool EVP_MD_digest(Crypt::OpenSSL3::MD md, const char* input, size_t length(input), OUTLIST SV* digest)
INIT:
unsigned int size = EVP_MD_get_size(md);
unsigned char* ptr = make_buffer(&digest, size);
C_ARGS: input, XSauto_length_of_input, ptr, &size, md, NULL
POSTCALL:
if (RETVAL)
set_buffer_length(digest, size);
MODULE = Crypt::OpenSSL3 PACKAGE = Crypt::OpenSSL3::MD::Context PREFIX = EVP_MD_CTX_
Crypt::OpenSSL3::MD::Context EVP_MD_CTX_new(classname)
C_ARGS:
Crypt::OpenSSL3::MD::Context EVP_MD_CTX_dup(Crypt::OpenSSL3::MD::Context ctx)
bool EVP_MD_CTX_copy(Crypt::OpenSSL3::MD::Context self, Crypt::OpenSSL3::MD::Context other)
bool EVP_MD_CTX_reset(Crypt::OpenSSL3::MD::Context ctx)
bool EVP_MD_CTX_init(Crypt::OpenSSL3::MD::Context ctx, Crypt::OpenSSL3::MD type, CTX_PARAMS(EVP_MD) params = NULL)
bool EVP_MD_CTX_update(Crypt::OpenSSL3::MD::Context ctx, const char *d, size_t length(d))
NO_OUTPUT bool EVP_MD_CTX_final(Crypt::OpenSSL3::MD::Context ctx, OUTLIST SV* digest)
INIT:
unsigned int size = EVP_MD_CTX_size(ctx);
unsigned char* ptr = make_buffer(&digest , size);
C_ARGS: ctx, ptr, &size
POSTCALL:
if (RETVAL)
set_buffer_length(digest, size);
NO_OUTPUT bool EVP_MD_CTX_final_xof(Crypt::OpenSSL3::MD::Context ctx, OUTLIST SV* digest, size_t outlen)
INIT:
unsigned char* ptr = make_buffer(&digest, outlen);
lib/Crypt/OpenSSL3.xs view on Meta::CPAN
if (EVP_DigestSign(ctx, NULL, &size, tbs, XSauto_length_of_tbs) == 1) {
unsigned char* ptr = make_buffer(&RETVAL, size);
if (EVP_DigestSign(ctx, ptr, &size, tbs, XSauto_length_of_tbs) == 1)
set_buffer_length(RETVAL, size);
} else
RETVAL = &PL_sv_undef;
OUTPUT: RETVAL
bool EVP_MD_CTX_verify_init(Crypt::OpenSSL3::MD::Context ctx, Crypt::OpenSSL3::MD type, Crypt::OpenSSL3::PKey pkey, Crypt::OpenSSL3::PKey::Context pctx = NULL)
C_ARGS: ctx, pctx ? &pctx : NULL, type, NULL, pkey
bool EVP_MD_CTX_verify_update(Crypt::OpenSSL3::MD::Context ctx, const char *d, size_t length(d))
Success EVP_MD_CTX_verify_final(Crypt::OpenSSL3::MD::Context ctx, const unsigned char *sig, size_t length(sig))
Success EVP_MD_CTX_verify(Crypt::OpenSSL3::MD::Context ctx, const unsigned char *sig, size_t length(sig), const unsigned char *tbs, size_t length(tbs))
bool EVP_MD_CTX_set_params(Crypt::OpenSSL3::MD::Context ctx, PARAMS(EVP_MD_CTX) params = NULL)
SV* EVP_MD_CTX_get_param(Crypt::OpenSSL3::MD::Context ctx, const char* name)
CODE:
GENERATE_GET_PARAM(EVP_MD_CTX, ctx, name)
OUTPUT: RETVAL
void EVP_MD_CTX_ctrl(Crypt::OpenSSL3::MD::Context ctx, int cmd, int p1, char* p2);
void EVP_MD_CTX_set_flags(Crypt::OpenSSL3::MD::Context ctx, int flags)
void EVP_MD_CTX_clear_flags(Crypt::OpenSSL3::MD::Context ctx, int flags)
int EVP_MD_CTX_test_flags(Crypt::OpenSSL3::MD::Context ctx, int flags)
Crypt::OpenSSL3::MD EVP_MD_CTX_get_md(Crypt::OpenSSL3::MD::Context ctx)
const char *EVP_MD_CTX_get_name(Crypt::OpenSSL3::MD::Context ctx)
int EVP_MD_CTX_get_size(Crypt::OpenSSL3::MD::Context ctx)
int EVP_MD_CTX_get_block_size(Crypt::OpenSSL3::MD::Context ctx)
int EVP_MD_CTX_get_type(Crypt::OpenSSL3::MD::Context ctx)
MODULE = Crypt::OpenSSL3 PACKAGE = Crypt::OpenSSL3::MAC PREFIX = EVP_MAC_
Crypt::OpenSSL3::MAC EVP_MAC_fetch(classname, const char* algorithm, const char* properties = "")
C_ARGS: NULL, algorithm, properties
POSTCALL:
if (RETVAL == NULL)
XSRETURN_UNDEF;
const char *EVP_MAC_get_name(Crypt::OpenSSL3::MAC mac)
const char *EVP_MAC_get_description(Crypt::OpenSSL3::MAC mac)
bool EVP_MAC_is_a(Crypt::OpenSSL3::MAC mac, const char *name)
void EVP_MAC_names_list_all(Crypt::OpenSSL3::MAC mac)
PPCODE:
PUTBACK;
EVP_MAC_names_do_all(mac, EVP_name_callback, iTHX);
SPAGAIN;
void EVP_MAC_list_all_provided(classname)
PPCODE:
PUTBACK;
EVP_MAC_do_all_provided(NULL, EVP_MAC_provided_callback, iTHX);
SPAGAIN;
SV* EVP_MAC_get_param(Crypt::OpenSSL3::MAC mac, const char* name)
CODE:
GENERATE_GET_PARAM(EVP_MAC, mac, name)
OUTPUT: RETVAL
MODULE = Crypt::OpenSSL3 PACKAGE = Crypt::OpenSSL3::MAC::Context PREFIX = EVP_MAC_CTX_
Crypt::OpenSSL3::MAC::Context EVP_MAC_CTX_new(classname, Crypt::OpenSSL3::MAC ctx)
C_ARGS: ctx
Crypt::OpenSSL3::MAC::Context EVP_MAC_CTX_dup(Crypt::OpenSSL3::MAC::Context ctx)
Crypt::OpenSSL3::MAC EVP_MAC_CTX_get_mac(Crypt::OpenSSL3::MAC::Context ctx);
POSTCALL:
EVP_MAC_up_ref(RETVAL);
size_t EVP_MAC_CTX_get_mac_size(Crypt::OpenSSL3::MAC::Context ctx)
size_t EVP_MAC_CTX_get_block_size(Crypt::OpenSSL3::MAC::Context ctx)
bool EVP_MAC_CTX_set_params(Crypt::OpenSSL3::MAC::Context ctx, PARAMS(EVP_MAC_CTX) params = NULL)
SV* EVP_MAC_CTX_get_param(Crypt::OpenSSL3::MAC::Context ctx, const char* name)
CODE:
GENERATE_GET_PARAM(EVP_MAC_CTX, ctx, name)
OUTPUT: RETVAL
MODULE = Crypt::OpenSSL3 PACKAGE = Crypt::OpenSSL3::MAC::Context PREFIX = EVP_MAC_
bool EVP_MAC_init(Crypt::OpenSSL3::MAC::Context ctx, const unsigned char *key, size_t length(key), PARAMS(EVP_MAC_CTX) params = NULL)
bool EVP_MAC_update(Crypt::OpenSSL3::MAC::Context ctx, const unsigned char *data, size_t length(data))
SV* EVP_MAC_final(Crypt::OpenSSL3::MAC::Context ctx)
CODE:
size_t outsize;
EVP_MAC_final(ctx, NULL, &outsize, 0);
unsigned char* ptr = make_buffer(&RETVAL, outsize);
int result = EVP_MAC_final(ctx, ptr, &outsize, outsize);
if (result)
set_buffer_length(RETVAL, outsize);
OUTPUT: RETVAL
NO_OUTPUT int EVP_MAC_finalXOF(Crypt::OpenSSL3::MAC::Context ctx, OUTLIST SV* code, size_t outsize)
INIT:
unsigned char* ptr = make_buffer(&code, outsize);
C_ARGS: ctx, ptr, outsize
POSTCALL:
if (RETVAL)
set_buffer_length(code, outsize);
MODULE = Crypt::OpenSSL3 PACKAGE = Crypt::OpenSSL3::KDF PREFIX = EVP_KDF_
Crypt::OpenSSL3::KDF EVP_KDF_fetch(classname, const char* algorithm, const char* properties = "")
C_ARGS: NULL, algorithm, properties
POSTCALL:
if (RETVAL == NULL)
XSRETURN_UNDEF;
const char *EVP_KDF_get_name(Crypt::OpenSSL3::KDF kdf)
const char *EVP_KDF_get_description(Crypt::OpenSSL3::KDF kdf)
bool EVP_KDF_is_a(Crypt::OpenSSL3::KDF kdf, const char *name)
void EVP_KDF_names_list_all(Crypt::OpenSSL3::KDF kdf)
PPCODE:
PUTBACK;
EVP_KDF_names_do_all(kdf, EVP_name_callback, iTHX);
SPAGAIN;
void EVP_KDF_list_all_provided(classname)
PPCODE:
PUTBACK;
EVP_KDF_do_all_provided(NULL, EVP_KDF_provided_callback, iTHX);
SPAGAIN;
SV* EVP_KDF_get_param(Crypt::OpenSSL3::KDF kdf, const char* name)
CODE:
GENERATE_GET_PARAM(EVP_KDF, kdf, name)
OUTPUT: RETVAL
MODULE = Crypt::OpenSSL3 PACKAGE = Crypt::OpenSSL3::KDF::Context PREFIX = EVP_KDF_CTX_
Crypt::OpenSSL3::KDF::Context EVP_KDF_CTX_new(classname, Crypt::OpenSSL3::KDF ctx)
C_ARGS: ctx
Crypt::OpenSSL3::KDF::Context EVP_KDF_CTX_dup(Crypt::OpenSSL3::KDF::Context ctx)
void EVP_KDF_CTX_reset(Crypt::OpenSSL3::KDF::Context ctx)
size_t EVP_KDF_CTX_get_kdf_size(Crypt::OpenSSL3::KDF::Context ctx)
bool EVP_KDF_CTX_set_params(Crypt::OpenSSL3::KDF::Context ctx, PARAMS(EVP_KDF_CTX) params = NULL)
SV* EVP_KDF_CTX_get_param(Crypt::OpenSSL3::KDF::Context ctx, const char* name)
CODE:
GENERATE_GET_PARAM(EVP_KDF_CTX, ctx, name)
OUTPUT: RETVAL
Crypt::OpenSSL3::KDF EVP_KDF_CTX_kdf(Crypt::OpenSSL3::KDF::Context ctx)
POSTCALL:
EVP_KDF_up_ref(RETVAL);
MODULE = Crypt::OpenSSL3 PACKAGE = Crypt::OpenSSL3::KDF::Context PREFIX = EVP_KDF_
NO_OUTPUT bool EVP_KDF_derive(Crypt::OpenSSL3::KDF::Context ctx, OUTLIST SV* derived, size_t keylen, PARAMS(EVP_KDF_CTX) params)
INIT:
unsigned char* ptr = make_buffer(&derived, keylen);
C_ARGS: ctx, ptr, keylen, params
POSTCALL:
if (RETVAL)
set_buffer_length(derived, keylen);
MODULE = Crypt::OpenSSL3 PACKAGE = Crypt::OpenSSL3::Signature PREFIX = EVP_SIGNATURE_
Crypt::OpenSSL3::Signature EVP_SIGNATURE_fetch(classname, const char* algorithm, const char* properties = "")
C_ARGS: NULL, algorithm, properties
POSTCALL:
if (RETVAL == NULL)
XSRETURN_UNDEF;
const char *EVP_SIGNATURE_get_name(Crypt::OpenSSL3::Signature signature)
const char *EVP_SIGNATURE_get_description(Crypt::OpenSSL3::Signature signature)
bool EVP_SIGNATURE_is_a(Crypt::OpenSSL3::Signature signature, const char *name)
void EVP_SIGNATURE_names_list_all(Crypt::OpenSSL3::Signature signature)
PPCODE:
PUTBACK;
EVP_SIGNATURE_names_do_all(signature, EVP_name_callback, iTHX);
SPAGAIN;
void EVP_SIGNATURE_list_all_provided(classname)
PPCODE:
PUTBACK;
EVP_SIGNATURE_do_all_provided(NULL, EVP_SIGNATURE_provided_callback, iTHX);
SPAGAIN;
MODULE = Crypt::OpenSSL3 PACKAGE = Crypt::OpenSSL3::PKey PREFIX = EVP_PKEY_
Crypt::OpenSSL3::PKey EVP_PKEY_new(classname)
C_ARGS:
Crypt::OpenSSL3::PKey EVP_PKEY_new_raw_private_key(classname, const char *keytype, const unsigned char *key, size_t length(key), const char *propq = "")
C_ARGS: NULL, keytype, propq, key, XSauto_length_of_key
POSTCALL:
if (RETVAL == NULL)
XSRETURN_UNDEF;
Crypt::OpenSSL3::PKey EVP_PKEY_new_raw_public_key(classname, const char *keytype, const unsigned char *key, size_t length(key), const char *propq = "")
C_ARGS: NULL, keytype, propq, key, XSauto_length_of_key
POSTCALL:
if (RETVAL == NULL)
XSRETURN_UNDEF;
Crypt::OpenSSL3::PKey EVP_PKEY_dup(Crypt::OpenSSL3::PKey ctx)
bool EVP_PKEY_eq(Crypt::OpenSSL3::PKey a, Crypt::OpenSSL3::PKey b)
bool EVP_PKEY_parameters_eq(Crypt::OpenSSL3::PKey a, Crypt::OpenSSL3::PKey b)
NO_OUTPUT void EVP_PKEY_get_raw_private_key(Crypt::OpenSSL3::PKey pkey, OUTLIST SV* key)
CODE:
size_t length;
int result = EVP_PKEY_get_raw_private_key(pkey, NULL, &length);
if (!result)
XSRETURN_UNDEF;
unsigned char* ptr = make_buffer(&key, length);
result = EVP_PKEY_get_raw_private_key(pkey, ptr, &length);
if (result)
set_buffer_length(key, length);
NO_OUTPUT void EVP_PKEY_get_raw_public_key(Crypt::OpenSSL3::PKey pkey, OUTLIST SV* key)
CODE:
size_t length;
int result = EVP_PKEY_get_raw_public_key(pkey, NULL, &length);
if (!result)
XSRETURN_UNDEF;
unsigned char* ptr = make_buffer(&key, length);
result = EVP_PKEY_get_raw_public_key(pkey, ptr, &length);
if (result)
set_buffer_length(key, length);
Crypt::OpenSSL3::PKey EVP_PKEY_read_pem_private_key(Crypt::OpenSSL3::BIO bio, SV* password_cb = undef, const char* propq = "")
C_ARGS: bio, NULL, NULL, NULL, NULL, propq
POSTCALL:
if (!RETVAL)
XSRETURN_UNDEF;
bool EVP_PKEY_write_pem_private_key(Crypt::OpenSSL3::PKey pkey, Crypt::OpenSSL3::BIO bio, SV* cipher_sv = undef, SV* key = undef, const char* propq = "")
INIT:
const EVP_CIPHER* cipher = SvOK(cipher_sv) ? get_EVP_CIPHER(aTHX_ cipher_sv) : NULL;
STRLEN klen = 0;
const unsigned char* kstr = NULL;
if (SvOK(key))
kstr = (unsigned char*)SvPV(key, klen);
C_ARGS: bio, pkey, cipher, kstr, klen, NULL, NULL, NULL, propq
Crypt::OpenSSL3::PKey EVP_PKEY_read_pem_public_key(Crypt::OpenSSL3::BIO bio, const char* propq = "")
C_ARGS: bio, NULL, NULL, NULL, NULL, propq
POSTCALL:
if (!RETVAL)
XSRETURN_UNDEF;
bool EVP_PKEY_write_pem_public_key(Crypt::OpenSSL3::PKey pkey, Crypt::OpenSSL3::BIO bio, const char* propq = "")
C_ARGS: bio, pkey, NULL, propq
int EVP_PKEY_get_id(Crypt::OpenSSL3::PKey pkey)
int EVP_PKEY_get_base_id(Crypt::OpenSSL3::PKey pkey)
int EVP_PKEY_type(int type)
bool EVP_PKEY_set_type(Crypt::OpenSSL3::PKey pkey, int type)
bool EVP_PKEY_set_type_str(Crypt::OpenSSL3::PKey pkey, const char *str, int length(str))
int EVP_PKEY_get_size(Crypt::OpenSSL3::PKey pkey)
int EVP_PKEY_get_bits(Crypt::OpenSSL3::PKey pkey)
int EVP_PKEY_get_security_bits(Crypt::OpenSSL3::PKey pkey)
bool EVP_PKEY_is_a(Crypt::OpenSSL3::PKey pkey, const char *name)
bool EVP_PKEY_can_sign(Crypt::OpenSSL3::PKey pkey)
void EVP_PKEY_type_names_list_all(Crypt::OpenSSL3::PKey pkey)
PPCODE:
PUTBACK;
EVP_PKEY_type_names_do_all(pkey, EVP_name_callback, iTHX);
SPAGAIN;
const char *EVP_PKEY_get_type_name(Crypt::OpenSSL3::PKey key)
const char *EVP_PKEY_get_description(Crypt::OpenSSL3::PKey key)
Success EVP_PKEY_digestsign_supports_digest(Crypt::OpenSSL3::PKey pkey, const char *name, const char *propq)
C_ARGS: pkey, NULL, name, propq
NO_OUTPUT int EVP_PKEY_get_default_digest_name(Crypt::OpenSSL3::PKey pkey, OUTLIST SV* mdname)
INIT:
char* ptr = (char*)make_buffer(&mdname, 32);
C_ARGS: pkey, ptr, 32
POSTCALL:
if (RETVAL > 0)
set_buffer_length(mdname, strlen(SvPV_nolen(mdname)));
NO_OUTPUT int EVP_PKEY_get_default_digest_nid(Crypt::OpenSSL3::PKey pkey, OUTLIST int pnid)
POSTCALL:
if (RETVAL <= 0)
XSRETURN_UNDEF;
int EVP_PKEY_get_field_type(Crypt::OpenSSL3::PKey pkey)
int EVP_PKEY_get_ec_point_conv_form(Crypt::OpenSSL3::PKey pkey)
NO_OUTPUT int EVP_PKEY_get_group_name(Crypt::OpenSSL3::PKey pkey, OUTLIST SV* name, size_t size = 32)
INIT:
char* ptr = (char*)make_buffer(&name, size);
C_ARGS: pkey, ptr, size + 1, &size
POSTCALL:
if (RETVAL)
set_buffer_length(name, size);
bool EVP_PKEY_set_encoded_public_key(Crypt::OpenSSL3::PKey pkey, const unsigned char *pub, size_t length(pub))
NO_OUTPUT size_t EVP_PKEY_get_encoded_public_key(Crypt::OpenSSL3::PKey pkey, OUTLIST SV* result)
INIT:
unsigned char* ptr = NULL;
C_ARGS: pkey, &ptr
POSTCALL:
result = RETVAL > 0 ? newSVpvn((char*)ptr, RETVAL) : &PL_sv_undef;
OPENSSL_free(ptr);
SV* EVP_PKEY_get_param(Crypt::OpenSSL3::PKey pkey, const char* name)
CODE:
GENERATE_GET_PARAM(EVP_PKEY, pkey, name)
OUTPUT: RETVAL
bool EVP_PKEY_get_int_param(Crypt::OpenSSL3::PKey pkey, const char *key_name, OUT int out)
bool EVP_PKEY_get_size_t_param(Crypt::OpenSSL3::PKey pkey, const char *key_name, OUT size_t out)
bool EVP_PKEY_get_bn_param(Crypt::OpenSSL3::PKey pkey, const char *key_name, OUT Crypt::OpenSSL3::BigNum bn)
bool EVP_PKEY_get_utf8_string_param(Crypt::OpenSSL3::PKey pkey, const char *key_name, char *str, size_t length(str), OUT size_t out_len)
bool EVP_PKEY_get_octet_string_param(Crypt::OpenSSL3::PKey pkey, const char *key_name, unsigned char *buf, size_t length(buf), OUT size_t out_len)
( run in 0.477 second using v1.01-cache-2.11-cpan-71847e10f99 )