mirror of
https://github.com/shred/acme4j.git
synced 2025-12-16 11:24:01 +08:00
Make setCommonName go through the addValue path
This ensures the CN is present as a SAN
This commit is contained in:
committed by
Richard Körber
parent
78ccae6bc9
commit
beb1d53dc0
@@ -213,7 +213,6 @@ public class CSRBuilder {
|
||||
public void addValue(ASN1ObjectIdentifier oid, String value) {
|
||||
if (requireNonNull(oid, "OID must not be null").equals(BCStyle.CN)) {
|
||||
addDomain(value);
|
||||
return;
|
||||
}
|
||||
namebuilder.addRDN(oid, requireNonNull(value, "attribute value must not be null"));
|
||||
}
|
||||
@@ -224,7 +223,7 @@ public class CSRBuilder {
|
||||
* Note that it is at the discretion of the ACME server to accept this parameter.
|
||||
*/
|
||||
public void setCommonName(String cn) {
|
||||
namebuilder.addRDN(BCStyle.CN, toAce(requireNonNull(cn)));
|
||||
addValue(BCStyle.CN, cn);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user