diff options
Diffstat (limited to 'src/lib/libressl/ressl.h')
| -rw-r--r-- | src/lib/libressl/ressl.h | 81 |
1 files changed, 0 insertions, 81 deletions
diff --git a/src/lib/libressl/ressl.h b/src/lib/libressl/ressl.h deleted file mode 100644 index 4ca2507f5a..0000000000 --- a/src/lib/libressl/ressl.h +++ /dev/null | |||
| @@ -1,81 +0,0 @@ | |||
| 1 | /* $OpenBSD: ressl.h,v 1.21 2014/10/15 21:02:39 tedu Exp $ */ | ||
| 2 | /* | ||
| 3 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | ||
| 4 | * | ||
| 5 | * Permission to use, copy, modify, and distribute this software for any | ||
| 6 | * purpose with or without fee is hereby granted, provided that the above | ||
| 7 | * copyright notice and this permission notice appear in all copies. | ||
| 8 | * | ||
| 9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 10 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 11 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 12 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 13 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 14 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #ifndef HEADER_RESSL_H | ||
| 19 | #define HEADER_RESSL_H | ||
| 20 | |||
| 21 | #define RESSL_API 20141008 | ||
| 22 | |||
| 23 | #define RESSL_PROTOCOL_TLSv1_0 (1 << 1) | ||
| 24 | #define RESSL_PROTOCOL_TLSv1_1 (1 << 2) | ||
| 25 | #define RESSL_PROTOCOL_TLSv1_2 (1 << 3) | ||
| 26 | #define RESSL_PROTOCOL_TLSv1 \ | ||
| 27 | (RESSL_PROTOCOL_TLSv1_0|RESSL_PROTOCOL_TLSv1_1|RESSL_PROTOCOL_TLSv1_2) | ||
| 28 | #define RESSL_PROTOCOLS_DEFAULT RESSL_PROTOCOL_TLSv1 | ||
| 29 | |||
| 30 | #define RESSL_READ_AGAIN -2 | ||
| 31 | #define RESSL_WRITE_AGAIN -3 | ||
| 32 | |||
| 33 | struct ressl; | ||
| 34 | struct ressl_config; | ||
| 35 | |||
| 36 | int ressl_init(void); | ||
| 37 | |||
| 38 | const char *ressl_error(struct ressl *ctx); | ||
| 39 | |||
| 40 | struct ressl_config *ressl_config_new(void); | ||
| 41 | void ressl_config_free(struct ressl_config *config); | ||
| 42 | |||
| 43 | int ressl_config_set_ca_file(struct ressl_config *config, const char *ca_file); | ||
| 44 | int ressl_config_set_ca_path(struct ressl_config *config, const char *ca_path); | ||
| 45 | int ressl_config_set_cert_file(struct ressl_config *config, | ||
| 46 | const char *cert_file); | ||
| 47 | int ressl_config_set_cert_mem(struct ressl_config *config, const uint8_t *cert, | ||
| 48 | size_t len); | ||
| 49 | int ressl_config_set_ciphers(struct ressl_config *config, const char *ciphers); | ||
| 50 | int ressl_config_set_ecdhcurve(struct ressl_config *config, const char *name); | ||
| 51 | int ressl_config_set_key_file(struct ressl_config *config, | ||
| 52 | const char *key_file); | ||
| 53 | int ressl_config_set_key_mem(struct ressl_config *config, const uint8_t *key, | ||
| 54 | size_t len); | ||
| 55 | void ressl_config_set_protocols(struct ressl_config *config, | ||
| 56 | uint32_t protocols); | ||
| 57 | void ressl_config_set_verify_depth(struct ressl_config *config, | ||
| 58 | int verify_depth); | ||
| 59 | |||
| 60 | void ressl_config_clear_keys(struct ressl_config *config); | ||
| 61 | void ressl_config_insecure_noverifyhost(struct ressl_config *config); | ||
| 62 | void ressl_config_insecure_noverifycert(struct ressl_config *config); | ||
| 63 | void ressl_config_verify(struct ressl_config *config); | ||
| 64 | |||
| 65 | struct ressl *ressl_client(void); | ||
| 66 | struct ressl *ressl_server(void); | ||
| 67 | int ressl_configure(struct ressl *ctx, struct ressl_config *config); | ||
| 68 | void ressl_reset(struct ressl *ctx); | ||
| 69 | void ressl_free(struct ressl *ctx); | ||
| 70 | |||
| 71 | int ressl_accept(struct ressl *ctx, struct ressl **cctx); | ||
| 72 | int ressl_accept_socket(struct ressl *ctx, struct ressl **cctx, int socket); | ||
| 73 | int ressl_connect(struct ressl *ctx, const char *host, const char *port); | ||
| 74 | int ressl_connect_socket(struct ressl *ctx, int s, const char *hostname); | ||
| 75 | int ressl_listen(struct ressl *ctx, const char *host, const char *port, int af); | ||
| 76 | int ressl_read(struct ressl *ctx, void *buf, size_t buflen, size_t *outlen); | ||
| 77 | int ressl_write(struct ressl *ctx, const void *buf, size_t buflen, | ||
| 78 | size_t *outlen); | ||
| 79 | int ressl_close(struct ressl *ctx); | ||
| 80 | |||
| 81 | #endif /* HEADER_RESSL_H */ | ||
