summaryrefslogtreecommitdiff
path: root/src/ssl_new.c
diff options
context:
space:
mode:
authorJannis Hoffmann <jannis@fehcom.de>2024-07-14 21:28:19 +0200
committerJannis Hoffmann <jannis@fehcom.de>2024-07-14 21:28:19 +0200
commit1087d4df2a7342d2832ba3bab1843bf4a3040775 (patch)
tree96cd6ea198cc542f29c0660d5e5f7083af84d711 /src/ssl_new.c
add version 0.12.10HEADmaster
Diffstat (limited to 'src/ssl_new.c')
-rw-r--r--src/ssl_new.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/ssl_new.c b/src/ssl_new.c
new file mode 100644
index 0000000..4833778
--- /dev/null
+++ b/src/ssl_new.c
@@ -0,0 +1,16 @@
+#include "ucspissl.h"
+#include "ndelay.h"
+
+SSL *ssl_new(SSL_CTX *ctx,int s)
+{
+ BIO *sbio;
+ SSL *ssl;
+
+ ssl = SSL_new(ctx);
+ if (!ssl) return 0;
+ sbio = BIO_new_socket(s,BIO_NOCLOSE);
+ if (!sbio) return 0;
+ SSL_set_bio(ssl,sbio,sbio);
+ return ssl;
+}
+