SSL Certificates

SSL Certificates — Support for SSL certificates

Synopsis




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);

Description

These functions provide the ability to handle an SSL certificate.

Details

enum GNetworkSslAuthType

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_INVALIDan invalid scheme.
GNETWORK_SSL_AUTH_ANONYMOUSa basic, non-verified encryption scheme.
GNETWORK_SSL_AUTH_CERTIFICATEa certificate-based encryption verification scheme.

enum GNetworkSslCertType

typedef enum /* <prefix=GNETWORK_SSL_CERT> */
{
  GNETWORK_SSL_CERT_INVALID,

  GNETWORK_SSL_CERT_X509
}
GNetworkSslCertType;

An enumeration of possible certificate types.

GNETWORK_SSL_CERT_INVALIDnot a certificate.
GNETWORK_SSL_CERT_X509an authority-model certificate used by secure servers.

struct GNetworkSslCert

struct GNetworkSslCert;

A structure used to wrap a certificate. This structure contains no public data.


gnetwork_ssl_cert_dup ()

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


gnetwork_ssl_cert_free ()

void        gnetwork_ssl_cert_free          (GNetworkSslCert *cert);

Destroys the data in cert.

cert : the certificate to free.

Since 1.0


gnetwork_ssl_cert_get_cert_type ()

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


gnetwork_ssl_cert_get_name ()

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


gnetwork_ssl_cert_get_email ()

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


gnetwork_ssl_cert_get_department ()

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


gnetwork_ssl_cert_get_organization ()

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


gnetwork_ssl_cert_get_city ()

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


gnetwork_ssl_cert_get_province ()

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


gnetwork_ssl_cert_get_country ()

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


gnetwork_ssl_cert_get_issued ()

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


gnetwork_ssl_cert_get_activation ()

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


gnetwork_ssl_cert_get_expiration ()

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