! Copyright (C) 2008, 2009 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. USING: accessors io.sockets.secure kernel ; IN: io.sockets.secure.debug GENERIC: * ( obj -- config ) M: TLSv1 * ( obj -- config ) drop "vocab:openssl/test-1.0/server.pem" >>key-file "vocab:openssl/test-1.0/dh1024.pem" >>dh-file "password" >>password ; M: object * ( obj -- config ) drop "vocab:openssl/test-1.2/server.pem" >>key-file "vocab:openssl/test-1.2/dh1024.pem" >>dh-file "password" >>password ; : ( -- config ) best-tls-method * ; : with-test-context ( quot -- ) swap with-secure-context ; inline