diff options
author | beck <> | 2017-02-07 02:08:38 +0000 |
---|---|---|
committer | beck <> | 2017-02-07 02:08:38 +0000 |
commit | 91c389f89015a024212e73f5ec6e24166955ab6e (patch) | |
tree | a4e6a6d2d23329b576b63c8698e62a87e7388b69 /src/lib/libssl/ssl_locl.h | |
parent | 8a1ec4c748b269fba0669ee71234ec9a0f128613 (diff) | |
download | openbsd-91c389f89015a024212e73f5ec6e24166955ab6e.tar.gz openbsd-91c389f89015a024212e73f5ec6e24166955ab6e.tar.bz2 openbsd-91c389f89015a024212e73f5ec6e24166955ab6e.zip |
Change SSLerror() back to taking two args, with the first one being an SSL *.
Make a table of "function codes" which maps the internal state of the SSL *
to something like a useful name so in a typical error in the connection you
know in what sort of place in the handshake things happened. (instead of
by arcane function name).
Add SSLerrorx() for when we don't have an SSL *
ok jsing@ after us both being prodded by bluhm@ to make it not terrible
Diffstat (limited to 'src/lib/libssl/ssl_locl.h')
-rw-r--r-- | src/lib/libssl/ssl_locl.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/libssl/ssl_locl.h b/src/lib/libssl/ssl_locl.h index 1ce9350ba6..a64edd2c18 100644 --- a/src/lib/libssl/ssl_locl.h +++ b/src/lib/libssl/ssl_locl.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_locl.h,v 1.172 2017/01/26 10:40:21 beck Exp $ */ | 1 | /* $OpenBSD: ssl_locl.h,v 1.173 2017/02/07 02:08:38 beck 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 | * |
@@ -1367,8 +1367,11 @@ int ssl3_cbc_digest_record(const EVP_MD_CTX *ctx, unsigned char *md_out, | |||
1367 | const unsigned char *data, size_t data_plus_mac_size, | 1367 | const unsigned char *data, size_t data_plus_mac_size, |
1368 | size_t data_plus_mac_plus_padding_size, const unsigned char *mac_secret, | 1368 | size_t data_plus_mac_plus_padding_size, const unsigned char *mac_secret, |
1369 | unsigned mac_secret_length); | 1369 | unsigned mac_secret_length); |
1370 | int SSL_state_func_code(int _state); | ||
1370 | 1371 | ||
1371 | #define SSLerror(r) ERR_PUT_error(ERR_LIB_SSL,(0xfff),(r),__FILE__,__LINE__) | 1372 | #define SSLerror(s, r) ERR_PUT_error(ERR_LIB_SSL, \ |
1373 | (SSL_state_func_code(s->internal->state)),(r),__FILE__,__LINE__) | ||
1374 | #define SSLerrorx(r) ERR_PUT_error(ERR_LIB_SSL,(0xfff),(r),__FILE__,__LINE__) | ||
1372 | 1375 | ||
1373 | __END_HIDDEN_DECLS | 1376 | __END_HIDDEN_DECLS |
1374 | 1377 | ||