s/qmail 4.3.20
Next generation secure email transport
Loading...
Searching...
No Matches
ucspitls.h
Go to the documentation of this file.
1#ifndef UCSPITLS_H
2#define UCSPITLS_H
3
4#include <openssl/ssl.h>
5/* the version is like this: 0xMNNFFPPS: major minor fix patch status */
6#if OPENSSL_VERSION_NUMBER < 0x10101000L
7# error "Need OpenSSL version at least 1.1.1"
8#endif
9#include <openssl/ssl.h>
10#include <openssl/opensslv.h>
11#include <openssl/ec.h>
12#include "stralloc.h"
13
14#define SSL_NAME_LEN 256
15
16#define ssl_client() (ssl_context(TLS_client_method()))
17#define ssl_server() (ssl_context(TLS_server_method()))
18
19extern int ssl_errno;
20int ssl_io(SSL *,int,int,unsigned int);
21SSL_CTX *ssl_context(SSL_METHOD *);
22int ssl_timeoutconn(SSL *,unsigned int);
23int ssl_timeoutaccept(SSL *,unsigned int);
24SSL *ssl_new(SSL_CTX *,int);
25int ssl_certkey(SSL_CTX *,const char *,const char *,pem_password_cb *);
26int ssl_ca(SSL_CTX *,const char *,const char *,int);
27int ssl_cca(SSL_CTX *,const char *);
28int ssl_ciphers(SSL_CTX *,const char *);
29int ssl_verify(SSL *,const char *);
30int ssl_params(SSL_CTX *,const char *,int);
31int ssl_server_env(SSL *,stralloc *);
32int ssl_client_env(SSL *,stralloc *);
33char *ssl_error_str(int);
34
35#define ssl_errstr() (SSL_load_error_strings())
36#define ssl_free(ssl) (SSL_free((ssl)))
37#define ssl_close(ssl) (close(SSL_get_fd((ssl))))
38
39#define ssl_pending(ssl) (SSL_pending((ssl)))
40#define ssl_shutdown(ssl) (SSL_shutdown((ssl)))
41#define ssl_shutdown_pending(ssl) (SSL_get_shutdown((ssl)) & SSL_RECEIVED_SHUTDOWN)
42#define ssl_shutdown_sent(ssl) (SSL_get_shutdown((ssl)) & SSL_SENT_SHUTDOWN)
43
44#endif
int ssl_ciphers(SSL_CTX *, const char *)
int ssl_timeoutaccept(SSL *, unsigned int)
int ssl_errno
int ssl_client_env(SSL *, stralloc *)
int ssl_certkey(SSL_CTX *, const char *, const char *, pem_password_cb *)
int ssl_cca(SSL_CTX *, const char *)
char * ssl_error_str(int)
SSL * ssl_new(SSL_CTX *, int)
int ssl_ca(SSL_CTX *, const char *, const char *, int)
int ssl_params(SSL_CTX *, const char *, int)
int ssl_server_env(SSL *, stralloc *)
SSL_CTX * ssl_context(SSL_METHOD *)
int ssl_verify(SSL *, const char *)
int ssl_io(SSL *, int, int, unsigned int)
int ssl_timeoutconn(SSL *, unsigned int)