diff options
author | beck <> | 2017-05-07 04:22:24 +0000 |
---|---|---|
committer | beck <> | 2017-05-07 04:22:24 +0000 |
commit | 3b455600d14ddcf2be0dcd2d4765d1b7854cd1c5 (patch) | |
tree | 9f980ffff8490ca0af628971a6d8ceb4a23d3b99 /src/lib/libssl/ssl_locl.h | |
parent | 2145114fc4f04a6a75134ef92bc551a976292150 (diff) | |
download | openbsd-3b455600d14ddcf2be0dcd2d4765d1b7854cd1c5.tar.gz openbsd-3b455600d14ddcf2be0dcd2d4765d1b7854cd1c5.tar.bz2 openbsd-3b455600d14ddcf2be0dcd2d4765d1b7854cd1c5.zip |
Move state from ssl->internal to the handshake structure.
while we are at it, convert SSLerror to use a function
internally, so that we may later allocate the handshake
structure and check for it
ok jsing@
Diffstat (limited to 'src/lib/libssl/ssl_locl.h')
-rw-r--r-- | src/lib/libssl/ssl_locl.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/libssl/ssl_locl.h b/src/lib/libssl/ssl_locl.h index 410fc04688..8f1721ce5a 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.180 2017/05/06 22:24:58 beck Exp $ */ | 1 | /* $OpenBSD: ssl_locl.h,v 1.181 2017/05/07 04:22:24 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 | * |
@@ -432,6 +432,9 @@ typedef struct ssl_session_internal_st { | |||
432 | #define SSI(s) (s->session->internal) | 432 | #define SSI(s) (s->session->internal) |
433 | 433 | ||
434 | typedef struct ssl_handshake_st { | 434 | typedef struct ssl_handshake_st { |
435 | /* state contains one of the SSL3_ST_* values. */ | ||
436 | int state; | ||
437 | |||
435 | /* used when SSL_ST_FLUSH_DATA is entered */ | 438 | /* used when SSL_ST_FLUSH_DATA is entered */ |
436 | int next_state; | 439 | int next_state; |
437 | 440 | ||
@@ -776,7 +779,6 @@ typedef struct ssl_internal_st { | |||
776 | * 2 if we are a server and are inside a handshake | 779 | * 2 if we are a server and are inside a handshake |
777 | * (i.e. not just sending a HelloRequest) */ | 780 | * (i.e. not just sending a HelloRequest) */ |
778 | 781 | ||
779 | int state; /* where we are */ | ||
780 | int rstate; /* where we are when reading */ | 782 | int rstate; /* where we are when reading */ |
781 | 783 | ||
782 | int mac_packet; | 784 | int mac_packet; |
@@ -1379,9 +1381,9 @@ int ssl3_cbc_digest_record(const EVP_MD_CTX *ctx, unsigned char *md_out, | |||
1379 | unsigned mac_secret_length); | 1381 | unsigned mac_secret_length); |
1380 | int SSL_state_func_code(int _state); | 1382 | int SSL_state_func_code(int _state); |
1381 | 1383 | ||
1382 | #define SSLerror(s, r) ERR_PUT_error(ERR_LIB_SSL, \ | 1384 | #define SSLerror(s, r) SSL_error_internal(s, r, __FILE__, __LINE__) |
1383 | (SSL_state_func_code(s->internal->state)),(r),__FILE__,__LINE__) | ||
1384 | #define SSLerrorx(r) ERR_PUT_error(ERR_LIB_SSL,(0xfff),(r),__FILE__,__LINE__) | 1385 | #define SSLerrorx(r) ERR_PUT_error(ERR_LIB_SSL,(0xfff),(r),__FILE__,__LINE__) |
1386 | void SSL_error_internal(const SSL *s, int r, char *f, int l); | ||
1385 | 1387 | ||
1386 | __END_HIDDEN_DECLS | 1388 | __END_HIDDEN_DECLS |
1387 | 1389 | ||