]> git.ipfire.org Git - thirdparty/tor.git/commitdiff
Remove tor_x509_get_cert_impl as unneeded.
authorNick Mathewson <nickm@torproject.org>
Thu, 23 Aug 2018 17:05:38 +0000 (13:05 -0400)
committerNick Mathewson <nickm@torproject.org>
Tue, 4 Sep 2018 18:52:35 +0000 (14:52 -0400)
src/lib/tls/tortls_openssl.c
src/lib/tls/x509.c
src/lib/tls/x509_internal.h

index e455693dfdfc72198be425e29ae81da61447cf27..d10e50a975bcf93e6a0e61b08fa697c80f52361c 100644 (file)
@@ -480,7 +480,7 @@ tor_tls_cert_matches_key,(const tor_tls_t *tls, const tor_x509_cert_t *cert))
   if (!peercert)
     return 0;
   link_key = X509_get_pubkey(peercert);
-  cert_key = X509_get_pubkey((X509 *)tor_x509_cert_get_impl(cert));
+  cert_key = X509_get_pubkey(cert->cert);
 
   result = link_key && cert_key && EVP_PKEY_cmp(cert_key, link_key) == 1;
 
index d2270f9108e50fd2601431bfcd87dd6c3db44ff7..cff1c1302cc95d9ee2f9e4c56cfeb40fa3c5439c 100644 (file)
@@ -52,14 +52,6 @@ tor_tls_pick_certificate_lifetime(time_t now,
   *end_time_out = end_time;
 }
 
-/** 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 *
index 4b49f1dec2a72a3fd5b87f5a0b89d07948a97f06..0e186ec8490ac243201eccbf1c57830262284317 100644 (file)
@@ -33,8 +33,6 @@ MOCK_DECL(tor_x509_cert_impl_t *, tor_tls_create_certificate,
                                                   unsigned int cert_lifetime));
 MOCK_DECL(tor_x509_cert_t *, tor_x509_cert_new,
           (tor_x509_cert_impl_t *x509_cert));
-const tor_x509_cert_impl_t *tor_x509_cert_get_impl(
-                                           const tor_x509_cert_t *cert);
 
 int tor_x509_check_cert_lifetime_internal(int severity,
                                           const tor_x509_cert_impl_t *cert,