![]() | ![]() | ![]() | GNetwork Library Manual | ![]() |
---|
SSL Certificates — Support for SSL certificates
enum GNetworkSslAuthType; enum GNetworkSslCertType; struct GNetworkSslCert; GNetworkSslCert* gnetwork_ssl_cert_dup (GNetworkSslCert *cert); void gnetwork_ssl_cert_free (GNetworkSslCert *cert); GNetworkSslCertType gnetwork_ssl_cert_get_cert_type (GNetworkSslCert *cert); G_CONST_RETURN gchar* gnetwork_ssl_cert_get_name (GNetworkSslCert *cert); G_CONST_RETURN gchar* gnetwork_ssl_cert_get_email (GNetworkSslCert *cert); G_CONST_RETURN gchar* gnetwork_ssl_cert_get_department (GNetworkSslCert *cert); G_CONST_RETURN gchar* gnetwork_ssl_cert_get_organization (GNetworkSslCert *cert); G_CONST_RETURN gchar* gnetwork_ssl_cert_get_city (GNetworkSslCert *cert); G_CONST_RETURN gchar* gnetwork_ssl_cert_get_province (GNetworkSslCert *cert); G_CONST_RETURN gchar* gnetwork_ssl_cert_get_country (GNetworkSslCert *cert); glong gnetwork_ssl_cert_get_issued (GNetworkSslCert *cert); glong gnetwork_ssl_cert_get_activation (GNetworkSslCert *cert); glong gnetwork_ssl_cert_get_expiration (GNetworkSslCert *cert);
These functions provide the ability to handle an SSL certificate.
typedef enum /* <prefix=GNETWORK_SSL_AUTH> */ { GNETWORK_SSL_AUTH_INVALID, GNETWORK_SSL_AUTH_ANONYMOUS, GNETWORK_SSL_AUTH_CERTIFICATE } GNetworkSslAuthType;
An enumeration of possible authentication schemes.
GNETWORK_SSL_AUTH_INVALID | an invalid scheme. |
GNETWORK_SSL_AUTH_ANONYMOUS | a basic, non-verified encryption scheme. |
GNETWORK_SSL_AUTH_CERTIFICATE | a certificate-based encryption verification scheme. |
typedef enum /* <prefix=GNETWORK_SSL_CERT> */ { GNETWORK_SSL_CERT_INVALID, GNETWORK_SSL_CERT_X509 } GNetworkSslCertType;
An enumeration of possible certificate types.
GNETWORK_SSL_CERT_INVALID | not a certificate. |
GNETWORK_SSL_CERT_X509 | an authority-model certificate used by secure servers. |
struct GNetworkSslCert;
A structure used to wrap a certificate. This structure contains no public data.
GNetworkSslCert* gnetwork_ssl_cert_dup (GNetworkSslCert *cert);
Creates a duplicate of the data in cert.
cert : | the certificate to duplicate. |
Returns : | a copy of cert. |
Since 1.0
void gnetwork_ssl_cert_free (GNetworkSslCert *cert);
Destroys the data in cert.
cert : | the certificate to free. |
Since 1.0
GNetworkSslCertType gnetwork_ssl_cert_get_cert_type (GNetworkSslCert *cert);
Retrieves the type of certificate stored in cert.
cert : | the certificate to examine. |
Returns : | the type of certificate in cert. |
Since 1.0
G_CONST_RETURN gchar* gnetwork_ssl_cert_get_name (GNetworkSslCert *cert);
Retrieves the name of cert. The returned value should not be modified or freed.
cert : | the certificate to examine. |
Returns : | the name of cert. |
Since 1.0
G_CONST_RETURN gchar* gnetwork_ssl_cert_get_email (GNetworkSslCert *cert);
Retrieves the e-mail address of the person or organization which owns cert. The returned value should not be modified or freed.
cert : | the certificate to examine. |
Returns : | the e-mail address for cert. |
Since 1.0
G_CONST_RETURN gchar* gnetwork_ssl_cert_get_department (GNetworkSslCert *cert);
Retrieves the name of the department which owns cert. The returned value should not be modified or freed.
cert : | the certificate to examine. |
Returns : | the department name for cert. |
Since 1.0
G_CONST_RETURN gchar* gnetwork_ssl_cert_get_organization (GNetworkSslCert *cert);
Retrieves the name of the organization which owns cert. The returned value should not be modified or freed.
cert : | the certificate to examine. |
Returns : | the organization name for cert. |
Since 1.0
G_CONST_RETURN gchar* gnetwork_ssl_cert_get_city (GNetworkSslCert *cert);
Retrieves the name of the city where the owner of cert is located. The returned value should not be modified or freed.
cert : | the certificate to examine. |
Returns : | the city name for cert. |
Since 1.0
G_CONST_RETURN gchar* gnetwork_ssl_cert_get_province (GNetworkSslCert *cert);
Retrieves the name of the province where the owner of cert is located. The returned value should not be modified or freed.
cert : | the certificate to examine. |
Returns : | the province name for cert. |
Since 1.0
G_CONST_RETURN gchar* gnetwork_ssl_cert_get_country (GNetworkSslCert *cert);
Retrieves the name of the country where the owner of cert is located. The returned value should not be modified or freed.
cert : | the certificate to examine. |
Returns : | the country name for cert. |
Since 1.0
glong gnetwork_ssl_cert_get_issued (GNetworkSslCert *cert);
Retrieves the UNIX time_t (seconds since the epoch) when cert was created.
cert : | the certificate to examine. |
Returns : | the creation time of cert. |
Since 1.0
glong gnetwork_ssl_cert_get_activation (GNetworkSslCert *cert);
Retrieves the UNIX time_t (seconds since the epoch) after which cert will be activated.
cert : | the certificate to examine. |
Returns : | the activation time of cert. |
Since 1.0
glong gnetwork_ssl_cert_get_expiration (GNetworkSslCert *cert);
Retrieves the UNIX time_t (seconds since the epoch) when cert will expire.
cert : | the certificate to examine. |
Returns : | the expiration time of cert. |
Since 1.0
<< Error Reporting | Low Level APIs >> |