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)