comparison common-kex.c @ 683:63f8d6c469cf

ENABLE_USER_ALGO_LIST should work for the client
author Matt Johnston <matt@ucc.asn.au>
date Thu, 17 May 2012 00:26:12 +0800
parents 4edea9f363d0
children c37857676924
comparison
equal deleted inserted replaced
682:4edea9f363d0 683:63f8d6c469cf
104 buf_put_algolist(ses.writepayload, sshkex); 104 buf_put_algolist(ses.writepayload, sshkex);
105 105
106 /* server_host_key_algorithms */ 106 /* server_host_key_algorithms */
107 buf_put_algolist(ses.writepayload, sshhostkey); 107 buf_put_algolist(ses.writepayload, sshhostkey);
108 108
109 #ifdef ENABLE_USER_ALGO_LIST 109 /* encryption_algorithms_client_to_server */
110 if (opts.cipher_list) 110 buf_put_algolist(ses.writepayload, sshciphers);
111 { 111
112 /* encryption_algorithms_client_to_server */ 112 /* encryption_algorithms_server_to_client */
113 buf_putbytes(ses.writepayload, opts.cipher_list, strlen(opts.cipher_list)); 113 buf_put_algolist(ses.writepayload, sshciphers);
114 /* encryption_algorithms_server_to_client */ 114
115 buf_putbytes(ses.writepayload, opts.cipher_list, strlen(opts.cipher_list)); 115 /* mac_algorithms_client_to_server */
116 } 116 buf_put_algolist(ses.writepayload, sshhashes);
117 else 117
118 #endif 118 /* mac_algorithms_server_to_client */
119 { 119 buf_put_algolist(ses.writepayload, sshhashes);
120 /* encryption_algorithms_client_to_server */
121 buf_put_algolist(ses.writepayload, sshciphers);
122 /* encryption_algorithms_server_to_client */
123 buf_put_algolist(ses.writepayload, sshciphers);
124 }
125
126 #ifdef ENABLE_USER_ALGO_LIST
127 if (opts.mac_list)
128 {
129 /* mac_algorithms_client_to_server */
130 buf_putbytes(ses.writepayload, opts.mac_list, strlen(opts.mac_list));
131 /* mac_algorithms_server_to_client */
132 buf_putbytes(ses.writepayload, opts.mac_list, strlen(opts.mac_list));
133 }
134 else
135 #endif
136 {
137 /* mac_algorithms_client_to_server */
138 buf_put_algolist(ses.writepayload, sshhashes);
139 /* mac_algorithms_server_to_client */
140 buf_put_algolist(ses.writepayload, sshhashes);
141 }
142 120
143 121
144 /* compression_algorithms_client_to_server */ 122 /* compression_algorithms_client_to_server */
145 buf_put_algolist(ses.writepayload, ses.compress_algos); 123 buf_put_algolist(ses.writepayload, ses.compress_algos);
146 124