]>
git.ipfire.org Git - thirdparty/openssl.git/blob - ssl/quic/quic_local.h
2 * Copyright 2022 The OpenSSL Project Authors. All Rights Reserved.
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
10 #ifndef OSSL_QUIC_LOCAL_H
11 # define OSSL_QUIC_LOCAL_H
13 # include <openssl/ssl.h>
14 # include "../ssl_local.h"
16 # define OSSL_QUIC_ANY_VERSION 0xFFFFF
18 # define IMPLEMENT_quic_meth_func(version, func_name, q_accept, \
19 q_connect, enc_data) \
20 const SSL_METHOD *func_name(void) \
22 static const SSL_METHOD func_name##_data= { \
35 NULL /* renegotiate */, \
36 ossl_quic_renegotiate_check, \
37 NULL /* read_bytes */, \
38 NULL /* write_bytes */, \
39 NULL /* dispatch_alert */, \
42 NULL /* get_cipher_by_char */, \
43 NULL /* put_cipher_by_char */, \
45 ossl_quic_num_ciphers, \
46 ossl_quic_get_cipher, \
47 ossl_quic_default_timeout, \
49 ssl_undefined_void_function, \
50 ossl_quic_callback_ctrl, \
51 ossl_quic_ctx_callback_ctrl, \
53 return &func_name##_data; \
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
);
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
);