aboutsummaryrefslogtreecommitdiff
path: root/src/lib/tls/x509.c
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2018-08-11 19:38:07 -0400
committerNick Mathewson <nickm@torproject.org>2018-08-21 12:25:33 -0400
commit598bc78bfa62e0879497c0ef03999d3700a5cd16 (patch)
treedb1fe950940aff8bf13f804f7b3cbdd21f902e25 /src/lib/tls/x509.c
parent9a4f05b05c12687e640d2aed9bb21229138bd1a5 (diff)
downloadtor-598bc78bfa62e0879497c0ef03999d3700a5cd16.tar.gz
tor-598bc78bfa62e0879497c0ef03999d3700a5cd16.zip
Extract tortls structures into a new header; clean up a little
Diffstat (limited to 'src/lib/tls/x509.c')
-rw-r--r--src/lib/tls/x509.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/lib/tls/x509.c b/src/lib/tls/x509.c
index feded34737..27cba1be6c 100644
--- a/src/lib/tls/x509.c
+++ b/src/lib/tls/x509.c
@@ -9,11 +9,12 @@
* X.509 functions from OpenSSL.
**/
+#define TOR_X509_PRIVATE
#include "lib/tls/x509.h"
#include "lib/tls/tortls.h"
-//#include "lib/crypt_ops/crypto_cipher.h"
#include "lib/crypt_ops/crypto_rand.h"
#include "lib/crypt_ops/crypto_util.h"
+#include "lib/crypt_ops/compat_openssl.h"
/* Some versions of OpenSSL declare SSL_get_selected_srtp_profile twice in
* srtp.h. Suppress the GCC warning so we can build with -Wredundant-decl. */
@@ -332,6 +333,14 @@ tor_x509_cert_get_der(const tor_x509_cert_t *cert,
*size_out = cert->encoded_len;
}
+/** Return the underlying implementation for <b>cert</b> */
+const tor_x509_cert_impl_t *
+tor_x509_cert_get_impl(const tor_x509_cert_t *cert)
+{
+ tor_assert(cert);
+ return cert->cert;
+}
+
/** Return a set of digests for the public key in <b>cert</b>, or NULL if this
* cert's public key is not one we know how to take the digest of. */
const common_digests_t *