[BUGFIX] Add a dummy distinguished name to CSR generation 72/40372/6
authorAlexander Krist <mail@alex-krist.de>
Wed, 17 Jun 2015 16:28:39 +0000 (18:28 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Mon, 22 Jun 2015 17:56:49 +0000 (19:56 +0200)
Add a dummy distinguished name to CSR generation in PhpBackend to fix a
problem with certain openssl versions, specifically a Gentoo Linux,
Kernel 3.8.3-hardened, OpenSSL 1.0.1f, PHP 5.4.24

Change-Id: I5c34d764077fe7561835d0e1b9b4fd47088a8de1
Resolves: #55396
Releases: master, 6.2
Reviewed-on: http://review.typo3.org/40372
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/rsaauth/Classes/Backend/PhpBackend.php

index c388e0b..69cc9a2 100644 (file)
@@ -44,7 +44,10 @@ class PhpBackend extends AbstractBackend {
                        openssl_pkey_export($privateKey, $privateKeyStr);
                        // Prepare public key information
                        $exportedData = '';
-                       $csr = openssl_csr_new(array(), $privateKey);
+                       $csr = openssl_csr_new(array(
+                               'localityName' => 'foo',
+                               'organizationName' => 'bar',
+                       ), $privateKey);
                        openssl_csr_export($csr, $exportedData, FALSE);
                        // Get public key (in fact modulus) and exponent
                        $publicKey = $this->extractPublicKeyModulus($exportedData);