diff --git a/Changes b/Changes index 59920ce..5479b54 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,9 @@ Revision history for Perl extension PerlCryptLib ================================================ +1.11 Sun Oct 24 18:45:21 2010 + - Added compatibility for deprecated functions removed from cryptlib starting from version 3.4.0 + 1.10 Sun Apr 18 00:25:33 2010 - Done some optimizations in XS code for gcc4 ISO C90 compatibility diff --git a/PerlCryptLib.pm b/PerlCryptLib.pm index f93d200..e262c54 100644 --- a/PerlCryptLib.pm +++ b/PerlCryptLib.pm @@ -8,7 +8,7 @@ use Carp; require Exporter; use AutoLoader; -our $VERSION = '1.10'; +our $VERSION = '1.11'; ############################################################################# @@ -114,7 +114,7 @@ our $VERSION = '1.10'; cryptInit cryptEnd cryptQueryCapability cryptCreateContext cryptDestroyContext cryptDestroyObject - cryptGenerateKey cryptGenerateKeyAsync cryptAsyncQuery cryptAsyncCancel + cryptGenerateKey cryptEncrypt cryptDecrypt cryptSetAttribute cryptSetAttributeString cryptGetAttribute cryptGetAttributeString cryptDeleteAttribute cryptAddRandom @@ -130,7 +130,8 @@ our $VERSION = '1.10'; cryptDeviceOpen cryptDeviceClose cryptDeviceQueryCapability cryptDeviceCreateContext cryptLogin cryptLogout ); - + # Add deprecated functions when CRYPTLIB_VERSION prior 3.4.0 + push @FUNCTIONS, qw(cryptGenerateKeyAsync cryptAsyncQuery cryptAsyncCancel) if &CRYPTLIB_VERSION < 3400; # Esportazione costanti e funzioni our @ISA = qw(Exporter); @@ -168,6 +169,8 @@ sub AUTOLOAD { require XSLoader; XSLoader::load('PerlCryptLib', $VERSION); +## Add deprecated functions if CRYPTLIB_VERSION is less than 3.4.0 +#XSLoader::load('PerlCryptLib-deprecated-340', $VERSION) if &CRYPTLIB_VERSION < 3400; if ( __FILE__ eq "$0" ) { # TEST PACKAGE SPACE diff --git a/PerlCryptLib.xs b/PerlCryptLib.xs index 15815bc..b6229b3 100644 --- a/PerlCryptLib.xs +++ b/PerlCryptLib.xs @@ -2,7 +2,7 @@ Perl extesione interface (XS) to 'cryptlib' library (PerlCryptLib) - Copyright (C) 2006-2009 Alvaro Livraghi. All Rights Reserved. + Copyright (C) 2006-2010 Alvaro Livraghi. All Rights Reserved. Alvaro Livraghi, *******************************************************************************/ @@ -335,14 +335,6 @@ int cryptAddRandom(randomData, randomDataLength) const int randomDataLength; -int cryptAsyncCancel(cryptObject) - const int cryptObject; - - -int cryptAsyncQuery(cryptObject) - const int cryptObject; - - int cryptCAAddItem(keyset, certificate) const int keyset; const int certificate; @@ -549,10 +541,6 @@ int cryptExportKeyEx(encryptedKey, encryptedKeyMaxLength, encryptedKeyLength, fo encryptedKeyLength -int cryptGenerateKeyAsync(cryptContext) - const int cryptContext; - - int cryptGetCertExtension(certificate, oid, criticalFlag, extension, extensionMaxLength, extensionLength) const int certificate; const char * oid; @@ -605,3 +593,19 @@ int cryptQueryObject(objectData, objectDataLength, cryptObjectInfo) } OUTPUT: RETVAL + +# Add deprecated functions when CRYPTLIB_VERSION prior 3.4.0 +#if CRYPTLIB_VERSION < 3400 + +int cryptAsyncCancel(cryptObject) + const int cryptObject; + + +int cryptAsyncQuery(cryptObject) + const int cryptObject; + + +int cryptGenerateKeyAsync(cryptContext) + const int cryptContext; + +#endif diff --git a/README b/README index 596b585..f345589 100644 --- a/README +++ b/README @@ -1,6 +1,4 @@ -============================ -PerlCryptLib v.1.10 - README -============================ +PerlCryptLib v.1.11 - README What is cryptlib?