diff options
author | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2008-04-09 00:34:52 -0400 |
---|---|---|
committer | Daniel Kahn Gillmor <dkg@fifthhorseman.net> | 2008-04-09 00:34:52 -0400 |
commit | 76c17804015ffb6c18232cd9ba80cf2a641fd59e (patch) | |
tree | 64aec8420fedf0dd22fa7e993e8068ce2e8cd27e /gnutls-helpers.h | |
parent | 29b46325c50f7b767d1027c817c4e050806f2aa1 (diff) |
exporting RSA public keys in openssh known_hosts format.
Diffstat (limited to 'gnutls-helpers.h')
-rw-r--r-- | gnutls-helpers.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/gnutls-helpers.h b/gnutls-helpers.h index c07997f..398413f 100644 --- a/gnutls-helpers.h +++ b/gnutls-helpers.h @@ -32,6 +32,12 @@ void init_datum(gnutls_datum_t* d); void copy_datum(gnutls_datum_t* dest, const gnutls_datum_t* src); int compare_data(const gnutls_datum_t* a, const gnutls_datum_t* b); void free_datum(gnutls_datum_t* d); +int write_datum_fd(int fd, const gnutls_datum_t* d); +int write_datum_fd_with_length(int fd, const gnutls_datum_t* d); +int write_data_fd_with_length(int fd, const gnutls_datum_t** d, unsigned int num); + +/* set up a datum from a null-terminated string */ +int datum_from_string(gnutls_datum_t* d, const char* str); /* keyid manipulations: */ typedef unsigned char printable_keyid[16]; @@ -52,3 +58,9 @@ int set_datum_fd(gnutls_datum_t* d, int fd); its entire contents in a single datum. */ int set_datum_file(gnutls_datum_t* d, const char* fname); +/* set up file descriptor pipe for writing (child process pid gets + stored in pid, fd is returned)*/ +int create_writing_pipe(pid_t* pid, const char* path, char* const argv[]); + +/* return 0 if userid matches the monkeysphere spec for ssh host user IDs */ +int validate_ssh_host_userid(const char* userid); |