]> gitweb.factorcode.org Git - factor.git/blob - basis/io/sockets/secure/debug/debug.factor
eb7d55e45f49a07f4ead87341e0d2e2f39aa2ee1
[factor.git] / basis / io / sockets / secure / debug / debug.factor
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
5
6
7 GENERIC: <test-secure-config>* ( obj -- config )
8
9
10 M: TLSv1 <test-secure-config>* ( obj -- config )
11     drop <secure-config>
12         "vocab:openssl/test-1.0/server.pem" >>key-file
13         "vocab:openssl/test-1.0/dh1024.pem" >>dh-file
14         "password" >>password ;
15
16 M: object <test-secure-config>* ( obj -- config )
17     drop <secure-config>
18         "vocab:openssl/test-1.2/server.pem" >>key-file
19         "vocab:openssl/test-1.2/dh1024.pem" >>dh-file
20         "password" >>password ;
21
22 : <test-secure-config> ( -- config )
23     best-tls-method <test-secure-config>* ;
24
25 : with-test-context ( quot -- )
26     <test-secure-config>
27     swap with-secure-context ; inline