Module Name:    src
Committed By:   agc
Date:           Tue Dec 22 06:55:03 UTC 2009

Modified Files:
        src/crypto/external/bsd/netpgp/dist/src/lib: netpgp.c

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


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 \
    src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c
diff -u src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c:1.35 src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c:1.36
--- src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c:1.35	Tue Dec 22 06:53:26 2009
+++ src/crypto/external/bsd/netpgp/dist/src/lib/netpgp.c	Tue Dec 22 06:55:03 2009
@@ -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

Reply via email to