xml.CryptoKey.loadPEM
Loads an asymmetric DSA key, an asymmetric RSA key, or Diffie-Hellman parameters from a file in PEM format.
Syntax
loadPEM(
filename STRING )
- filename defines the filename or an entry in the FGLPROFILE file.
If your FGLPROFILE file contains an entry for an encryption key, such as
xml.myRsa.key="/opt/fourjs/crt/myRsa.pem"
, where "myRsa" is the identifier for this entry, you can retrieve the associated value by passing "myRsa" as a parameter to the method. For an example using the method to load an encryption key, go to Loading an asymmetric RSA key. For more information on security FGLPROFILE entries, go to XML configuration and FGLPROFILE: XML cryptography.
Usage
If the DSA or RSA private key or Diffie-Hellman parameters are protected with a password, the recommended way is to unprotect it with the openssl tool and to put the key file on a restricted file system. However, you can use a script or the fglpass agent to provide the password to the application.
In case of error, the method throws an exception and sets the
status
variable. Depending on the error, a human-readable description of the
problem is available in the sqlca.sqlerrm
register. See Error handling in GWS calls (status).