Next: Operations, Previous: Abstract public keys, Up: Abstract key types [Contents][Index]
An abstract gnutls_privkey_t can be initialized
using the functions below. It can be imported through
an existing structure like gnutls_x509_privkey_t,
but unlike public keys it cannot be exported. That is
to allow abstraction over PKCS #11 keys that
are not extractable.
gnutls_privkey_import_x509gnutls_privkey_import_openpgpgnutls_privkey_import_pkcs11gnutls_privkey_get_pk_algorithmgnutls_privkey_get_typeIn order to support cryptographic operations using an external API, the following function is provided. This allows for a simple extensibility API without resorting to PKCS #11.
pkey: The private key
pk: The public key algorithm
userdata: private data to be provided to the callbacks
sign_func: callback for signature operations
decrypt_func: callback for decryption operations
flags: Flags for the import
This function will associate the given callbacks with the
gnutls_privkey_t structure. At least one of the two callbacks
must be non-null.
Returns: On success, GNUTLS_E_SUCCESS (0) is returned, otherwise a
negative error value.
Since: 3.0