Tor
0.4.7.0-alpha-dev
|
Code to sign directory objects. More...
Go to the source code of this file.
Macros | |
#define | BEGIN_END_OVERHEAD_LEN 64 |
Functions | |
char * | router_get_dirobj_signature (const char *digest, size_t digest_len, const crypto_pk_t *private_key) |
int | router_append_dirobj_signature (char *buf, size_t buf_len, const char *digest, size_t digest_len, crypto_pk_t *private_key) |
Code to sign directory objects.
Definition in file signing.c.
int router_append_dirobj_signature | ( | char * | buf, |
size_t | buf_len, | ||
const char * | digest, | ||
size_t | digest_len, | ||
crypto_pk_t * | private_key | ||
) |
Helper: used to generate signatures for routers, directories and network-status objects. Given a digest in digest and a secret private_key, generate a PKCS1-padded signature, BASE64-encode it, surround it with --—BEGIN/END--— pairs, and write it to the buf_len-byte buffer at buf. Return 0 on success, -1 on failure.
char* router_get_dirobj_signature | ( | const char * | digest, |
size_t | digest_len, | ||
const crypto_pk_t * | private_key | ||
) |
Helper: used to generate signatures for routers, directories and network-status objects. Given a digest_len-byte digest in digest and a secret private_key, generate an PKCS1-padded signature, BASE64-encode it, surround it with --—BEGIN/END--— pairs, and return the new signature on success or NULL on failure.
Definition at line 22 of file signing.c.
Referenced by router_append_dirobj_signature().