Soletta™ Framework
|
Typedefs | |
typedef struct sol_cert | sol_cert |
Certificate handler. More... | |
Functions | |
struct sol_blob * | sol_cert_get_contents (const struct sol_cert *cert) |
Get the certificate contents. More... | |
struct sol_cert * | sol_cert_load_from_id (const char *id) |
Load a certificate from an id. More... | |
struct sol_cert * | sol_cert_ref (struct sol_cert *cert) |
Increments the reference counter of the given sol_cert. More... | |
void | sol_cert_unref (struct sol_cert *cert) |
Free the resources a sol_cert object and the object itself. More... | |
ssize_t | sol_cert_write_contents (const char *file_name, struct sol_str_slice contents) |
Write contents to cert. More... | |
Certificate handler.
This object is the abstraction of certificate.
Get the certificate contents.
cert | Certificate object. |
struct sol_cert* sol_cert_load_from_id | ( | const char * | id | ) |
Load a certificate from an id.
id | The id of the certificate to be loaded. |
In systems where file system is supported, the id is the name of the certificate file. The id can be a relative or an absolute path to the certificat file. If relative, function will look for it at user home config directory (${HOME}/.config/{$APPNAME}/certs/), in default system directories ($SYSCONF/ssl/certs, $SYSCONF/ssl/private, $SYSCONF/tls/certs and $SYSCONF/tls/private), and in a directory specified by SSL_CERT_DIR
Referenced by startup_server().
Increments the reference counter of the given sol_cert.
cert | The certificate to increase the references |
void sol_cert_unref | ( | struct sol_cert * | cert | ) |
Free the resources a sol_cert object and the object itself.
cert | The object to be freed |
Referenced by startup_server().
ssize_t sol_cert_write_contents | ( | const char * | file_name, |
struct sol_str_slice | contents | ||
) |
Write contents to cert.
Certificates are always saved in user context.
file_name | The name of the certificate file. The certificate file name must be relative. File name with full path is not supported. |
contents | A blob containing the contents to be written to the certificate. |