diff options
author | Ulf Möller <ulf@openssl.org> | 1999-07-22 16:10:31 +0000 |
---|---|---|
committer | Ulf Möller <ulf@openssl.org> | 1999-07-22 16:10:31 +0000 |
commit | 49b8142262247dcf6e0308e26cdb2d7f1bbafcb8 (patch) | |
tree | 8144e1c2ba653eecc652b94776783c6ee59db756 | |
parent | f0e8ae723cf8f86a91bdc5be8a6a5b956309729f (diff) |
Make the perl module compile and eliminate some of the warnings.
Still doesn't work (the destructor on BIO and SSL is called immediately
after creating the object. Why that??)
-rw-r--r-- | Makefile.org | 4 | ||||
-rw-r--r-- | crypto/.cvsignore | 2 | ||||
-rw-r--r-- | crypto/ex_data.c | 2 | ||||
-rw-r--r-- | perl/MANIFEST | 1 | ||||
-rw-r--r-- | perl/Makefile.PL | 7 | ||||
-rw-r--r-- | perl/OpenSSL.pm | 2 | ||||
-rw-r--r-- | perl/OpenSSL.xs | 2 | ||||
-rw-r--r-- | perl/openssl.h | 2 | ||||
-rw-r--r-- | perl/openssl_bio.xs | 3 | ||||
-rw-r--r-- | perl/openssl_bn.xs | 1 | ||||
-rw-r--r-- | perl/openssl_cipher.xs | 3 | ||||
-rw-r--r-- | perl/openssl_digest.xs | 2 | ||||
-rw-r--r-- | perl/openssl_ssl.xs | 18 |
13 files changed, 32 insertions, 17 deletions
diff --git a/Makefile.org b/Makefile.org index d53dbe6076..ec50e75c3a 100644 --- a/Makefile.org +++ b/Makefile.org @@ -180,6 +180,7 @@ all: Makefile.ssl (cd $$i && echo "making all in $$i..." && \ $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' SDIRS='${SDIRS}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' all ) || exit 1; \ done; + cd perl; $(PERL) Makefile.PL; make sub_all: @for i in $(DIRS) ;\ @@ -207,8 +208,7 @@ linux-shared: Makefile.ssl: Makefile.org @echo "Makefile.ssl is older than Makefile.org." - @echo "Reconfigure the source tree (via 'perl Configure' or 'sh config')" - @echo "and update the error lists (via 'make errors'), please." + @echo "Reconfigure the source tree (via './config' or 'perl Configure'), please." @false libclean: diff --git a/crypto/.cvsignore b/crypto/.cvsignore index ce36d588f9..6b86a0a8dc 100644 --- a/crypto/.cvsignore +++ b/crypto/.cvsignore @@ -1,4 +1,4 @@ lib -date.h +buildinf.h opensslconf.h Makefile.save diff --git a/crypto/ex_data.c b/crypto/ex_data.c index 741bb570f0..176574766b 100644 --- a/crypto/ex_data.c +++ b/crypto/ex_data.c @@ -141,7 +141,7 @@ char *CRYPTO_get_ex_data(CRYPTO_EX_DATA *ad, int idx) return(sk_value(ad->sk,idx)); } -/* The callback is called with the 'object', which is the origional data object +/* The callback is called with the 'object', which is the original data object * being duplicated, a pointer to the * 'new' object to be inserted, the index, and the argi/argp */ diff --git a/perl/MANIFEST b/perl/MANIFEST index a7046cf28c..80c900769d 100644 --- a/perl/MANIFEST +++ b/perl/MANIFEST @@ -12,7 +12,6 @@ openssl_digest.xs openssl_err.xs openssl_ssl.xs openssl_x509.xs -openssl_cb.c t/01-use.t t/02-version.t t/03-bio.t diff --git a/perl/Makefile.PL b/perl/Makefile.PL index 09eb93653b..2a67ad061d 100644 --- a/perl/Makefile.PL +++ b/perl/Makefile.PL @@ -2,7 +2,11 @@ ## Makefile.PL -- Perl MakeMaker specification ## -$V = '0.9.2b'; +open(IN,"<../Makefile.ssl") || die "unable to open Makefile.ssl!\n"; +while(<IN>) { + $V=$1 if (/^VERSION=(.*)$/); +} +close(IN); print "Configuring companion Perl module for OpenSSL $V\n"; use ExtUtils::MakeMaker; @@ -18,7 +22,6 @@ WriteMakefile( 'DEFINE' => '', 'INC' => '-I../include', 'H' => ['openssl.h'], - 'C' => ['openssl_cb.c'], 'OBJECT' => 'OpenSSL.o ' . 'openssl_bio.o ' . diff --git a/perl/OpenSSL.pm b/perl/OpenSSL.pm index 7711c332ca..ae7265a21d 100644 --- a/perl/OpenSSL.pm +++ b/perl/OpenSSL.pm @@ -11,7 +11,7 @@ use DynaLoader; @ISA = qw(Exporter DynaLoader); @EXPORT = qw(); -$VERSION = '0.922'; +$VERSION = '0.94'; bootstrap OpenSSL; @OpenSSL::BN::ISA = qw(OpenSSL::ERR); diff --git a/perl/OpenSSL.xs b/perl/OpenSSL.xs index 9af3113f76..2267168b79 100644 --- a/perl/OpenSSL.xs +++ b/perl/OpenSSL.xs @@ -64,6 +64,8 @@ ex_cleanup(obj, data, ad, idx, argl, argp) MODULE = OpenSSL PACKAGE = OpenSSL +PROTOTYPES: ENABLE + BOOT: boot_bio(); boot_cipher(); diff --git a/perl/openssl.h b/perl/openssl.h index 52e6cfc89a..2712324a30 100644 --- a/perl/openssl.h +++ b/perl/openssl.h @@ -60,7 +60,7 @@ extern "C" { #endif #include "EXTERN.h" -#include <openssl/perl.h> +#include "perl.h" #include "XSUB.h" #ifdef __cplusplus diff --git a/perl/openssl_bio.xs b/perl/openssl_bio.xs index 346ead441f..06d61af130 100644 --- a/perl/openssl_bio.xs +++ b/perl/openssl_bio.xs @@ -66,6 +66,7 @@ boot_bio(void) MODULE = OpenSSL::BIO PACKAGE = OpenSSL::BIO PREFIX = p5_BIO_ +PROTOTYPES: ENABLE VERSIONCHECK: DISABLE void @@ -216,7 +217,7 @@ p5_BIO_pop(b) * perl library, in which case it will have a perl * SV, otherwise it will have been created internally, * inside OpenSSL. For the 'pushed in', it needs - * the reference count decememted. */ + * the reference count decremented. */ arg = (SV *)BIO_get_ex_data(bio, p5_bio_ex_bio_ptr); if (arg == NULL) { arg = new_ref("OpenSSL::BIO",(char *)bio,0); diff --git a/perl/openssl_bn.xs b/perl/openssl_bn.xs index 359e906651..f79bf879e8 100644 --- a/perl/openssl_bn.xs +++ b/perl/openssl_bn.xs @@ -72,6 +72,7 @@ char *arg; MODULE = OpenSSL::BN PACKAGE = OpenSSL::BN PREFIX = p5_BN_ +PROTOTYPES: ENABLE VERSIONCHECK: DISABLE void diff --git a/perl/openssl_cipher.xs b/perl/openssl_cipher.xs index fb4c632995..e9ff2a8f79 100644 --- a/perl/openssl_cipher.xs +++ b/perl/openssl_cipher.xs @@ -9,13 +9,14 @@ int boot_cipher() 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))) diff --git a/perl/openssl_digest.xs b/perl/openssl_digest.xs index e4bc29ea89..6cd3018e9f 100644 --- a/perl/openssl_digest.xs +++ b/perl/openssl_digest.xs @@ -23,7 +23,7 @@ void p5_EVP_MD_new(...) PREINIT: EVP_MD_CTX *ctx; - EVP_MD *md; + const EVP_MD *md; char *name; PPCODE: if ((items == 1) && SvPOK(ST(0))) diff --git a/perl/openssl_ssl.xs b/perl/openssl_ssl.xs index 7022c468f2..c7d1b171ab 100644 --- a/perl/openssl_ssl.xs +++ b/perl/openssl_ssl.xs @@ -60,6 +60,7 @@ int boot_ssl() MODULE = OpenSSL::SSL PACKAGE = OpenSSL::SSL::CTX PREFIX = p5_SSL_CTX_ +PROTOTYPES: ENABLE VERSIONCHECK: DISABLE void @@ -75,7 +76,7 @@ p5_SSL_CTX_new(...) else if ((items == 2) && SvPOK(ST(1))) method=SvPV(ST(1),na); else - croak("Usage: OpenSSL::SSL_CTX::new(type)"); + croak("Usage: OpenSSL::SSL::CTX::new(type)"); if (strcmp(method,"SSLv3") == 0) meth=SSLv3_method(); @@ -95,9 +96,15 @@ p5_SSL_CTX_new(...) meth=SSLv2_client_method(); else if (strcmp(method,"SSLv2_server") == 0) meth=SSLv2_server_method(); + else if (strcmp(method,"TLSv1") == 0) + meth=TLSv1_method(); + else if (strcmp(method,"TLSv1_client") == 0) + meth=TLSv1_client_method(); + else if (strcmp(method,"TLSv1_server") == 0) + meth=TLSv1_server_method(); else { - croak("Not passed a valid SSL method name, should be 'SSLv[23] [client|server]'"); + croak("Not a valid SSL method name, should be 'SSLv[23] [client|server]'"); } EXTEND(sp,1); PUSHs(sv_newmortal()); @@ -176,7 +183,6 @@ p5_SSL_new(...) SV *sv_ctx; SSL_CTX *ctx; SSL *ssl; - int i; SV *arg; PPCODE: pr_name("p5_SSL_new"); @@ -198,8 +204,8 @@ p5_SSL_new(...) /* Now this is being a little hairy, we keep a pointer to * our perl reference. We need to do a different one - * to the one we return because it will have it's reference - * count droped to 0 apon return and if we up its reference + * to the one we return because it will have its reference + * count dropped to 0 upon return and if we up its reference * count, it will never be DESTROYED */ arg=newSVsv(ST(0)); SSL_set_ex_data(ssl,p5_ssl_ex_ssl_ptr,(char *)arg); @@ -363,7 +369,9 @@ p5_SSL_DESTROY(ssl) SSL *ssl; CODE: pr_name_dd("p5_SSL_DESTROY",ssl->references,ssl->ctx->references); +#ifdef DEBUG fprintf(stderr,"SSL_DESTROY %d\n",ssl->references); +#endif SSL_free(ssl); int |