Qore Programming Language Reference Manual
0.8.11.1
|
This class implements a container for private key data. More...
Public Member Functions | |
constructor (string pem, *string pass) | |
Creates the SSLPrivateKey object from the PEM-encoded text representation of the private key passed. More... | |
constructor (binary der) | |
Creates the SSLPrivateKey object from the data argument passed. More... | |
copy () | |
Copying objects of this class is not supported, an exception will be thrown. More... | |
int | getBitLength () |
Returns the bit length of the private key. More... | |
hash | getInfo () |
Returns a hash of all information for the private key. More... | |
string | getPEM () |
Returns a string in PEM format representing the private key. More... | |
string | getType () |
Returns a string giving the algorithm used for the private key. More... | |
int | getVersion () |
Returns a constant value of 1; do not use; only included for backwards-compatibility. More... | |
This class implements a container for private key data.
Creates the SSLPrivateKey object from the PEM-encoded text representation of the private key passed.
pem | The PEM-encoded text representation of the private key |
pass | The optional password or passphrase for the private key |
SSLPRIVATEKEY-CONSTRUCTOR-ERROR | error in private key data |
Qore::SSLPrivateKey::constructor | ( | binary | der | ) |
Creates the SSLPrivateKey object from the data argument passed.
der | The DER-encoded binary representation of the private key |
SSLPRIVATEKEY-CONSTRUCTOR-ERROR | error in private key data |
Qore::SSLPrivateKey::copy | ( | ) |
Copying objects of this class is not supported, an exception will be thrown.
SSLPRIVATEKEY-COPY-ERROR | SSLPrivateKey objects cannot be copied |
int Qore::SSLPrivateKey::getBitLength | ( | ) |
Returns the bit length of the private key.
hash Qore::SSLPrivateKey::getInfo | ( | ) |
Returns a hash of all information for the private key.
"type"
: The type of private key (see SSLPrivateKey::getType())"version"
: The version of the private key (see SSLPrivateKey::getVersion())"bitLength"
: The bit length of the private key (see SSLPrivateKey::getBitLength())string Qore::SSLPrivateKey::getPEM | ( | ) |
Returns a string in PEM format representing the private key.
SSLPRIVATEKEY-ERROR | could not create PEM string from private key data |
string Qore::SSLPrivateKey::getType | ( | ) |
Returns a string giving the algorithm used for the private key.
"RSA"
, "RSA2"
, "DSA"
, "DSA1"
, "DSA2"
, "DAS3"
, "DAS4"
, "DH"
, "unknown"
)int Qore::SSLPrivateKey::getVersion | ( | ) |
Returns a constant value of 1; do not use; only included for backwards-compatibility.
The openssl library never put any usable value into the internal fields that were used to provide this information; newer versions of openssl do not expose this information at all, therefore this method now returns a constant value of 1 for backwards-compatibility.