The micro version number of the Gcr library.
The minor version number of the Gcr library.
The purpose used to verify the client certificate in a TLS connection.
The purpose used to verify certificate used for the signature on signed code.
The purpose used to verify certificates that are used in email communication such as S/MIME.
The purpose used to verify the server certificate in a TLS connection. This is the most common purpose in use.
The current secret exchange protocol. Key agreement is done using DH with the 1536 bit IKE parameter group. Keys are derived using SHA256 with HKDF. The transport encryption is done with 128 bit AES.
Compare one certificate against another. If the certificates are equal then zero is returned. If one certificate is %NULL or not a certificate, then a non-zero value is returned.
The return value is useful in a stable sort, but has no user logical meaning.
the certificate to compare
the certificate to compare against
Create a key fingerprint for a certificate, public key or private key. Note that this is not a fingerprint of certificate data, which you would use gcr_certificate_get_fingerprint() for.
attributes for key or certificate
the type of fingerprint to create
Create a key fingerprint for a DER encoded subjectPublicKeyInfo. The fingerprint is created so that it will be identical for a key and its corresponding certificate.
Note that in the case of certificates this is not a fingerprint of the actual certificate data, but rather of the public key contained in a certificate.
DER encoded subjectPublicKeyInfo structure
the type of fingerprint to create
Queues an additional item to be imported in all compattible importers in the set. The parsed item is represented by the state of the #GcrParser at the time of calling this method.
If the parsed item is incompatible with an importer, then that the item will not be queued on that importer.
Register an importer to handle parsed items that match the given attributes.
If attrs
are a floating reference, then it is consumed.
the GType of the importer being registered
the attributes that this importer is compatible with
Register built-in PKCS#11 and GnuPG importers.
Disconnect the mock prompter
Queue an expected response on the mock prompter.
Expects any prompt, and closes the prompt when it gets it.
Queue an expected response on the mock prompter.
Expects a confirmation prompt, and then cancels that prompt.
Queue an expected response on the mock prompter.
Expects a password prompt, and then cancels that prompt.
Get the delay in milliseconds before the mock prompter completes an expected prompt.
Check if the mock prompter is expecting a response. This will be %TRUE
when one of the
Check if the mock prompter is showing any prompts.
Set the delay in milliseconds before the mock prompter completes an expected prompt.
prompt response delay in milliseconds
Start the mock prompter. This is often used from the
Starts the mock prompter in an additional thread. Use the returned DBus bus name with gcr_system_prompt_open_for_prompter() to connect to this prompter.
Stop the mock prompter. This is often used from the
Unreferences a parsed item which was referenced with gcr_parsed_ref()
a parsed item
Initialize a PKCS#11 module and add it to the modules that are used by the GCR library. Note that is an error to initialize the same PKCS#11 module twice.
It is not normally necessary to call this function. The available PKCS#11 modules installed on the system are automatically loaded by the GCR library.
the full file path of the PKCS#11 module
unused
List all the PKCS#11 modules that are used by the GCR library.
Each module is a [classGck
.Module] object.
An empty list of modules will be returned if [funcpkcs1
1_set_modules],
or [funcpkcs1
1_initialize] has not yet run.
When done with the list, free it with gck_list_unref_free().
Get the PKCS#11 URIs that are used to identify which slots to use for lookup trust assertions.
Selects an appropriate PKCS#11 slot to store trust assertions. The slot to use is normally configured automatically by the system.
This will only return a valid result after the [funcpkcs1
1_initialize]
method has been called.
When done with the #GckSlot, use g_object_unref() to release it.
Get the PKCS#11 URI that is used to identify which slot to use for storing trust storage.
Asynchronously initialize the registered PKCS#11 modules.
optional cancellable used to cancel the operation
Asynchronously initialize the registered PKCS#11 modules.
optional cancellable used to cancel the operation
callback which will be called when the operation completes
Complete the asynchronous operation to initialize the registered PKCS#11 modules.
the asynchronous result
Set the list of PKCS#11 modules that are used by the GCR library.
Each module in the list is a [classGck
.Module] object.
It is not normally necessary to call this function. The available PKCS#11 modules installed on the system are automatically loaded by the GCR library.
Set the PKCS#11 URIs that are used to identify which slots to use for lookup of trust assertions.
It is not normally necessary to call this function. The relevant PKCS#11 slots are automatically configured by the GCR library.
the uris which identifies trust lookup slots
Set the PKCS#11 URI that is used to identify which slot to use for storing trust assertions.
It is not normally necessary to call this function. The relevant PKCS#11 slot is automatically configured by the GCR library.
the uri which identifies trust storage slot
Add a pinned certificate
for connections to peer
for purpose
. A pinned
certificate overrides all other certificate verification and should be
used with care.
If the same pinned certificate already exists, then this operation does not add another, and succeeds without error.
This call may block, see gcr_trust_add_pinned_certificate_async() for the non-blocking version.
a #GcrCertificate
the purpose string
the peer for this pinned certificate
a #GCancellable
Add a pinned certificate for communication with peer
for purpose
. A pinned
certificate overrides all other certificate verification and should be used
with care.
If the same pinned certificate already exists, then this operation does not add another, and succeeds without error.
When the operation is finished, callback will be called. You can then call
[funcGcr
.trust_add_pinned_certificate_finish] to get the result of the
operation.
a #GcrCertificate
the purpose string
the peer for this pinned certificate
a #GCancellable
a #GAsyncReadyCallback to call when the operation completes
Finishes an asynchronous operation started by gcr_trust_add_pinned_certificate_async().
the #GAsyncResult passed to the callback
Check if the certificate
is a trust anchor for the given purpose
. A trust
anchor is used to verify the signatures on other certificates when verifying
a certificate chain. Also known as a trusted certificate authority.
This call may block, see [funcGcr
.trust_is_certificate_anchored_async] for
the non-blocking version.
In the case of an error, %FALSE is also returned. Check error
to detect
if an error occurred.
a #GcrCertificate to check
the purpose string
a #GCancellable
Check if the certificate
is a trust anchor for the given purpose
. A trust
anchor is used to verify the signatures on other certificates when verifying
a certificate chain. Also known as a trusted certificate authority.
When the operation is finished, callback will be called. You can then call gcr_trust_is_certificate_anchored_finish() to get the result of the operation.
a #GcrCertificate to check
the purpose string
a #GCancellable
a #GAsyncReadyCallback to call when the operation completes
Finishes an asynchronous operation started by gcr_trust_is_certificate_anchored_async().
In the case of an error, %FALSE is also returned. Check error
to detect
if an error occurred.
the #GAsyncResult passed to the callback
Check if certificate
is pinned for purpose
to communicate with peer
.
A pinned certificate overrides all other certificate verification.
This call may block, see gcr_trust_is_certificate_pinned_async() for the non-blocking version.
In the case of an error, %FALSE is also returned. Check error
to detect
if an error occurred.
a #GcrCertificate to check
the purpose string
the peer for this pinned
a #GCancellable
Check if certificate
is pinned for purpose
to communicate with peer
. A
pinned certificate overrides all other certificate verification.
When the operation is finished, callback will be called. You can then call
[funcGcr
.trust_is_certificate_pinned_finish] to get the result of the
operation.
a #GcrCertificate to check
the purpose string
the peer for this pinned
a #GCancellable
a #GAsyncReadyCallback to call when the operation completes
Finishes an asynchronous operation started by gcr_trust_is_certificate_pinned_async().
In the case of an error, %FALSE is also returned. Check error
to detect
if an error occurred.
the #GAsyncResult passed to the callback
Remove a pinned certificate for communication with peer
for purpose
.
If the same pinned certificate does not exist, or was already removed, then this operation succeeds without error.
This call may block, see gcr_trust_remove_pinned_certificate_async() for the non-blocking version.
a #GcrCertificate
the purpose string
the peer for this pinned certificate
a #GCancellable
Remove a pinned certificate for communication with peer
for purpose
.
If the same pinned certificate does not exist, or was already removed, then this operation succeeds without error.
When the operation is finished, callback will be called. You can then call gcr_trust_remove_pinned_certificate_finish() to get the result of the operation.
a #GcrCertificate
the purpose string
the peer for this pinned certificate
a #GCancellable
a #GAsyncReadyCallback to call when the operation completes
Finishes an asynchronous operation started by gcr_trust_remove_pinned_certificate_async().
the #GAsyncResult passed to the callback
The major version number of the Gcr library.