Skip to content

Commit

Permalink
remove URLEncoder in makeLabeledURI (#146)
Browse files Browse the repository at this point in the history
  • Loading branch information
foxgem authored Jun 30, 2021
1 parent 296c391 commit 1086a4a
Showing 1 changed file with 8 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,14 @@ public IdentifierAttestation(byte[] derEncoding) throws IOException, IllegalArgu
}
}

private X500Name makeLabeledURI(String type, String identifier) {
DERUTF8String labelValue = new DERUTF8String(URLEncoder.encode(identifier + " " + type, StandardCharsets.UTF_8));
RDN rdn = new RDN(LABELED_URI, labelValue);
/**
* @param label the label of the URL, similar to what is inside <a>...</a>
* @param URL the URL itself, similar to what is in <a href="...">, note that
* it should already be URLencoded therefore not containing space
*/
private X500Name makeLabeledURI(String label, String URL) {
DERUTF8String labeledURLValue = new DERUTF8String(URL + " " + label);
RDN rdn = new RDN(LABELED_URI, labeledURLValue);
return new X500Name(new RDN[] {rdn});
}

Expand Down

0 comments on commit 1086a4a

Please sign in to comment.