From 649cca9994cb2786d18d9941f27cb412c9984e8c Mon Sep 17 00:00:00 2001 From: Jeffrey Armstrong Date: Sun, 31 May 2020 10:53:18 -0400 Subject: Fixed SSL initialization --- jessl.f90 | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/jessl.f90 b/jessl.f90 index 5c1a174..223fd14 100644 --- a/jessl.f90 +++ b/jessl.f90 @@ -35,8 +35,12 @@ implicit none interface - subroutine library_init() bind(c, name="OPENSSL_init_ssl") - end subroutine library_init + function init_ssl_c(flags, settings) bind(c, name="OPENSSL_init_ssl") + use iso_c_binding + integer(kind=c_int64_t), value::flags + type(c_ptr), value::settings + integer(kind=c_int)::init_ssl_c + end function init_ssl_c subroutine add_ssl_algorithms() bind(c, name="SSLeay_add_ssl_algorithms") end subroutine add_ssl_algorithms @@ -354,5 +358,17 @@ contains deallocate(cfilename) end function ctx_use_private_key_file + + subroutine library_init() + use iso_c_binding + implicit none + + integer(kind=c_int64_t)::flags + integer::res + + flags = 0 + res = init_ssl_c(flags, c_null_ptr) + + end subroutine library_init end module jessl -- cgit v1.2.3