[Ttssh2-commit] [6571] EVP_PKEY 構造体のtypeメンバー取得を関数化した。

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2017年 1月 15日 (日) 15:05:35 JST


Revision: 6571
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/6571
Author:   yutakapon
Date:     2017-01-15 15:05:35 +0900 (Sun, 15 Jan 2017)
Log Message:
-----------
EVP_PKEY 構造体のtypeメンバー取得を関数化した。

Modified Paths:
--------------
    branches/openssl_1_1_0/ttssh2/ttxssh/keyfiles.c

-------------- next part --------------
Modified: branches/openssl_1_1_0/ttssh2/ttxssh/keyfiles.c
===================================================================
--- branches/openssl_1_1_0/ttssh2/ttxssh/keyfiles.c	2017-01-15 05:28:14 UTC (rev 6570)
+++ branches/openssl_1_1_0/ttssh2/ttxssh/keyfiles.c	2017-01-15 06:05:35 UTC (rev 6571)
@@ -641,6 +641,7 @@
 	Key *result = NULL;
 	EVP_PKEY *pk = NULL;
 	unsigned long err = 0;
+	int pk_type;
 
 	OpenSSL_add_all_algorithms();
 	ERR_load_crypto_strings();
@@ -662,7 +663,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);



Ttssh2-commit メーリングリストの案内
Back to archive index