|
int | noise_load_certificate_chain_from_buffer (Noise_CertificateChain **chain, NoiseProtobuf *pbuf) |
| Loads a certificate chain from a protobuf. More...
|
|
int | noise_load_certificate_chain_from_file (Noise_CertificateChain **chain, const char *filename) |
| Loads a certificate chain from a file. More...
|
|
int | noise_load_certificate_from_buffer (Noise_Certificate **cert, NoiseProtobuf *pbuf) |
| Loads a certificate from a protobuf. More...
|
|
int | noise_load_certificate_from_file (Noise_Certificate **cert, const char *filename) |
| Loads a certificate from a file. More...
|
|
int | noise_load_private_key_from_buffer (Noise_PrivateKey **key, NoiseProtobuf *pbuf, const void *passphrase, size_t passphrase_len) |
| Loads a private key from a protobuf. More...
|
|
int | noise_load_private_key_from_file (Noise_PrivateKey **key, const char *filename, const void *passphrase, size_t passphrase_len) |
| Loads a private key from a file. More...
|
|
int | noise_save_certificate_chain_to_buffer (const Noise_CertificateChain *chain, NoiseProtobuf *pbuf) |
| Saves a certificate chain to a protobuf. More...
|
|
int | noise_save_certificate_chain_to_file (const Noise_CertificateChain *chain, const char *filename) |
| Saves a certificate chain to a file. More...
|
|
int | noise_save_certificate_to_buffer (const Noise_Certificate *cert, NoiseProtobuf *pbuf) |
| Saves a certificate to a protobuf. More...
|
|
int | noise_save_certificate_to_file (const Noise_Certificate *cert, const char *filename) |
| Saves a certificate to a file. More...
|
|
int | noise_save_private_key_to_buffer (const Noise_PrivateKey *key, NoiseProtobuf *pbuf, const void *passphrase, size_t passphrase_len, const char *protect_name) |
| Saves a private key in encrypted form to a protobuf. More...
|
|
int | noise_save_private_key_to_file (const Noise_PrivateKey *key, const char *filename, const void *passphrase, size_t passphrase_len, const char *protect_name) |
| Saves a private key in encrypted form to a file. More...
|
|
Loads a certificate chain from a file.
- Parameters
-
chain | Variable that returns the certificate chain if one is loaded. |
filename | The name of the file to load the certificate chain from. |
- Returns
- NOISE_ERROR_NONE on success.
-
NOISE_ERROR_INVALID_PARAM if chain or filename is NULL.
-
NOISE_ERROR_INVALID_FORMAT if the format of filename is not as expected for a certificate or certificate chain.
-
NOISE_ERROR_NO_MEMORY if there is insufficient memory to load the certificate chain.
-
NOISE_ERROR_SYSTEM if filename cannot be opened or read, with further information in the system errno variable.
The certificate chain is expected to occupy the entire file. Trailing unknown data will be rejected as invalid.
If the file contains a certificate instead of a full chain, then this function will load the certificate and convert it into a chain containing a single certificate.
- See Also
- noise_load_certificate_chain_from_file(), noise_save_certificate_chain_to_file()
Definition at line 280 of file loader.c.
Loads a certificate from a protobuf.
- Parameters
-
cert | Variable that returns the certificate if one is loaded. |
pbuf | The protobuf to load the certificate from. |
- Returns
- NOISE_ERROR_NONE on success.
-
NOISE_ERROR_INVALID_PARAM if cert or pbuf is NULL.
-
NOISE_ERROR_INVALID_FORMAT if the format of pbuf is not as expected for a certificate or certificate chain.
-
NOISE_ERROR_NO_MEMORY if there is insufficient memory to load the certificate.
The certificate is expected to occupy the entire buffer. Trailing unknown data will be rejected as invalid.
If the buffer contains a certificate chain, then this function will load the first certificate in the chain and discard the rest. No verification will be performed on the certificate even if the remaining certificates in the chain would allow verification.
- See Also
- noise_load_certificate_from_file(), noise_save_certificate_to_buffer()
Definition at line 214 of file loader.c.
int noise_load_certificate_from_file |
( |
Noise_Certificate ** |
cert, |
|
|
const char * |
filename |
|
) |
| |
Loads a certificate from a file.
- Parameters
-
cert | Variable that returns the certificate if one is loaded. |
filename | The name of the file to load the certificate from. |
- Returns
- NOISE_ERROR_NONE on success.
-
NOISE_ERROR_INVALID_PARAM if cert or filename is NULL.
-
NOISE_ERROR_INVALID_FORMAT if the format of filename is not as expected for a certificate or certificate chain.
-
NOISE_ERROR_NO_MEMORY if there is insufficient memory to load the certificate.
-
NOISE_ERROR_SYSTEM if filename cannot be opened or read, with further information in the system errno variable.
The certificate is expected to occupy the entire file. Trailing unknown data will be rejected as invalid.
If the file contains a certificate chain, then this function will load the first certificate in the chain and discard the rest. No verification will be performed on the certificate even if the remaining certificates in the chain would allow verification.
- See Also
- noise_load_certificate_from_buffer(), noise_save_certificate_to_file()
Definition at line 179 of file loader.c.