Responsible for managing the properties file
"~/.globus/cog.properties", which holds information about various properties
needed by the security classes. These properties include:
public static void setDefault(CoGProperties properties)
Sets default configuration. It can be used
to set a different configuration dynamically.
save
public void save()
throws java.io.IOException
save
public void save(java.lang.String file)
throws java.io.IOException
load
public void load(java.lang.String file)
throws java.io.IOException
load
public void load(java.io.InputStream in)
throws java.io.IOException
Overrides:
load in class java.util.Properties
fixSpace
public static void fixSpace(java.util.Properties p)
getUserCertFile
public java.lang.String getUserCertFile()
Retreives the location of the user cert file.
It first checks the X509_USER_CERT system property. If the property
is not set, it checks next the 'usercert' property in the current
configuration. If that property is not set, it returns a default
location of the user cert file. The default value
is the 'usercert.pem' file in the user's globus directory. For example:
${user.home}/.globus/usercert.pem.
Returns:
String the location of the user cert file
setUserCertFile
public void setUserCertFile(java.lang.String userCertFile)
getPKCS11LibraryName
public java.lang.String getPKCS11LibraryName()
getDefaultPKCS11Handle
public java.lang.String getDefaultPKCS11Handle()
getUserKeyFile
public java.lang.String getUserKeyFile()
Retrieves the location of the user key file.
It first checks the X509_USER_KEY system property. If the property
is not set, it checks next the 'userkey' property in the current
configuration. If that property is not set, it returns a default
location of the user key file. The default value
is the 'userkey.pem' file in the user's globus directory. For example:
${user.home}/.globus/userkey.pem.
Returns:
String the location of the user key file
setUserKeyFile
public void setUserKeyFile(java.lang.String userKeyFile)
getIPAddress
public java.lang.String getIPAddress()
Returns the user specified ip address. This is used
for DHCP machines where java is unable to determine the
right IP address.
Retrieves the location of the CA cert files.
It first checks the X509_CERT_DIR system property. If the property
is not set, it checks next the 'cacert' property in the current
configuration. If that property is not set, it tries to find
the certificates using the following rules:
First the ${user.home}/certificates directory is checked.
If the directory does not exist, and on a Unix machine, the
/etc/grid-security/certificates directory is checked next. Otherwise,
null is returned. This indicates the the certificates directory could
not be found.
Moreover, this function can return multiple file and directory
locations.
The locations must be comma separated.
Returns:
String the locations of the CA certificates
setCaCertLocations
public void setCaCertLocations(java.lang.String list)
getProxyFile
public java.lang.String getProxyFile()
Retrieves the location of the proxy file.
It first checks the X509_USER_PROXY system property. If the property
is not set, it checks next the 'proxy' property in the current
configuration. If that property is not set, then it defaults to a
value based on the following rules:
If a UID system property is set, and running on a Unix machine it
returns /tmp/x509up_u${UID}. If any other machine then Unix, it returns
${tempdir}/x509up_u${UID}, where tempdir is a platform-specific
temporary directory as indicated by the java.io.tmpdir system property.
If a UID system property is not set, the username will be used instead
of the UID. That is, it returns ${tempdir}/x509up_u_${username}
This is done this way because Java is not able to obtain the current
uid.
Returns:
String the location of the proxy file
setProxyFile
public void setProxyFile(java.lang.String proxyFile)
getTcpPortRange
public java.lang.String getTcpPortRange()
Returns the tcp port range.
It first checks the 'org.globus.tcp.port.range' system property. If the
system property is not set then it returns the value specified in the
configuration file. Returns null if the port range is not defined.
The port range is in the following form: ,
Returns:
String the port range.
useDevRandom
public boolean useDevRandom()
Returns whether to use the /dev/urandom device
for seed generation.
Returns:
true if the device should be used (if available of course)
Returns true by default unless specified otherwise by the
user.
getSecureRandomProvider
public java.lang.String getSecureRandomProvider()
getSecureRandomAlgorithm
public java.lang.String getSecureRandomAlgorithm()