added outside to encoding...
import java.io.IOException;
import org.bouncycastle.asn1.DEROctetString;
+import org.bouncycastle.asn1.DERSequence;
import org.bouncycastle.asn1.isara.IsaraObjectIdentifiers;
import org.bouncycastle.asn1.pkcs.PKCSObjectIdentifiers;
import org.bouncycastle.asn1.x509.AlgorithmIdentifier;
@@ -104,7 +105,7 @@ else if (publicKey instanceof CMCEPublicKeyParameters)
AlgorithmIdentifier algorithmIdentifier = new AlgorithmIdentifier(Utils.mcElieceOidLookup(params.getParameters()));
- return new SubjectPublicKeyInfo(algorithmIdentifier, new DEROctetString(encoding));
+ return new SubjectPublicKeyInfo(algorithmIdentifier, new DERSequence(new DEROctetString(encoding)));
}
else if (publicKey instanceof XMSSPublicKeyParameters)
{
