send ecdsa_sign for client cert request type is sig algo ecdsa

This commit is contained in:
toddouska 2014-06-20 09:22:40 -07:00
parent 9642902c07
commit 6371b3c262
2 changed files with 14 additions and 3 deletions

View File

@ -1438,7 +1438,10 @@ enum ClientCertificateType {
dss_fixed_dh = 4,
rsa_ephemeral_dh = 5,
dss_ephemeral_dh = 6,
fortezza_kea_cert = 20
fortezza_kea_cert = 20,
ecdsa_sign = 64,
rsa_fixed_ecdh = 65,
ecdsa_fixed_ecdh = 66
};

View File

@ -6009,7 +6009,7 @@ int SendCertificateRequest(CYASSL* ssl)
int sendSz;
word32 i = RECORD_HEADER_SZ + HANDSHAKE_HEADER_SZ;
int typeTotal = 1; /* only rsa for now */
int typeTotal = 1; /* only 1 for now */
int reqSz = ENUM_LEN + typeTotal + REQ_HEADER_SZ; /* add auth later */
if (IsAtLeastTLSv1_2(ssl))
@ -6037,7 +6037,15 @@ int SendCertificateRequest(CYASSL* ssl)
/* write to output */
output[i++] = (byte)typeTotal; /* # of types */
output[i++] = rsa_sign;
#ifdef HAVE_ECC
if (ssl->options.cipherSuite0 == ECC_BYTE &&
ssl->specs.sig_algo == ecc_dsa_sa_algo) {
output[i++] = ecdsa_sign;
} else
#endif /* HAVE_ECC */
{
output[i++] = rsa_sign;
}
/* supported hash/sig */
if (IsAtLeastTLSv1_2(ssl)) {