Skip to content

Commit

Permalink
Merge pull request #8 from alivraghi/1.10
Browse files Browse the repository at this point in the history
1.10  Sun Apr 18 00:25:33 2010
  • Loading branch information
alivraghi authored Oct 9, 2016
2 parents 0bd6906 + ea41631 commit 0a60c55
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 9 deletions.
3 changes: 3 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Revision history for Perl extension PerlCryptLib
================================================

1.10 Sun Apr 18 00:25:33 2010
- Done some optimizations in XS code for gcc4 ISO C90 compatibility

1.09 Sun Jul 26 04:47:10 2009
- Cryptlib header's translation has been reviewd

Expand Down
4 changes: 2 additions & 2 deletions PerlCryptLib.pm
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use Carp;
require Exporter;
use AutoLoader;

our $VERSION = '1.09';
our $VERSION = '1.10';


#############################################################################
Expand Down Expand Up @@ -463,7 +463,7 @@ Alvaro Livraghi, <perlcryptlib@gmail.com>
=head1 COPYRIGHT AND LICENSE
Copyright (C) 2006-2009 Alvaro Livraghi. All Rights Reserved.
Copyright (C) 2006-2010 Alvaro Livraghi. All Rights Reserved.
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
Expand Down
14 changes: 8 additions & 6 deletions PerlCryptLib.xs
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@

MODULE = PerlCryptLib PACKAGE = PerlCryptLib

PROTOTYPES: DISABLE

INCLUDE: const-xs.inc

################################################################################
Expand All @@ -43,7 +41,8 @@ void * shift_buffer(buffer, length, offset)
INIT:
void * __buffer;
CODE:
if ( __buffer = (void *)malloc(length) ) {
__buffer = (void *)malloc(length);
if ( __buffer != 0 ) {
length -= offset;
buffer += offset;
memcpy(__buffer, buffer, length);
Expand Down Expand Up @@ -509,8 +508,9 @@ int cryptDeviceQueryCapability(cryptDevice, cryptAlgo, cryptQueryInfo)
const int cryptDevice;
const int cryptAlgo;
HV * cryptQueryInfo;
CODE:
INIT:
CRYPT_QUERY_INFO dummy;
CODE:
RETVAL = cryptDeviceQueryCapability(cryptDevice, cryptAlgo, &dummy);
if ( RETVAL == CRYPT_OK ) {
hv_store(cryptQueryInfo, "algoName", 8, newSVpv(dummy.algoName, strlen(dummy.algoName)), 0);
Expand Down Expand Up @@ -572,8 +572,9 @@ int cryptGetCertExtension(certificate, oid, criticalFlag, extension, extensionMa
int cryptQueryCapability(cryptAlgo, cryptQueryInfo)
const int cryptAlgo;
HV * cryptQueryInfo;
CODE:
INIT:
CRYPT_QUERY_INFO dummy;
CODE:
RETVAL = cryptQueryCapability(cryptAlgo, &dummy);
if ( RETVAL == CRYPT_OK ) {
hv_store(cryptQueryInfo, "algoName", 8, newSVpv(dummy.algoName, strlen(dummy.algoName)), 0);
Expand All @@ -590,8 +591,9 @@ int cryptQueryObject(objectData, objectDataLength, cryptObjectInfo)
const void * objectData;
const int objectDataLength;
HV * cryptObjectInfo;
CODE:
INIT:
CRYPT_OBJECT_INFO dummy;
CODE:
RETVAL = cryptQueryObject(objectData, objectDataLength, &dummy);
if ( RETVAL == CRYPT_OK ) {
hv_store(cryptObjectInfo, "objectType", 10, newSVnv(dummy.objectType), 0);
Expand Down
2 changes: 1 addition & 1 deletion README
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
============================
PerlCryptLib v.1.09 - README
PerlCryptLib v.1.10 - README
============================


Expand Down

0 comments on commit 0a60c55

Please sign in to comment.