add import/export type for private keys

This commit is contained in:
Love Hornquist Astrand
2010-10-03 16:32:01 -07:00
parent dfc54c6eea
commit 48ad3e1e65
6 changed files with 77 additions and 35 deletions

View File

@@ -541,7 +541,8 @@ store_func(hx509_context context, void *ctx, hx509_cert c)
free(data.data);
if (_hx509_cert_private_key_exportable(c)) {
hx509_private_key key = _hx509_cert_private_key(c);
ret = _hx509_private_key_export(context, key, &data);
ret = _hx509_private_key_export(context, key,
HX509_KEY_FORMAT_DER, &data);
if (ret)
break;
hx509_pem_write(context, _hx509_private_pem_name(key), NULL, sc->f,