Revision: 7796 https://osdn.net/projects/ttssh2/scm/svn/commits/7796 Author: yutakapon Date: 2019-06-24 15:04:37 +0900 (Mon, 24 Jun 2019) Log Message: ----------- save_bcrypt_private_key関数で EVP_CIPHER_CTX ポインタ指定ミスを修正した。 r7789の対応漏れ。 チケット #36876 Ticket Links: ------------ https://osdn.net/projects/ttssh2/tracker/detail/36876 Modified Paths: -------------- branches/openssl_1_1_1_v2/ttssh2/ttxssh/ttxssh.c -------------- next part -------------- Modified: branches/openssl_1_1_1_v2/ttssh2/ttxssh/ttxssh.c =================================================================== --- branches/openssl_1_1_1_v2/ttssh2/ttxssh/ttxssh.c 2019-06-24 03:14:51 UTC (rev 7795) +++ branches/openssl_1_1_1_v2/ttssh2/ttxssh/ttxssh.c 2019-06-24 06:04:37 UTC (rev 7796) @@ -4128,7 +4128,7 @@ // \x88Í\x86\x89\xBB\x82̏\x80\x94\xF5 // TODO: OpenSSH 6.5\x82ł\xCD -Z \x83I\x83v\x83V\x83\x87\x83\x93\x82ŁA\x88Í\x86\x89\xBB\x83A\x83\x8B\x83S\x83\x8A\x83Y\x83\x80\x82\xF0\x8Ew\x92\xE8\x89\\x82\xBE\x82\xAA\x81A // \x82\xB1\x82\xB1\x82ł\xCD"AES256-CBC"\x82ɌŒ\xE8\x82Ƃ\xB7\x82\xE9\x81B - cipher_init_SSH2(&cipher_ctx, key, keylen, key + keylen, ivlen, CIPHER_ENCRYPT, + cipher_init_SSH2(cipher_ctx, key, keylen, key + keylen, ivlen, CIPHER_ENCRYPT, get_cipher_EVP_CIPHER(cipher), 0, 0, pvar); SecureZeroMemory(key, keylen + ivlen); free(key); @@ -4172,12 +4172,12 @@ /* encrypt */ cp = buffer_append_space(encoded, buffer_len(b) + authlen); - if (EVP_Cipher(&cipher_ctx, cp, buffer_ptr(b), buffer_len(b)) == 0) { + if (EVP_Cipher(cipher_ctx, cp, buffer_ptr(b), buffer_len(b)) == 0) { //strncpy_s(errmsg, errmsg_len, "Key decrypt error", _TRUNCATE); //free(decrypted); //goto error; } - cipher_cleanup_SSH2(&cipher_ctx); + cipher_cleanup_SSH2(cipher_ctx); len = 2 * buffer_len(encoded); cp = malloc(len);