- java.lang.Object
-
- com.ibm.crypto.zsecurity.provider.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.
-
-
Field Summary
Fields Modifier and Type Field Description boolean
debug
static boolean
IsAvailable
static int
RACF_CERTAUTH
static int
RACF_DH_KEY
static int
RACF_DSA_KEY
static int
RACF_ICSF_KEY
static int
RACF_PCICC_KEY
static int
RACF_PERSONAL
static int
RACF_PKDS_ECC_KEY
static int
RACF_SOFTWARE_ECC_KEY
static int
RACF_SOFTWARE_KEY
static int
RACF_TKDS_DSA_KEY
static int
RACF_TKDS_ECC_KEY
static int
RACF_TKDS_RSA_KEY
-
Constructor Summary
Constructors Constructor Description RACF()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Hashtable
getRACFHashtable()
Return the hash table containing RACF key ring entries.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.boolean
isTrusted(java.lang.String userid, java.lang.String ringid, byte[] cert)
Check if the certificate is trusted.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.void
setDebug(boolean dbg)
Sets whether native method tracing is enabled or disabled.void
TestLibrary()
Test if the DLL (JNI code) for reading the RACF keyring is available.
-
-
-
Field Detail
-
RACF_SOFTWARE_KEY
public static final int RACF_SOFTWARE_KEY
- See Also:
- Constant Field Values
-
RACF_ICSF_KEY
public static final int RACF_ICSF_KEY
- See Also:
- Constant Field Values
-
RACF_PCICC_KEY
public static final int RACF_PCICC_KEY
- See Also:
- Constant Field Values
-
RACF_DSA_KEY
public static final int RACF_DSA_KEY
- See Also:
- Constant Field Values
-
RACF_DH_KEY
public static final int RACF_DH_KEY
- See Also:
- Constant Field Values
-
RACF_SOFTWARE_ECC_KEY
public static final int RACF_SOFTWARE_ECC_KEY
- See Also:
- Constant Field Values
-
RACF_PKDS_ECC_KEY
public static final int RACF_PKDS_ECC_KEY
- See Also:
- Constant Field Values
-
RACF_TKDS_RSA_KEY
public static final int RACF_TKDS_RSA_KEY
- See Also:
- Constant Field Values
-
RACF_TKDS_ECC_KEY
public static final int RACF_TKDS_ECC_KEY
- See Also:
- Constant Field Values
-
RACF_TKDS_DSA_KEY
public static final int RACF_TKDS_DSA_KEY
- See Also:
- Constant Field Values
-
RACF_CERTAUTH
public static final int RACF_CERTAUTH
- See Also:
- Constant Field Values
-
RACF_PERSONAL
public static final int RACF_PERSONAL
- See Also:
- Constant Field Values
-
IsAvailable
public static boolean IsAvailable
-
debug
public boolean debug
-
-
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 acom.ibm.crypto.provider.RACFObject
for each RACF entry, and store these entries in theRACFentries
hash table.- Parameters:
userid
- the userid of the key ring owneralias
- not being used, ant string value should sufficeringid
- 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 operationuseridbytes
- the userid of the key ring ownerringidbytes
- the key ring to write tonumDeleteRecords
- number of delete recordsnumPutRecords
- number of put recordsrecordsbytes
- 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 ownerringid
- the key ring which contains the specified certificatecert
- 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
-
-