Merge "org.apache.conn.ssl: rename DistinguishedNameParser to AndroidDistinguishedNameParser"

am: eb93182dfb

* commit 'eb93182dfb862df27e479d30c7b8e12f13e5def5':
  org.apache.conn.ssl: rename DistinguishedNameParser to AndroidDistinguishedNameParser
This commit is contained in:
Sergio Giro
2016-01-21 17:20:41 +00:00
committed by android-build-merger
2 changed files with 4 additions and 4 deletions

View File

@@ -208,8 +208,8 @@ public abstract class AbstractVerifier implements X509HostnameVerifier {
} }
public static String[] getCNs(X509Certificate cert) { public static String[] getCNs(X509Certificate cert) {
DistinguishedNameParser dnParser = AndroidDistinguishedNameParser dnParser =
new DistinguishedNameParser(cert.getSubjectX500Principal()); new AndroidDistinguishedNameParser(cert.getSubjectX500Principal());
List<String> cnList = dnParser.getAllMostSpecificFirst("cn"); List<String> cnList = dnParser.getAllMostSpecificFirst("cn");
if(!cnList.isEmpty()) { if(!cnList.isEmpty()) {

View File

@@ -29,7 +29,7 @@ import javax.security.auth.x500.X500Principal;
* @hide * @hide
*/ */
@Deprecated @Deprecated
final class DistinguishedNameParser { final class AndroidDistinguishedNameParser {
private final String dn; private final String dn;
private final int length; private final int length;
private int pos; private int pos;
@@ -42,7 +42,7 @@ final class DistinguishedNameParser {
/** distinguished name chars */ /** distinguished name chars */
private char[] chars; private char[] chars;
public DistinguishedNameParser(X500Principal principal) { public AndroidDistinguishedNameParser(X500Principal principal) {
// RFC2253 is used to ensure we get attributes in the reverse // RFC2253 is used to ensure we get attributes in the reverse
// order of the underlying ASN.1 encoding, so that the most // order of the underlying ASN.1 encoding, so that the most
// significant values of repeated attributes occur first. // significant values of repeated attributes occur first.