Gcr.CertificateRequest¶
- Subclasses:
None
Methods¶
- Inherited:
- Structs:
class |
|
class |
|
class |
|
class |
|
|
|
|
|
|
|
|
|
|
|
|
Virtual Methods¶
- Inherited:
Properties¶
Name |
Type |
Flags |
Short Description |
---|---|---|---|
r/w/co |
Private key for request |
Signals¶
- Inherited:
Fields¶
- Inherited:
Class Details¶
- class Gcr.CertificateRequest(**kwargs)¶
- Bases:
- Abstract:
No
- Structure:
An object that allows creation of certificate requests. A certificate request is sent to a certificate authority to request an X.509 certificate.
Use [func`CertificateRequest`.prepare] to create a blank certificate request for a given private key. Set the common name on the certificate request with [method`CertificateRequest`.set_cn], and then sign the request with [method`CertificateRequest`.complete_async].
- classmethod capable(private_key, cancellable)[source]¶
- Parameters:
private_key (
Gck.Object
) – a private keycancellable (
Gio.Cancellable
orNone
) – cancellation object
- Raises:
- Returns:
whether a request can be created
- Return type:
Check whether [class`CertificateRequest`] is capable of creating a request for the given private_key.
- classmethod capable_async(private_key, cancellable, callback, *user_data)[source]¶
- Parameters:
private_key (
Gck.Object
) – a private keycancellable (
Gio.Cancellable
orNone
) – cancellation objectcallback (
Gio.AsyncReadyCallback
orNone
) – will be called when the operation completes
Asynchronously check whether [class`CertificateRequest`] is capable of creating a request for the given private_key.
- classmethod capable_finish(result)[source]¶
- Parameters:
result (
Gio.AsyncResult
) – asynchronous result- Raises:
- Returns:
whether a request can be created
- Return type:
Get the result for asynchronously check whether [class`CertificateRequest`] is capable of creating a request for the given private_key.
- classmethod prepare(format, private_key)[source]¶
- Parameters:
format (
Gcr.CertificateRequestFormat
) – the format for the certificate requestprivate_key (
Gck.Object
) – the private key the the certificate is being requested for
- Returns:
a new
Gcr.Certificate
request- Return type:
Create a new certificate request, in the given format for the private key.
- complete(cancellable)[source]¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – a cancellation object- Raises:
- Returns:
whether certificate request was successfully completed or not
- Return type:
Complete and sign a certificate request, so that it can be encoded and sent to a certificate authority.
This call may block as it signs the request using the private key.
- complete_async(cancellable, callback, *user_data)[source]¶
- Parameters:
cancellable (
Gio.Cancellable
orNone
) – a cancellation objectcallback (
Gio.AsyncReadyCallback
orNone
) – called when the operation completes
Asynchronously complete and sign a certificate request, so that it can be encoded and sent to a certificate authority.
This call will return immediately and complete later.
- complete_finish(result)[source]¶
- Parameters:
result (
Gio.AsyncResult
) – result of the asynchronous operation- Raises:
- Returns:
whether certificate request was successfully completed or not
- Return type:
Finish an asynchronous operation to complete and sign a certificate request.
- encode(textual)[source]¶
- Parameters:
textual (
bool
) – whether to encode output as text- Returns:
the encoded certificate request
- Return type:
Encode the certificate request. It must have been completed with [method`CertificateRequest`.complete] or [method`CertificateRequest`.complete_async].
If textual is
False
, the output is a DER encoded certificate request.If textual is
True
, the output is encoded as text. For PKCS#10 requests this is done using the OpenSSL style PEM encoding.
Property Details¶
- Gcr.CertificateRequest.props.private_key¶
- Name:
private-key
- Type:
- Default Value:
- Flags:
The private key that this certificate request is for.