Certificate
Object Hierarchy:
Gcr.Certificate
Gcr.Certificate
Gcr.Certificate
GLib.Object
GLib.Object
GLib.Object->Gcr.Certificate
Description:
[ CCode ( type_id = "gcr_certificate_get_type ()" ) ]public interface Certificate : Object
An interface that represents an X.509 certificate.
Objects can implement this interface to make a certificate usable with the GCR library.
Various methods are available to parse out relevant bits of the certificate. However no verification of the validity of a certificate is
done here. Use your favorite crypto library to do this.
You can use [class@SimpleCertificate] to simply load a certificate for which you already have the raw certificate data.
The Certificate interface has several properties that must be implemented. You can use a mixin to
implement these properties if desired. See the gcr_certificate_mixin_class_init
and gcr_certificate_mixin_get_property
functions.
All known implementing classes:
Content:
Properties:
public abstract string description { owned get ; }
A readable description for this certificate
public abstract DateTime ? expiry_date { owned get ; }
The expiry date of the certificate
public abstract string ? issuer_name { owned get ; }
Common name part of the certificate issuer
public abstract string ? label { owned get ; }
A readable label for this certificate.
public abstract string ? subject_name { owned get ; }
Methods:
public bool get_basic_constraints (out bool is_ca, out int path_len)
Get the basic constraints for the certificate if present.
public abstract unowned uint8 [] get_der_data ()
Gets the raw DER data for an X.509 certificate.
public DateTime ? get_expiry_date ()
Get the expiry date of this certificate.
public unowned uint8 []? get_fingerprint (ChecksumType type)
Calculate the fingerprint for this certificate.
public string ? get_fingerprint_hex (ChecksumType type)
Calculate the fingerprint for this certificate, and return it as a hex
string.
public List <CertificateSection > get_interface_elements ()
Get the list of sections from the certificate that can be shown to the
user interface.
public DateTime ? get_issued_date ()
Get the issued date of this certificate.
public string ? get_issuer_cn ()
Get the common name of the issuer of this certificate.
public string ? get_issuer_dn ()
Get the full issuer DN of the certificate as a (mostly) readable
string.
public string ? get_issuer_name ()
Get a name to represent the issuer of this certificate.
public string ? get_issuer_part (string part)
Get a part of the DN of the issuer of this certificate.
public uint8 []? get_issuer_raw ()
Get the raw DER data for the issuer DN of the certificate.
public uint get_key_size ()
Get the key size in bits of the public key represented by this
certificate.
public unowned uint8 []? get_serial_number ()
Get the raw binary serial number of the certificate.
public string ? get_serial_number_hex ()
Get the serial number of the certificate as a hex string.
public string ? get_subject_cn ()
Get the common name of the subject of this certificate.
public string ? get_subject_dn ()
Get the full subject DN of the certificate as a (mostly) readable
string.
public string ? get_subject_name ()
Get a name to represent the subject of this certificate.
public string ? get_subject_part (string part)
Get a part of the DN of the subject of this certificate.
public uint8 []? get_subject_raw ()
Get the raw DER data for the subject DN of the certificate.
public bool is_issuer (Certificate issuer)
Check if issuer
could be the issuer of this certificate.
public void mixin_emit_notify ()
Implementers of the Certificate mixin
should call this function to notify when the certificate has changed to emit notifications on the various properties.
Inherited Members:
All known members inherited from class GLib.Object
@get
@new
@ref
@set
add_toggle_ref
add_weak_pointer
bind_property
connect
constructed
disconnect
dispose
dup_data
dup_qdata
force_floating
freeze_notify
get_class
get_data
get_property
get_qdata
get_type
getv
interface_find_property
interface_install_property
interface_list_properties
is_floating
new_valist
new_with_properties
newv
notify
notify_property
ref_count
ref_sink
remove_toggle_ref
remove_weak_pointer
replace_data
replace_qdata
set_data
set_data_full
set_property
set_qdata
set_qdata_full
set_valist
setv
steal_data
steal_qdata
thaw_notify
unref
watch_closure
weak_ref
weak_unref