Oracle Security Developer Tools PKI SDK LDAP Java API Reference
10g Release 2 (10.1.2.0.2)

B15561-01


oracle.security.crypto.ldap
Class LDAPUtils

java.lang.Object
  extended byoracle.security.crypto.ldap.LDAPUtils


public class LDAPUtils
extends java.lang.Object

Constructor Summary
LDAPUtils()

Method Summary
static void addCACert(oracle.security.crypto.cert.X500Name subject, oracle.security.crypto.cert.X509 cert, javax.naming.directory.DirContext ctx)
Adds a CA certificate to the LDAP server.
static void addCACert(oracle.security.crypto.cert.X509 cert, javax.naming.directory.DirContext ctx)
Adds a CA certificate to the LDAP server.
static void addCert(oracle.security.crypto.cert.X500Name subject, oracle.security.crypto.cert.X509 cert, java.lang.String attr, javax.naming.directory.DirContext ctx)
Adds a certificate to the LDAP server.
static void addCert(oracle.security.crypto.cert.X509 cert, java.lang.String attr, javax.naming.directory.DirContext ctx)
Adds a certificate to the LDAP server.
static void addCRL(oracle.security.crypto.cert.CRL crl, javax.naming.directory.DirContext ctx)
Adds a CRL to the LDAP server.
static void addCRL(oracle.security.crypto.cert.X500Name crlDist, oracle.security.crypto.cert.CRL crl, javax.naming.directory.DirContext ctx)
Adds a CRL to the LDAP server.
static void addUserCert(oracle.security.crypto.cert.X500Name subject, oracle.security.crypto.cert.X509 cert, javax.naming.directory.DirContext ctx)
Adds a certificate to the LDAP server.
static void addUserCert(oracle.security.crypto.cert.X509 cert, javax.naming.directory.DirContext ctx)
Adds a certificate to the LDAP server.
static void createCA(oracle.security.crypto.cert.X500Name dn, oracle.security.crypto.cert.X509 cert, PrivateKey sk, oracle.security.crypto.cert.CRL crl, javax.naming.directory.DirContext ctx)
Creates a CA on the LDAP server: a certificate and a CRL..
static void createCA(oracle.security.crypto.cert.X500Name dn, oracle.security.crypto.cert.X509 cert, PrivateKey sk, javax.naming.directory.DirContext ctx)
Creates a CA on the LDAP server: a certificate and a CRL..
static void createCA(oracle.security.crypto.cert.X509 cert, PrivateKey sk, oracle.security.crypto.cert.CRL crl, javax.naming.directory.DirContext ctx)
Creates a CA on the LDAP server: a certificate and a CRL..
static void createCA(oracle.security.crypto.cert.X509 cert, PrivateKey sk, javax.naming.directory.DirContext ctx)
Creates a CA on the LDAP server: a certificate and a CRL..
static java.util.Vector getCACerts(oracle.security.crypto.cert.X500Name subject, javax.naming.directory.DirContext ctx)
Gets the certificates that match the subject from the Directory represented by the context.
static java.util.Vector getCerts(oracle.security.crypto.cert.X500Name subject, java.lang.String attr, javax.naming.directory.DirContext ctx)
Gets the certificates that match the subject from the Directory represented by the context.
static oracle.security.crypto.cert.CRL getCRL(oracle.security.crypto.cert.X500Name crlDist, javax.naming.directory.DirContext ctx)
Gets a CRL from the Directory represented by the context.
static java.util.Vector getUserCerts(oracle.security.crypto.cert.X500Name subject, javax.naming.directory.DirContext ctx)
Gets the certificates that match the subject from the Directory represented by the context.
static void removeCACert(oracle.security.crypto.cert.X500Name subject, javax.naming.directory.DirContext ctx)
Removes a CAcertificate from the LDAP server.
static void removeCACert(oracle.security.crypto.cert.X500Name subject, oracle.security.crypto.cert.X509 cert, javax.naming.directory.DirContext ctx)
Removes a CAcertificate from the LDAP server.
static void removeCACert(oracle.security.crypto.cert.X509 cert, javax.naming.directory.DirContext ctx)
Removes a CAcertificate from the LDAP server.
static void removeCert(oracle.security.crypto.cert.X500Name subject, java.lang.String attr, javax.naming.directory.DirContext ctx)
Removes a certificate from the LDAP server.
static void removeCert(oracle.security.crypto.cert.X500Name subject, oracle.security.crypto.cert.X509 cert, java.lang.String attr, javax.naming.directory.DirContext ctx)
Removes a certificate from the LDAP server.
static void removeCert(oracle.security.crypto.cert.X509 cert, java.lang.String attr, javax.naming.directory.DirContext ctx)
Removes a certificate from the LDAP server.
static void removeUserCert(oracle.security.crypto.cert.X500Name subject, javax.naming.directory.DirContext ctx)
Removes a certificate from the LDAP server.
static void removeUserCert(oracle.security.crypto.cert.X500Name subject, oracle.security.crypto.cert.X509 cert, javax.naming.directory.DirContext ctx)
Removes a certificate from the LDAP server.
static void removeUserCert(oracle.security.crypto.cert.X509 cert, javax.naming.directory.DirContext ctx)
Removes a certificate from the LDAP server.
static void updateCRL(oracle.security.crypto.cert.CRL crl, javax.naming.directory.DirContext ctx)
Updates a CRL on the LDAP server.
static void updateCRL(oracle.security.crypto.cert.X500Name crlDist, oracle.security.crypto.cert.CRL crl, javax.naming.directory.DirContext ctx)
Updates a CRL on the LDAP server.

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Constructor Detail

LDAPUtils

public LDAPUtils()

Method Detail

addUserCert

public static void addUserCert(oracle.security.crypto.cert.X509 cert,
                               javax.naming.directory.DirContext ctx)
                        throws java.io.IOException,
                               javax.naming.NamingException
Adds a certificate to the LDAP server. The name identifying the certificate will be the subject of the certificate. The id of the attribute that will contain the value of the certificate will be userCertificate.
Parameters:
cert - The X509 certificate to import.
ctx - The directory context.
Throws:
java.io.IOException
javax.naming.NamingException

addUserCert

public static void addUserCert(oracle.security.crypto.cert.X500Name subject,
                               oracle.security.crypto.cert.X509 cert,
                               javax.naming.directory.DirContext ctx)
                        throws java.io.IOException,
                               javax.naming.NamingException
Adds a certificate to the LDAP server. The id of the attribute that will contain the value of the certificate will be userCertificate.
Parameters:
subject - The name that will identify the certificate in the directory.
cert - The X509 certificate to import.
ctx - The directory context.
Throws:
java.io.IOException
javax.naming.NamingException

addCACert

public static void addCACert(oracle.security.crypto.cert.X509 cert,
                             javax.naming.directory.DirContext ctx)
                      throws java.io.IOException,
                             javax.naming.NamingException
Adds a CA certificate to the LDAP server. The name identifying the certificate will be the subject of the certificate. The id of the attribute that will contain the value of the certificate will be cACertificate.
Parameters:
cert - The X509 CAcertificate to import.
ctx - The directory context.
Throws:
java.io.IOException
javax.naming.NamingException

addCACert

public static void addCACert(oracle.security.crypto.cert.X500Name subject,
                             oracle.security.crypto.cert.X509 cert,
                             javax.naming.directory.DirContext ctx)
                      throws java.io.IOException,
                             javax.naming.NamingException
Adds a CA certificate to the LDAP server. The id of the attribute that will contain the value of the certificate will be cACertificate.
Parameters:
subject - The name that will identify the certificate in the directory.
cert - The X509 CAcertificate to import.
ctx - The directory context.
Throws:
java.io.IOException
javax.naming.NamingException

addCert

public static void addCert(oracle.security.crypto.cert.X509 cert,
                           java.lang.String attr,
                           javax.naming.directory.DirContext ctx)
                    throws java.io.IOException,
                           javax.naming.NamingException
Adds a certificate to the LDAP server. The name identifying the certificate will be the subject of the certificate.
Parameters:
cert - The X509 certificate to import.
attr - The id of the attribute that will contain the value of the certificate.
ctx - The directory context.
Throws:
java.io.IOException
javax.naming.NamingException

addCert

public static void addCert(oracle.security.crypto.cert.X500Name subject,
                           oracle.security.crypto.cert.X509 cert,
                           java.lang.String attr,
                           javax.naming.directory.DirContext ctx)
                    throws java.io.IOException,
                           javax.naming.NamingException
Adds a certificate to the LDAP server.
Parameters:
subject - The name that will identify the certificate in the directory.
cert - The X509 certificate to import.
attr - The id of the attribute that will contain the value of the certificate.
ctx - The directory context.
Throws:
java.io.IOException
javax.naming.NamingException

getUserCerts

public static java.util.Vector getUserCerts(oracle.security.crypto.cert.X500Name subject,
                                            javax.naming.directory.DirContext ctx)
                                     throws java.io.IOException,
                                            javax.naming.NamingException
Gets the certificates that match the subject from the Directory represented by the context. The id of the attribute to retrieve will be userCertificate.
Parameters:
subject - The subject identifying the certificate to look for.
ctx - The directory context.
Throws:
java.io.IOException
javax.naming.NamingException

getCACerts

public static java.util.Vector getCACerts(oracle.security.crypto.cert.X500Name subject,
                                          javax.naming.directory.DirContext ctx)
                                   throws java.io.IOException,
                                          javax.naming.NamingException
Gets the certificates that match the subject from the Directory represented by the context. The id of the attribute to retrieve will be cACertificate.
Parameters:
subject - The subject identifying the certificate to look for.
ctx - The directory context.
Throws:
java.io.IOException
javax.naming.NamingException

getCerts

public static java.util.Vector getCerts(oracle.security.crypto.cert.X500Name subject,
                                        java.lang.String attr,
                                        javax.naming.directory.DirContext ctx)
                                 throws java.io.IOException,
                                        javax.naming.NamingException
Gets the certificates that match the subject from the Directory represented by the context.
Parameters:
subject - The subject identifying the certificate to look for.
attr - The id identifying the attribute to retrieve.
ctx - The directory context.
Throws:
java.io.IOException
javax.naming.NamingException

getCRL

public static oracle.security.crypto.cert.CRL getCRL(oracle.security.crypto.cert.X500Name crlDist,
                                                     javax.naming.directory.DirContext ctx)
                                              throws java.io.IOException,
                                                     javax.naming.NamingException
Gets a CRL from the Directory represented by the context. The id of the attribute to retrieve will be certificateRevocationList.
Parameters:
crlDist - The identifier representing the CRL to look for.
ctx - The directory context.
Throws:
java.io.IOException
javax.naming.NamingException

removeUserCert

public static void removeUserCert(oracle.security.crypto.cert.X509 cert,
                                  javax.naming.directory.DirContext ctx)
                           throws java.io.IOException,
                                  javax.naming.NamingException
Removes a certificate from the LDAP server. The name identifying the certificate to remove will be the subject of the certificate. The id of the attribute to remove containing the value of the certificate will be userCertificate.
Parameters:
cert - The X509 certificate to remove.
ctx - The directory context.
Throws:
java.io.IOException
javax.naming.NamingException

removeUserCert

public static void removeUserCert(oracle.security.crypto.cert.X500Name subject,
                                  oracle.security.crypto.cert.X509 cert,
                                  javax.naming.directory.DirContext ctx)
                           throws java.io.IOException,
                                  javax.naming.NamingException
Removes a certificate from the LDAP server. The id of the attribute to remove containing the value of the certificate will be userCertificate.
Parameters:
subject - The name identifying the certificate to remove from the directory.
cert - The X509 certificate to remove.
ctx - The directory context.
Throws:
java.io.IOException
javax.naming.NamingException

removeUserCert

public static void removeUserCert(oracle.security.crypto.cert.X500Name subject,
                                  javax.naming.directory.DirContext ctx)
                           throws java.io.IOException,
                                  javax.naming.NamingException
Removes a certificate from the LDAP server. The id of the attribute to remove containing the value of the certificate will be userCertificate.
Parameters:
subject - The name identifying the certificate to remove from the directory.
ctx - The directory context.
Throws:
java.io.IOException
javax.naming.NamingException

removeCACert

public static void removeCACert(oracle.security.crypto.cert.X509 cert,
                                javax.naming.directory.DirContext ctx)
                         throws java.io.IOException,
                                javax.naming.NamingException
Removes a CAcertificate from the LDAP server. The name identifying the certificate to remove will be the subject of the certificate.The id of the attribute to remove containing the value of the certificate will be cACertificate.
Parameters:
cert - The X509 CAcertificate to remove.
ctx - The directory context.
Throws:
java.io.IOException
javax.naming.NamingException

removeCACert

public static void removeCACert(oracle.security.crypto.cert.X500Name subject,
                                oracle.security.crypto.cert.X509 cert,
                                javax.naming.directory.DirContext ctx)
                         throws java.io.IOException,
                                javax.naming.NamingException
Removes a CAcertificate from the LDAP server. The id of the attribute to remove containing the value of the certificate will be cACertificate.
Parameters:
subject - The name identifying the CAcertificate to remove from the directory.
cert - The X509 CAcertificate to remove.
ctx - The directory context.
Throws:
java.io.IOException
javax.naming.NamingException

removeCACert

public static void removeCACert(oracle.security.crypto.cert.X500Name subject,
                                javax.naming.directory.DirContext ctx)
                         throws java.io.IOException,
                                javax.naming.NamingException
Removes a CAcertificate from the LDAP server. The id of the attribute to remove containing the value of the certificate will be cACertificate.
Parameters:
subject - The name identifying the CAcertificate to remove from the directory.
ctx - The directory context.
Throws:
java.io.IOException
javax.naming.NamingException

removeCert

public static void removeCert(oracle.security.crypto.cert.X509 cert,
                              java.lang.String attr,
                              javax.naming.directory.DirContext ctx)
                       throws java.io.IOException,
                              javax.naming.NamingException
Removes a certificate from the LDAP server. The name identifying the certificate to remove will be the subject of the certificate.
Parameters:
cert - The X509 certificate to remove.
attr - The id of the attribute to remove.
ctx - The directory context.
Throws:
java.io.IOException
javax.naming.NamingException

removeCert

public static void removeCert(oracle.security.crypto.cert.X500Name subject,
                              oracle.security.crypto.cert.X509 cert,
                              java.lang.String attr,
                              javax.naming.directory.DirContext ctx)
                       throws java.io.IOException,
                              javax.naming.NamingException
Removes a certificate from the LDAP server.
Parameters:
subject - The name identifying the certificate to remove from the directory.
cert - The X509 certificate to remove.
attr - The id of the attribute to remove.
ctx - The directory context.
Throws:
java.io.IOException
javax.naming.NamingException

removeCert

public static void removeCert(oracle.security.crypto.cert.X500Name subject,
                              java.lang.String attr,
                              javax.naming.directory.DirContext ctx)
                       throws java.io.IOException,
                              javax.naming.NamingException
Removes a certificate from the LDAP server.
Parameters:
subject - The name identifying the certificate to remove from the directory.
attr - The id of the attribute to remove.
ctx - The directory context.
Throws:
java.io.IOException
javax.naming.NamingException

addCRL

public static void addCRL(oracle.security.crypto.cert.CRL crl,
                          javax.naming.directory.DirContext ctx)
                   throws java.io.IOException,
                          javax.naming.NamingException
Adds a CRL to the LDAP server. The name identifying the CRL will be the issuer of the CRL. The id of the attribute that will contain the value of the CRL will be certificateRevocationList.
Parameters:
crl - The CRL to import.
ctx - The directory context.
Throws:
java.io.IOException
javax.naming.NamingException

addCRL

public static void addCRL(oracle.security.crypto.cert.X500Name crlDist,
                          oracle.security.crypto.cert.CRL crl,
                          javax.naming.directory.DirContext ctx)
                   throws java.io.IOException,
                          javax.naming.NamingException
Adds a CRL to the LDAP server. The name identifying the CRL will be the issuer of the CRL. The id of the attribute that will contain the value of the CRL will be certificateRevocationList.
Parameters:
crlDist - The name that will identify the CRL in the directory.
crl - The CRL to import.
ctx - The directory context.
Throws:
java.io.IOException
javax.naming.NamingException

updateCRL

public static void updateCRL(oracle.security.crypto.cert.CRL crl,
                             javax.naming.directory.DirContext ctx)
                      throws java.io.IOException,
                             javax.naming.NamingException
Updates a CRL on the LDAP server. The name identifying the CRL will be the issuer of the CRL. The id of the attribute that will contain the value of the CRL will be certificateRevocationList.
Parameters:
crl - The CRL to import.
ctx - The directory context.
Throws:
java.io.IOException
javax.naming.NamingException

updateCRL

public static void updateCRL(oracle.security.crypto.cert.X500Name crlDist,
                             oracle.security.crypto.cert.CRL crl,
                             javax.naming.directory.DirContext ctx)
                      throws java.io.IOException,
                             javax.naming.NamingException
Updates a CRL on the LDAP server. The id of the attribute that will contain the value of the CRL will be certificateRevocationList.
Parameters:
crlDist - The name identifying the CRL in the directory.
crl - The CRL to import.
ctx - The directory context.
Throws:
java.io.IOException
javax.naming.NamingException

createCA

public static void createCA(oracle.security.crypto.cert.X509 cert,
                            PrivateKey sk,
                            javax.naming.directory.DirContext ctx)
                     throws java.io.IOException,
                            javax.naming.NamingException,
                            SignatureException
Creates a CA on the LDAP server: a certificate and a CRL..
Parameters:
cert - The X509 CAcertificate to import.
sk - The private key of the CA.
ctx - The directory context.
Throws:
java.io.IOException
javax.naming.NamingException
SignatureException

createCA

public static void createCA(oracle.security.crypto.cert.X500Name dn,
                            oracle.security.crypto.cert.X509 cert,
                            PrivateKey sk,
                            javax.naming.directory.DirContext ctx)
                     throws java.io.IOException,
                            javax.naming.NamingException,
                            SignatureException
Creates a CA on the LDAP server: a certificate and a CRL..
Parameters:
dn - The name identifying the certificate and the CRL.
cert - The X509 CAcertificate to import.
sk - The private key of the CA.
ctx - The directory context.
Throws:
java.io.IOException
javax.naming.NamingException
SignatureException

createCA

public static void createCA(oracle.security.crypto.cert.X509 cert,
                            PrivateKey sk,
                            oracle.security.crypto.cert.CRL crl,
                            javax.naming.directory.DirContext ctx)
                     throws java.io.IOException,
                            javax.naming.NamingException,
                            SignatureException
Creates a CA on the LDAP server: a certificate and a CRL..
Parameters:
cert - The X509 CAcertificate to import.
sk - The private key of the CA.
crl - The CRL to import.
ctx - The directory context.
Throws:
java.io.IOException
javax.naming.NamingException
SignatureException

createCA

public static void createCA(oracle.security.crypto.cert.X500Name dn,
                            oracle.security.crypto.cert.X509 cert,
                            PrivateKey sk,
                            oracle.security.crypto.cert.CRL crl,
                            javax.naming.directory.DirContext ctx)
                     throws java.io.IOException,
                            javax.naming.NamingException,
                            SignatureException
Creates a CA on the LDAP server: a certificate and a CRL..
Parameters:
dn - The name identifying the certificate and the CRL.
cert - The X509 CAcertificate to import.
sk - The private key of the CA.
crl - The CRL to import.
ctx - The directory context.
Throws:
java.io.IOException
javax.naming.NamingException
SignatureException

Oracle Security Developer Tools PKI SDK LDAP Java API Reference
10g Release 2 (10.1.2.0.2)

B15561-01


Copyright © 2005 , Oracle. All rights reserved.