SOMA.security.infrastructure
Class Infrastructure

java.lang.Object
  extended bySOMA.security.infrastructure.Infrastructure
All Implemented Interfaces:
InfrastructureConst, NetAddress
Direct Known Subclasses:
InfrastructureBox

public class Infrastructure
extends java.lang.Object
implements NetAddress, InfrastructureConst


Field Summary
static int CREATE_PROFILE
           
(package private)  InfrastructureAddress directoryAddress
           
(package private)  CertificateCRLList localCertificateCRLList
           
 java.io.PrintStream out
           
(package private)  EntrustProfile profile
           
static int RECOVER_PROFILE
           
(package private)  java.lang.String SearchBase
           
static java.lang.String SearchExpression
           
 
Fields inherited from interface SOMA.security.infrastructure.NetAddress
CA_IP, CA_SearchBase, DEFAULT_CA_PORT, DEFAULT_LDAP_PORT, DIR_IP
 
Constructor Summary
Infrastructure()
          Creates an new objects that rappresents an Entrust PKI
Infrastructure(InfrastructureAddress directoryAddress)
           
Infrastructure(java.lang.String caIP, java.lang.String dirIP)
          Creates an new objects that rappresents an Entrust PKI
Infrastructure(java.lang.String caIP, java.lang.String dirIP, boolean onLine)
          Creates an new objects that rappresents an Entrust PKI
 
Method Summary
 void connectDirectory()
           
(package private)  void createOrRecoverProfile(java.lang.String refnum, java.lang.String authcode, java.lang.String password, EntrustProfile epf, int signalg, java.lang.String filename, int mode)
           
(package private)  void createOrRecoverProfile(java.lang.String refnum, java.lang.String authcode, java.lang.String password, int signalg, java.lang.String filename, int mode)
          Creates a new entrust profile.
 void doKeyUpdate(EntrustProfile profile, int key_type, java.lang.String filename)
           
 void doKeyUpdate(int key_type, java.lang.String filename)
          Used to update the keys
 X509Certificate getCertificate(EntrustProfile epf, java.lang.String dn, boolean dirVer)
           
 X509Certificate getCertificate(java.lang.String dn, boolean dirVer)
          Returns a certificate.
 CertificateCRLList getCertificateCRLList()
           
 javax.naming.directory.DirContext getDirectoryContext()
           
 EntrustProfile getEntrustProfile(EntrustProfile profile)
           
 InfrastructureAddress getInfrastructureAddress()
          This method return CA address
 boolean getOnLine()
          This method return onLine state
 java.lang.String getSearchBase()
           
 X509Certificate[] getValidCertificates(EntrustProfile epf, java.lang.String[] dn)
           
 X509Certificate[] getValidCertificates(java.lang.String[] dn)
          Returns an array of valid certificates.
 long initCertificateCRLList(EntrustProfile epf, java.lang.String[] dn)
           
 long initCertificateCRLList(java.lang.String[] dn)
          Download the certificates from the directory.
 void putInfrastructureAddress(InfrastructureAddress ia)
          This method put CA address object
 void setEntrustProfile(EntrustProfile profile)
           
 void setOnLine(boolean onLine)
          This method sets the onLine parameter
 void setOut(java.io.PrintStream out)
           
 void setSearchBase(java.lang.String sb)
           
 boolean updateCertificateCRLList()
          Update the certificate list and the CRL list.
 void updateProfile(EntrustProfile profile, java.lang.String filename)
           
 void updateProfile(java.lang.String filename)
          Check if an update is needed and performs it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

out

public java.io.PrintStream out

SearchBase

java.lang.String SearchBase

directoryAddress

InfrastructureAddress directoryAddress

profile

EntrustProfile profile

localCertificateCRLList

CertificateCRLList localCertificateCRLList

RECOVER_PROFILE

public static final int RECOVER_PROFILE
See Also:
Constant Field Values

CREATE_PROFILE

public static final int CREATE_PROFILE
See Also:
Constant Field Values

SearchExpression

public static final java.lang.String SearchExpression
See Also:
Constant Field Values
Constructor Detail

Infrastructure

public Infrastructure(InfrastructureAddress directoryAddress)
               throws java.io.IOException,
                      iaik.pkcs.PKCSParsingException

Infrastructure

public Infrastructure(java.lang.String caIP,
                      java.lang.String dirIP)
Creates an new objects that rappresents an Entrust PKI

Parameters:
caIP - the ip address or hostname of the entrust authority,
dirIP - the ip address or hostname of the ldap directory

Infrastructure

public Infrastructure(java.lang.String caIP,
                      java.lang.String dirIP,
                      boolean onLine)
Creates an new objects that rappresents an Entrust PKI

Parameters:
caIP - the ip address or hostname of the entrust authority,
dirIP - the ip address or hostname of the ldap directory
onLine - the directory is on line.

Infrastructure

public Infrastructure()
Creates an new objects that rappresents an Entrust PKI

Method Detail

setEntrustProfile

public void setEntrustProfile(EntrustProfile profile)

getEntrustProfile

public EntrustProfile getEntrustProfile(EntrustProfile profile)

setOut

public void setOut(java.io.PrintStream out)

getCertificateCRLList

public CertificateCRLList getCertificateCRLList()

getOnLine

public boolean getOnLine()
This method return onLine state


setOnLine

public void setOnLine(boolean onLine)
This method sets the onLine parameter

Parameters:
onLine - it's the new value

putInfrastructureAddress

public void putInfrastructureAddress(InfrastructureAddress ia)
This method put CA address object


getInfrastructureAddress

public InfrastructureAddress getInfrastructureAddress()
This method return CA address

Returns:
ca address

getSearchBase

public java.lang.String getSearchBase()

setSearchBase

public void setSearchBase(java.lang.String sb)

getDirectoryContext

public javax.naming.directory.DirContext getDirectoryContext()

connectDirectory

public void connectDirectory()

createOrRecoverProfile

void createOrRecoverProfile(java.lang.String refnum,
                            java.lang.String authcode,
                            java.lang.String password,
                            int signalg,
                            java.lang.String filename,
                            int mode)
                      throws java.io.FileNotFoundException,
                             com.entrust.security.exceptions.EntrustBaseException
Creates a new entrust profile. It shouldn't be used directly, but through EntrustProfileManager.

Parameters:
refnum - the reference number,
authcode - the authentication code,
password - the password used to protect the profile,
signalg - the signature algorithm to be used,
filename - the file where to store the profile
mode - can be either RECOVER_PROFILE or CREATE_PROFILE
Throws:
java.io.FileNotFoundException
com.entrust.security.exceptions.EntrustBaseException

createOrRecoverProfile

void createOrRecoverProfile(java.lang.String refnum,
                            java.lang.String authcode,
                            java.lang.String password,
                            EntrustProfile epf,
                            int signalg,
                            java.lang.String filename,
                            int mode)
                      throws java.io.FileNotFoundException,
                             com.entrust.security.exceptions.EntrustBaseException
Throws:
java.io.FileNotFoundException
com.entrust.security.exceptions.EntrustBaseException

updateProfile

public void updateProfile(java.lang.String filename)
                   throws com.entrust.security.exceptions.EntrustBaseException
Check if an update is needed and performs it.

Parameters:
filename - the filename where to store the updated profile
Throws:
com.entrust.security.exceptions.EntrustBaseException

updateProfile

public void updateProfile(EntrustProfile profile,
                          java.lang.String filename)
                   throws com.entrust.security.exceptions.EntrustBaseException
Throws:
com.entrust.security.exceptions.EntrustBaseException

doKeyUpdate

public void doKeyUpdate(int key_type,
                        java.lang.String filename)
                 throws com.entrust.security.exceptions.EntrustBaseException
Used to update the keys

Throws:
com.entrust.security.exceptions.EntrustBaseException

doKeyUpdate

public void doKeyUpdate(EntrustProfile profile,
                        int key_type,
                        java.lang.String filename)
                 throws com.entrust.security.exceptions.EntrustBaseException
Throws:
com.entrust.security.exceptions.EntrustBaseException

getValidCertificates

public X509Certificate[] getValidCertificates(java.lang.String[] dn)
Returns an array of valid certificates.

Parameters:
dn - the array of distinguished name for whom to verify and ....
Returns:
an array of valid certificates

getValidCertificates

public X509Certificate[] getValidCertificates(EntrustProfile epf,
                                              java.lang.String[] dn)

getCertificate

public X509Certificate getCertificate(java.lang.String dn,
                                      boolean dirVer)
                               throws java.io.IOException,
                                      iaik.pkcs.PKCSParsingException
Returns a certificate.

Parameters:
dn - the array of distinguished name for whom to verify and,
dirVer - access to directory,
Returns:
an array of valid certificates
Throws:
java.io.IOException
iaik.pkcs.PKCSParsingException

getCertificate

public X509Certificate getCertificate(EntrustProfile epf,
                                      java.lang.String dn,
                                      boolean dirVer)
                               throws java.io.IOException,
                                      iaik.pkcs.PKCSParsingException
Throws:
java.io.IOException
iaik.pkcs.PKCSParsingException

initCertificateCRLList

public long initCertificateCRLList(java.lang.String[] dn)
                            throws java.io.IOException,
                                   iaik.pkcs.PKCSParsingException
Download the certificates from the directory.

Parameters:
dn - the array of distinguish names to download,
Returns:
an array of valid certificates
Throws:
java.io.IOException
iaik.pkcs.PKCSParsingException

initCertificateCRLList

public long initCertificateCRLList(EntrustProfile epf,
                                   java.lang.String[] dn)
                            throws java.io.IOException,
                                   iaik.pkcs.PKCSParsingException
Throws:
java.io.IOException
iaik.pkcs.PKCSParsingException

updateCertificateCRLList

public boolean updateCertificateCRLList()
Update the certificate list and the CRL list.



Copyright © 2004 Luca Foschini