Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-05 09:25:01

0001 /*
0002  * Copyright 2022-2025 The OpenSSL Project Authors. All Rights Reserved.
0003  *
0004  * Licensed under the Apache License 2.0 (the "License").  You may not use
0005  * this file except in compliance with the License.  You can obtain a copy
0006  * in the file LICENSE in the source distribution or at
0007  * https://www.openssl.org/source/license.html
0008  */
0009 
0010 #ifndef OPENSSL_QUIC_H
0011 #define OPENSSL_QUIC_H
0012 #pragma once
0013 
0014 #include <openssl/macros.h>
0015 #include <openssl/ssl.h>
0016 
0017 #ifndef OPENSSL_NO_QUIC
0018 
0019 #ifdef __cplusplus
0020 extern "C" {
0021 #endif
0022 
0023 /*
0024  * Method used for non-thread-assisted QUIC client operation.
0025  */
0026 __owur const SSL_METHOD *OSSL_QUIC_client_method(void);
0027 
0028 /*
0029  * Method used for thread-assisted QUIC client operation.
0030  */
0031 __owur const SSL_METHOD *OSSL_QUIC_client_thread_method(void);
0032 
0033 /*
0034  * QUIC transport error codes (RFC 9000 s. 20.1)
0035  */
0036 #define OSSL_QUIC_ERR_NO_ERROR 0x00
0037 #define OSSL_QUIC_ERR_INTERNAL_ERROR 0x01
0038 #define OSSL_QUIC_ERR_CONNECTION_REFUSED 0x02
0039 #define OSSL_QUIC_ERR_FLOW_CONTROL_ERROR 0x03
0040 #define OSSL_QUIC_ERR_STREAM_LIMIT_ERROR 0x04
0041 #define OSSL_QUIC_ERR_STREAM_STATE_ERROR 0x05
0042 #define OSSL_QUIC_ERR_FINAL_SIZE_ERROR 0x06
0043 #define OSSL_QUIC_ERR_FRAME_ENCODING_ERROR 0x07
0044 #define OSSL_QUIC_ERR_TRANSPORT_PARAMETER_ERROR 0x08
0045 #define OSSL_QUIC_ERR_CONNECTION_ID_LIMIT_ERROR 0x09
0046 #define OSSL_QUIC_ERR_PROTOCOL_VIOLATION 0x0A
0047 #define OSSL_QUIC_ERR_INVALID_TOKEN 0x0B
0048 #define OSSL_QUIC_ERR_APPLICATION_ERROR 0x0C
0049 #define OSSL_QUIC_ERR_CRYPTO_BUFFER_EXCEEDED 0x0D
0050 #define OSSL_QUIC_ERR_KEY_UPDATE_ERROR 0x0E
0051 #define OSSL_QUIC_ERR_AEAD_LIMIT_REACHED 0x0F
0052 #define OSSL_QUIC_ERR_NO_VIABLE_PATH 0x10
0053 
0054 /* Inclusive range for handshake-specific errors. */
0055 #define OSSL_QUIC_ERR_CRYPTO_ERR_BEGIN 0x0100
0056 #define OSSL_QUIC_ERR_CRYPTO_ERR_END 0x01FF
0057 
0058 #define OSSL_QUIC_ERR_CRYPTO_ERR(X) \
0059     (OSSL_QUIC_ERR_CRYPTO_ERR_BEGIN + (X))
0060 
0061 /* Local errors. */
0062 #define OSSL_QUIC_LOCAL_ERR_IDLE_TIMEOUT \
0063     ((uint64_t)0xFFFFFFFFFFFFFFFFULL)
0064 
0065 /*
0066  * Method used for QUIC server operation.
0067  */
0068 __owur const SSL_METHOD *OSSL_QUIC_server_method(void);
0069 
0070 #ifdef __cplusplus
0071 }
0072 #endif
0073 
0074 #endif /* OPENSSL_NO_QUIC */
0075 #endif