Note that there are some explanatory texts on larger screens.

plurals
  1. POProblems Using OpenSSL in Windows 7
    text
    copied!<p>I noticed some problems between installing OpenSSL on Windows XP Professional and Windows 7 Professional. For both OSs, I downloaded the <code>Win32 OpenSSL v1.0.0d</code> and <code>Visual C++ 2008</code> Redistributables binaries from the Shining Light Productions website. Both installed with no problems on both machines. However, on the Windows 7 machine, I encountered the following problems using the OpenSSL exe and API:</p> <ul> <li><p>From the MS-DOS command prompt, I tried to create a root CA with</p> <pre><code>openssl x509 -req -in rootreq.pem -sha1 -extensions v3_ca -signkey rootkey.pem -out rootcert.pem </code></pre></li> </ul> <p>but was given the following error <code>unable to write random state</code>. Windows XP worked fine.</p> <ul> <li>I compiled a simple SSL web server using the OpenSSL API, but when I try to connect using</li> </ul> <blockquote> <pre><code>openssl s_client -connect 127.0.0.1:16001 </code></pre> </blockquote> <p>I get the following response</p> <pre><code>Loading 'screen' into random state - done connect: No such file or directory connect:errno=0 </code></pre> <p>Once again, Windows XP returned a better response. If you look at my attached code, it appears that the second BIO_do_accept never gets called.</p> <p>Does anyone know what the problem may be ? Are there extra steps that I need to take when installing on Windows 7? </p> <p>FYI - I also tried installing the 64 bit binaries on Windows 7 as well, but I got the same results. I really need to get this up and running on my Windows 7 machine, so any help is appreciated.</p> <pre><code>/////////////////// Code /////////////////////////////////// // Simple OpenSSL Webserver // Compiler : MSVS 2010 Professional // Language: C / C++ int main(int argc, char *argv[]) { BIO *acc, *client; SSL *ssl; SSL_CTX *ctx; THREAD_TYPE tid; init_OpenSSL( ); seed_prng( ); ctx = setup_server_ctx( ); acc = BIO_new_accept(PORT); printf ("BIO_new_accept\n"); if (!acc) int_error("Error creating server socket"); if (BIO_do_accept(acc) &lt;= 0) int_error("Error binding server socket"); printf ("BIO_do_accept\n"); for (;;) { if (BIO_do_accept(acc) &lt;= 0) int_error("Error accepting connection"); printf ("BIO_do_accept2\n"); client = BIO_pop(acc); printf ("BIO_pop\n"); if (!(ssl = SSL_new(ctx))) int_error("Error creating SSL context"); printf ("SSL_new\n"); SSL_set_bio(ssl, client, client); printf ("SSL_set_bio\n"); THREAD_CREATE(tid, (void *)server_thread, ssl); } SSL_CTX_free(ctx); BIO_free(acc); return 0; } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload