Revision: 7805 https://osdn.net/projects/ttssh2/scm/svn/commits/7805 Author: yutakapon Date: 2019-06-24 17:15:00 +0900 (Mon, 24 Jun 2019) Log Message: ----------- DSA構造体の変数の取り違えを修正した(q -> dsa_q)。 ECDSA構造体の変数の上書きを修正した(s -> bs)。 チケット #36876 Ticket Links: ------------ https://osdn.net/projects/ttssh2/tracker/detail/36876 Modified Paths: -------------- branches/openssl_1_1_1_v2/ttssh2/ttxssh/key.c -------------- next part -------------- Modified: branches/openssl_1_1_1_v2/ttssh2/ttxssh/key.c =================================================================== --- branches/openssl_1_1_1_v2/ttssh2/ttxssh/key.c 2019-06-24 08:04:41 UTC (rev 7804) +++ branches/openssl_1_1_1_v2/ttssh2/ttxssh/key.c 2019-06-24 08:15:00 UTC (rev 7805) @@ -1451,13 +1451,13 @@ goto error; } p = BN_new(); - q = BN_new(); + dsa_q = BN_new(); g = BN_new(); pub_key = BN_new(); DSA_set0_pqg(dsa, p, dsa_q, g); DSA_set0_key(dsa, pub_key, NULL); if (p == NULL || - q == NULL || + dsa_q == NULL || g == NULL || pub_key == NULL) { goto error; @@ -1464,7 +1464,7 @@ } buffer_get_bignum2(&data, p); - buffer_get_bignum2(&data, q); + buffer_get_bignum2(&data, dsa_q); buffer_get_bignum2(&data, g); buffer_get_bignum2(&data, pub_key); @@ -1717,7 +1717,7 @@ u_char digest[EVP_MAX_MD_SIZE]; u_int len, dlen, nid; buffer_t *buf2 = NULL; - BIGNUM *r, *s; + BIGNUM *br, *bs; nid = keytype_to_hash_nid(keypair->type); if ((evp_md = EVP_get_digestbynid(nid)) == NULL) { @@ -1747,9 +1747,9 @@ // TODO: error check goto error; } - ECDSA_SIG_get0(sig, &r, &s); - buffer_put_bignum2(buf2, r); - buffer_put_bignum2(buf2, s); + ECDSA_SIG_get0(sig, &br, &bs); + buffer_put_bignum2(buf2, br); + buffer_put_bignum2(buf2, bs); ECDSA_SIG_free(sig); s = get_sshname_from_key(keypair);