Mercurial > dropbear
comparison dropbearkey.c @ 766:d1575fdc29a6 ecc
start on ecdsa keys
author | Matt Johnston <matt@ucc.asn.au> |
---|---|
date | Tue, 09 Apr 2013 00:36:04 +0800 |
parents | af4ef98b8591 |
children | d386defb5376 |
comparison
equal
deleted
inserted
replaced
765:5503e05ab3a4 | 766:d1575fdc29a6 |
---|---|
186 if (sscanf(sizetext, "%u", &bits) != 1) { | 186 if (sscanf(sizetext, "%u", &bits) != 1) { |
187 fprintf(stderr, "Bits must be an integer\n"); | 187 fprintf(stderr, "Bits must be an integer\n"); |
188 exit(EXIT_FAILURE); | 188 exit(EXIT_FAILURE); |
189 } | 189 } |
190 | 190 |
191 // TODO: put RSA and DSS size checks into genrsa.c etc | |
191 if (keytype == DROPBEAR_SIGNKEY_DSS && bits != 1024) { | 192 if (keytype == DROPBEAR_SIGNKEY_DSS && bits != 1024) { |
192 fprintf(stderr, "DSS keys have a fixed size of 1024 bits\n"); | 193 fprintf(stderr, "DSS keys have a fixed size of 1024 bits\n"); |
193 exit(EXIT_FAILURE); | 194 exit(EXIT_FAILURE); |
194 } else if (bits < 512 || bits > 4096 || (bits % 8 != 0)) { | 195 } else if (bits < 512 || bits > 4096 || (bits % 8 != 0)) { |
195 fprintf(stderr, "Bits must satisfy 512 <= bits <= 4096, and be a" | 196 fprintf(stderr, "Bits must satisfy 512 <= bits <= 4096, and be a" |