![]() |
![]() |
![]() |
GNetwork Library Manual | ![]() |
---|---|---|---|---|
enum GNetworkSslAuthType; enum GNetworkSslCertType; 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); const gchar* gnetwork_ssl_cert_get_name (const GNetworkSslCert *cert); const gchar* gnetwork_ssl_cert_get_email (GNetworkSslCert *cert); const gchar* gnetwork_ssl_cert_get_organization (GNetworkSslCert *cert); const gchar* gnetwork_ssl_cert_get_department (GNetworkSslCert *cert); const gchar* gnetwork_ssl_cert_get_city (GNetworkSslCert *cert); const gchar* gnetwork_ssl_cert_get_province (GNetworkSslCert *cert); const 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.
typedef enum /* <prefix=GNETWORK_SSL_CERT> */ { GNETWORK_SSL_CERT_INVALID, GNETWORK_SSL_CERT_X509 } GNetworkSslCertType;
An enumeration of possible certificate types.
typedef struct _GNetworkSslCert 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
const 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
const 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
const 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
const 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
const 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
const 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
const 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