diff options
author | Damien Miller <djm@mindrot.org> | 2002-03-13 03:19:42 +0100 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2002-03-13 03:19:42 +0100 |
commit | 3a5b0233306a3db3a5db5b9ddc187c55e9b251f4 (patch) | |
tree | 86478addb63771a9a1be0e13cfbdea9f964f963a /key.c | |
parent | That shouldn't be here yet (diff) | |
download | openssh-3a5b0233306a3db3a5db5b9ddc187c55e9b251f4.tar.xz openssh-3a5b0233306a3db3a5db5b9ddc187c55e9b251f4.zip |
Stupid djm commits experimental code to head instead of branch
revert
Diffstat (limited to 'key.c')
-rw-r--r-- | key.c | 43 |
1 files changed, 0 insertions, 43 deletions
@@ -801,46 +801,3 @@ key_verify( break; } } - -/* Converts a private to a public key */ - -Key * -key_demote(Key *k) -{ - Key *pk; - - pk = xmalloc(sizeof(*pk)); - pk->type = k->type; - pk->flags = k->flags; - pk->dsa = NULL; - pk->rsa = NULL; - - switch (k->type) { - case KEY_RSA1: - case KEY_RSA: - if ((pk->rsa = RSA_new()) == NULL) - fatal("key_demote: RSA_new failed"); - if ((pk->rsa->e = BN_dup(k->rsa->e)) == NULL) - fatal("key_demote: BN_dup failed"); - if ((pk->rsa->n = BN_dup(k->rsa->n)) == NULL) - fatal("key_demote: BN_dup failed"); - break; - case KEY_DSA: - if ((pk->dsa = DSA_new()) == NULL) - fatal("key_demote: DSA_new failed"); - if ((pk->dsa->p = BN_dup(k->dsa->p)) == NULL) - fatal("key_demote: BN_dup failed"); - if ((pk->dsa->q = BN_dup(k->dsa->q)) == NULL) - fatal("key_demote: BN_dup failed"); - if ((pk->dsa->g = BN_dup(k->dsa->g)) == NULL) - fatal("key_demote: BN_dup failed"); - if ((pk->dsa->pub_key = BN_dup(k->dsa->pub_key)) == NULL) - fatal("key_demote: BN_dup failed"); - break; - default: - fatal("key_free: bad key type %d", k->type); - break; - } - - return (pk); -} |