summaryrefslogtreecommitdiff
path: root/src/include/ucspitls.h
diff options
context:
space:
mode:
authorJannis Hoffmann <jannis@fehcom.de>2024-07-03 15:52:39 +0200
committerJannis Hoffmann <jannis@fehcom.de>2024-07-03 15:52:39 +0200
commita6a7d6ce079cabdaf2fa502b2e2cf15e5428ac6f (patch)
treeb88cc7a8457658d67e0321718556ac807f6bccf3 /src/include/ucspitls.h
parent00be7622c428f279872f84569f098ce16150f8a8 (diff)
format files
Diffstat (limited to 'src/include/ucspitls.h')
-rw-r--r--src/include/ucspitls.h49
1 files changed, 25 insertions, 24 deletions
diff --git a/src/include/ucspitls.h b/src/include/ucspitls.h
index 40f8a81..f0505c7 100644
--- a/src/include/ucspitls.h
+++ b/src/include/ucspitls.h
@@ -1,45 +1,46 @@
#ifndef UCSPITLS_H
#define UCSPITLS_H
-#include <openssl/ssl.h>
-#include <openssl/opensslv.h>
#include <openssl/ec.h>
+#include <openssl/opensslv.h>
+#include <openssl/ssl.h>
+
#include "stralloc.h"
-#define SSL_NAME_LEN 256
+#define SSL_NAME_LEN 256
#define OPENSSL_VERSION_NUMBER 0x101010100L
#if (OPENSSL_VERSION_NUMBER < 0x10100000L)
-#define ssl_client() (ssl_context(SSLv23_client_method()))
-#define ssl_server() (ssl_context(SSLv23_server_method()))
+ #define ssl_client() (ssl_context(SSLv23_client_method()))
+ #define ssl_server() (ssl_context(SSLv23_server_method()))
#else
-#define ssl_client() (ssl_context(TLS_client_method()))
-#define ssl_server() (ssl_context(TLS_server_method()))
+ #define ssl_client() (ssl_context(TLS_client_method()))
+ #define ssl_server() (ssl_context(TLS_server_method()))
#endif
extern int ssl_errno;
-int ssl_io(SSL *,int,int,unsigned int);
+int ssl_io(SSL *, int, int, unsigned int);
SSL_CTX *ssl_context(SSL_METHOD *);
-int ssl_timeoutconn(SSL *,unsigned int);
-int ssl_timeoutaccept(SSL *,unsigned int);
-SSL *ssl_new(SSL_CTX *,int);
-int ssl_certkey(SSL_CTX *,const char *,const char *,pem_password_cb *);
-int ssl_ca(SSL_CTX *,const char *,const char *,int);
-int ssl_cca(SSL_CTX *,const char *);
-int ssl_ciphers(SSL_CTX *,const char *);
-int ssl_verify(SSL *,const char *);
-int ssl_params(SSL_CTX *,const char *,int);
-int ssl_server_env(SSL *,stralloc *);
-int ssl_client_env(SSL *,stralloc *);
+int ssl_timeoutconn(SSL *, unsigned int);
+int ssl_timeoutaccept(SSL *, unsigned int);
+SSL *ssl_new(SSL_CTX *, int);
+int ssl_certkey(SSL_CTX *, const char *, const char *, pem_password_cb *);
+int ssl_ca(SSL_CTX *, const char *, const char *, int);
+int ssl_cca(SSL_CTX *, const char *);
+int ssl_ciphers(SSL_CTX *, const char *);
+int ssl_verify(SSL *, const char *);
+int ssl_params(SSL_CTX *, const char *, int);
+int ssl_server_env(SSL *, stralloc *);
+int ssl_client_env(SSL *, stralloc *);
char *ssl_error_str(int);
-#define ssl_errstr() (SSL_load_error_strings())
-#define ssl_free(ssl) (SSL_free((ssl)))
+#define ssl_errstr() (SSL_load_error_strings())
+#define ssl_free(ssl) (SSL_free((ssl)))
#define ssl_close(ssl) (close(SSL_get_fd((ssl))))
-#define ssl_pending(ssl) (SSL_pending((ssl)))
-#define ssl_shutdown(ssl) (SSL_shutdown((ssl)))
+#define ssl_pending(ssl) (SSL_pending((ssl)))
+#define ssl_shutdown(ssl) (SSL_shutdown((ssl)))
#define ssl_shutdown_pending(ssl) (SSL_get_shutdown((ssl)) & SSL_RECEIVED_SHUTDOWN)
-#define ssl_shutdown_sent(ssl) (SSL_get_shutdown((ssl)) & SSL_SENT_SHUTDOWN)
+#define ssl_shutdown_sent(ssl) (SSL_get_shutdown((ssl)) & SSL_SENT_SHUTDOWN)
#endif