X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=gnutls-helpers.h;h=9ea22a3491c90e8266fcd5a9b4c3c7c3f9a9732d;hb=6b83b50141e37e2926333dc1aa987bfb50317b5b;hp=398413fdfd2015e2bdd6389db5418102a06af624;hpb=76c17804015ffb6c18232cd9ba80cf2a641fd59e;p=monkeysphere.git diff --git a/gnutls-helpers.h b/gnutls-helpers.h index 398413f..9ea22a3 100644 --- a/gnutls-helpers.h +++ b/gnutls-helpers.h @@ -54,7 +54,7 @@ int set_datum_string(gnutls_datum_t* d, const char* s); datum */ int set_datum_fd(gnutls_datum_t* d, int fd); -/* read the file indicated (by na1me) in the fname parameter. store +/* read the file indicated (by name) in the fname parameter. store its entire contents in a single datum. */ int set_datum_file(gnutls_datum_t* d, const char* fname); @@ -64,3 +64,9 @@ 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); + +/* how many bytes will it take to write out this datum in OpenPGP MPI form? */ +size_t get_openpgp_mpi_size(gnutls_datum_t* d); + +/* write the MPI stored in gnutls_datum_t to file descriptor fd: */ +int write_openpgp_mpi_to_fd(int fd, gnutls_datum_t* d);