I’m currently using Java 15. And it still seems odd to me that OpenSC-Java would not implement
SignatureSpi.engineGetParameters since that is a defined interface method.
But regardless, attempting to create a PKCS10 object with Bouncy Castle fails with this exception:
Exception in thread "main" java.lang.IllegalArgumentException: unknown object in getInstance: org.bouncycastle.asn1.ASN1Integer
at org.bouncycastle.asn1.ASN1Sequence.getInstance(ASN1Sequence.java:105)
at org.bouncycastle.asn1.x509.AlgorithmIdentifier.getInstance(AlgorithmIdentifier.java:34)
at org.bouncycastle.asn1.x509.SubjectPublicKeyInfo.<init>(SubjectPublicKeyInfo.java:80)
at org.bouncycastle.asn1.x509.SubjectPublicKeyInfo.getInstance(SubjectPublicKeyInfo.java:43)
at org.bouncycastle.pkcs.jcajce.JcaPKCS10CertificationRequestBuilder.<init>(Unknown Source)
I have used this method with other PKCS #11 implementations without this issue, but I need to take a closer look to see if this is something I can work around.
In the meantime, do you have any advice about ECC support. The Nitrokey HSM apparently supports ECC key pairs, but the OpenSC-Java libraries don’t have wrappers for this key type. Any suggestions?