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
6 GENERIC: <test-secure-config>* ( obj -- config )
8 M: TLSv1 <test-secure-config>*
10 "vocab:openssl/test-1.0/server.pem" >>key-file
11 "vocab:openssl/test-1.0/dh1024.pem" >>dh-file
12 "password" >>password ;
14 M: object <test-secure-config>*
16 "vocab:openssl/test-1.2/server.pem" >>key-file
17 "vocab:openssl/test-1.2/dh1024.pem" >>dh-file
18 "password" >>password ;
20 : <test-secure-config> ( -- config )
21 best-tls-method <test-secure-config>* ;
23 : with-test-context ( quot -- )
25 swap with-secure-context ; inline