tls-crypto: Fix usage of chunk_from_chars()
See 8ea13bbc5c for details.
References #3249.
This commit is contained in:
@@ -1409,6 +1409,8 @@ METHOD(tls_crypto_t, sign, bool,
|
|||||||
{
|
{
|
||||||
if (this->tls->get_version(this->tls) >= TLS_1_2)
|
if (this->tls->get_version(this->tls) >= TLS_1_2)
|
||||||
{
|
{
|
||||||
|
const chunk_t hashsig_def = chunk_from_chars(
|
||||||
|
TLS_HASH_SHA1, TLS_SIG_RSA, TLS_HASH_SHA1, TLS_SIG_ECDSA);
|
||||||
signature_scheme_t scheme;
|
signature_scheme_t scheme;
|
||||||
bio_reader_t *reader;
|
bio_reader_t *reader;
|
||||||
uint8_t hash, alg;
|
uint8_t hash, alg;
|
||||||
@@ -1417,8 +1419,7 @@ METHOD(tls_crypto_t, sign, bool,
|
|||||||
|
|
||||||
if (!hashsig.len)
|
if (!hashsig.len)
|
||||||
{ /* fallback if none given */
|
{ /* fallback if none given */
|
||||||
hashsig = chunk_from_chars(
|
hashsig = hashsig_def;
|
||||||
TLS_HASH_SHA1, TLS_SIG_RSA, TLS_HASH_SHA1, TLS_SIG_ECDSA);
|
|
||||||
}
|
}
|
||||||
reader = bio_reader_create(hashsig);
|
reader = bio_reader_create(hashsig);
|
||||||
while (reader->remaining(reader) >= 2)
|
while (reader->remaining(reader) >= 2)
|
||||||
|
|||||||
Reference in New Issue
Block a user