diff options
author | jsing <> | 2015-09-09 19:42:39 +0000 |
---|---|---|
committer | jsing <> | 2015-09-09 19:42:39 +0000 |
commit | 5a0fee68a31acf1157290844d560687560e65007 (patch) | |
tree | ab631feb9b0e3c1688a199abe5761cc556a2bcfc /src | |
parent | 869b2e79c9ff30e6144dddc6562522a90c73bb14 (diff) | |
download | openbsd-5a0fee68a31acf1157290844d560687560e65007.tar.gz openbsd-5a0fee68a31acf1157290844d560687560e65007.tar.bz2 openbsd-5a0fee68a31acf1157290844d560687560e65007.zip |
Check handshake_func against NULL rather than 0, since it is a function
pointer.
ok bcook@ miod@
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/libssl/src/ssl/ssl_lib.c | 14 | ||||
-rw-r--r-- | src/lib/libssl/ssl_lib.c | 14 |
2 files changed, 14 insertions, 14 deletions
diff --git a/src/lib/libssl/src/ssl/ssl_lib.c b/src/lib/libssl/src/ssl/ssl_lib.c index a93c16de65..8df885e9f7 100644 --- a/src/lib/libssl/src/ssl/ssl_lib.c +++ b/src/lib/libssl/src/ssl/ssl_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_lib.c,v 1.106 2015/08/27 06:21:15 doug Exp $ */ | 1 | /* $OpenBSD: ssl_lib.c,v 1.107 2015/09/09 19:42:39 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 | * |
@@ -927,7 +927,7 @@ SSL_check_private_key(const SSL *ssl) | |||
927 | int | 927 | int |
928 | SSL_accept(SSL *s) | 928 | SSL_accept(SSL *s) |
929 | { | 929 | { |
930 | if (s->handshake_func == 0) | 930 | if (s->handshake_func == NULL) |
931 | SSL_set_accept_state(s); /* Not properly initialized yet */ | 931 | SSL_set_accept_state(s); /* Not properly initialized yet */ |
932 | 932 | ||
933 | return (s->method->ssl_accept(s)); | 933 | return (s->method->ssl_accept(s)); |
@@ -936,7 +936,7 @@ SSL_accept(SSL *s) | |||
936 | int | 936 | int |
937 | SSL_connect(SSL *s) | 937 | SSL_connect(SSL *s) |
938 | { | 938 | { |
939 | if (s->handshake_func == 0) | 939 | if (s->handshake_func == NULL) |
940 | SSL_set_connect_state(s); /* Not properly initialized yet */ | 940 | SSL_set_connect_state(s); /* Not properly initialized yet */ |
941 | 941 | ||
942 | return (s->method->ssl_connect(s)); | 942 | return (s->method->ssl_connect(s)); |
@@ -951,7 +951,7 @@ SSL_get_default_timeout(const SSL *s) | |||
951 | int | 951 | int |
952 | SSL_read(SSL *s, void *buf, int num) | 952 | SSL_read(SSL *s, void *buf, int num) |
953 | { | 953 | { |
954 | if (s->handshake_func == 0) { | 954 | if (s->handshake_func == NULL) { |
955 | SSLerr(SSL_F_SSL_READ, | 955 | SSLerr(SSL_F_SSL_READ, |
956 | SSL_R_UNINITIALIZED); | 956 | SSL_R_UNINITIALIZED); |
957 | return (-1); | 957 | return (-1); |
@@ -967,7 +967,7 @@ SSL_read(SSL *s, void *buf, int num) | |||
967 | int | 967 | int |
968 | SSL_peek(SSL *s, void *buf, int num) | 968 | SSL_peek(SSL *s, void *buf, int num) |
969 | { | 969 | { |
970 | if (s->handshake_func == 0) { | 970 | if (s->handshake_func == NULL) { |
971 | SSLerr(SSL_F_SSL_PEEK, | 971 | SSLerr(SSL_F_SSL_PEEK, |
972 | SSL_R_UNINITIALIZED); | 972 | SSL_R_UNINITIALIZED); |
973 | return (-1); | 973 | return (-1); |
@@ -982,7 +982,7 @@ SSL_peek(SSL *s, void *buf, int num) | |||
982 | int | 982 | int |
983 | SSL_write(SSL *s, const void *buf, int num) | 983 | SSL_write(SSL *s, const void *buf, int num) |
984 | { | 984 | { |
985 | if (s->handshake_func == 0) { | 985 | if (s->handshake_func == NULL) { |
986 | SSLerr(SSL_F_SSL_WRITE, | 986 | SSLerr(SSL_F_SSL_WRITE, |
987 | SSL_R_UNINITIALIZED); | 987 | SSL_R_UNINITIALIZED); |
988 | return (-1); | 988 | return (-1); |
@@ -1007,7 +1007,7 @@ SSL_shutdown(SSL *s) | |||
1007 | * even if blocking I/O is used (see ssl3_shutdown). | 1007 | * even if blocking I/O is used (see ssl3_shutdown). |
1008 | */ | 1008 | */ |
1009 | 1009 | ||
1010 | if (s->handshake_func == 0) { | 1010 | if (s->handshake_func == NULL) { |
1011 | SSLerr(SSL_F_SSL_SHUTDOWN, | 1011 | SSLerr(SSL_F_SSL_SHUTDOWN, |
1012 | SSL_R_UNINITIALIZED); | 1012 | SSL_R_UNINITIALIZED); |
1013 | return (-1); | 1013 | return (-1); |
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index a93c16de65..8df885e9f7 100644 --- a/src/lib/libssl/ssl_lib.c +++ b/src/lib/libssl/ssl_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: ssl_lib.c,v 1.106 2015/08/27 06:21:15 doug Exp $ */ | 1 | /* $OpenBSD: ssl_lib.c,v 1.107 2015/09/09 19:42:39 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 | * |
@@ -927,7 +927,7 @@ SSL_check_private_key(const SSL *ssl) | |||
927 | int | 927 | int |
928 | SSL_accept(SSL *s) | 928 | SSL_accept(SSL *s) |
929 | { | 929 | { |
930 | if (s->handshake_func == 0) | 930 | if (s->handshake_func == NULL) |
931 | SSL_set_accept_state(s); /* Not properly initialized yet */ | 931 | SSL_set_accept_state(s); /* Not properly initialized yet */ |
932 | 932 | ||
933 | return (s->method->ssl_accept(s)); | 933 | return (s->method->ssl_accept(s)); |
@@ -936,7 +936,7 @@ SSL_accept(SSL *s) | |||
936 | int | 936 | int |
937 | SSL_connect(SSL *s) | 937 | SSL_connect(SSL *s) |
938 | { | 938 | { |
939 | if (s->handshake_func == 0) | 939 | if (s->handshake_func == NULL) |
940 | SSL_set_connect_state(s); /* Not properly initialized yet */ | 940 | SSL_set_connect_state(s); /* Not properly initialized yet */ |
941 | 941 | ||
942 | return (s->method->ssl_connect(s)); | 942 | return (s->method->ssl_connect(s)); |
@@ -951,7 +951,7 @@ SSL_get_default_timeout(const SSL *s) | |||
951 | int | 951 | int |
952 | SSL_read(SSL *s, void *buf, int num) | 952 | SSL_read(SSL *s, void *buf, int num) |
953 | { | 953 | { |
954 | if (s->handshake_func == 0) { | 954 | if (s->handshake_func == NULL) { |
955 | SSLerr(SSL_F_SSL_READ, | 955 | SSLerr(SSL_F_SSL_READ, |
956 | SSL_R_UNINITIALIZED); | 956 | SSL_R_UNINITIALIZED); |
957 | return (-1); | 957 | return (-1); |
@@ -967,7 +967,7 @@ SSL_read(SSL *s, void *buf, int num) | |||
967 | int | 967 | int |
968 | SSL_peek(SSL *s, void *buf, int num) | 968 | SSL_peek(SSL *s, void *buf, int num) |
969 | { | 969 | { |
970 | if (s->handshake_func == 0) { | 970 | if (s->handshake_func == NULL) { |
971 | SSLerr(SSL_F_SSL_PEEK, | 971 | SSLerr(SSL_F_SSL_PEEK, |
972 | SSL_R_UNINITIALIZED); | 972 | SSL_R_UNINITIALIZED); |
973 | return (-1); | 973 | return (-1); |
@@ -982,7 +982,7 @@ SSL_peek(SSL *s, void *buf, int num) | |||
982 | int | 982 | int |
983 | SSL_write(SSL *s, const void *buf, int num) | 983 | SSL_write(SSL *s, const void *buf, int num) |
984 | { | 984 | { |
985 | if (s->handshake_func == 0) { | 985 | if (s->handshake_func == NULL) { |
986 | SSLerr(SSL_F_SSL_WRITE, | 986 | SSLerr(SSL_F_SSL_WRITE, |
987 | SSL_R_UNINITIALIZED); | 987 | SSL_R_UNINITIALIZED); |
988 | return (-1); | 988 | return (-1); |
@@ -1007,7 +1007,7 @@ SSL_shutdown(SSL *s) | |||
1007 | * even if blocking I/O is used (see ssl3_shutdown). | 1007 | * even if blocking I/O is used (see ssl3_shutdown). |
1008 | */ | 1008 | */ |
1009 | 1009 | ||
1010 | if (s->handshake_func == 0) { | 1010 | if (s->handshake_func == NULL) { |
1011 | SSLerr(SSL_F_SSL_SHUTDOWN, | 1011 | SSLerr(SSL_F_SSL_SHUTDOWN, |
1012 | SSL_R_UNINITIALIZED); | 1012 | SSL_R_UNINITIALIZED); |
1013 | return (-1); | 1013 | return (-1); |