chiark / gitweb /
Commit 2.4.5-5 as unpacked
[innduct.git] / nnrpd / tls.h
1 /* tls.h --- TLSv1 functions
2    Copyright (C) 2000 Kenichi Okada <okada@opaopa.org>
3
4    Author: Kenichi Okada <okada@opaopa.org>
5    Created: 2000-02-22
6
7    Keywords: TLS, OpenSSL
8
9    Commentary:
10
11    [RFC 2246] "The TLS Protocol Version 1.0"
12         by Christopher Allen <callen@certicom.com> and
13         Tim Dierks <tdierks@certicom.com> (1999/01)
14
15    [RFC 2595] "Using TLS with IMAP, POP3 and ACAP"
16         by Chris Newman <chris.newman@innosoft.com> (1999/06)
17
18 */
19
20 #ifdef HAVE_SSL
21
22 #ifndef TLS_H
23 #define TLS_H
24
25 #include <openssl/lhash.h>
26 #include <openssl/bn.h>
27 #include <openssl/err.h>
28 #include <openssl/pem.h>
29 #include <openssl/rand.h>
30 #include <openssl/x509.h>
31 #include <openssl/ssl.h>
32
33 /* init tls engine */
34 int tls_init_serverengine(int verifydepth, /* depth to verify */
35                           int askcert,     /* 1 = verify client */
36                           int requirecert, /* 1 = another client verify? */
37                           char *tls_CAfile,
38                           char *tls_CApath,
39                           char *tls_cert_file,
40                           char *tls_key_file);
41
42 /* init tls */
43 void tls_init(void);
44
45 /* start tls negotiation */
46 int tls_start_servertls(int readfd, int writefd);
47
48 ssize_t SSL_writev (SSL *ssl, const struct iovec *vector, int count);
49
50 #endif /* CYRUSTLS_H */
51
52 #endif /* HAVE_SSL */