diff options
author | Daiki Ueno <dueno@redhat.com> | 2019-01-09 13:58:30 +0100 |
---|---|---|
committer | Daiki Ueno <ueno@gnu.org> | 2019-01-10 14:06:02 +0100 |
commit | 7289639cf41df1840002e865bf700f50afec523c (patch) | |
tree | cdc2e9980bc644f4b43d8e3e2b157de6bbbec28c /trust | |
parent | 5e6a92b67ddade14a54769b05cc717043bc56b78 (diff) |
trust: Fix alias generation in JKS extractor
When there is a duplicate, the JKS extractor previously assigned
somewhat obscure name "-<digit>" (not "<name>-<digit>").
Diffstat (limited to 'trust')
-rw-r--r-- | trust/extract-jks.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; |