openssl/perl/typemap

97 lines
2.4 KiB
Text
Raw Normal View History

datum T_DATUM
EVP_MD_CTX * T_MD_CTX
EVP_CIPHER_CTX * T_CIPHER_CTX
BIGNUM * T_BIGNUM
SSL_METHOD * T_SSL_METHOD
SSL_CTX * T_SSL_CTX
SSL_CIPHER * T_SSL_CIPHER
SSL * T_SSL
BIO * T_BIO
X509 * T_X509
INPUT
T_DATUM
$var.dptr=SvPV($arg,$var.dsize);
T_MD_CTX
if (sv_derived_from($arg, \"OpenSSL::MD\")) {
IV tmp = SvIV((SV*)SvRV($arg));
$var = (EVP_MD_CTX *) tmp;
}
else
croak(\"$var is not of type OpenSSL::MD\")
T_CIPHER_CTX
if (sv_derived_from($arg, \"OpenSSL::Cipher\")) {
IV tmp = SvIV((SV*)SvRV($arg));
$var = (EVP_CIPHER_CTX *) tmp;
}
else
croak(\"$var is not of type OpenSSL::Cipher\")
T_BIGNUM
sv_to_BIGNUM(&($var),$arg,\"$var is not of type OpenSSL::MD, int or string\")
T_SSL_METHOD
if (sv_derived_from($arg, \"OpenSSL::SSL::METHOD\")) {
IV tmp = SvIV((SV*)SvRV($arg));
$var = (SSL_METHOD *) tmp;
}
else
croak(\"$var is not of type OpenSSL::SSL::METHOD\")
T_SSL_CTX
if (sv_derived_from($arg, \"OpenSSL::SSL::CTX\")) {
IV tmp = SvIV((SV*)SvRV($arg));
$var = (SSL_CTX *) tmp;
}
else
croak(\"$var is not of type OpenSSL::SSL::CTX\")
T_SSL_CIPHER
if (sv_derived_from($arg, \"OpenSSL::SSL::CIPHER\")) {
IV tmp = SvIV((SV*)SvRV($arg));
$var = (SSL_CIPHER *) tmp;
}
else
croak(\"$var is not of type OpenSSL::SSL::CIPHER\")
T_SSL
if (sv_derived_from($arg, \"OpenSSL::SSL\")) {
IV tmp = SvIV((SV*)SvRV($arg));
$var = (SSL *) tmp;
}
else
croak(\"$var is not of type OpenSSL::SSL\")
T_BIO
if (sv_derived_from($arg, \"OpenSSL::BIO\")) {
IV tmp = SvIV((SV*)SvRV($arg));
$var = (BIO *) tmp;
}
else
croak(\"$var is not of type OpenSSL::BIO\")
T_X509
if (sv_derived_from($arg, \"OpenSSL::X509\")) {
IV tmp = SvIV((SV*)SvRV($arg));
$var = (X509 *) tmp;
}
else
croak(\"$var is not of type OpenSSL::X509\")
OUTPUT
T_DATUM
sv_setpvn($arg,$var.dptr,$var.dsize);
T_MD_CTX
sv_setref_pv($arg, \"OpenSSL::MD\", (void*)$var);
T_CIPHER_CTX
sv_setref_pv($arg, \"OpenSSL::Cipher\", (void*)$var);
T_BIGNUM
sv_setref_pv($arg, \"OpenSSL::BN\", (void*)$var);
T_SSL_METHOD
sv_setref_pv($arg, \"OpenSSL::SSL::METHOD\", (void*)$var);
T_SSL_CTX
sv_setref_pv($arg, \"OpenSSL::SSL::CTX\", (void*)$var);
T_SSL_CIPHER
sv_setref_pv($arg, \"OpenSSL::SSL::CIPHER\", (void*)$var);
T_SSL
sv_setref_pv($arg, \"OpenSSL::SSL\", (void*)$var);
T_BIO
sv_setref_pv($arg, \"OpenSSL::BIO\", (void*)$var);
T_X509
sv_setref_pv($arg, \"OpenSSL::X509\", (void*)$var);