summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2006-09-21 12:26:07 +0000
committerSimon Josefsson <simon@josefsson.org>2006-09-21 12:26:07 +0000
commit9a864df94dfefb951c5d6a3a139cccd136ed4295 (patch)
tree7e10822cd7a845050501adadcbe6f43f73582e00 /src
parent4b053d66035ef48aef79db9a4add96fbfaa34e01 (diff)
downloadgnutls-9a864df94dfefb951c5d6a3a139cccd136ed4295.tar.gz
(generate_self_signed): Load key, if generate_certificate() didn't
load or generate it, typically because it used a certificate request. Reported by Sascha Ziemann <sascha.ziemann@secunet.com>.
Diffstat (limited to 'src')
-rw-r--r--src/certtool.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/certtool.c b/src/certtool.c
index 52c7a26d55..f292d02974 100644
--- a/src/certtool.c
+++ b/src/certtool.c
@@ -696,6 +696,9 @@ generate_self_signed (void)
crt = generate_certificate (&key, NULL);
+ if (!key)
+ key = load_private_key (1);
+
uri = get_crl_dist_point_url ();
if (uri)
{