diff options
Diffstat (limited to 'src/main/model/x501/AttributeTypeAndValue.java')
-rw-r--r-- | src/main/model/x501/AttributeTypeAndValue.java | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/main/model/x501/AttributeTypeAndValue.java b/src/main/model/x501/AttributeTypeAndValue.java index 54b3352..179d6ff 100644 --- a/src/main/model/x501/AttributeTypeAndValue.java +++ b/src/main/model/x501/AttributeTypeAndValue.java @@ -72,11 +72,16 @@ public class AttributeTypeAndValue extends ASN1Object { /** * EFFECTS: Return in TYPE=Value format. Type will be either x.x.x.x.x or human-readable strings like CN. Value is - * input-defined. + * input-defined. ',' '+' '=' will be escaped. */ @Override public String toString() { - return type.toString() + "=" + value.toString(); + return type.toString().replace(",", "\\,") + .replace("=", "\\=") + .replace("+", "\\+") + + "=" + value.toString().replace(",", "\\,") + .replace("=", "\\=") + .replace("+", "\\+"); } public ObjectIdentifier getType() { |