From 8073036dd62848b616c6a817c155c3255074ec83 Mon Sep 17 00:00:00 2001 From: "Ralf S. Engelschall" Date: Wed, 10 Feb 1999 09:38:31 +0000 Subject: Overhauled the Perl interface (perl/*): - ported BN stuff to OpenSSL's different BN library - made the perl/ source tree CVS-aware - renamed the package from SSLeay to OpenSSL (the files still contain their history because I've copied them in the repository) - removed obsolete files (the test scripts will be replaced by better Test::Harness variants in the future) --- perl/openssl_ssl.xs | 35 ++++++++++++++++++----------------- 1 file changed, 18 insertions(+), 17 deletions(-) (limited to 'perl/openssl_ssl.xs') diff --git a/perl/openssl_ssl.xs b/perl/openssl_ssl.xs index 05834797e3..7022c468f2 100644 --- a/perl/openssl_ssl.xs +++ b/perl/openssl_ssl.xs @@ -1,4 +1,5 @@ -#include "p5SSLeay.h" + +#include "openssl.h" static int p5_ssl_ex_ssl_ptr=0; static int p5_ssl_ex_ssl_info_callback=0; @@ -44,7 +45,7 @@ int ret; int boot_ssl() { p5_ssl_ex_ssl_ptr= - SSL_get_ex_new_index(0,"SSLeay::SSL",ex_new,NULL,ex_cleanup); + SSL_get_ex_new_index(0,"OpenSSL::SSL",ex_new,NULL,ex_cleanup); p5_ssl_ex_ssl_info_callback= SSL_get_ex_new_index(0,"ssl_info_callback",NULL,NULL, ex_cleanup); @@ -57,7 +58,7 @@ int boot_ssl() return(1); } -MODULE = SSLeay::SSL PACKAGE = SSLeay::SSL::CTX PREFIX = p5_SSL_CTX_ +MODULE = OpenSSL::SSL PACKAGE = OpenSSL::SSL::CTX PREFIX = p5_SSL_CTX_ VERSIONCHECK: DISABLE @@ -74,7 +75,7 @@ p5_SSL_CTX_new(...) else if ((items == 2) && SvPOK(ST(1))) method=SvPV(ST(1),na); else - croak("Usage: SSLeay::SSL_CTX::new(type)"); + croak("Usage: OpenSSL::SSL_CTX::new(type)"); if (strcmp(method,"SSLv3") == 0) meth=SSLv3_method(); @@ -101,7 +102,7 @@ p5_SSL_CTX_new(...) EXTEND(sp,1); PUSHs(sv_newmortal()); ctx=SSL_CTX_new(meth); - sv_setref_pv(ST(0), "SSLeay::SSL::CTX", (void*)ctx); + sv_setref_pv(ST(0), "OpenSSL::SSL::CTX", (void*)ctx); int p5_SSL_CTX_use_PrivateKey_file(ctx,file,...) @@ -113,7 +114,7 @@ p5_SSL_CTX_use_PrivateKey_file(ctx,file,...) CODE: pr_name("p5_SSL_CTX_use_PrivateKey_file"); if (items > 3) - croak("SSLeay::SSL::CTX::use_PrivateKey_file(ssl_ctx,file[,type])"); + croak("OpenSSL::SSL::CTX::use_PrivateKey_file(ssl_ctx,file[,type])"); if (items == 3) { ptr=SvPV(ST(2),na); @@ -139,7 +140,7 @@ p5_SSL_CTX_set_options(ctx,...) for (i=1; ireferences); SSL_CTX_free(ctx); -MODULE = SSLeay::SSL PACKAGE = SSLeay::SSL PREFIX = p5_SSL_ +MODULE = OpenSSL::SSL PACKAGE = OpenSSL::SSL PREFIX = p5_SSL_ void p5_SSL_new(...) @@ -180,20 +181,20 @@ p5_SSL_new(...) PPCODE: pr_name("p5_SSL_new"); if ((items != 1) && (items != 2)) - croak("Usage: SSLeay::SSL::new(ssl_ctx)"); - if (sv_derived_from(ST(items-1),"SSLeay::SSL::CTX")) + croak("Usage: OpenSSL::SSL::new(ssl_ctx)"); + if (sv_derived_from(ST(items-1),"OpenSSL::SSL::CTX")) { IV tmp = SvIV((SV*)SvRV(ST(items-1))); ctx=(SSL_CTX *)tmp; sv_ctx=ST(items-1); } else - croak("ssl_ctx is not of type SSLeay::SSL::CTX"); + croak("ssl_ctx is not of type OpenSSL::SSL::CTX"); EXTEND(sp,1); PUSHs(sv_newmortal()); ssl=SSL_new(ctx); - sv_setref_pv(ST(0), "SSLeay::SSL", (void*)ssl); + sv_setref_pv(ST(0), "OpenSSL::SSL", (void*)ssl); /* Now this is being a little hairy, we keep a pointer to * our perl reference. We need to do a different one @@ -317,7 +318,7 @@ p5_SSL_set_options(ssl,...) for (i=1; i