98 lines
3.0 KiB
Java
98 lines
3.0 KiB
Java
package o;
|
|
|
|
import java.io.IOException;
|
|
import java.io.InputStream;
|
|
|
|
/* renamed from: o.gqH, reason: case insensitive filesystem */
|
|
/* loaded from: classes6.dex */
|
|
final class C15428gqH {
|
|
private final String b;
|
|
private final String c;
|
|
private final String d;
|
|
private final String e;
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public C15428gqH(String str) {
|
|
StringBuilder sb = new StringBuilder("-----BEGIN ");
|
|
sb.append(str);
|
|
sb.append("-----");
|
|
this.d = sb.toString();
|
|
StringBuilder sb2 = new StringBuilder("-----BEGIN X509 ");
|
|
sb2.append(str);
|
|
sb2.append("-----");
|
|
this.b = sb2.toString();
|
|
StringBuilder sb3 = new StringBuilder("-----END ");
|
|
sb3.append(str);
|
|
sb3.append("-----");
|
|
this.c = sb3.toString();
|
|
StringBuilder sb4 = new StringBuilder("-----END X509 ");
|
|
sb4.append(str);
|
|
sb4.append("-----");
|
|
this.e = sb4.toString();
|
|
}
|
|
|
|
/* JADX WARN: Code restructure failed: missing block: B:10:0x001e, code lost:
|
|
|
|
if (r0.length() == 0) goto L24;
|
|
*/
|
|
/*
|
|
Code decompiled incorrectly, please refer to instructions dump.
|
|
To view partially-correct add '--show-bad-code' argument
|
|
*/
|
|
private static java.lang.String e(java.io.InputStream r3) throws java.io.IOException {
|
|
/*
|
|
java.lang.StringBuffer r0 = new java.lang.StringBuffer
|
|
r0.<init>()
|
|
L5:
|
|
int r1 = r3.read()
|
|
r2 = 13
|
|
if (r1 == r2) goto L18
|
|
r2 = 10
|
|
if (r1 == r2) goto L18
|
|
if (r1 < 0) goto L18
|
|
char r1 = (char) r1
|
|
r0.append(r1)
|
|
goto L5
|
|
L18:
|
|
if (r1 < 0) goto L20
|
|
int r2 = r0.length()
|
|
if (r2 == 0) goto L5
|
|
L20:
|
|
if (r1 >= 0) goto L24
|
|
r3 = 0
|
|
return r3
|
|
L24:
|
|
java.lang.String r3 = r0.toString()
|
|
return r3
|
|
*/
|
|
throw new UnsupportedOperationException("Method not decompiled: o.C15428gqH.e(java.io.InputStream):java.lang.String");
|
|
}
|
|
|
|
/* JADX INFO: Access modifiers changed from: package-private */
|
|
public final AbstractC15317gnH c(InputStream inputStream) throws IOException {
|
|
String e;
|
|
StringBuffer stringBuffer = new StringBuffer();
|
|
do {
|
|
e = e(inputStream);
|
|
if (e == null || e.startsWith(this.d)) {
|
|
break;
|
|
}
|
|
} while (!e.startsWith(this.b));
|
|
while (true) {
|
|
String e2 = e(inputStream);
|
|
if (e2 == null || e2.startsWith(this.c) || e2.startsWith(this.e)) {
|
|
break;
|
|
}
|
|
stringBuffer.append(e2);
|
|
}
|
|
if (stringBuffer.length() == 0) {
|
|
return null;
|
|
}
|
|
try {
|
|
return AbstractC15317gnH.a(C15469grO.c(stringBuffer.toString()));
|
|
} catch (Exception unused) {
|
|
throw new IOException("malformed PEM data encountered");
|
|
}
|
|
}
|
|
}
|