Каталог статей
Меню сайта


Форма входа


Категории раздела
Oracle DB [72]
Materials concerning Oracle database
Howto [24]
Все про Oracle [65]
Разработка на SQL и PL/SQL для Oracle, анализ работы базы
Построение Web-интерфейса: все что касается JSF, ADF и AJAX [9]
Разное [19]
Solaris [46]
Что касается администрирования Solaris
Linux [29]
Заметки по настройке Linux
AIX [1]
AIX, настройка Oracle на AIX
Java [15]
Cryptography [10]
Windows [1]
Java [35]
PostgreSQL [2]


Поиск


Друзья сайта
  • Официальный блог
  • Сообщество uCoz
  • FAQ по системе
  • Инструкции для uCoz


  • Статистика

    Онлайн всего: 1
    Гостей: 1
    Пользователей: 0


    Приветствую Вас, Гость · RSS 20.05.2024, 09:49
    Главная » Статьи » Разное

    Java и /dev/random


    The Sun/Oracle-based JVM is attempting to generate a pseudo-random number to be used as a seed for an SSL server socket. To generate the pseudo-random number, the JVM is reading from the /dev/random device to obtain some random information for the seed. The problem is that reads from the /dev/random device will block if the system does not have a good source of random events. So, the Geronimo server startup is blocked waiting for enough random information to be returned from /dev/random. This article may be help understand the basic issue --
    http://en.wikipedia.org/wiki//dev/random#Linux

     I'm no security expert. And I don't know the potential implications, but the simplest way that I've found to avoid the problem is to use the /dev/urandom device, instead of /dev/random. Do this by specifying the following java property '-Djava.security.egd=file:/dev/./urandom'.
    But keep in mind that often setting up the mentioned property does not make any difference.


    It's a bug in Java.
    A bug was submitted in 2004 but updated and resolved in 2012.

    http://bugs.sun.com/view_bug.do;jsessionid=ff625daf459fdffffffffcd54f1c775299e0?bug_id=6202721

    Java picks up /dev/random even though /dev/urandom is passed in command
    line. The workaround around is to trick java to use /dev/urandom, by using
    /dev/./urandom. Basically it's the same device, (.) dot means current
    directory
    Look also at the class SecureRandom

    More cardinal measure is to change /dev/random for /dev/urandom globally in the system:

    # rm /dev/random
    # mknod /dev/random c 1 9



    Категория: Разное | Добавил: basil (31.05.2012)
    Просмотров: 834 | Комментарии: 1 | Рейтинг: 0.0/0
    Всего комментариев: 1
    1 Smithg157  
    0
    Thanks for any other informative web site. Where else may just I get that kind of information written in such an ideal way? I have a mission that I am just now operating on, and I have been on the look out for such information. cakeffbebfeekddg

    Имя *:
    Email *:
    Код *:
    Бесплатный конструктор сайтов - uCoz