-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
When the token has only the leaf certificate but does not carry the entire chain (as most of the cryptographic tokens, such as smart cards do), the code throws an exception or returns null:
. . . . .
Certificate certificate = ks.getCertificate(alias); // this works
System.out.println(" certificate=" + certificate);
// the following either throws an exception on trying to fetch certificate
// of the issuer, or simply returns null
Certificate [] chain = ks.getCertificateChain(alias);
. . . . .
The correct (and expected) result would be Certificate[] chain having one entry - the leaf certificate itself. That's how SunPKCS11 provider behaves.
Metadata
Metadata
Assignees
Labels
No labels