diff options
Diffstat (limited to 'src/lib/libtls/tls_internal.h')
-rw-r--r-- | src/lib/libtls/tls_internal.h | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/src/lib/libtls/tls_internal.h b/src/lib/libtls/tls_internal.h index c272038055..df35db37f2 100644 --- a/src/lib/libtls/tls_internal.h +++ b/src/lib/libtls/tls_internal.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls_internal.h,v 1.43 2016/09/04 12:26:43 bcook Exp $ */ | 1 | /* $OpenBSD: tls_internal.h,v 1.44 2016/11/02 15:18:42 beck Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2014 Jeremie Courreges-Anglas <jca@openbsd.org> | 3 | * Copyright (c) 2014 Jeremie Courreges-Anglas <jca@openbsd.org> |
4 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> | 4 | * Copyright (c) 2014 Joel Sing <jsing@openbsd.org> |
@@ -92,6 +92,31 @@ struct tls_conninfo { | |||
92 | #define TLS_EOF_NO_CLOSE_NOTIFY (1 << 0) | 92 | #define TLS_EOF_NO_CLOSE_NOTIFY (1 << 0) |
93 | #define TLS_HANDSHAKE_COMPLETE (1 << 1) | 93 | #define TLS_HANDSHAKE_COMPLETE (1 << 1) |
94 | 94 | ||
95 | struct tls_ocsp_result { | ||
96 | const char *result_msg; | ||
97 | int response_status; | ||
98 | int cert_status; | ||
99 | int crl_reason; | ||
100 | time_t this_update; | ||
101 | time_t next_update; | ||
102 | time_t revocation_time; | ||
103 | }; | ||
104 | |||
105 | struct tls_ocsp_ctx { | ||
106 | /* responder location */ | ||
107 | char *ocsp_url; | ||
108 | |||
109 | /* request blob */ | ||
110 | uint8_t *request_data; | ||
111 | size_t request_size; | ||
112 | |||
113 | /* cert data, this struct does not own these */ | ||
114 | X509 *main_cert; | ||
115 | STACK_OF(X509) *extra_certs; | ||
116 | |||
117 | struct tls_ocsp_result *ocsp_result; | ||
118 | }; | ||
119 | |||
95 | struct tls_sni_ctx { | 120 | struct tls_sni_ctx { |
96 | struct tls_sni_ctx *next; | 121 | struct tls_sni_ctx *next; |
97 | 122 | ||
@@ -118,6 +143,8 @@ struct tls { | |||
118 | 143 | ||
119 | struct tls_conninfo *conninfo; | 144 | struct tls_conninfo *conninfo; |
120 | 145 | ||
146 | struct tls_ocsp_ctx *ocsp_ctx; | ||
147 | |||
121 | tls_read_cb read_cb; | 148 | tls_read_cb read_cb; |
122 | tls_write_cb write_cb; | 149 | tls_write_cb write_cb; |
123 | void *cb_arg; | 150 | void *cb_arg; |
@@ -172,6 +199,10 @@ int tls_ssl_error(struct tls *ctx, SSL *ssl_conn, int ssl_ret, | |||
172 | int tls_conninfo_populate(struct tls *ctx); | 199 | int tls_conninfo_populate(struct tls *ctx); |
173 | void tls_conninfo_free(struct tls_conninfo *conninfo); | 200 | void tls_conninfo_free(struct tls_conninfo *conninfo); |
174 | 201 | ||
202 | int tls_ocsp_verify_cb(SSL *ssl, void *arg); | ||
203 | void tls_ocsp_ctx_free(struct tls_ocsp_ctx *ctx); | ||
204 | struct tls_ocsp_ctx *tls_ocsp_setup_from_peer(struct tls *ctx); | ||
205 | |||
175 | int asn1_time_parse(const char *, size_t, struct tm *, int); | 206 | int asn1_time_parse(const char *, size_t, struct tm *, int); |
176 | 207 | ||
177 | #endif /* HEADER_TLS_INTERNAL_H */ | 208 | #endif /* HEADER_TLS_INTERNAL_H */ |