comparison common-kex.c @ 1700:56f636f84bf5

Fix indentation and add braces
author Matt Johnston <matt@ucc.asn.au>
date Thu, 28 May 2020 22:55:49 +0800
parents 1051e4eea25a
children 8f93f37c01de
comparison
equal deleted inserted replaced
1699:ef57ead04987 1700:56f636f84bf5
333 333
334 if (ses.newkeys->recv.algo_crypt->cipherdesc != NULL) { 334 if (ses.newkeys->recv.algo_crypt->cipherdesc != NULL) {
335 int recv_cipher = -1; 335 int recv_cipher = -1;
336 if (ses.newkeys->recv.algo_crypt->cipherdesc->name != NULL) { 336 if (ses.newkeys->recv.algo_crypt->cipherdesc->name != NULL) {
337 recv_cipher = find_cipher(ses.newkeys->recv.algo_crypt->cipherdesc->name); 337 recv_cipher = find_cipher(ses.newkeys->recv.algo_crypt->cipherdesc->name);
338 if (recv_cipher < 0) 338 if (recv_cipher < 0) {
339 dropbear_exit("Crypto error"); 339 dropbear_exit("Crypto error");
340 }
340 } 341 }
341 if (ses.newkeys->recv.crypt_mode->start(recv_cipher, 342 if (ses.newkeys->recv.crypt_mode->start(recv_cipher,
342 recv_IV, recv_key, 343 recv_IV, recv_key,
343 ses.newkeys->recv.algo_crypt->keysize, 0, 344 ses.newkeys->recv.algo_crypt->keysize, 0,
344 &ses.newkeys->recv.cipher_state) != CRYPT_OK) { 345 &ses.newkeys->recv.cipher_state) != CRYPT_OK) {
348 349
349 if (ses.newkeys->trans.algo_crypt->cipherdesc != NULL) { 350 if (ses.newkeys->trans.algo_crypt->cipherdesc != NULL) {
350 int trans_cipher = -1; 351 int trans_cipher = -1;
351 if (ses.newkeys->trans.algo_crypt->cipherdesc->name != NULL) { 352 if (ses.newkeys->trans.algo_crypt->cipherdesc->name != NULL) {
352 trans_cipher = find_cipher(ses.newkeys->trans.algo_crypt->cipherdesc->name); 353 trans_cipher = find_cipher(ses.newkeys->trans.algo_crypt->cipherdesc->name);
353 if (trans_cipher < 0) 354 if (trans_cipher < 0) {
354 dropbear_exit("Crypto error"); 355 dropbear_exit("Crypto error");
356 }
355 } 357 }
356 if (ses.newkeys->trans.crypt_mode->start(trans_cipher, 358 if (ses.newkeys->trans.crypt_mode->start(trans_cipher,
357 trans_IV, trans_key, 359 trans_IV, trans_key,
358 ses.newkeys->trans.algo_crypt->keysize, 0, 360 ses.newkeys->trans.algo_crypt->keysize, 0,
359 &ses.newkeys->trans.cipher_state) != CRYPT_OK) { 361 &ses.newkeys->trans.cipher_state) != CRYPT_OK) {