Code example for X509Certificate

Methods: getIssuerDNgetSerialNumber

0
     * @return an LDAP filter for retrieving the user's entry. 
     */ 
    private String getFilterFromCertificate(X509Certificate cert)
    { 
        StringBuffer buff = new StringBuffer();
        String serialNumber = cert.getSerialNumber().toString(16).toUpperCase();
 
        if (serialNumber.length() % 2 != 0) buff.append("0");
 
        buff.append(serialNumber);
        buff.append(" ");
        buff.append(cert.getIssuerDN().toString());
        String filter = buff.toString();
        return filter;
    } 
 
    public void disassociate(Principal user)
    { 
        SecurityAssociation.clear(); 
    } 
Experience pair programming with AI  Get Codota for Java