Closed romanett closed 1 month ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 54.74%. Comparing base (
884ddf3
) to head (c7c80db
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Thanks for looking into this! I am reading the Spec. a bit differently than it is implemented here I think, but maybe I am just wrong...: "The value may be any printable character except for ‘”’. If the value contains a ‘/’ or a ‘=’ then it shall be enclosed in double quotes (‘”’). " --> I read it that those strings from your test are actually to be interpreted as invalid strings since they contain a '"' ... I'd expect the whole string to be enclosed -> not: "CN=UA Yellow Green Server,DC=dogblueberry,O=OPC\"=\"Foundation" but instead: "CN=UA Yellow Green Server,DC=dogblueberry,O=\"OPC=Foundation\"" So only the value of O= would be enclosed by quotes ... But as I said I might be reading it wrong, just wanted to hint this.
@KircMax Thanks for the hint. However for your case we seem to handle it correctly already w.o. the patch. Can you provide the complete subject name contained in the Certificate Request created by your server? You can read it out e.g. with Bounce Castle:
var pkcs10CertificationRequest = new Org.BouncyCastle.Pkcs.Pkcs10CertificationRequest(certificateRequestByteArray);
var info = pkcs10CertificationRequest.GetCertificationRequestInfo();
var Subjectname = info.Subject;
Proposed changes
As per OPC UA Spec a Subject Name can be provided to methods with a special escaping sequence: If the value contains a ‘/’ or a ‘=’ then it shall be enclosed in double quotes (‘”’).
https://reference.opcfoundation.org/GDS/v105/docs/7.8.3
This fix removes this special escaping sequence when parsing a subject Name.
Related Issues
2586
Types of changes
What types of changes does your code introduce?
Checklist
Further comments