Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

X509IssuerName wrong oid 2.5.4.97 #237

Open
PaolaRuby opened this issue Oct 1, 2021 · 0 comments
Open

X509IssuerName wrong oid 2.5.4.97 #237

PaolaRuby opened this issue Oct 1, 2021 · 0 comments

Comments

@PaolaRuby
Copy link

PaolaRuby commented Oct 1, 2021

organizationIdentifier 2.5.4.97 not properly converted

On X509IssuerName I'm getting UNDEF=
UNDEF=VATES-A66721499,CN=UANATACA CA2 2016,OU=TSP-UANATACA,O=UANATACA S.A.,L=Barcelona,C=ES
but must be something like
OID.2.5.4.97=VATES-A66721499,CN=UANATACA CA1 2016,OU=TSP-UANATACA,O=UANATACA S.A.,L=Barcelona,C=ES

Example:
https://github.com/luisgoncalves/xades4j/blob/855738c009524a721b4e29f1c22dc27ce6a730d5/src/test/java/xades4j/verification/Issue166Test.java#L19-L21

if ($issuerSerial && ! empty($certData['issuer']) && ! empty($certData['serialNumber'])) {
if (is_array($certData['issuer'])) {
$parts = array();
foreach ($certData['issuer'] AS $key => $value) {
array_unshift($parts, "$key=$value");
}
$issuerName = implode(',', $parts);
} else {
$issuerName = $certData['issuer'];
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant