You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using this code (Bouncy Castle) I am getting the error below:
try {
Enumeration<?> derObjects = ASN1Sequence.getInstance(octets).getObjects();
CertificateFactory cf = CertificateFactory.getInstance("X.509","BC");
while (derObjects.hasMoreElements()) {
ASN1Integer version = (ASN1Integer)derObjects.nextElement(); //Should be 0
// if (version!=0) throw Exception; //TODO Exception model
ASN1Set certSet = ASN1Set.getInstance(derObjects.nextElement());
Enumeration<Certificate> certs = certSet.getObjects();
while (certs.hasMoreElements()) {
org.bouncycastle.asn1.x509.Certificate certAsASN1Object = org.bouncycastle.asn1.x509.Certificate.getInstance(certs.nextElement());
cscaCerts.add(cf.generateCertificate(new ByteArrayInputStream(certAsASN1Object.getEncoded())));
}
}
java.security.NoSuchAlgorithmException: The BC provider no longer provides an implementation for CertificateFactory.X.509. Please see https://android-developers.googleblog.com/2018/03/cryptography-changes-in-android-p.html for more details.
Using Spongy Castle I am getting null in public key (in object java.security.cert within the list cscaCerts) NO error but after parsing null public key presented.
try {
Enumeration<?> derObjects = ASN1Sequence.getInstance(octets).getObjects();
while (derObjects.hasMoreElements()) {
ASN1Integer version = (ASN1Integer) derObjects.nextElement(); //Should be 0
// if (version!=0) throw Exception; //TODO Exception model
ASN1Set certSet = ASN1Set.getInstance(derObjects.nextElement());
Enumeration<Certificate> certs = certSet.getObjects();
while (certs.hasMoreElements()) {
org.spongycastle.asn1.x509.Certificate certAsASN1Object = org.spongycastle.asn1.x509.Certificate.getInstance(certs.nextElement());
cscaCerts.add(new X509CertificateObject(certAsASN1Object));
}
}
I am trying to parse the master list using the code below in this link:
Github MasterList Parser
Using this code (Bouncy Castle) I am getting the error below:
Using Spongy Castle I am getting null in public key (in object java.security.cert within the list cscaCerts) NO error but after parsing null public key presented.
Public Key: null
implementation 'com.madgag.spongycastle:prov:1.58.0.0'
implementation 'com.madgag.spongycastle:bcpkix-jdk15on:1.58.0.0'
targetSdk 32 Gradle jdk: 17
The text was updated successfully, but these errors were encountered: