comparison dropbearkey.c @ 1250:2bb4c662d1c2

more hard tab
author Francois Perrad <francois.perrad@gadz.org>
date Fri, 01 Jan 2016 15:02:09 +0100
parents c6346c63281b
children 750ec4ec4cbe efad433418c4
comparison
equal deleted inserted replaced
1249:c6346c63281b 1250:2bb4c662d1c2
103 } 103 }
104 104
105 /* fails fatally */ 105 /* fails fatally */
106 static void check_signkey_bits(enum signkey_type type, int bits) 106 static void check_signkey_bits(enum signkey_type type, int bits)
107 { 107 {
108 switch (type) { 108 switch (type) {
109 #ifdef DROPBEAR_RSA 109 #ifdef DROPBEAR_RSA
110 case DROPBEAR_SIGNKEY_RSA: 110 case DROPBEAR_SIGNKEY_RSA:
111 if (bits < 512 || bits > 4096 || (bits % 8 != 0)) { 111 if (bits < 512 || bits > 4096 || (bits % 8 != 0)) {
112 dropbear_exit("Bits must satisfy 512 <= bits <= 4096, and be a" 112 dropbear_exit("Bits must satisfy 512 <= bits <= 4096, and be a"
113 " multiple of 8\n"); 113 " multiple of 8\n");
114 } 114 }
115 break; 115 break;
116 #endif 116 #endif
117 #ifdef DROPEAR_DSS 117 #ifdef DROPEAR_DSS
118 case DROPBEAR_SIGNKEY_DSS: 118 case DROPBEAR_SIGNKEY_DSS:
119 if (bits != 1024) { 119 if (bits != 1024) {
120 dropbear_exit("DSS keys have a fixed size of 1024 bits\n"); 120 dropbear_exit("DSS keys have a fixed size of 1024 bits\n");
121 exit(EXIT_FAILURE); 121 exit(EXIT_FAILURE);
122 } 122 }
123 #endif 123 #endif
124 default: 124 default:
125 (void)0; /* quiet, compiler. ecdsa handles checks itself */ 125 (void)0; /* quiet, compiler. ecdsa handles checks itself */
126 } 126 }
127 } 127 }
128 128
129 #if defined(DBMULTI_dropbearkey) || !defined(DROPBEAR_MULTI) 129 #if defined(DBMULTI_dropbearkey) || !defined(DROPBEAR_MULTI)
130 #if defined(DBMULTI_dropbearkey) && defined(DROPBEAR_MULTI) 130 #if defined(DBMULTI_dropbearkey) && defined(DROPBEAR_MULTI)
131 int dropbearkey_main(int argc, char ** argv) { 131 int dropbearkey_main(int argc, char ** argv) {