am dd20fc48: Merge "Fix CertPath APIs"

* commit 'dd20fc483e31ff20b5da95d37b4106150cd7c6b0':
  Fix CertPath APIs
diff --git a/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/x509/CertificateFactory.java b/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/x509/CertificateFactory.java
index 2ed6ca6..5b79864 100644
--- a/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/x509/CertificateFactory.java
+++ b/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/x509/CertificateFactory.java
@@ -334,7 +334,9 @@
 
     public Iterator engineGetCertPathEncodings()
     {
-        return null; // TODO: PKIXCertPath.certPathEncodings.iterator();
+        // BEGIN android-changed
+        return PKIXCertPath.certPathEncodings.iterator();
+        // END android-changed
     }
 
     public CertPath engineGenerateCertPath(
diff --git a/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/x509/PKIXCertPath.java b/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/x509/PKIXCertPath.java
index e13412d..9b14731 100644
--- a/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/x509/PKIXCertPath.java
+++ b/bcprov/src/main/java/org/bouncycastle/jcajce/provider/asymmetric/x509/PKIXCertPath.java
@@ -53,7 +53,9 @@
     {
         List encodings = new ArrayList();
         encodings.add("PkiPath");
-        encodings.add("PEM");
+        // BEGIN android-removed
+        // encodings.add("PEM");
+        // END android-removed
         encodings.add("PKCS7");
         certPathEncodings = Collections.unmodifiableList(encodings);
     }
diff --git a/patches/bcprov.patch b/patches/bcprov.patch
index 50a61f1..b789f35 100644
--- a/patches/bcprov.patch
+++ b/patches/bcprov.patch
@@ -3051,9 +3051,23 @@
                                      };
  
  
+diff -Naur bcprov-jdk15on-148.orig/org/bouncycastle/jcajce/provider/asymmetric/x509/CertificateFactory.java bcprov-jdk15on-148/org/bouncycastle/jcajce/provider/asymmetric/x509/CertificateFactory.java
+--- bcprov-jdk15on-148.orig/org/bouncycastle/jcajce/provider/asymmetric/x509/CertificateFactory.java	2013-02-10 00:37:58.000000000 +0000
++++ bcprov-jdk15on-148/org/bouncycastle/jcajce/provider/asymmetric/x509/CertificateFactory.java	2013-02-21 00:01:31.000000000 +0000
+@@ -334,7 +334,9 @@
+ 
+     public Iterator engineGetCertPathEncodings()
+     {
+-        return null; // TODO: PKIXCertPath.certPathEncodings.iterator();
++        // BEGIN android-changed
++        return PKIXCertPath.certPathEncodings.iterator();
++        // END android-changed
+     }
+ 
+     public CertPath engineGenerateCertPath(
 diff -Naur bcprov-jdk15on-148.orig/org/bouncycastle/jcajce/provider/asymmetric/x509/PKIXCertPath.java bcprov-jdk15on-148/org/bouncycastle/jcajce/provider/asymmetric/x509/PKIXCertPath.java
 --- bcprov-jdk15on-148.orig/org/bouncycastle/jcajce/provider/asymmetric/x509/PKIXCertPath.java	2013-02-10 00:37:58.000000000 +0000
-+++ bcprov-jdk15on-148/org/bouncycastle/jcajce/provider/asymmetric/x509/PKIXCertPath.java	2012-09-17 23:04:47.000000000 +0000
++++ bcprov-jdk15on-148/org/bouncycastle/jcajce/provider/asymmetric/x509/PKIXCertPath.java	2013-02-21 00:01:31.000000000 +0000
 @@ -36,7 +36,9 @@
  import org.bouncycastle.asn1.pkcs.SignedData;
  import org.bouncycastle.jce.provider.BouncyCastleProvider;
@@ -3065,7 +3079,18 @@
  
  /**
   * CertPath implementation for X.509 certificates.
-@@ -298,27 +300,29 @@
+@@ -51,7 +53,9 @@
+     {
+         List encodings = new ArrayList();
+         encodings.add("PkiPath");
+-        encodings.add("PEM");
++        // BEGIN android-removed
++        // encodings.add("PEM");
++        // END android-removed
+         encodings.add("PKCS7");
+         certPathEncodings = Collections.unmodifiableList(encodings);
+     }
+@@ -298,27 +302,29 @@
              return toDEREncoded(new ContentInfo(
                      PKCSObjectIdentifiers.signedData, sd));
          }