[BUGFIX] Fix fatal in RsaAuth-PhpBackendTest with broken openssl config 97/35597/2
authorStephan Großberndt <stephan@grossberndt.de>
Wed, 17 Dec 2014 01:19:31 +0000 (02:19 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sat, 20 Dec 2014 09:43:47 +0000 (10:43 +0100)
commit1890c86995333e7fa2d521dc7bdcccc4fd419d1b
treeb55c38a6382df0d70fbee0d35eb8ece335528ffa
parentea33fb5f8c289120bb6e3466ebd869662023b89d
[BUGFIX] Fix fatal in RsaAuth-PhpBackendTest with broken openssl config

If the openssl environment is not set up correctly (in Install Tool:
"PHP OpenSSL extension not working") the unit test
TYPO3\CMS\Rsaauth\Tests\Unit\Backend\PhpBackendTest causes a fatal PHP
error "Call to a member function isReady() on a non-object". This
happens because $this->subject->createNewKeyPair() returns NULL if
something goes wrong while setting up a openssl keypair.

Assert the keypair is not null before calling $keypair->isReady().

Resolves: #63948
Releases: master, 6.2
Change-Id: Iffde2b7eafe160d387568d08f627a2bb9852f32f
Reviewed-on: http://review.typo3.org/35597
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/rsaauth/Tests/Unit/Backend/PhpBackendTest.php