diff options
author | jsing <> | 2014-08-23 14:52:41 +0000 |
---|---|---|
committer | jsing <> | 2014-08-23 14:52:41 +0000 |
commit | db1c05eb858dd85ea0e5a69890a22c096e70a3e9 (patch) | |
tree | 9e39489ad7ca821461a8b5fdd5dee2a80c25c1e2 /src/lib/libssl/s3_lib.c | |
parent | 885ee42bc56bc2f9a07ecd5da7d3917ae0bab9be (diff) | |
download | openbsd-db1c05eb858dd85ea0e5a69890a22c096e70a3e9.tar.gz openbsd-db1c05eb858dd85ea0e5a69890a22c096e70a3e9.tar.bz2 openbsd-db1c05eb858dd85ea0e5a69890a22c096e70a3e9.zip |
Replace the remaining ssl3_get_cipher_by_char() calls with n2s() and
ssl3_get_cipher_by_id().
ok bcook@
Diffstat (limited to 'src/lib/libssl/s3_lib.c')
-rw-r--r-- | src/lib/libssl/s3_lib.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/src/lib/libssl/s3_lib.c b/src/lib/libssl/s3_lib.c index 1d84effeea..1578f0388d 100644 --- a/src/lib/libssl/s3_lib.c +++ b/src/lib/libssl/s3_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: s3_lib.c,v 1.76 2014/08/11 01:06:22 jsing Exp $ */ | 1 | /* $OpenBSD: s3_lib.c,v 1.77 2014/08/23 14:52:41 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 | * |
@@ -2452,28 +2452,6 @@ ssl3_ctx_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp)(void)) | |||
2452 | return (1); | 2452 | return (1); |
2453 | } | 2453 | } |
2454 | 2454 | ||
2455 | /* This function needs to check if the ciphers required are actually | ||
2456 | * available */ | ||
2457 | const SSL_CIPHER * | ||
2458 | ssl3_get_cipher_by_char(const unsigned char *p) | ||
2459 | { | ||
2460 | SSL_CIPHER c; | ||
2461 | const SSL_CIPHER *cp; | ||
2462 | unsigned long id; | ||
2463 | |||
2464 | id = 0x03000000L | ((unsigned long)p[0] << 8L) | (unsigned long)p[1]; | ||
2465 | c.id = id; | ||
2466 | cp = OBJ_bsearch_ssl_cipher_id(&c, ssl3_ciphers, SSL3_NUM_CIPHERS); | ||
2467 | #ifdef DEBUG_PRINT_UNKNOWN_CIPHERSUITES | ||
2468 | if (cp == NULL) | ||
2469 | fprintf(stderr, "Unknown cipher ID %x\n", (p[0] << 8) | p[1]); | ||
2470 | #endif | ||
2471 | if (cp == NULL || cp->valid == 0) | ||
2472 | return NULL; | ||
2473 | else | ||
2474 | return cp; | ||
2475 | } | ||
2476 | |||
2477 | int | 2455 | int |
2478 | ssl3_put_cipher_by_char(const SSL_CIPHER *c, unsigned char *p) | 2456 | ssl3_put_cipher_by_char(const SSL_CIPHER *c, unsigned char *p) |
2479 | { | 2457 | { |