8 IN: openssl.libssl.tests
10 : all-opts ( -- opts )
17 } [ execute( -- x ) ] map ;
19 : set-opt ( ctx op -- )
20 SSL_CTRL_OPTIONS swap f SSL_CTX_ctrl drop ;
22 : has-opt ( ctx op -- ? )
23 swap SSL_CTRL_OPTIONS 0 f SSL_CTX_ctrl bitand 0 > ;
26 SSLv23_client_method SSL_CTX_new ;
31 ! Test default options
32 [ { f f f f f } ] [ new-ctx all-opts [ has-opt ] with map ] unit-test
34 ! Test setting options
36 new-ctx all-opts [ [ set-opt ] [ has-opt ] 2bi ] with map [ t = ] count
40 [ { "before/connect initialization" "read header" 1 f } ] [
43 SSL_rstate_string_long
45 SSL_get_peer_certificate
46 } [ execute( x -- x ) ] with map