diff --git a/harbour/ChangeLog b/harbour/ChangeLog index 8757bd27d7..0b80c3f4ec 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -16,6 +16,12 @@ The license applies to all entries newer than 2009-04-28. */ +2012-01-27 21:15 UTC+0100 Viktor Szakats (harbour syenar.net) + * contrib/hbhttpd/core.prg + * contrib/hbhttpd/tests/eshop.prg + + enabled SSL after successful testing + * moved cert generation instructions to sample app src + 2012-01-27 20:52 UTC+0100 Viktor Szakats (harbour syenar.net) * contrib/hbplist * contrib/hbhttpd/core.prg diff --git a/harbour/contrib/hbhttpd/core.prg b/harbour/contrib/hbhttpd/core.prg index 04620c3c42..77b6897533 100644 --- a/harbour/contrib/hbhttpd/core.prg +++ b/harbour/contrib/hbhttpd/core.prg @@ -13,13 +13,6 @@ #pragma -km+ -/* -openssl genrsa -out privatekey.pem 2048 -openssl req -new -subj "/C=LT/CN=mycompany.org/O=My Company" -key privatekey.pem -out certrequest.csr -openssl x509 -req -days 730 -in certrequest.csr -signkey privatekey.pem -out certificate.pem -openssl x509 -in certificate.pem -text -noout -*/ - /* Docs: diff --git a/harbour/contrib/hbhttpd/tests/eshop.prg b/harbour/contrib/hbhttpd/tests/eshop.prg index 3355593470..10c6ac49fd 100644 --- a/harbour/contrib/hbhttpd/tests/eshop.prg +++ b/harbour/contrib/hbhttpd/tests/eshop.prg @@ -2,6 +2,13 @@ * $Id$ */ +/* +openssl genrsa -out privatekey.pem 2048 +openssl req -new -subj "/C=LT/CN=mycompany.org/O=My Company" -key privatekey.pem -out certrequest.csr +openssl x509 -req -days 730 -in certrequest.csr -signkey privatekey.pem -out certificate.pem +openssl x509 -in certificate.pem -text -noout +*/ + REQUEST DBFCDX MEMVAR server, get, post, cookie, session @@ -95,12 +102,15 @@ PROCEDURE Main() oServer := UHttpdNew() IF ! oServer:Run( {; - "FirewallFilter" => "", ; - "LogAccess" => {| m | oLogAccess:Add( m + hb_eol() ) }, ; - "LogError" => {| m | oLogError:Add( m + hb_eol() ) }, ; - "Trace" => {| ... | QOut( ... ) }, ; - "Port" => nPort, ; - "Idle" => {| o | iif( HB_FILEEXISTS( ".uhttpd.stop" ), ( FErase(".uhttpd.stop" ), o:Stop() ), NIL ) }, ; + "FirewallFilter" => "", ; + "LogAccess" => {| m | oLogAccess:Add( m + hb_eol() ) }, ; + "LogError" => {| m | oLogError:Add( m + hb_eol() ) }, ; + "Trace" => {| ... | QOut( ... ) }, ; + "Port" => nPort, ; + "Idle" => {| o | iif( HB_FILEEXISTS( ".uhttpd.stop" ), ( FErase(".uhttpd.stop" ), o:Stop() ), NIL ) }, ; + "PrivateKeyFilename" => "private.key", ; + "CertificateFilename" => "certificate.crt", ; + "SSL" => .T. , ; "Mount" => {; "/hello" => {|| UWrite( "Hello!" ) }, ; "/info" => {|| UProcInfo() }, ;