new ECDSA_KEY()
This module implements the module:api.Key interface, for ECDSA.
Extends
- module:api.Key
Methods
-
generateCSR(subjectDN [, extensions])
-
Generates a CSR/PKCS#10 certificate signing request for this key
Parameters:
Name Type Argument Description subjectDN
string The X500Name for the certificate request in LDAP(RFC 2253) format extensions
Array.<Object> <optional>
Additional X.509v3 extensions for the certificate signing request Throws:
-
Will throw an error if this is not a private key
-
Will throw an error if CSR generation fails for any other reason
Returns:
PEM-encoded PKCS#10 certificate signing request- Type
- string
-
-
generateX509Certificate( [commonName])
-
Generates a self-signed X.509 certificate
Parameters:
Name Type Argument Description commonName
string <optional>
The common name to use as the subject for the X509 certificate Throws:
-
Will throw an error if this is not a private key
-
Will throw an error if X.509 certificate generation fails for any other reason
Returns:
PEM-encoded X.509 certificate- Type
- string
-
-
getHandle()
-
Not supported by non PKCS11 keys. Only PKCS11 keys have a handle used by the HSM internally to access the key.
Throws:
Error -
getSKI()
-
Returns:
a string representation of the hash from a sequence based on the private key bytes- Type
- string