[TYPO3-core] RFC #9474: Integrate OpenID authentication support to TYPO3

Dmitry Dulepov dmitry at typo3.org
Fri Oct 3 15:26:15 CEST 2008


Hi!

Martin Kutschker wrote:
>> // Make sure that random generator is properly set up
>> if (!is_readable('/dev/urandom')) {
>>     if (is_readable('/dev/random')) {
>>         define('Auth_OpenID_RAND_SOURCE', '/dev/random');
>>     } else {
>>         define('Auth_OpenID_RAND_SOURCE', null);
>>     }
>> }
> 
> Nice idea. I see in the OpenID classes that a user error is triggered
> when these devices are not present. The code tries later on to
> circumvent the problem with a built-in random number generation.
> 
> Question: do we need to catch this error with an error handler to make
> this thing work on Windows. Does it make sense to provide a
> configuration option to let the OpenID classes read from some other
> "file"? I'm thinking of entropy gaterhing daemons.

The code above should take care of it. /dev/urandom definitely does not exist on Windows and we can even check OS before we check that /dev/urandom exists. So on Windows it will be just built–in generator. trigger_error will never be called in this case.

-- 
Dmitry Dulepov
TYPO3 Core team
My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book
In the blog: http://typo3bloke.net/post-details/duplicate_content_with_realurl/


More information about the TYPO3-team-core mailing list