package o; import java.io.ByteArrayOutputStream; import java.io.IOException; import org.bouncycastle.asn1.ASN1Encoding; import org.spongycastle.asn1.ASN1ParsingException; /* loaded from: classes6.dex */ public final class gnO extends AbstractC15336gnl { public gnO(int i, C15343gns c15343gns) { super(true, i, c(c15343gns)); } private static byte[] c(C15343gns c15343gns) { ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream(); for (int i = 0; i != c15343gns.a.size(); i++) { try { byteArrayOutputStream.write(((AbstractC15346gnv) ((InterfaceC15342gnr) c15343gns.a.elementAt(i))).c(ASN1Encoding.BER)); } catch (IOException e) { throw new ASN1ParsingException("malformed object: ".concat(String.valueOf(e)), e); } } return byteArrayOutputStream.toByteArray(); } /* JADX INFO: Access modifiers changed from: package-private */ @Override // o.AbstractC15336gnl, o.AbstractC15315gnE public final void c(gnG gng) throws IOException { gng.b(this.c ? 96 : 64, this.d); gng.a(128); gng.a.write(this.a); gng.a(0); gng.a(0); } }