 ! ===============================================
 ! asn1t.h
 ! ===============================================
-
 C-TYPE: ASN1_ITEM
 
 ! ===============================================

: SSL_CTX_set_session_cache_mode ( ctx mode -- n )
    [ SSL_CTRL_SET_SESS_CACHE_MODE ] dip f SSL_CTX_ctrl ;

CONSTANT: SSL_SESS_CACHE_OFF    0x0000
CONSTANT: SSL_SESS_CACHE_CLIENT 0x0001
CONSTANT: SSL_SESS_CACHE_SERVER 0x0002

CONSTANT: SSL_SESS_CACHE_BOTH flags{ SSL_SESS_CACHE_CLIENT SSL_SESS_CACHE_SERVER }

CONSTANT: SSL_SESS_CACHE_NO_AUTO_CLEAR      0x0080
CONSTANT: SSL_SESS_CACHE_NO_INTERNAL_LOOKUP 0x0100
CONSTANT: SSL_SESS_CACHE_NO_INTERNAL_STORE  0x0200

CONSTANT: SSL_SESS_CACHE_NO_INTERNAL
    flags{ SSL_SESS_CACHE_NO_INTERNAL_LOOKUP SSL_SESS_CACHE_NO_INTERNAL_STORE }

! ===============================================
! x509_vfy.h
! ===============================================

<<

SYMBOL: verify-messages

! On Windows, some of the functions making up libressl
! are placed in libcrypto-37.dll
! ===============================================
<< os windows? [
    "libssl-windows"
    [ "libcrypto-37.dll" cdecl add-library ] [ current-library set ] bi
] when >>

! ===============================================
! x509.h
! ===============================================
CONSTANT: X509_R_CERT_ALREADY_IN_HASH_TABLE 101

FUNCTION: int X509_NAME_get_text_by_NID ( X509_NAME* name, int nid, void* buf, int len )
! X509_NAME_oneline could return c-string but needs to be freed with OPENSSL_free
FUNCTION: char* X509_NAME_oneline ( X509_NAME* a, char* buf, int size )

FUNCTION: int X509_get_ext_by_NID ( X509* a, int nid, int lastpos )
FUNCTION: void* X509_get_ext_d2i ( X509 *a, int nid, int* crit, int* idx )
FUNCTION: X509_NAME* X509_get_issuer_name ( X509* a )
