Class RACF


  • public class RACF
    extends java.lang.Object
    This class represents a RACF object which contains the contents of a RACF keyring. This class is an interface to the JNI code for reading and storing records from and to the key ring.
    • Constructor Detail

      • RACF

        public RACF()
    • Method Detail

      • TestLibrary

        public void TestLibrary()
        Test if the DLL (JNI code) for reading the RACF keyring is available.
      • getRecords

        public int getRecords​(java.lang.String userid,
                              java.lang.String alias,
                              java.lang.String ringid)
        Get RACF entries (certificates and keys) from the specified RACF key ring. Create a com.ibm.crypto.provider.RACFObject for each RACF entry, and store these entries in the RACFentries hash table.
        Parameters:
        userid - the userid of the key ring owner
        alias - not being used, ant string value should suffice
        ringid - the key ring name to read from
        Returns:
        the return code
      • putRecords

        public int putRecords​(RACFResults results,
                              byte[] useridbytes,
                              byte[] ringidbytes,
                              int numDeleteRecords,
                              int numPutRecords,
                              byte[] recordsbytes)
        Write certificate and key entries to the specified RACF key ring.
        Parameters:
        results - the results object containing results from the operation
        useridbytes - the userid of the key ring owner
        ringidbytes - the key ring to write to
        numDeleteRecords - number of delete records
        numPutRecords - number of put records
        recordsbytes - byte array containing certificates and keys to write to RACF
        Returns:
        the return code
      • isTrusted

        public boolean isTrusted​(java.lang.String userid,
                                 java.lang.String ringid,
                                 byte[] cert)
        Check if the certificate is trusted.
        Parameters:
        userid - the userid of the key ring owner
        ringid - the key ring which contains the specified certificate
        cert - the certificate to be checked for trust status
        Returns:
        true if the certificate is trusted, false otherwise.
      • getRACFHashtable

        public java.util.Hashtable getRACFHashtable()
        Return the hash table containing RACF key ring entries.
        Returns:
        hash table containing RACF key ring entries.
      • setDebug

        public void setDebug​(boolean dbg)
        Sets whether native method tracing is enabled or disabled.
        Parameters:
        dbg - flag to indicate whether native method tracing should be enabled or disabled