• R/O
  • SSH
  • HTTPS

ttssh2: Commit


Commit MetaInfo

Revision7805 (tree)
Zeit2019-06-24 17:15:00
Autoryutakapon

Log Message

DSA構造体の変数の取り違えを修正した(q -> dsa_q)。
ECDSA構造体の変数の上書きを修正した(s -> bs)。
チケット #36876

Ändern Zusammenfassung

Diff

--- branches/openssl_1_1_1_v2/ttssh2/ttxssh/key.c (revision 7804)
+++ branches/openssl_1_1_1_v2/ttssh2/ttxssh/key.c (revision 7805)
@@ -1451,13 +1451,13 @@
14511451 goto error;
14521452 }
14531453 p = BN_new();
1454- q = BN_new();
1454+ dsa_q = BN_new();
14551455 g = BN_new();
14561456 pub_key = BN_new();
14571457 DSA_set0_pqg(dsa, p, dsa_q, g);
14581458 DSA_set0_key(dsa, pub_key, NULL);
14591459 if (p == NULL ||
1460- q == NULL ||
1460+ dsa_q == NULL ||
14611461 g == NULL ||
14621462 pub_key == NULL) {
14631463 goto error;
@@ -1464,7 +1464,7 @@
14641464 }
14651465
14661466 buffer_get_bignum2(&data, p);
1467- buffer_get_bignum2(&data, q);
1467+ buffer_get_bignum2(&data, dsa_q);
14681468 buffer_get_bignum2(&data, g);
14691469 buffer_get_bignum2(&data, pub_key);
14701470
@@ -1717,7 +1717,7 @@
17171717 u_char digest[EVP_MAX_MD_SIZE];
17181718 u_int len, dlen, nid;
17191719 buffer_t *buf2 = NULL;
1720- BIGNUM *r, *s;
1720+ BIGNUM *br, *bs;
17211721
17221722 nid = keytype_to_hash_nid(keypair->type);
17231723 if ((evp_md = EVP_get_digestbynid(nid)) == NULL) {
@@ -1747,9 +1747,9 @@
17471747 // TODO: error check
17481748 goto error;
17491749 }
1750- ECDSA_SIG_get0(sig, &r, &s);
1751- buffer_put_bignum2(buf2, r);
1752- buffer_put_bignum2(buf2, s);
1750+ ECDSA_SIG_get0(sig, &br, &bs);
1751+ buffer_put_bignum2(buf2, br);
1752+ buffer_put_bignum2(buf2, bs);
17531753 ECDSA_SIG_free(sig);
17541754
17551755 s = get_sshname_from_key(keypair);
Show on old repository browser