Working on OpenSSL sockets
parent
8a0db8eda9
commit
c59e17d483
|
@ -0,0 +1,5 @@
|
|||
IN: io.sockets.secure.tests
|
||||
USING: io.sockets.secure tools.test ;
|
||||
|
||||
\ <ssl-config> must-infer
|
||||
{ 1 0 } [ [ ] with-ssl-context ] must-infer-as
|
|
@ -0,0 +1,24 @@
|
|||
! Copyright (C) 2008 Slava Pestov.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: accessors kernel symbols namespaces continuations ;
|
||||
IN: io.sockets.secure
|
||||
|
||||
SYMBOL: ssl-backend
|
||||
|
||||
SINGLETONS: SSLv2 SSLv23 SSLv3 TLSv1 ;
|
||||
|
||||
TUPLE: ssl-config method key-file ca-file ca-path password ;
|
||||
|
||||
: <ssl-config> ( -- config )
|
||||
ssl-config new
|
||||
SSLv23 >>method ;
|
||||
|
||||
TUPLE: ssl-context config handle ;
|
||||
|
||||
HOOK: <ssl-context> ssl-backend ( config -- context )
|
||||
|
||||
: with-ssl-context ( config quot -- )
|
||||
[
|
||||
[ <ssl-context> ] [ [ ssl-context set ] prepose ] bi*
|
||||
with-disposal
|
||||
] with-scope ; inline
|
|
@ -1,10 +0,0 @@
|
|||
|
||||
USING: help.syntax help.markup ;
|
||||
|
||||
IN: openssl
|
||||
|
||||
ARTICLE: "openssl" "OpenSSL"
|
||||
|
||||
"Factor on Windows has been tested with this version of OpenSSL: "
|
||||
|
||||
{ $url "http://www.openssl.org/related/binaries.html" } ;
|
Loading…
Reference in New Issue