mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-11 10:40:27 +09:00
pki: Improve documentation about pubkey import functions
Resolves: #253 and #254
Signed-off-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
(cherry picked from commit 1f1309c915)
This commit is contained in:
24
src/pki.c
24
src/pki.c
@@ -1621,14 +1621,16 @@ fail:
|
||||
/**
|
||||
* @brief Import a base64 formatted public key from a memory c-string.
|
||||
*
|
||||
* @param[in] b64_key The base64 key to format.
|
||||
*
|
||||
* @param[in] type The type of the key to format.
|
||||
* Note that the public key is just the base64 part (without the key
|
||||
* type prefix and comment suffix you can find in the OpenSSH public
|
||||
* key file or known_hosts file).
|
||||
*
|
||||
* @param[in] b64_key The base64 key to import.
|
||||
* @param[in] type The type of the key to import.
|
||||
* @param[out] pkey A pointer where the allocated key can be stored. You
|
||||
* need to free the memory using ssh_key_free().
|
||||
*
|
||||
* @return SSH_OK on success, SSH_ERROR on error.
|
||||
* @return `SSH_OK` on success, `SSH_ERROR` on error.
|
||||
*
|
||||
* @see ssh_key_free()
|
||||
*/
|
||||
@@ -1929,14 +1931,16 @@ int ssh_pki_import_pubkey_file(const char *filename, ssh_key *pkey)
|
||||
/**
|
||||
* @brief Import a base64 formatted certificate from a memory c-string.
|
||||
*
|
||||
* @param[in] b64_cert The base64 cert to format.
|
||||
* Note that the certificate is just the base64 part (without the key
|
||||
* type prefix and comment suffix you can find in the OpenSSH certificate
|
||||
* file).
|
||||
*
|
||||
* @param[in] type The type of the cert to format.
|
||||
* @param[in] b64_cert The base64 cert to import.
|
||||
* @param[in] type The type of the cert to import.
|
||||
* @param[out] pkey A pointer where the allocated certificate can be stored.
|
||||
* You need to free the memory using ssh_key_free().
|
||||
*
|
||||
* @param[out] pkey A pointer where the allocated key can be stored. You
|
||||
* need to free the memory using ssh_key_free().
|
||||
*
|
||||
* @return SSH_OK on success, SSH_ERROR on error.
|
||||
* @return `SSH_OK` on success, `SSH_ERROR` on error.
|
||||
*
|
||||
* @see ssh_key_free()
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user