diff options
author | jsing <> | 2022-08-21 19:18:57 +0000 |
---|---|---|
committer | jsing <> | 2022-08-21 19:18:57 +0000 |
commit | 14c1d07ebeba51e7c5d52a7a218214dcd39548d4 (patch) | |
tree | 5540079df24aefeb01b22cc8bd9aa7a7c6cb4021 /src | |
parent | 241884636e350bc9aa3c9962e626ddcc8e4a566e (diff) | |
download | openbsd-14c1d07ebeba51e7c5d52a7a218214dcd39548d4.tar.gz openbsd-14c1d07ebeba51e7c5d52a7a218214dcd39548d4.tar.bz2 openbsd-14c1d07ebeba51e7c5d52a7a218214dcd39548d4.zip |
Provide and use QUIC specific error reasons.
ok tb@
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libssl/ssl.h | 4 | ||||
-rw-r--r-- | src/lib/libssl/ssl_err.c | 4 | ||||
-rw-r--r-- | src/lib/libssl/tls13_quic.c | 6 |
3 files changed, 9 insertions, 5 deletions
diff --git a/src/lib/libssl/ssl.h b/src/lib/libssl/ssl.h index 7ce873de3f..359b554ecc 100644 --- a/src/lib/libssl/ssl.h +++ b/src/lib/libssl/ssl.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl.h,v 1.224 2022/08/21 17:54:38 jsing Exp $ */ | 1 | /* $OpenBSD: ssl.h,v 1.225 2022/08/21 19:18:57 jsing Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -2164,6 +2164,8 @@ void ERR_load_SSL_strings(void); | |||
2164 | #define SSL_R_X509_LIB 268 | 2164 | #define SSL_R_X509_LIB 268 |
2165 | #define SSL_R_X509_VERIFICATION_SETUP_PROBLEMS 269 | 2165 | #define SSL_R_X509_VERIFICATION_SETUP_PROBLEMS 269 |
2166 | #define SSL_R_PEER_BEHAVING_BADLY 666 | 2166 | #define SSL_R_PEER_BEHAVING_BADLY 666 |
2167 | #define SSL_R_QUIC_INTERNAL_ERROR 667 | ||
2168 | #define SSL_R_WRONG_ENCRYPTION_LEVEL_RECEIVED 668 | ||
2167 | #define SSL_R_UNKNOWN 999 | 2169 | #define SSL_R_UNKNOWN 999 |
2168 | 2170 | ||
2169 | /* | 2171 | /* |
diff --git a/src/lib/libssl/ssl_err.c b/src/lib/libssl/ssl_err.c index 6078378568..31925026d4 100644 --- a/src/lib/libssl/ssl_err.c +++ b/src/lib/libssl/ssl_err.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_err.c,v 1.43 2022/07/12 14:42:48 kn Exp $ */ | 1 | /* $OpenBSD: ssl_err.c,v 1.44 2022/08/21 19:18:57 jsing Exp $ */ |
2 | /* ==================================================================== | 2 | /* ==================================================================== |
3 | * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1999-2011 The OpenSSL Project. All rights reserved. |
4 | * | 4 | * |
@@ -341,6 +341,7 @@ static ERR_STRING_DATA SSL_str_reasons[]= { | |||
341 | {ERR_REASON(SSL_R_PUBLIC_KEY_ENCRYPT_ERROR), "public key encrypt error"}, | 341 | {ERR_REASON(SSL_R_PUBLIC_KEY_ENCRYPT_ERROR), "public key encrypt error"}, |
342 | {ERR_REASON(SSL_R_PUBLIC_KEY_IS_NOT_RSA) , "public key is not rsa"}, | 342 | {ERR_REASON(SSL_R_PUBLIC_KEY_IS_NOT_RSA) , "public key is not rsa"}, |
343 | {ERR_REASON(SSL_R_PUBLIC_KEY_NOT_RSA) , "public key not rsa"}, | 343 | {ERR_REASON(SSL_R_PUBLIC_KEY_NOT_RSA) , "public key not rsa"}, |
344 | {ERR_REASON(SSL_R_QUIC_INTERNAL_ERROR) , "QUIC: internal error"}, | ||
344 | {ERR_REASON(SSL_R_READ_BIO_NOT_SET) , "read bio not set"}, | 345 | {ERR_REASON(SSL_R_READ_BIO_NOT_SET) , "read bio not set"}, |
345 | {ERR_REASON(SSL_R_READ_TIMEOUT_EXPIRED) , "read timeout expired"}, | 346 | {ERR_REASON(SSL_R_READ_TIMEOUT_EXPIRED) , "read timeout expired"}, |
346 | {ERR_REASON(SSL_R_READ_WRONG_PACKET_TYPE), "read wrong packet type"}, | 347 | {ERR_REASON(SSL_R_READ_WRONG_PACKET_TYPE), "read wrong packet type"}, |
@@ -456,6 +457,7 @@ static ERR_STRING_DATA SSL_str_reasons[]= { | |||
456 | {ERR_REASON(SSL_R_WRITE_BIO_NOT_SET) , "write bio not set"}, | 457 | {ERR_REASON(SSL_R_WRITE_BIO_NOT_SET) , "write bio not set"}, |
457 | {ERR_REASON(SSL_R_WRONG_CIPHER_RETURNED) , "wrong cipher returned"}, | 458 | {ERR_REASON(SSL_R_WRONG_CIPHER_RETURNED) , "wrong cipher returned"}, |
458 | {ERR_REASON(SSL_R_WRONG_CURVE) , "wrong curve"}, | 459 | {ERR_REASON(SSL_R_WRONG_CURVE) , "wrong curve"}, |
460 | {ERR_REASON(SSL_R_WRONG_ENCRYPTION_LEVEL_RECEIVED), "QUIC: wrong encryption level received"}, | ||
459 | {ERR_REASON(SSL_R_WRONG_MESSAGE_TYPE) , "wrong message type"}, | 461 | {ERR_REASON(SSL_R_WRONG_MESSAGE_TYPE) , "wrong message type"}, |
460 | {ERR_REASON(SSL_R_WRONG_NUMBER_OF_KEY_BITS), "wrong number of key bits"}, | 462 | {ERR_REASON(SSL_R_WRONG_NUMBER_OF_KEY_BITS), "wrong number of key bits"}, |
461 | {ERR_REASON(SSL_R_WRONG_SIGNATURE_LENGTH), "wrong signature length"}, | 463 | {ERR_REASON(SSL_R_WRONG_SIGNATURE_LENGTH), "wrong signature length"}, |
diff --git a/src/lib/libssl/tls13_quic.c b/src/lib/libssl/tls13_quic.c index 52e09f03eb..f58a0b8b28 100644 --- a/src/lib/libssl/tls13_quic.c +++ b/src/lib/libssl/tls13_quic.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: tls13_quic.c,v 1.2 2022/07/24 14:31:37 jsing Exp $ */ | 1 | /* $OpenBSD: tls13_quic.c,v 1.3 2022/08/21 19:18:57 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 2022 Joel Sing <jsing@openbsd.org> | 3 | * Copyright (c) 2022 Joel Sing <jsing@openbsd.org> |
4 | * | 4 | * |
@@ -25,7 +25,7 @@ tls13_quic_wire_read_cb(void *buf, size_t n, void *arg) | |||
25 | struct tls13_ctx *ctx = arg; | 25 | struct tls13_ctx *ctx = arg; |
26 | SSL *ssl = ctx->ssl; | 26 | SSL *ssl = ctx->ssl; |
27 | 27 | ||
28 | SSLerror(ssl, ERR_R_INTERNAL_ERROR); | 28 | SSLerror(ssl, SSL_R_QUIC_INTERNAL_ERROR); |
29 | return TLS13_IO_FAILURE; | 29 | return TLS13_IO_FAILURE; |
30 | } | 30 | } |
31 | 31 | ||
@@ -35,7 +35,7 @@ tls13_quic_wire_write_cb(const void *buf, size_t n, void *arg) | |||
35 | struct tls13_ctx *ctx = arg; | 35 | struct tls13_ctx *ctx = arg; |
36 | SSL *ssl = ctx->ssl; | 36 | SSL *ssl = ctx->ssl; |
37 | 37 | ||
38 | SSLerror(ssl, ERR_R_INTERNAL_ERROR); | 38 | SSLerror(ssl, SSL_R_QUIC_INTERNAL_ERROR); |
39 | return TLS13_IO_FAILURE; | 39 | return TLS13_IO_FAILURE; |
40 | } | 40 | } |
41 | 41 | ||