openssl/perl/typemap
1998-12-21 10:56:39 +00:00

96 lines
2.3 KiB
Text

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