PLUGIN ssl description: %{ Prior to install this plugin, the OpenSSL library shall be installed in developer mode. Under Debian, this can be done by the command: .nf apt install libssl-dev .fi %} includes: %{ #include %} DEFINE TYPE ssl.context %{ ~type_context() { SSL_CTX_free(_context); } SSL_CTX *_context; %} delete default: %{} INSTRUCTION ssl.new [ 'SSL_2' 'SSL_23' 'SSL_3' 'TLS_1' 'TLS_11' 'TLS_12' 'TLS_13' ] : method -> ssl.context %{ SSL_CTX_new //SSL_CTX_set_min_proto_version %} INSTRUCTION ssl.cipher MUTABLE ssl.context STR : cipher_list %{ SSL_CTX_set_cipher_list(,cipher_list.c_str()) %} INSTRUCTION ssl.certificate MUTABLE ssl.context STR : certificate %{ SSL_CTX_use_certificate_chain_file() %} INSTRUCTION ssl.options MUTABLE ssl.context ( [ '' '' '' ] = BLN ) + %{ %} STRUCT ssl.tcp %{ ~struct_tcp() { SSL_free(_ssl); } SSL *_ssl; %} delete default: %{} FUNCTION ssl.device_tcp_open [ < > ] STR : ip STR : port ssl.context -> $ssl.tcp %{ %} FUNCTION ssl.device_tcp_close $ssl.tcp -> BLN %{ %} FUNCTION ssl.device_tcp_print $ssl.tcp -> STR %{ %} FUNCTION ssl.device_tcp_read $ssl.tcp -> STR ? %{ %} FUNCTION ssl.device_tcp_write $ssl.tcp STR %{ %} FUNCTION ssl.device_tcp_idle $ssl.tcp MUTABLE INT 3 %{ %} FUNCTION ssl.device_tcp_command $ssl.tcp .* -> VALUE ? %{ %}