X-Git-Url: https://git.openssl.org/gitweb/?p=openssl.git;a=blobdiff_plain;f=perl%2Fopenssl_cipher.xs;h=e9ff2a8f7905c67bb39746cad142777119b00e5e;hp=1044d7a4ef861f046b979f5c849897e58df77c6e;hb=615513ba5294e03b451f33bc46c714c5efa28916;hpb=58964a492275ca9a59a0cd9c8155cb2491b4b909 diff --git a/perl/openssl_cipher.xs b/perl/openssl_cipher.xs index 1044d7a4ef..e9ff2a8f79 100644 --- a/perl/openssl_cipher.xs +++ b/perl/openssl_cipher.xs @@ -1,4 +1,5 @@ -#include "p5SSLeay.h" + +#include "openssl.h" int boot_cipher() { @@ -6,15 +7,16 @@ int boot_cipher() return(1); } -MODULE = SSLeay::Cipher PACKAGE = SSLeay::Cipher PREFIX = p5_EVP_C_ +MODULE = OpenSSL::Cipher PACKAGE = OpenSSL::Cipher PREFIX = p5_EVP_C_ +PROTOTYPES: ENABLE VERSIONCHECK: DISABLE void p5_EVP_C_new(...) PREINIT: EVP_CIPHER_CTX *ctx; - EVP_CIPHER *c; + const EVP_CIPHER *c; char *name; PPCODE: if ((items == 1) && SvPOK(ST(0))) @@ -22,14 +24,14 @@ p5_EVP_C_new(...) else if ((items == 2) && SvPOK(ST(1))) name=SvPV(ST(1),na); else - croak("Usage: SSLeay::Cipher::new(type)"); + croak("Usage: OpenSSL::Cipher::new(type)"); PUSHs(sv_newmortal()); c=EVP_get_cipherbyname(name); if (c != NULL) { ctx=malloc(sizeof(EVP_CIPHER_CTX)); EVP_EncryptInit(ctx,c,NULL,NULL); - sv_setref_pv(ST(0), "SSLeay::Cipher", (void*)ctx); + sv_setref_pv(ST(0), "OpenSSL::Cipher", (void*)ctx); } datum