Revision: 7800 https://osdn.net/projects/ttssh2/scm/svn/commits/7800 Author: yutakapon Date: 2019-06-24 16:41:36 +0900 (Mon, 24 Jun 2019) Log Message: ----------- EVP_PKEY 構造体のtypeメンバー取得を関数化した。 チケット #36876 Ticket Links: ------------ https://osdn.net/projects/ttssh2/tracker/detail/36876 Modified Paths: -------------- branches/openssl_1_1_1_v2/ttssh2/ttxssh/keyfiles.c -------------- next part -------------- Modified: branches/openssl_1_1_1_v2/ttssh2/ttxssh/keyfiles.c =================================================================== --- branches/openssl_1_1_1_v2/ttssh2/ttxssh/keyfiles.c 2019-06-24 07:31:50 UTC (rev 7799) +++ branches/openssl_1_1_1_v2/ttssh2/ttxssh/keyfiles.c 2019-06-24 07:41:36 UTC (rev 7800) @@ -646,9 +646,11 @@ char *errmsg, int errmsg_len) { + /********* OPENSSL1.1.1 NOTEST *********/ Key *result = NULL; EVP_PKEY *pk = NULL; unsigned long err = 0; + int pk_type; OpenSSL_add_all_algorithms(); ERR_load_crypto_strings(); @@ -670,7 +672,8 @@ goto error; } - switch (pk->type) { + pk_type = EVP_PKEY_id(pk); + switch (pk_type) { case EVP_PKEY_RSA: // RSA key result->type = KEY_RSA; result->rsa = EVP_PKEY_get1_RSA(pk);