x509_internal.h 1.3 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /* Copyright (c) 2003, Roger Dingledine
  2. * Copyright (c) 2004-2006, Roger Dingledine, Nick Mathewson.
  3. * Copyright (c) 2007-2018, The Tor Project, Inc. */
  4. /* See LICENSE for licensing information */
  5. #ifndef TOR_X509_INTERNAL_H
  6. #define TOR_X509_INTERNAL_H
  7. /**
  8. * \file x509.h
  9. * \brief Internal headers for tortls.c
  10. **/
  11. #include "lib/crypt_ops/crypto_rsa.h"
  12. #include "lib/testsupport/testsupport.h"
  13. MOCK_DECL(tor_x509_cert_impl_t *, tor_tls_create_certificate,
  14. (crypto_pk_t *rsa,
  15. crypto_pk_t *rsa_sign,
  16. const char *cname,
  17. const char *cname_sign,
  18. unsigned int cert_lifetime));
  19. MOCK_DECL(tor_x509_cert_t *, tor_x509_cert_new,
  20. (tor_x509_cert_impl_t *x509_cert));
  21. const tor_x509_cert_impl_t *tor_x509_cert_get_impl(
  22. const tor_x509_cert_t *cert);
  23. void tor_x509_cert_impl_free_(tor_x509_cert_impl_t *cert);
  24. #ifdef ENABLE_OPENSSL
  25. int tor_x509_cert_set_cached_der_encoding(tor_x509_cert_t *cert);
  26. #else
  27. #define tor_x509_cert_set_cached_der_encoding(cert) (0)
  28. #endif
  29. #endif