summaryrefslogtreecommitdiffstats
path: root/include/libssh/pki.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/libssh/pki.h')
-rw-r--r--include/libssh/pki.h26
1 files changed, 15 insertions, 11 deletions
diff --git a/include/libssh/pki.h b/include/libssh/pki.h
index 8657f0f..8046fca 100644
--- a/include/libssh/pki.h
+++ b/include/libssh/pki.h
@@ -46,9 +46,23 @@ struct ssh_key_struct {
void *cert;
};
+/* internal pki functions */
+ssh_key pki_key_dup(const ssh_key key, int demote);
+
+enum ssh_keytypes_e pki_privatekey_type_from_string(const char *privkey);
+int pki_pubkey_build_dss(ssh_key key,
+ ssh_string p,
+ ssh_string q,
+ ssh_string g,
+ ssh_string pubkey);
+int pki_pubkey_build_rsa(ssh_key key,
+ ssh_string e,
+ ssh_string n);
+
+
+/* half public ssh pki functions */
ssh_key ssh_key_dup(const ssh_key key);
void ssh_key_clean (ssh_key key);
-ssh_key pki_key_dup(const ssh_key key, int demote);
ssh_key ssh_pki_publickey_from_privatekey(const ssh_key privkey);
ssh_string ssh_pki_do_sign(ssh_session session, ssh_buffer sigbuf,
@@ -58,20 +72,10 @@ ssh_string ssh_pki_do_sign(ssh_session session, ssh_buffer sigbuf,
ssh_public_key ssh_pki_convert_key_to_publickey(ssh_key key);
ssh_private_key ssh_pki_convert_key_to_privatekey(ssh_key key);
-enum ssh_keytypes_e pki_privatekey_type_from_string(const char *privkey);
ssh_key pki_private_key_from_base64(ssh_session session,
const char *b64_key,
const char *passphrase);
-int pki_pubkey_build_dss(ssh_key key,
- ssh_string p,
- ssh_string q,
- ssh_string g,
- ssh_string pubkey);
-int pki_pubkey_build_rsa(ssh_key key,
- ssh_string e,
- ssh_string n);
-
int ssh_pki_import_pubkey_string(ssh_session session,
const ssh_string pubkey,
ssh_key *pkey);