[BUGFIX] Fix fatal in RsaAuth-PhpBackendTest with broken openssl config 31/35531/4
authorStephan Großberndt <stephan@grossberndt.de>
Wed, 17 Dec 2014 01:19:31 +0000 (02:19 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Thu, 18 Dec 2014 22:05:06 +0000 (23:05 +0100)
commit64692a051a825d8e013584eb1a57a285c848bbfc
tree0554edf3cd44805b4679a73823e29a5ce60aebe9
parent03cb99cdf3217af196674055b8418c661b63a423
[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/35531
Reviewed-by: Oliver Klee <typo3-coding@oliverklee.de>
Reviewed-by: Stephan Großberndt <stephan@grossberndt.de>
Tested-by: Stephan Großberndt <stephan@grossberndt.de>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/rsaauth/Tests/Unit/Backend/PhpBackendTest.php