1 ! Copyright (C) 2008, 2009 Slava Pestov.
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: accessors io.sockets.secure kernel ;
4 IN: io.sockets.secure.debug
7 GENERIC: <test-secure-config>* ( obj -- config )
10 M: TLSv1 <test-secure-config>* ( obj -- config )
12 "vocab:openssl/test-1.0/server.pem" >>key-file
13 "vocab:openssl/test-1.0/dh1024.pem" >>dh-file
14 "password" >>password ;
16 M: object <test-secure-config>* ( obj -- config )
18 "vocab:openssl/test-1.2/server.pem" >>key-file
19 "vocab:openssl/test-1.2/dh1024.pem" >>dh-file
20 "password" >>password ;
22 : <test-secure-config> ( -- config )
23 best-tls-method <test-secure-config>* ;
25 : with-test-context ( quot -- )
27 swap with-secure-context ; inline