[tor-commits] [tor/master] Constify crypto_pk_get_digest().

nickm at torproject.org nickm at torproject.org
Fri Dec 19 15:39:27 UTC 2014


commit 447ece46f5705770df05bd28e27765dde50063de
Author: George Kadianakis <desnacked at riseup.net>
Date:   Mon Dec 1 16:12:05 2014 +0000

    Constify crypto_pk_get_digest().
---
 src/common/crypto.c |    2 +-
 src/common/crypto.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/common/crypto.c b/src/common/crypto.c
index 7138ba0..713e588 100644
--- a/src/common/crypto.c
+++ b/src/common/crypto.c
@@ -1293,7 +1293,7 @@ crypto_pk_asn1_decode(const char *str, size_t len)
  * Return 0 on success, -1 on failure.
  */
 int
-crypto_pk_get_digest(crypto_pk_t *pk, char *digest_out)
+crypto_pk_get_digest(const crypto_pk_t *pk, char *digest_out)
 {
   unsigned char *buf = NULL;
   int len;
diff --git a/src/common/crypto.h b/src/common/crypto.h
index d496521..a8f0fbc 100644
--- a/src/common/crypto.h
+++ b/src/common/crypto.h
@@ -180,7 +180,7 @@ int crypto_pk_private_hybrid_decrypt(crypto_pk_t *env, char *to,
 
 int crypto_pk_asn1_encode(crypto_pk_t *pk, char *dest, size_t dest_len);
 crypto_pk_t *crypto_pk_asn1_decode(const char *str, size_t len);
-int crypto_pk_get_digest(crypto_pk_t *pk, char *digest_out);
+int crypto_pk_get_digest(const crypto_pk_t *pk, char *digest_out);
 int crypto_pk_get_all_digests(crypto_pk_t *pk, digests_t *digests_out);
 int crypto_pk_get_fingerprint(crypto_pk_t *pk, char *fp_out,int add_space);
 int crypto_pk_get_hashed_fingerprint(crypto_pk_t *pk, char *fp_out);





More information about the tor-commits mailing list