Blame doc/examples/tlsproxy/crypto-gnutls.h

Packit Service 4684c1
/*
Packit Service 4684c1
Packit Service 4684c1
The MIT License (MIT)
Packit Service 4684c1
Packit Service 4684c1
Copyright (c) 2016 Wrymouth Innovation Ltd
Packit Service 4684c1
Packit Service 4684c1
Permission is hereby granted, free of charge, to any person obtaining a
Packit Service 4684c1
copy of this software and associated documentation files (the "Software"),
Packit Service 4684c1
to deal in the Software without restriction, including without limitation
Packit Service 4684c1
the rights to use, copy, modify, merge, publish, distribute, sublicense,
Packit Service 4684c1
and/or sell copies of the Software, and to permit persons to whom the
Packit Service 4684c1
Software is furnished to do so, subject to the following conditions:
Packit Service 4684c1
Packit Service 4684c1
The above copyright notice and this permission notice shall be included
Packit Service 4684c1
in all copies or substantial portions of the Software.
Packit Service 4684c1
Packit Service 4684c1
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
Packit Service 4684c1
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
Packit Service 4684c1
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
Packit Service 4684c1
THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
Packit Service 4684c1
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
Packit Service 4684c1
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
Packit Service 4684c1
OTHER DEALINGS IN THE SOFTWARE.
Packit Service 4684c1
Packit Service 4684c1
*/
Packit Service 4684c1
Packit Service 4684c1
#ifndef __TLSPROXY_CRYPTO_GNUTLS_H
Packit Service 4684c1
#define __TLSPROXY_CRYPTO_GNUTLS_H
Packit Service 4684c1
Packit Service 4684c1
int tlssession_init (void);
Packit Service 4684c1
Packit Service 4684c1
typedef struct tlssession tlssession_t;
Packit Service 4684c1
tlssession_t *tlssession_new (int isserver,
Packit Service 4684c1
			      char *keyfile, char *certfile, char *cacertfile,
Packit Service 4684c1
			      char *hostname, int insecure, int debug,
Packit Service 4684c1
			      int (*quitfn) (void *opaque),
Packit Service 4684c1
			      int (*erroutfn) (void *opaque,
Packit Service 4684c1
					       const char *format,
Packit Service 4684c1
					       va_list ap), void *opaque);
Packit Service 4684c1
void tlssession_close (tlssession_t * s);
Packit Service 4684c1
int tlssession_mainloop (int cryptfd, int plainfd, tlssession_t * session);
Packit Service 4684c1
Packit Service 4684c1
#endif