#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2004
    Posts
    36
    Rep Power
    11

    URLSeedGenerator file:/dev/random reached end of file


    Hi,

    I am trying to put HTTP/S request to Apache server from java program running on FreeBSD 4.10

    but while executing it gives following error at

    (SSLSocketFactory)SSLSocketFactory.getDefault();

    Error is :

    PHP Code:
    Exception in thread "main" java.lang.InternalErrorURLSeedGenerator file:/dev/random reached end of file
            at sun
    .security.provider.SeedGenerator$URLSeedGenerator.getSeedByte(SeedGenerator.java:476)
            
    at sun.security.provider.SeedGenerator.getSeedBytes(SeedGenerator.java:137)
            
    at sun.security.provider.SeedGenerator.generateSeed(SeedGenerator.java:132)
            
    at sun.security.provider.SecureRandom.engineGenerateSeed(SecureRandom.java:112)
            
    at sun.security.provider.SecureRandom.engineNextBytes(SecureRandom.java:169)
            
    at java.security.SecureRandom.nextBytes(SecureRandom.java:381)
            
    at java.security.SecureRandom.next(SecureRandom.java:403)
            
    at java.util.Random.nextInt(Random.java:191)
            
    at com.sun.net.ssl.internal.ssl.SSLContextImpl.engineInit(DashoA6275)
            
    at com.sun.net.ssl.internal.ssl.SSLContextImpl.e(DashoA6275)
            
    at com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.<init>(DashoA6275)
            
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
            
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
            
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
            
    at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
            
    at java.lang.Class.newInstance0(Class.java:308)
            
    at java.lang.Class.newInstance(Class.java:261)
            
    at javax.net.ssl.SSLSocketFactory.getDefault(DashoA6275)        at ApacheSSL.main(ApacheSSL.java:17
    how can i remove this error

    FreeBSD 4.10-BETA (GENERIC)
    I am using following packages
    linux-sun-jdk-1.4.2.04 Sun Java Development Kit 1.4 for Linux
    linux_base-8-8.0_4 Base set of packages needed in Linux mode (only for i386)
    linux_devtools-8.0_1 Packages needed for doing development in Linux mode
    libtool-1.3.5_1 Generic shared library support script
    gmake-3.80_1 GNU version of 'make' utility
    automake-1.4.5_9 GNU Standards-compliant Makefile generator (legacy version
    GCC 2.95.4
    gdb 4.18
    ld 2.12.1 supported emulation elf_i386


    Thanks in advance

    Regards
    Man479
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2004
    Posts
    36
    Rep Power
    11
    That error is removed by reffering to below link

    Helpful Link:
    http://www.clarksys.com/archives/2004/01/stir_the_entropy_pool_in_freebsd_4.html


    but I am facing below error:





    Code:
    javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: No trusted certificate found
    at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA6275)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
    at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA6275)
    at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA6275)
    at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA6275)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA6275)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA6275)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA6275)
    at ApacheSSL.main(ApacheSSL.java:23)
    Caused by: sun.security.validator.ValidatorException: No trusted certificate found
    at sun.security.validator.SimpleValidator.buildTrustedChain(SimpleValidator.java:304)
    at sun.security.validator.SimpleValidator.engineValidate(SimpleValidator.java:107)
    at sun.security.validator.Validator.validate(Validator.java:202)
    at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(DashoA6275)
    at com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(DashoA6275)

    Regards
    Man479
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    May 2003
    Posts
    10
    Rep Power
    0
    Hi,

    Found this thread through google while having the same end of file for /dev/random. The URL you provided has changed to:
    http://www.clarksys.com/archives/2004/01/16/stir-the-entropy-pool-in-freebsd-4/

    Just for reference in case that link disappears one day:
    1. dmesg | grep irq - find out the IRQ of an interface (eg, ethernet interface) that's used
    2. Add those to the random generator's seed:
    # rndcontrol -s 10
    # rndcontrol -s 11
    # rndcontrol -s 14
    # rndcontrol
    The last command outputs what seeds its using
    3. Add to /etc/rc.conf if you want it to keep over machine reboots:
    rand_irqs=10 11 14″

IMN logo majestic logo threadwatch logo seochat tools logo