diff options
Diffstat (limited to 'bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/x509/PEMUtil.java')
-rw-r--r-- | bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/x509/PEMUtil.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/x509/PEMUtil.java b/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/x509/PEMUtil.java index 3efd2d69..7badbdc1 100644 --- a/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/x509/PEMUtil.java +++ b/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/x509/PEMUtil.java @@ -10,16 +10,20 @@ class PEMUtil { private final String _header1; private final String _header2; + private final String _header3; private final String _footer1; private final String _footer2; + private final String _footer3; PEMUtil( String type) { _header1 = "-----BEGIN " + type + "-----"; _header2 = "-----BEGIN X509 " + type + "-----"; + _header3 = "-----BEGIN PKCS7-----"; _footer1 = "-----END " + type + "-----"; _footer2 = "-----END X509 " + type + "-----"; + _footer3 = "-----END PKCS7-----"; } private String readLine( @@ -71,7 +75,7 @@ class PEMUtil while ((line = readLine(in)) != null) { - if (line.startsWith(_header1) || line.startsWith(_header2)) + if (line.startsWith(_header1) || line.startsWith(_header2) || line.startsWith(_header3)) { break; } @@ -79,7 +83,7 @@ class PEMUtil while ((line = readLine(in)) != null) { - if (line.startsWith(_footer1) || line.startsWith(_footer2)) + if (line.startsWith(_footer1) || line.startsWith(_footer2) || line.startsWith(_footer3)) { break; } |