Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/crypto/external/bsd/netpgp/dist/src/lib Remove a code excerp...



details:   https://anonhg.NetBSD.org/src/rev/f6d08547369f
branches:  trunk
changeset: 750246:f6d08547369f
user:      agc <agc%NetBSD.org@localhost>
date:      Tue Dec 22 06:55:03 2009 +0000

description:
Remove a code excerpt which is not ready for primetime just yet

diffstat:

 crypto/external/bsd/netpgp/dist/src/lib/netpgp.c |  56 +-----------------------
 1 files changed, 1 insertions(+), 55 deletions(-)

diffs (70 lines):

diff -r 54c3ccb74b23 -r f6d08547369f crypto/external/bsd/netpgp/dist/src/lib/netpgp.c
--- a/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c  Tue Dec 22 06:53:26 2009 +0000
+++ b/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c  Tue Dec 22 06:55:03 2009 +0000
@@ -34,7 +34,7 @@
 
 #if defined(__NetBSD__)
 __COPYRIGHT("@(#) Copyright (c) 2009 The NetBSD Foundation, Inc. All rights reserved.");
-__RCSID("$NetBSD: netpgp.c,v 1.35 2009/12/22 06:53:26 agc Exp $");
+__RCSID("$NetBSD: netpgp.c,v 1.36 2009/12/22 06:55:03 agc Exp $");
 #endif
 
 #include <sys/types.h>
@@ -1103,57 +1103,3 @@
        return 1;
 }
 
-#if 0
-#include "sshkey.h"
-
-int
-netpgp_pgpkey_to_sshkey(netpgp_t *netpgp, char *name, SSHKey *sshkey)
-{
-       const __ops_key_t       *pgpkey;
-       unsigned                 k;
-
-       k = 0;
-       pgpkey = __ops_getnextkeybyname(netpgp->io, netpgp->pubring, name, &k);
-       if (pgpkey == NULL) {
-               pgpkey = __ops_getkeybyname(io, netpgp->pubring, userid);
-       }
-       if (pgpkey == NULL) {
-               (void) fprintf(stderr, "No key matching '%s'\n", name);
-               return 0;
-       }
-       switch(pgpkey->key.pubkey.alg) {
-       case OPS_PKA_RSA:
-               sshkey->type = KEY_RSA;
-               sshkey->rsa = calloc(1, sizeof(*sshkey->rsa);
-               if (sshkey->rsa == NULL) {
-                       (void) fprintf(stderr, "RSA memory problems\n");
-                       return 0;
-               }
-               sshkey->rsa->n = pgpkey->key.pubkey.key.rsa.n;
-               sshkey->rsa->e = pgpkey->key.pubkey.key.rsa.e;
-               sshkey->rsa->d = pgpkey->key.seckey.key.rsa.d;
-               sshkey->rsa->p = pgpkey->key.seckey.key.rsa.p;
-               sshkey->rsa->q = pgpkey->key.seckey.key.rsa.q;
-               sshkey->rsa->iqmp = pgpkey->key.seckey.key.rsa.u;
-               break;
-       case OPS_PKA_DSA:
-               sshkey->type = KEY_DSA;
-               sshkey->dsa = calloc(1, sizeof(*sshkey->dsa);
-               if (sshkey->dsa == NULL) {
-                       (void) fprintf(stderr, "DSA memory problems\n");
-                       return 0;
-               }
-               sshkey->rsa->n = pgpkey->key.pubkey.key.rsa.n;
-               key->dsa->p = pgpkey->key.pubkey.key.dsa.p;
-               key->dsa->q = pgpkey->key.pubkey.key.dsa.q;
-               key->dsa->g = pgpkey->key.pubkey.key.dsa.g;
-               key->dsa->pub_key = pgpkey->key.pubkey.key.dsa.y;
-               key->dsa->priv_key = pgpkey->key.seckey.key.dsa.x;
-               break;
-       default:
-               (void) fprintf(stderr, "weird type\n");
-               return 0;
-       }
-       return 1;
-}
-#endif



Home | Main Index | Thread Index | Old Index