http_local.h 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * Copyright 2007-2020 The OpenSSL Project Authors. All Rights Reserved.
  3. * Copyright Siemens AG 2018-2020
  4. *
  5. * Licensed under the Apache License 2.0 (the "License"). You may not use
  6. * this file except in compliance with the License. You can obtain a copy
  7. * in the file LICENSE in the source distribution or at
  8. * https://www.openssl.org/source/license.html
  9. */
  10. #ifndef OSSL_CRYPTO_HTTP_LOCAL_H
  11. # define OSSL_CRYPTO_HTTP_LOCAL_H
  12. # include <openssl/ocsp.h>
  13. /* name aliases for legacy names with name prefix "OCSP_" */
  14. typedef OCSP_REQ_CTX OSSL_HTTP_REQ_CTX;
  15. /* functions meanwhile only used internally */
  16. # define OSSL_HTTP_REQ_CTX_new OCSP_REQ_CTX_new
  17. # define OSSL_HTTP_REQ_CTX_free OCSP_REQ_CTX_free
  18. # define OSSL_HTTP_REQ_CTX_header OCSP_REQ_CTX_http
  19. # define OSSL_HTTP_REQ_CTX_add1_header OCSP_REQ_CTX_add1_header
  20. # define OSSL_HTTP_REQ_CTX_i2d OCSP_REQ_CTX_i2d
  21. # define OSSL_HTTP_REQ_CTX_nbio OCSP_REQ_CTX_nbio
  22. # define OSSL_HTTP_REQ_CTX_sendreq_d2i OCSP_REQ_CTX_nbio_d2i
  23. /* functions that are meanwhile unused */
  24. # define OSSL_HTTP_REQ_CTX_get0_mem_bio OCSP_REQ_CTX_get0_mem_bio /* undoc'd */
  25. # define OSSL_HTTP_REQ_CTX_set_max_response_length OCSP_set_max_response_length
  26. BIO *HTTP_asn1_item2bio(const ASN1_ITEM *it, const ASN1_VALUE *val);
  27. OSSL_HTTP_REQ_CTX *HTTP_REQ_CTX_new(BIO *wbio, BIO *rbio, int use_http_proxy,
  28. const char *server, const char *port,
  29. const char *path,
  30. const STACK_OF(CONF_VALUE) *headers,
  31. const char *content_type, BIO *req_mem,
  32. int maxline, unsigned long max_resp_len,
  33. int timeout,
  34. const char *expected_content_type,
  35. int expect_asn1);
  36. ASN1_VALUE *HTTP_sendreq_bio(BIO *bio, OSSL_HTTP_bio_cb_t bio_update_fn,
  37. void *arg, const char *server, const char *port,
  38. const char *path, int use_ssl, int use_proxy,
  39. const STACK_OF(CONF_VALUE) *headers,
  40. const char *content_type,
  41. ASN1_VALUE *req, const ASN1_ITEM *req_it,
  42. int maxline, unsigned long max_resp_len,
  43. int timeout, const ASN1_ITEM *rsp_it);
  44. int http_use_proxy(const char *no_proxy, const char *server);
  45. const char *http_adapt_proxy(const char *proxy, const char *no_proxy,
  46. const char *server, int use_ssl);
  47. #endif /* !defined(OSSL_CRYPTO_HTTP_LOCAL_H) */