diff options
author | David Benjamin <davidben@chromium.org> | 2014-08-20 19:09:03 +0400 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2014-08-20 23:04:32 +0400 |
commit | 422d3a40158385942acc20e24a736798cf93745e (patch) | |
tree | 5f5342839ed9b5caee89ac24771ddbd5e276cbc8 /ssl/t1_lib.c | |
parent | fd00303a54554d20d2ce38bb40ae13b8aace6c41 (diff) |
Remove some unused state and code.
Change-Id: I1f917d1fe70ef5046eeea8fed27cc402bcd674b9
Reviewed-on: https://boringssl-review.googlesource.com/1568
Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'ssl/t1_lib.c')
-rw-r--r-- | ssl/t1_lib.c | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/ssl/t1_lib.c b/ssl/t1_lib.c index d5cb5f47..855d1d0b 100644 --- a/ssl/t1_lib.c +++ b/ssl/t1_lib.c @@ -3141,73 +3141,6 @@ int tls1_record_handshake_hashes_for_channel_id(SSL *s) return 1; } -/* TODO(fork): remove */ -#if 0 -#define MAX_SIGALGLEN (TLSEXT_hash_num * TLSEXT_signature_num * 2) - -typedef struct - { - size_t sigalgcnt; - int sigalgs[MAX_SIGALGLEN]; - } sig_cb_st; - -static int sig_cb(const char *elem, int len, void *arg) - { - sig_cb_st *sarg = arg; - size_t i; - char etmp[20], *p; - int sig_alg, hash_alg; - if (sarg->sigalgcnt == MAX_SIGALGLEN) - return 0; - if (len > (int)(sizeof(etmp) - 1)) - return 0; - memcpy(etmp, elem, len); - etmp[len] = 0; - p = strchr(etmp, '+'); - if (!p) - return 0; - *p = 0; - p++; - if (!*p) - return 0; - - if (!strcmp(etmp, "RSA")) - sig_alg = EVP_PKEY_RSA; - else if (!strcmp(etmp, "ECDSA")) - sig_alg = EVP_PKEY_EC; - else return 0; - - hash_alg = OBJ_sn2nid(p); - if (hash_alg == NID_undef) - hash_alg = OBJ_ln2nid(p); - if (hash_alg == NID_undef) - return 0; - - for (i = 0; i < sarg->sigalgcnt; i+=2) - { - if (sarg->sigalgs[i] == sig_alg - && sarg->sigalgs[i + 1] == hash_alg) - return 0; - } - sarg->sigalgs[sarg->sigalgcnt++] = hash_alg; - sarg->sigalgs[sarg->sigalgcnt++] = sig_alg; - return 1; - } - -/* Set suppored signature algorithms based on a colon separated list - * of the form sig+hash e.g. RSA+SHA512:DSA+SHA512 */ -int tls1_set_sigalgs_list(CERT *c, const char *str, int client) - { - sig_cb_st sig; - sig.sigalgcnt = 0; - if (!CONF_parse_list(str, ':', 1, sig_cb, &sig)) - return 0; - if (c == NULL) - return 1; - return tls1_set_sigalgs(c, sig.sigalgs, sig.sigalgcnt, client); - } -#endif - int tls1_set_sigalgs(CERT *c, const int *psig_nids, size_t salglen, int client) { unsigned char *sigalgs, *sptr; |