All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class com.ibm.as400.access.AS400CertificateUserProfileUtil

java.lang.Object
   |
   +----com.ibm.as400.access.AS400CertificateUtil
           |
           +----com.ibm.as400.access.AS400CertificateUserProfileUtil

public class AS400CertificateUserProfileUtil
extends AS400CertificateUtil
implements Serializable

The AS400CertificateUserProfileUtil class accesses certificates in an AS400 user profile object.


Constructor Index

 o AS400CertificateUserProfileUtil()
Constructs an AS400CertificateUserProfileUtil object.
 o AS400CertificateUserProfileUtil(AS400, String)
Constructs an AS400CertificateUserProfileUtil object.

Method Index

 o addCertificate(byte[])
Adds the certificate to the user profile.
 o deleteCertificate(byte[])
Deletes the certificate from the user profile.
 o deleteCertificateByHandle(byte[])
Deletes the certificate matching the certificate handle from the user profile.
 o findCertificateUser(byte[])
Returns the user profile name which contains the certificate.
 o findCertificateUserByHandle(byte[])
Returns the user profile which contains the certificate with the specified handle.
 o listCertificates(AS400CertificateAttribute[], String)
List certificates which match the specified attributes.
 o setPath(String)
Sets the path for the user profile.

Constructors

 o AS400CertificateUserProfileUtil
 public AS400CertificateUserProfileUtil()
Constructs an AS400CertificateUserProfileUtil object.

 o AS400CertificateUserProfileUtil
 public AS400CertificateUserProfileUtil(AS400 system,
                                        String path)
Constructs an AS400CertificateUserProfileUtil object. If the user profile specified is not the user profile that is currently running, adding and deleting certificates require *SECADM special authority for the currently running user profile and *USE and *OBJMGT authorities to the target user profile.

Parameters:
system - The AS/400 system on which the user profile exists.
path - The fully qualified integrated file system path name of the user profile, for example, "/QSYS.LIB/MYLIB.LIB/MYUSRPRF.USRPRF".

Methods

 o addCertificate
 public void addCertificate(byte certificate[]) throws AS400SecurityException, ErrorCompletingRequestException, ExtendedIOException, InterruptedException, IOException, ObjectDoesNotExistException
Adds the certificate to the user profile. Throws an ExtendedIOException if the certificate is already a member of the user profile.

Parameters:
certificate - The complete ASN.1 X.509 certificate to be added to the user profile.
Throws: AS400SecurityException
If a security or authority error occurs.
Throws: ErrorCompletingRequestException
If an error occurs before the request is completed.
Throws: ExtendedIllegalArgumentException
If invalid certificate.
Throws: ExtendedIOException
If certificate already added and other AS400 certificate access errors.
Throws: InterruptedException
If this thread is interrupted.
Throws: IOException
If an error occurs while communicating with the AS/400.
Throws: ObjectDoesNotExistException
If the AS400 object does not exist.
Overrides:
addCertificate in class AS400CertificateUtil
 o deleteCertificate
 public void deleteCertificate(byte certificate[]) throws AS400SecurityException, ErrorCompletingRequestException, ExtendedIOException, InterruptedException, IOException, ObjectDoesNotExistException
Deletes the certificate from the user profile. Throws an ExtendedIOException if the certificate is not present in the user profile.

Parameters:
certificate - The complete ASN.1 X.509 certificate to be deleted from the user profile.
Throws: AS400SecurityException
If a security or authority error occurs.
Throws: ErrorCompletingRequestException
If an error occurs before the request is completed.
Throws: ExtendedIllegalArgumentException
If invalid certificate.
Throws: ExtendedIOException
If certificate not found and other AS400 certificate access errors.
Throws: InterruptedException
If this thread is interrupted.
Throws: IOException
If an error occurs while communicating with the AS/400.
Throws: ObjectDoesNotExistException
If the AS400 object does not exist.
Overrides:
deleteCertificate in class AS400CertificateUtil
 o deleteCertificateByHandle
 public void deleteCertificateByHandle(byte certificateHandle[]) throws AS400SecurityException, ErrorCompletingRequestException, ExtendedIOException, InterruptedException, IOException, ObjectDoesNotExistException
Deletes the certificate matching the certificate handle from the user profile. Throws ExtendedIOException if the certificate is not present in the user profile.

Parameters:
certificateHandle - The AS400Certificate handle of the certificate to be deleted from the user profile.
Throws: AS400SecurityException
If a security or authority error occurs.
Throws: ErrorCompletingRequestException
If an error occurs before the request is completed.
Throws: ExtendedIllegalArgumentException
If invalid certificate handle.
Throws: ExtendedIOException
If certificate not found and other AS400 certificate access errors.
Throws: InterruptedException
If this thread is interrupted.
Throws: IOException
If an error occurs while communicating with the AS/400.
Throws: ObjectDoesNotExistException
If the AS400 object does not exist.
Overrides:
deleteCertificateByHandle in class AS400CertificateUtil
 o findCertificateUser
 public String findCertificateUser(byte certificate[]) throws AS400SecurityException, ErrorCompletingRequestException, ExtendedIOException, InterruptedException, IOException, ObjectDoesNotExistException
Returns the user profile name which contains the certificate. Throws ExtendedIOException if the certificate is not registered to any user profile on the system.

Parameters:
certificate - The ASN.1 X.509 encoded certificate to search for in the user profile.
Returns:
The user profile name containing the certificate.
Throws: AS400SecurityException
If a security or authority error occurs.
Throws: ErrorCompletingRequestException
If an error occurs before the request is completed.
Throws: ExtendedIllegalArgumentException
If invalid certificate.
Throws: ExtendedIOException
If certificate not found and other AS400 certificate access errors.
Throws: InterruptedException
If this thread is interrupted.
Throws: IOException
If an error occurs while communicating with the AS/400.
Throws: ObjectDoesNotExistException
If the AS400 object does not exist.
 o findCertificateUserByHandle
 public String findCertificateUserByHandle(byte certificateHandle[]) throws AS400SecurityException, ErrorCompletingRequestException, ExtendedIOException, InterruptedException, IOException, ObjectDoesNotExistException
Returns the user profile which contains the certificate with the specified handle. Throws ExtendedIOException if the certificate is not registered to any user profile on the system.

Parameters:
certificateHandle - The AS400Certificate handle the certificate should match.
Returns:
The user profile name containing the certificate.
Throws: AS400SecurityException
If a security or authority error occurs.
Throws: ErrorCompletingRequestException
If an error occurs before the request is completed.
Throws: ExtendedIllegalArgumentException
If invalid certificate handle.
Throws: ExtendedIOException
If certificate not found and other AS400 certificate access errors.
Throws: InterruptedException
If this thread is interrupted.
Throws: IOException
If an error occurs while communicating with the AS/400.
Throws: ObjectDoesNotExistException
If the AS400 object does not exist.
 o listCertificates
 public int listCertificates(AS400CertificateAttribute certificateAttributes[],
                             String userSpaceName) throws AS400SecurityException, ErrorCompletingRequestException, ExtendedIOException, InterruptedException, IOException, ObjectDoesNotExistException
List certificates which match the specified attributes. The certificates are copied from the user profile to the specified user space. The user profile is not locked during the listCertificates operation. Certificates are stored into the user space with CERT0100 format. See the AS400 QsyListVldlCertificates (QSYLSTVC) and QsyListUserCertificates (QSYLSTUC) API's for further information.

Parameters:
certificateAttributes - The list of attributes the certificate should match. A value of null places all certificates from user profile into the user space. An empty String or empty byte array search attribute will search for certificates that do not have this attribute. For example, SUBJECT_ORGANIZATION = new String("") will search for certificates without the subject organization field. Null search attributes are ignored.
userSpaceName - The fully qualified integrated file system path name of the user space to put the list results, for example, /QSYS.LIB/MYLIB.LIB/MYUSRSPC.USRSPC. The 10 character AS400 library of the user space may also be specified as %CURLIB% or %LIBL%. @see QSYSObjectPathName
Returns:
The number of certificates found matching the search attributes.
Throws: AS400SecurityException
If a security or authority error occurs.
Throws: ErrorCompletingRequestException
If an error occurs before the request is completed.
Throws: ExtendedIllegalArgumentException
If invalid search attributes or input parameter.
Throws: ExtendedIOException
If AS400 certificate access error.
Throws: InterruptedException
If this thread is interrupted.
Throws: IOException
If an error occurs while communicating with the AS/400.
Throws: ObjectDoesNotExistException
If the AS400 object does not exist.
Overrides:
listCertificates in class AS400CertificateUtil
 o setPath
 public void setPath(String path) throws PropertyVetoException
Sets the path for the user profile.

Parameters:
path - The fully qualified integrated file system path name of the user profile.
Throws: PropertyVetoException
If the change is vetoed.
Overrides:
setPath in class AS400CertificateUtil

All Packages  Class Hierarchy  This Package  Previous  Next  Index