[BUGFIX] Add a dummy distinguished name to CSR generation 53/40453/2
authorAlexander Krist <mail@alex-krist.de>
Wed, 17 Jun 2015 16:28:39 +0000 (18:28 +0200)
committerMarkus Klein <markus.klein@typo3.org>
Fri, 10 Jul 2015 14:08:06 +0000 (16:08 +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/40453
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
typo3/sysext/rsaauth/Classes/Backend/PhpBackend.php

index a6e4f16..c2205ac 100644 (file)
@@ -44,7 +44,10 @@ class PhpBackend extends \TYPO3\CMS\Rsaauth\Backend\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);