public static String getCertificatePolicyId(X509Certificate cert)
public static String getCertificatePolicyId(X509Certificate cert, int pos)
    public static String getCertificatePolicyId(X509Certificate cert)        throws IOException {        byte[] extvalue = cert.getExtensionValue("2.5.29.32");        if (extvalue == null) {            return null;        }        DEROctetString oct = (DEROctetString) (new DERInputStream(new ByteArrayInputStream(extvalue)).readObject());        CertificatePolicies cp = new CertificatePolicies((ASN1Sequence) new DERInputStream(                    new ByteArrayInputStream(oct.getOctets())).readObject());        String id = cp.getPolicy(0);        return id;    } // getCertificatePolicyId