summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjsing <>2014-06-07 14:03:50 +0000
committerjsing <>2014-06-07 14:03:50 +0000
commit8e572c76ea1f88213041d8394aa478381641e07c (patch)
tree1483401d9ac09fe10fa53ffafc7bd8bb260b07bd /src
parent99792a55f5dd8fe42d180e1f4dab872f01821deb (diff)
downloadopenbsd-8e572c76ea1f88213041d8394aa478381641e07c.tar.gz
openbsd-8e572c76ea1f88213041d8394aa478381641e07c.tar.bz2
openbsd-8e572c76ea1f88213041d8394aa478381641e07c.zip
More KNF.
Diffstat (limited to 'src')
-rw-r--r--src/lib/libssl/src/ssl/ssl_lib.c10
-rw-r--r--src/lib/libssl/ssl_lib.c10
2 files changed, 8 insertions, 12 deletions
diff --git a/src/lib/libssl/src/ssl/ssl_lib.c b/src/lib/libssl/src/ssl/ssl_lib.c
index 7feb920ab8..be57df7736 100644
--- a/src/lib/libssl/src/ssl/ssl_lib.c
+++ b/src/lib/libssl/src/ssl/ssl_lib.c
@@ -2234,8 +2234,7 @@ ssl_get_server_send_pkey(const SSL *s)
2234 } else if (alg_a & SSL_aGOST01) { 2234 } else if (alg_a & SSL_aGOST01) {
2235 i = SSL_PKEY_GOST01; 2235 i = SSL_PKEY_GOST01;
2236 } else { /* if (alg_a & SSL_aNULL) */ 2236 } else { /* if (alg_a & SSL_aNULL) */
2237 SSLerr(SSL_F_SSL_GET_SERVER_SEND_PKEY, 2237 SSLerr(SSL_F_SSL_GET_SERVER_SEND_PKEY, ERR_R_INTERNAL_ERROR);
2238 ERR_R_INTERNAL_ERROR);
2239 return (NULL); 2238 return (NULL);
2240 } 2239 }
2241 2240
@@ -2275,8 +2274,7 @@ ssl_get_sign_pkey(SSL *s, const SSL_CIPHER *cipher, const EVP_MD **pmd)
2275 (c->pkeys[SSL_PKEY_ECC].privatekey != NULL)) 2274 (c->pkeys[SSL_PKEY_ECC].privatekey != NULL))
2276 idx = SSL_PKEY_ECC; 2275 idx = SSL_PKEY_ECC;
2277 if (idx == -1) { 2276 if (idx == -1) {
2278 SSLerr(SSL_F_SSL_GET_SIGN_PKEY, 2277 SSLerr(SSL_F_SSL_GET_SIGN_PKEY, ERR_R_INTERNAL_ERROR);
2279 ERR_R_INTERNAL_ERROR);
2280 return (NULL); 2278 return (NULL);
2281 } 2279 }
2282 if (pmd) 2280 if (pmd)
@@ -3025,8 +3023,8 @@ SSL_use_psk_identity_hint(SSL *s, const char *identity_hint)
3025 if (s->session == NULL) 3023 if (s->session == NULL)
3026 return (1); /* session not created yet, ignored */ 3024 return (1); /* session not created yet, ignored */
3027 3025
3028 if (identity_hint != NULL && strlen(identity_hint) > 3026 if (identity_hint != NULL &&
3029 PSK_MAX_IDENTITY_LEN) { 3027 strlen(identity_hint) > PSK_MAX_IDENTITY_LEN) {
3030 SSLerr(SSL_F_SSL_USE_PSK_IDENTITY_HINT, 3028 SSLerr(SSL_F_SSL_USE_PSK_IDENTITY_HINT,
3031 SSL_R_DATA_LENGTH_TOO_LONG); 3029 SSL_R_DATA_LENGTH_TOO_LONG);
3032 return (0); 3030 return (0);
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c
index 7feb920ab8..be57df7736 100644
--- a/src/lib/libssl/ssl_lib.c
+++ b/src/lib/libssl/ssl_lib.c
@@ -2234,8 +2234,7 @@ ssl_get_server_send_pkey(const SSL *s)
2234 } else if (alg_a & SSL_aGOST01) { 2234 } else if (alg_a & SSL_aGOST01) {
2235 i = SSL_PKEY_GOST01; 2235 i = SSL_PKEY_GOST01;
2236 } else { /* if (alg_a & SSL_aNULL) */ 2236 } else { /* if (alg_a & SSL_aNULL) */
2237 SSLerr(SSL_F_SSL_GET_SERVER_SEND_PKEY, 2237 SSLerr(SSL_F_SSL_GET_SERVER_SEND_PKEY, ERR_R_INTERNAL_ERROR);
2238 ERR_R_INTERNAL_ERROR);
2239 return (NULL); 2238 return (NULL);
2240 } 2239 }
2241 2240
@@ -2275,8 +2274,7 @@ ssl_get_sign_pkey(SSL *s, const SSL_CIPHER *cipher, const EVP_MD **pmd)
2275 (c->pkeys[SSL_PKEY_ECC].privatekey != NULL)) 2274 (c->pkeys[SSL_PKEY_ECC].privatekey != NULL))
2276 idx = SSL_PKEY_ECC; 2275 idx = SSL_PKEY_ECC;
2277 if (idx == -1) { 2276 if (idx == -1) {
2278 SSLerr(SSL_F_SSL_GET_SIGN_PKEY, 2277 SSLerr(SSL_F_SSL_GET_SIGN_PKEY, ERR_R_INTERNAL_ERROR);
2279 ERR_R_INTERNAL_ERROR);
2280 return (NULL); 2278 return (NULL);
2281 } 2279 }
2282 if (pmd) 2280 if (pmd)
@@ -3025,8 +3023,8 @@ SSL_use_psk_identity_hint(SSL *s, const char *identity_hint)
3025 if (s->session == NULL) 3023 if (s->session == NULL)
3026 return (1); /* session not created yet, ignored */ 3024 return (1); /* session not created yet, ignored */
3027 3025
3028 if (identity_hint != NULL && strlen(identity_hint) > 3026 if (identity_hint != NULL &&
3029 PSK_MAX_IDENTITY_LEN) { 3027 strlen(identity_hint) > PSK_MAX_IDENTITY_LEN) {
3030 SSLerr(SSL_F_SSL_USE_PSK_IDENTITY_HINT, 3028 SSLerr(SSL_F_SSL_USE_PSK_IDENTITY_HINT,
3031 SSL_R_DATA_LENGTH_TOO_LONG); 3029 SSL_R_DATA_LENGTH_TOO_LONG);
3032 return (0); 3030 return (0);