summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgregor herrmann <gregoa@debian.org>2022-03-13 17:54:50 +0100
committergregor herrmann <gregoa@debian.org>2022-03-13 17:54:50 +0100
commit978fab9470d645631d75d4c892af69023ac567b1 (patch)
tree6a165e14ffcfd5b70b7210e1639253502d095a54
parentb4004884fdd4dd74ed5cabb6997624cad076810a (diff)
New upstream version 0.18
-rwxr-xr-xChanges6
-rw-r--r--META.json23
-rw-r--r--META.yml23
-rwxr-xr-xMakefile.PL31
-rwxr-xr-xPKCS10.pm2
-rwxr-xr-xPKCS10.xs10
6 files changed, 78 insertions, 17 deletions
diff --git a/Changes b/Changes
index 4e68621..6f201cd 100755
--- a/Changes
+++ b/Changes
@@ -1,7 +1,11 @@
Revision history for Perl extension Crypt::OpenSSL::PKCS10.
+0.18 Thu Mar 10 17:31:59 PST 2022
+ - Improve Makefile.PL to detect LIBS and INC values automatically (thanks Michal Josef �pacek)
+ - Fix failing tests with OpenSSL 3 (Petr Pisar)
+
0.16 Mon Oct 17 09:36:48 PDT 2016
- - OpenSSL 1.1.0 support (thanks Petr Písar)
+ - OpenSSL 1.1.0 support (thanks Petr P�sar)
0.15 Fri Aug 7 23:12:46 PDT 2015
- UTF-8 subject support. (Adam Osuchowski)
diff --git a/META.json b/META.json
index ed60ccd..d7cb95d 100644
--- a/META.json
+++ b/META.json
@@ -4,9 +4,9 @@
"JoNO <jonozzz@yahoo.com>"
],
"dynamic_config" : 1,
- "generated_by" : "ExtUtils::MakeMaker version 6.66, CPAN::Meta::Converter version 2.120921",
+ "generated_by" : "ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 2.150010",
"license" : [
- "unknown"
+ "perl_5"
],
"meta-spec" : {
"url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
@@ -22,20 +22,35 @@
"prereqs" : {
"build" : {
"requires" : {
- "ExtUtils::MakeMaker" : "0"
+ "ExtUtils::MakeMaker" : "0",
+ "Test" : "0"
}
},
"configure" : {
"requires" : {
+ "Crypt::OpenSSL::Guess" : "0.11",
"ExtUtils::MakeMaker" : "0"
}
},
"runtime" : {
+ "recommends" : {
+ "Crypt::OpenSSL::Bignum" : "0"
+ },
"requires" : {
"Crypt::OpenSSL::RSA" : "0"
}
}
},
"release_status" : "stable",
- "version" : "0.16"
+ "resources" : {
+ "bugtracker" : {
+ "web" : "https://rt.cpan.org/Public/Dist/Display.html?Name=Crypt-OpenSSL-PKCS10"
+ },
+ "homepage" : "https://metacpan.org/pod/Crypt::OpenSSL::PKCS10",
+ "license" : [
+ "http://dev.perl.org/licenses/"
+ ]
+ },
+ "version" : "0.18",
+ "x_serialization_backend" : "JSON::PP version 2.27400_02"
}
diff --git a/META.yml b/META.yml
index 4430781..b618209 100644
--- a/META.yml
+++ b/META.yml
@@ -3,20 +3,29 @@ abstract: "Perl extension to OpenSSL's PKCS10 API."
author:
- 'JoNO <jonozzz@yahoo.com>'
build_requires:
- ExtUtils::MakeMaker: 0
+ ExtUtils::MakeMaker: '0'
+ Test: '0'
configure_requires:
- ExtUtils::MakeMaker: 0
+ Crypt::OpenSSL::Guess: '0.11'
+ ExtUtils::MakeMaker: '0'
dynamic_config: 1
-generated_by: 'ExtUtils::MakeMaker version 6.66, CPAN::Meta::Converter version 2.120921'
-license: unknown
+generated_by: 'ExtUtils::MakeMaker version 7.24, CPAN::Meta::Converter version 2.150010'
+license: perl
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
- version: 1.4
+ version: '1.4'
name: Crypt-OpenSSL-PKCS10
no_index:
directory:
- t
- inc
+recommends:
+ Crypt::OpenSSL::Bignum: '0'
requires:
- Crypt::OpenSSL::RSA: 0
-version: 0.16
+ Crypt::OpenSSL::RSA: '0'
+resources:
+ bugtracker: https://rt.cpan.org/Public/Dist/Display.html?Name=Crypt-OpenSSL-PKCS10
+ homepage: https://metacpan.org/pod/Crypt::OpenSSL::PKCS10
+ license: http://dev.perl.org/licenses/
+version: '0.18'
+x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff --git a/Makefile.PL b/Makefile.PL
index 95cab07..4a6a95f 100755
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -1,5 +1,6 @@
use 5.008000;
use ExtUtils::MakeMaker;
+use Crypt::OpenSSL::Guess qw(openssl_inc_paths openssl_lib_paths);
# See lib/ExtUtils/MakeMaker.pm for details of how to influence
# the contents of the Makefile that is written.
WriteMakefile(
@@ -9,7 +10,33 @@ WriteMakefile(
($] >= 5.005 ? ## Add these new keywords supported since 5.005
(ABSTRACT_FROM => 'PKCS10.pm',
AUTHOR => 'JoNO <jonozzz@yahoo.com>') : ()),
- LIBS => ['-L/usr/local/ssl/lib -lcrypto'],
+ LIBS => [openssl_lib_paths().' -lcrypto'],
DEFINE => '-DPERL5 -Wall',
- INC => '-I/usr/local/ssl/include',
+ INC => openssl_inc_paths(),
+
+ 'dist' => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
+ 'clean' => { FILES => 'Crypt-OpenSSL-PKCS10-*' },
+ ( $ExtUtils::MakeMaker::VERSION >= 6.3002 ? ( 'LICENSE' => 'perl', ) : () ),
+ (
+ $ExtUtils::MakeMaker::VERSION >= 6.46
+ ? (
+ 'META_MERGE' => {
+ recommends => {
+ 'Crypt::OpenSSL::Bignum' => 0,
+ },
+ configure_requires => {
+ 'Crypt::OpenSSL::Guess' => '0.11',
+ },
+ build_requires => {
+ 'Test' => 0, # For testing
+ },
+ resources => {
+ 'license' => 'http://dev.perl.org/licenses/',
+ 'homepage' => 'https://metacpan.org/pod/Crypt::OpenSSL::PKCS10',
+ 'bugtracker' => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Crypt-OpenSSL-PKCS10',
+ }
+ }
+ )
+ : ()
+ ),
);
diff --git a/PKCS10.pm b/PKCS10.pm
index d60d5c0..fcacc1e 100755
--- a/PKCS10.pm
+++ b/PKCS10.pm
@@ -30,7 +30,7 @@ our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
#);
-our $VERSION = '0.16';
+our $VERSION = '0.18';
require XSLoader;
XSLoader::load('Crypt::OpenSSL::PKCS10', $VERSION);
diff --git a/PKCS10.xs b/PKCS10.xs
index af6e2a6..59089cc 100755
--- a/PKCS10.xs
+++ b/PKCS10.xs
@@ -356,6 +356,8 @@ new(class, keylen = 1024)
X509_REQ_set_pubkey(x,pk);
X509_REQ_set_version(x,0L);
+ if (!X509_REQ_sign(x,pk,EVP_sha256()))
+ croak ("%s - X509_REQ_sign", class);
RETVAL = make_pkcs10_obj(class, x, pk, NULL, NULL);
@@ -404,6 +406,8 @@ new_from_rsa(class, p_rsa)
X509_REQ_set_pubkey(x,pk);
X509_REQ_set_version(x,0L);
+ if (!X509_REQ_sign(x,pk,EVP_sha256()))
+ croak ("%s - X509_REQ_sign", class);
RETVAL = make_pkcs10_obj(class, x, pk, NULL, &rsa->rsa);
@@ -623,7 +627,8 @@ add_custom_ext_raw(pkcs10, oid_SV, ext_SV)
if(!pkcs10->exts)
pkcs10->exts = sk_X509_EXTENSION_new_null();
- nid = OBJ_create(oid, "MyAlias", "My Test Alias Extension");
+ if ((nid = OBJ_create(oid, oid, oid)) == NID_undef)
+ croak ("add_custom_ext_raw: OBJ_create() for OID %s failed", oid);
RETVAL = add_ext_raw(pkcs10->exts, nid, ext, ext_length);
if (!RETVAL)
@@ -651,7 +656,8 @@ add_custom_ext(pkcs10, oid_SV, ext_SV)
if(!pkcs10->exts)
pkcs10->exts = sk_X509_EXTENSION_new_null();
- nid = OBJ_create(oid, "MyAlias", "My Test Alias Extension");
+ if ((nid = OBJ_create(oid, oid, oid)) == NID_undef)
+ croak ("add_custom_ext_raw: OBJ_create() for OID %s failed", oid);
X509V3_EXT_add_alias(nid, NID_netscape_comment);
RETVAL = add_ext(pkcs10->exts, pkcs10->req, nid, ext);