![]() | ![]() | ![]() | GNetwork Library Manual | ![]() |
---|
SSL Certificates — Support for SSL certificates
enum GNetworkSslAuthType; enum GNetworkSslCertType; struct GNetworkSslCert; GNetworkSslCert* gnetwork_ssl_cert_dup (const GNetworkSslCert *cert); void gnetwork_ssl_cert_free (GNetworkSslCert *cert); GNetworkSslCertType gnetwork_ssl_cert_get_cert_type (const GNetworkSslCert *cert); G_CONST_RETURN gchar* gnetwork_ssl_cert_get_name (const GNetworkSslCert *cert); G_CONST_RETURN gchar* gnetwork_ssl_cert_get_email (GNetworkSslCert *cert); G_CONST_RETURN gchar* gnetwork_ssl_cert_get_organization (GNetworkSslCert *cert); G_CONST_RETURN gchar* gnetwork_ssl_cert_get_department (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_activation (const GNetworkSslCert *cert); glong gnetwork_ssl_cert_get_expiration (const GNetworkSslCert *cert); GSList* gnetwork_ssl_cert_get_errors (GNetworkSslCert *certificate, GNetworkSslCertErrorFlags errors);
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 (const 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 (const 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 (const 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_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_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_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_activation (const 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 (const 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
GSList* gnetwork_ssl_cert_get_errors (GNetworkSslCert *certificate, GNetworkSslCertErrorFlags errors);
Generates a list of GError structures for each flag in errors. This is primarily useful for retrieving the error strings and their corresponding error flag. The data of the returned list should be freed with g_error_free(), and the list itself should be freed with g_slist_free().
certificate : | the certificate in question. |
errors : | the bitmask of errors with certificate. |
Returns : | a newly allocated list of GError structures. |
Since 1.0
<< IP Addresses | Low Level APIs >> |