From 7289639cf41df1840002e865bf700f50afec523c Mon Sep 17 00:00:00 2001 From: Daiki Ueno Date: Wed, 9 Jan 2019 13:58:30 +0100 Subject: trust: Fix alias generation in JKS extractor When there is a duplicate, the JKS extractor previously assigned somewhat obscure name "-" (not "-"). --- trust/extract-jks.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'trust') diff --git a/trust/extract-jks.c b/trust/extract-jks.c index 33554df..c274e4f 100644 --- a/trust/extract-jks.c +++ b/trust/extract-jks.c @@ -191,6 +191,7 @@ add_alias (p11_buffer *buffer, } convert_alias (input, input_len, &buf); + length = buf.len; for (i = 0; i < INT32_MAX; i++) { if (i > 0) { @@ -207,7 +208,7 @@ add_alias (p11_buffer *buffer, return true; } - p11_buffer_reset (&buf, 0); + buf.len = length; } return false; -- cgit v1.1