diff options
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/auth.c | 1 | ||||
-rw-r--r-- | usr.bin/ssh/key.c | 18 | ||||
-rw-r--r-- | usr.bin/ssh/misc.c | 1 | ||||
-rw-r--r-- | usr.bin/ssh/packet.c | 2 | ||||
-rw-r--r-- | usr.bin/ssh/ssh-add.c | 3 |
5 files changed, 3 insertions, 22 deletions
diff --git a/usr.bin/ssh/auth.c b/usr.bin/ssh/auth.c index 14aa65108a2..da28d388a70 100644 --- a/usr.bin/ssh/auth.c +++ b/usr.bin/ssh/auth.c @@ -196,7 +196,6 @@ auth_root_allowed(char *method) switch (options.permit_root_login) { case PERMIT_YES: return 1; - break; case PERMIT_NO_PASSWD: if (strcmp(method, "password") != 0) return 1; diff --git a/usr.bin/ssh/key.c b/usr.bin/ssh/key.c index 283aea99ebd..96619fe60e2 100644 --- a/usr.bin/ssh/key.c +++ b/usr.bin/ssh/key.c @@ -156,14 +156,12 @@ key_equal(const Key *a, const Key *b) return a->rsa != NULL && b->rsa != NULL && BN_cmp(a->rsa->e, b->rsa->e) == 0 && BN_cmp(a->rsa->n, b->rsa->n) == 0; - break; case KEY_DSA: return a->dsa != NULL && b->dsa != NULL && BN_cmp(a->dsa->p, b->dsa->p) == 0 && BN_cmp(a->dsa->q, b->dsa->q) == 0 && BN_cmp(a->dsa->g, b->dsa->g) == 0 && BN_cmp(a->dsa->pub_key, b->dsa->pub_key) == 0; - break; default: fatal("key_equal: bad key type %d", a->type); break; @@ -210,7 +208,6 @@ key_fingerprint_raw(const Key *k, enum fp_type dgst_type, break; case KEY_UNSPEC: return retval; - break; default: fatal("key_fingerprint_raw: bad key type %d", k->type); break; @@ -531,13 +528,10 @@ key_type(const Key *k) switch (k->type) { case KEY_RSA1: return "RSA1"; - break; case KEY_RSA: return "RSA"; - break; case KEY_DSA: return "DSA"; - break; } return "unknown"; } @@ -548,10 +542,8 @@ key_ssh_name(const Key *k) switch (k->type) { case KEY_RSA: return "ssh-rsa"; - break; case KEY_DSA: return "ssh-dss"; - break; } return "ssh-unknown"; } @@ -563,10 +555,8 @@ key_size(const Key *k) case KEY_RSA1: case KEY_RSA: return BN_num_bits(k->rsa->n); - break; case KEY_DSA: return BN_num_bits(k->dsa->p); - break; } return 0; } @@ -575,6 +565,7 @@ static RSA * rsa_generate_private_key(u_int bits) { RSA *private; + private = RSA_generate_key(bits, 35, NULL, NULL); if (private == NULL) fatal("rsa_generate_private_key: key generation failed."); @@ -585,6 +576,7 @@ static DSA* dsa_generate_private_key(u_int bits) { DSA *private = DSA_generate_parameters(bits, NULL, 0, NULL, NULL, NULL, NULL); + if (private == NULL) fatal("dsa_generate_private_key: DSA_generate_parameters failed"); if (!DSA_generate_key(private)) @@ -794,14 +786,11 @@ key_sign( switch (key->type) { case KEY_DSA: return ssh_dss_sign(key, sigp, lenp, data, datalen); - break; case KEY_RSA: return ssh_rsa_sign(key, sigp, lenp, data, datalen); - break; default: error("key_sign: invalid key type %d", key->type); return -1; - break; } } @@ -821,14 +810,11 @@ key_verify( switch (key->type) { case KEY_DSA: return ssh_dss_verify(key, signature, signaturelen, data, datalen); - break; case KEY_RSA: return ssh_rsa_verify(key, signature, signaturelen, data, datalen); - break; default: error("key_verify: invalid key type %d", key->type); return -1; - break; } } diff --git a/usr.bin/ssh/misc.c b/usr.bin/ssh/misc.c index 77f7ffb370c..11e3285a391 100644 --- a/usr.bin/ssh/misc.c +++ b/usr.bin/ssh/misc.c @@ -289,6 +289,7 @@ convtime(const char *s) switch (*endp++) { case '\0': endp--; + break; case 's': case 'S': break; diff --git a/usr.bin/ssh/packet.c b/usr.bin/ssh/packet.c index 2a30ef2107c..ea9f6aa2098 100644 --- a/usr.bin/ssh/packet.c +++ b/usr.bin/ssh/packet.c @@ -1184,7 +1184,6 @@ packet_read_poll_seqnr(u_int32_t *seqnr_p) break; default: return type; - break; } } else { type = packet_read_poll1(); @@ -1207,7 +1206,6 @@ packet_read_poll_seqnr(u_int32_t *seqnr_p) if (type) DBG(debug("received packet type %d", type)); return type; - break; } } } diff --git a/usr.bin/ssh/ssh-add.c b/usr.bin/ssh/ssh-add.c index 5f14b536091..5347e39e1e1 100644 --- a/usr.bin/ssh/ssh-add.c +++ b/usr.bin/ssh/ssh-add.c @@ -342,13 +342,11 @@ main(int argc, char **argv) if (list_identities(ac, ch == 'l' ? 1 : 0) == -1) ret = 1; goto done; - break; case 'x': case 'X': if (lock_agent(ac, ch == 'x' ? 1 : 0) == -1) ret = 1; goto done; - break; case 'c': confirm = 1; break; @@ -359,7 +357,6 @@ main(int argc, char **argv) if (delete_all(ac) == -1) ret = 1; goto done; - break; case 's': sc_reader_id = optarg; break; |