aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Nikos Mavrogiannopoulos 2009-05-21 18:48:34 +0000
committerGravatar Nokis Mavrogiannopoulos 2009-05-21 18:48:34 +0000
commit7ef38d4e50d58d0e9e2494b8f71cf16a85b13b17 (patch)
tree99bb4cbe8b717b4157dc6bf32a085f493063272c /src
parent8663ace30034bc7c7e0775ed48a77c5f7f5c8da2 (diff)
if private key import fails try as pkcs8 key.
Diffstat (limited to 'src')
-rw-r--r--src/gnutls_config.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gnutls_config.c b/src/gnutls_config.c
index 0a56b38..3ff3b34 100644
--- a/src/gnutls_config.c
+++ b/src/gnutls_config.c
@@ -194,7 +194,12 @@ const char *mgs_set_key_file(cmd_parms * parms, void *dummy,
194 ret = 194 ret =
195 gnutls_x509_privkey_import(sc->privkey_x509, &data, 195 gnutls_x509_privkey_import(sc->privkey_x509, &data,
196 GNUTLS_X509_FMT_PEM); 196 GNUTLS_X509_FMT_PEM);
197 if (ret != 0) { 197
198 if (ret < 0)
199 ret = gnutls_x509_privkey_import_pkcs8 (sc->privkey_x509, &data, GNUTLS_X509_FMT_PEM,
200 NULL, GNUTLS_PKCS_PLAIN);
201
202 if (ret < 0) {
198 return apr_psprintf(parms->pool, "GnuTLS: Failed to Import " 203 return apr_psprintf(parms->pool, "GnuTLS: Failed to Import "
199 "Private Key '%s': (%d) %s", file, ret, 204 "Private Key '%s': (%d) %s", file, ret,
200 gnutls_strerror(ret)); 205 gnutls_strerror(ret));