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