Hello.

I'm trying to make a Webserver.
and fixing thttp daemon code to add SSL.

i did simply used library like this.. to see SSL works..

// in initializing..

        SSL_load_error_strings();
        SSL_library_init();
        RAND_add("kimhyoungwoo:1234",17,25);

        method = SSLv3_server_method();
        if((sslctx = SSL_CTX_new(method)) == NULL)
                printf("ssl_ctx creation error!!");

................
................


// and, when a connection was maked..

        SSL * ssl;
        char readbuf[1024] , writebuf[1024];

        strcpy (writebuf , "HTTP/1.0 200 OK\r\n
Server:MYWEBSERVER\r\n
Content-type:text/html\r\n
Date:Wed,12 Sep 2001 03:02:47 GMT\r\n
\r\n
<HTML>
<body>
This is SSL test.
</body>
</HTML>
");

        ssl = SSL_new(sslctx);

        SSL_set_fd( ssl , fd );

        SSL_accept( ssl );

        SSL_read ( ssl , readbuf , 1024 );

        puts(readbuf);
        SSL_write ( ssl , writebuf , 1024 );

        SSL_shutdown( ssl );

....
result is.
Client(IE)'s 408/409 error..
and takes long time to see error message..

is there something i emitted? or Something misunderstood?

ps.. i'm new here.. :> 



kim.
===================================================================
¿ì¸® ÀÎÅͳÝ, Daum  http://www.daum.net
È­²öÇÑ ¿ø¼¦ °Ë»ö! Daum°Ë»ö ÄíÄ¡·Î ãÀÚ!
¢Ñ°Ë»öÇϱâ http://search.daum.net
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to