[Ttssh2-commit] [7004] 型名変更。主に見栄えの為。

Back to archive index

scmno****@osdn***** scmno****@osdn*****
2017年 12月 18日 (月) 19:41:13 JST


Revision: 7004
          http://sourceforge.jp/projects/ttssh2/scm/svn/commits/7004
Author:   doda
Date:     2017-12-18 19:41:13 +0900 (Mon, 18 Dec 2017)
Log Message:
-----------
型名変更。主に見栄えの為。

・SSHCipher -> SSHCipherId
・ssh2_cipher_t -> SSH2Cipher

Modified Paths:
--------------
    trunk/ttssh2/ttxssh/crypt.c
    trunk/ttssh2/ttxssh/keyfiles.c
    trunk/ttssh2/ttxssh/ssh.c
    trunk/ttssh2/ttxssh/ssh.h
    trunk/ttssh2/ttxssh/ttxssh.c
    trunk/ttssh2/ttxssh/ttxssh.h

-------------- next part --------------
Modified: trunk/ttssh2/ttxssh/crypt.c
===================================================================
--- trunk/ttssh2/ttxssh/crypt.c	2017-12-18 10:41:10 UTC (rev 7003)
+++ trunk/ttssh2/ttxssh/crypt.c	2017-12-18 10:41:13 UTC (rev 7004)
@@ -1069,7 +1069,7 @@
 	struct Enc *enc;
 	char *encryption_key = pvar->crypt_state.sender_cipher_key;
 	char *decryption_key = pvar->crypt_state.receiver_cipher_key;
-	ssh2_cipher_t *cipher;
+	SSH2Cipher *cipher;
 	BOOL isOK = TRUE;
 
 	if (sender_flag) {

Modified: trunk/ttssh2/ttxssh/keyfiles.c
===================================================================
--- trunk/ttssh2/ttxssh/keyfiles.c	2017-12-18 10:41:10 UTC (rev 7003)
+++ trunk/ttssh2/ttxssh/keyfiles.c	2017-12-18 10:41:13 UTC (rev 7004)
@@ -371,7 +371,7 @@
 	unsigned int len, klen, nkeys, blocksize, keylen, ivlen, slen, rounds;
 	unsigned int check1, check2, m1len, m2len; 
 	int dlen, i;
-	ssh2_cipher_t *cipher;
+	SSH2Cipher *cipher;
 	size_t authlen;
 	EVP_CIPHER_CTX cipher_ctx;
 

Modified: trunk/ttssh2/ttxssh/ssh.c
===================================================================
--- trunk/ttssh2/ttxssh/ssh.c	2017-12-18 10:41:10 UTC (rev 7003)
+++ trunk/ttssh2/ttxssh/ssh.c	2017-12-18 10:41:13 UTC (rev 7004)
@@ -4091,7 +4091,7 @@
 // general
 //
 
-int get_cipher_block_size(ssh2_cipher_t *cipher)
+int get_cipher_block_size(SSH2Cipher *cipher)
 {
 	int blocksize = 0;
 	
@@ -4102,7 +4102,7 @@
 	return max(blocksize, 8);
 }
 
-int get_cipher_key_len(ssh2_cipher_t *cipher)
+int get_cipher_key_len(SSH2Cipher *cipher)
 {
 	if (cipher) {
 		return cipher->key_len;
@@ -4112,7 +4112,7 @@
 	}
 }
 
-int get_cipher_discard_len(ssh2_cipher_t *cipher)
+int get_cipher_discard_len(SSH2Cipher *cipher)
 {
 	if (cipher) {
 		return cipher->discard_len;
@@ -4122,7 +4122,7 @@
 	}
 }
 
-int get_cipher_iv_len(ssh2_cipher_t *cipher)
+int get_cipher_iv_len(SSH2Cipher *cipher)
 {
 	if (cipher) {
 		if (cipher->iv_len != 0) {
@@ -4137,7 +4137,7 @@
 	}
 }
 
-int get_cipher_auth_len(ssh2_cipher_t *cipher)
+int get_cipher_auth_len(SSH2Cipher *cipher)
 {
 	if (cipher) {
 		return cipher->auth_len;
@@ -4148,9 +4148,9 @@
 }
 
 // \x88Í\x86\x83A\x83\x8B\x83S\x83\x8A\x83Y\x83\x80\x96\xBC\x82\xA9\x82猟\x8D\x{142DC2}\xE9\x81B
-ssh2_cipher_t *get_cipher_by_name(char *name)
+SSH2Cipher *get_cipher_by_name(char *name)
 {
-	ssh2_cipher_t *ptr = ssh2_ciphers;
+	SSH2Cipher *ptr = ssh2_ciphers;
 
 	while (ptr->name != NULL) {
 		if (name != NULL && strcmp(ptr->name, name) == 0) {
@@ -4163,7 +4163,7 @@
 	return ptr;
 }
 
-static char * get_cipher_string(ssh2_cipher_t *cipher)
+static char * get_cipher_string(SSH2Cipher *cipher)
 {
 	if (cipher) {
 		return cipher->name;
@@ -4173,7 +4173,7 @@
 	}
 }
 
-const EVP_CIPHER* get_cipher_EVP_CIPHER(ssh2_cipher_t *cipher)
+const EVP_CIPHER* get_cipher_EVP_CIPHER(SSH2Cipher *cipher)
 {
 	if (cipher) {
 		return cipher->func();
@@ -4717,10 +4717,10 @@
 	return (type);
 }
 
-static ssh2_cipher_t *choose_SSH2_cipher_algorithm(char *server_proposal, char *my_proposal)
+static SSH2Cipher *choose_SSH2_cipher_algorithm(char *server_proposal, char *my_proposal)
 {
 	char str_cipher[32];
-	ssh2_cipher_t *ptr = ssh2_ciphers;
+	SSH2Cipher *ptr = ssh2_ciphers;
 
 	choose_SSH2_proposal(server_proposal, my_proposal, str_cipher, sizeof(str_cipher));
 	return get_cipher_by_name(str_cipher);
@@ -4779,7 +4779,7 @@
 	int mode, val;
 	unsigned int need = 0;
 	const EVP_MD *md;
-	ssh2_cipher_t *cipher;
+	SSH2Cipher *cipher;
 	hmac_type mac;
 
 	for (mode = 0; mode < MODE_MAX; mode++) {

Modified: trunk/ttssh2/ttxssh/ssh.h
===================================================================
--- trunk/ttssh2/ttxssh/ssh.h	2017-12-18 10:41:10 UTC (rev 7003)
+++ trunk/ttssh2/ttxssh/ssh.h	2017-12-18 10:41:13 UTC (rev 7004)
@@ -97,7 +97,7 @@
 	SSH2_CIPHER_CAMELLIA128_CTR, SSH2_CIPHER_CAMELLIA192_CTR, SSH2_CIPHER_CAMELLIA256_CTR,
 	SSH2_CIPHER_AES128_GCM, SSH2_CIPHER_AES256_GCM,
 	SSH_CIPHER_MAX = SSH2_CIPHER_AES256_GCM,
-} SSHCipher;
+} SSHCipherId;
 
 typedef enum {
 	SSH_AUTH_NONE, SSH_AUTH_RHOSTS, SSH_AUTH_RSA, SSH_AUTH_PASSWORD,
@@ -376,7 +376,7 @@
 
 
 typedef struct ssh2_cipher {
-	SSHCipher id;
+	SSHCipherId id;
 	char *name;
 	int block_size;
 	int key_len;
@@ -384,9 +384,9 @@
 	int iv_len;
 	int auth_len;
 	const EVP_CIPHER *(*func)(void);
-} ssh2_cipher_t;
+} SSH2Cipher;
 
-static ssh2_cipher_t ssh2_ciphers[] = {
+static SSH2Cipher ssh2_ciphers[] = {
 	{SSH2_CIPHER_3DES_CBC,        "3des-cbc",         8, 24,    0, 0, 0, EVP_des_ede3_cbc},     // RFC4253
 	{SSH2_CIPHER_AES128_CBC,      "aes128-cbc",      16, 16,    0, 0, 0, EVP_aes_128_cbc},      // RFC4253
 	{SSH2_CIPHER_AES192_CBC,      "aes192-cbc",      16, 24,    0, 0, 0, EVP_aes_192_cbc},      // RFC4253
@@ -773,13 +773,13 @@
 BOOL do_SSH2_userauth(PTInstVar pvar);
 BOOL do_SSH2_authrequest(PTInstVar pvar);
 void debug_print(int no, char *msg, int len);
-int get_cipher_block_size(ssh2_cipher_t *cipher);
-int get_cipher_key_len(ssh2_cipher_t *cipher);
-int get_cipher_iv_len(ssh2_cipher_t *cipher);
-int get_cipher_auth_len(ssh2_cipher_t *cipher);
-ssh2_cipher_t *get_cipher_by_name(char *name);
+int get_cipher_block_size(SSH2Cipher *cipher);
+int get_cipher_key_len(SSH2Cipher *cipher);
+int get_cipher_iv_len(SSH2Cipher *cipher);
+int get_cipher_auth_len(SSH2Cipher *cipher);
+SSH2Cipher *get_cipher_by_name(char *name);
 char* get_kex_algorithm_name(kex_algorithm kextype);
-const EVP_CIPHER* get_cipher_EVP_CIPHER(ssh2_cipher_t *cipher);
+const EVP_CIPHER* get_cipher_EVP_CIPHER(SSH2Cipher *cipher);
 const EVP_MD* get_kex_algorithm_EVP_MD(kex_algorithm kextype);
 char* get_ssh2_mac_name(hmac_type type);
 const EVP_MD* get_ssh2_mac_EVP_MD(hmac_type type);
@@ -787,7 +787,7 @@
 char* get_ssh2_comp_name(compression_type type);
 char* get_ssh_keytype_name(ssh_keytype type);
 char* get_digest_algorithm_name(digest_algorithm id);
-int get_cipher_discard_len(ssh2_cipher_t *cipher);
+int get_cipher_discard_len(SSH2Cipher *cipher);
 void ssh_heartbeat_lock_initialize(void);
 void ssh_heartbeat_lock_finalize(void);
 void ssh_heartbeat_lock(void);

Modified: trunk/ttssh2/ttxssh/ttxssh.c
===================================================================
--- trunk/ttssh2/ttxssh/ttxssh.c	2017-12-18 10:41:10 UTC (rev 7003)
+++ trunk/ttssh2/ttxssh/ttxssh.c	2017-12-18 10:41:13 UTC (rev 7004)
@@ -4128,7 +4128,7 @@
 // based on OpenSSH 6.5:key_save_private(), key_private_to_blob2()
 static void save_bcrypt_private_key(char *passphrase, char *filename, char *comment, HWND dlg, PTInstVar pvar, int rounds)
 {
-	ssh2_cipher_t *cipher = NULL;
+	SSH2Cipher *cipher = NULL;
 	char *ciphername = DEFAULT_CIPHERNAME;
 	buffer_t *b = NULL;
 	buffer_t *kdf = NULL;

Modified: trunk/ttssh2/ttxssh/ttxssh.h
===================================================================
--- trunk/ttssh2/ttxssh/ttxssh.h	2017-12-18 10:41:10 UTC (rev 7003)
+++ trunk/ttssh2/ttxssh/ttxssh.h	2017-12-18 10:41:13 UTC (rev 7004)
@@ -257,7 +257,7 @@
 	buffer_t *peer_kex;
 	kex_algorithm kex_type; // KEX algorithm
 	ssh_keytype hostkey_type;
-	ssh2_cipher_t *ciphers[MODE_MAX];
+	SSH2Cipher *ciphers[MODE_MAX];
 	hmac_type ctos_hmac;
 	hmac_type stoc_hmac;
 	compression_type ctos_compression;



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