summaryrefslogtreecommitdiff
path: root/src/common/tortls.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2011-09-14 14:43:44 -0400
committerNick Mathewson <nickm@torproject.org>2011-10-10 23:14:10 -0400
commit8c9fdecfe9e6c93e678a5917e302aa18ada8a3b6 (patch)
tree331ccdc0e75e7db6eea82b98937a7bd5a3477e33 /src/common/tortls.c
parentf4c1fa2a04c310c4e0274129bb2fff2aacb59248 (diff)
downloadtor-8c9fdecfe9e6c93e678a5917e302aa18ada8a3b6.tar.gz
tor-8c9fdecfe9e6c93e678a5917e302aa18ada8a3b6.zip
Function to get digests of the certs and their keys
Diffstat (limited to 'src/common/tortls.c')
-rw-r--r--src/common/tortls.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/common/tortls.c b/src/common/tortls.c
index 0ba47baa44..1435223987 100644
--- a/src/common/tortls.c
+++ b/src/common/tortls.c
@@ -789,6 +789,20 @@ tor_cert_get_der(const tor_cert_t *cert,
*size_out = cert->encoded_len;
}
+/** Return a set of digests for the public key in <b>cert</b>. */
+const digests_t *
+tor_cert_get_id_digests(const tor_cert_t *cert)
+{
+ return &cert->pkey_digests;
+}
+
+/** Return a set of digests for the public key in <b>cert</b>. */
+const digests_t *
+tor_cert_get_cert_digests(const tor_cert_t *cert)
+{
+ return &cert->cert_digests;
+}
+
/** Remove a reference to <b>ctx</b>, and free it if it has no more
* references. */
static void