Skip to content

Commit

Permalink
trust: Fix alias generation in JKS extractor
Browse files Browse the repository at this point in the history
When there is a duplicate, the JKS extractor previously assigned
somewhat obscure name "-<digit>" (not "<name>-<digit>").
  • Loading branch information
ueno committed Jan 10, 2019
1 parent 5e6a92b commit 7289639
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion trust/extract-jks.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -207,7 +208,7 @@ add_alias (p11_buffer *buffer,
return true;
}

p11_buffer_reset (&buf, 0);
buf.len = length;
}

return false;
Expand Down

0 comments on commit 7289639

Please sign in to comment.