]>
Commit | Line | Data |
---|---|---|
99e1cc7b TM |
1 | /* |
2 | * Copyright 2022 The OpenSSL Project Authors. All Rights Reserved. | |
3 | * | |
4 | * Licensed under the Apache License 2.0 (the "License"). You may not use | |
5 | * this file except in compliance with the License. You can obtain a copy | |
6 | * in the file LICENSE in the source distribution or at | |
7 | * https://www.openssl.org/source/license.html | |
8 | */ | |
9 | ||
10 | #ifndef OSSL_QUIC_LOCAL_H | |
11 | # define OSSL_QUIC_LOCAL_H | |
12 | ||
13 | # include <openssl/ssl.h> | |
14 | # include "../ssl_local.h" | |
15 | ||
16 | # define OSSL_QUIC_ANY_VERSION 0xFFFFF | |
17 | ||
18 | # define IMPLEMENT_quic_meth_func(version, func_name, s_accept, \ | |
19 | s_connect, enc_data) \ | |
20 | const SSL_METHOD *func_name(void) \ | |
21 | { \ | |
22 | static const SSL_METHOD func_name##_data= { \ | |
23 | version, \ | |
24 | 0, \ | |
25 | 0, \ | |
26 | ossl_quic_new, \ | |
27 | ossl_quic_clear, \ | |
28 | ossl_quic_free, \ | |
29 | s_accept, \ | |
30 | s_connect, \ | |
31 | ossl_quic_read, \ | |
32 | ossl_quic_peek, \ | |
33 | ossl_quic_write, \ | |
34 | ossl_quic_shutdown, \ | |
35 | NULL /* renegotiate */, \ | |
e44795bd | 36 | ossl_quic_renegotiate_check, \ |
99e1cc7b TM |
37 | NULL /* read_bytes */, \ |
38 | NULL /* write_bytes */, \ | |
39 | NULL /* dispatch_alert */, \ | |
40 | ossl_quic_ctrl, \ | |
41 | ossl_quic_ctx_ctrl, \ | |
42 | NULL /* get_cipher_by_char */, \ | |
43 | NULL /* put_cipher_by_char */, \ | |
44 | ossl_quic_pending, \ | |
e44795bd TM |
45 | ossl_quic_num_ciphers, \ |
46 | ossl_quic_get_cipher, \ | |
47 | ossl_quic_default_timeout, \ | |
99e1cc7b TM |
48 | &enc_data, \ |
49 | ssl_undefined_void_function, \ | |
50 | ossl_quic_callback_ctrl, \ | |
51 | ossl_quic_ctx_callback_ctrl, \ | |
52 | }; \ | |
53 | return &func_name##_data; \ | |
54 | } | |
55 | ||
56 | __owur int ossl_quic_new(SSL *s); | |
57 | void ossl_quic_free(SSL *s); | |
58 | int ossl_quic_clear(SSL *s); | |
59 | __owur int ossl_quic_accept(SSL *s); | |
60 | __owur int ossl_quic_connect(SSL *s); | |
61 | __owur int ossl_quic_read(SSL *s, void *buf, size_t len, size_t *readbytes); | |
62 | __owur int ossl_quic_peek(SSL *s, void *buf, size_t len, size_t *readbytes); | |
63 | __owur int ossl_quic_write(SSL *s, const void *buf, size_t len, size_t *written); | |
64 | __owur int ossl_quic_shutdown(SSL *s); | |
65 | __owur long ossl_quic_ctrl(SSL *s, int cmd, long larg, void *parg); | |
66 | __owur long ossl_quic_ctx_ctrl(SSL_CTX *s, int cmd, long larg, void *parg); | |
67 | __owur long ossl_quic_callback_ctrl(SSL *s, int cmd, void (*fp) (void)); | |
68 | __owur long ossl_quic_ctx_callback_ctrl(SSL_CTX *s, int cmd, void (*fp) (void)); | |
69 | __owur size_t ossl_quic_pending(const SSL *s); | |
e44795bd TM |
70 | __owur long ossl_quic_default_timeout(void); |
71 | __owur int ossl_quic_num_ciphers(void); | |
72 | __owur const SSL_CIPHER *ossl_quic_get_cipher(unsigned int u); | |
73 | int ossl_quic_renegotiate_check(SSL *ssl, int initok); | |
99e1cc7b TM |
74 | |
75 | #endif |