From 0f2af8c10f8f49ac32db0b7161d3e1f66a9c1d6c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Love=20H=C3=B6rnquist=20=C3=85strand?= Date: Mon, 9 Feb 2009 17:16:32 +0000 Subject: [PATCH] more EC bits, now parses the private key git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@24661 ec53bebd-3082-4978-b11e-865c3cabbd6b --- lib/hx509/ks_file.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/hx509/ks_file.c b/lib/hx509/ks_file.c index cc9b6c576..8243ec092 100644 --- a/lib/hx509/ks_file.c +++ b/lib/hx509/ks_file.c @@ -284,10 +284,8 @@ struct pem_formats { const AlgorithmIdentifier *(*ai)(void); } formats[] = { { "CERTIFICATE", parse_certificate, NULL }, - { "RSA PRIVATE KEY", parse_private_key, hx509_signature_rsa } -#if 0 - { "EC PRIVATE KEY", parse_private_key, hx509_signature_rsa } /* XXX */ -#endif + { "RSA PRIVATE KEY", parse_private_key, hx509_signature_rsa }, + { "EC PRIVATE KEY", parse_private_key, hx509_signature_ecPublicKey } }; @@ -306,6 +304,7 @@ pem_func(hx509_context context, const char *type, for (j = 0; j < sizeof(formats)/sizeof(formats[0]); j++) { const char *q = formats[j].name; + printf("matching %s with %s\n", type, q); if (strcasecmp(type, q) == 0) { const AlgorithmIdentifier *ai = NULL; if (formats[j].ai != NULL)