quic_ssl.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*
  2. * Copyright 2022 The OpenSSL Project Authors. All Rights Reserved.
  3. *
  4. * Licensed under the Apache License 2.0 (the "License"). You may not use
  5. * this file except in compliance with the License. You can obtain a copy
  6. * in the file LICENSE in the source distribution or at
  7. * https://www.openssl.org/source/license.html
  8. */
  9. #ifndef OSSL_QUIC_SSL_H
  10. # define OSSL_QUIC_SSL_H
  11. # include <openssl/ssl.h>
  12. # include "internal/quic_record_rx.h" /* OSSL_QRX */
  13. # include "internal/quic_ackm.h" /* OSSL_ACKM */
  14. __owur SSL *ossl_quic_new(SSL_CTX *ctx);
  15. __owur int ossl_quic_init(SSL *s);
  16. void ossl_quic_deinit(SSL *s);
  17. void ossl_quic_free(SSL *s);
  18. int ossl_quic_reset(SSL *s);
  19. int ossl_quic_clear(SSL *s);
  20. __owur int ossl_quic_accept(SSL *s);
  21. __owur int ossl_quic_connect(SSL *s);
  22. __owur int ossl_quic_read(SSL *s, void *buf, size_t len, size_t *readbytes);
  23. __owur int ossl_quic_peek(SSL *s, void *buf, size_t len, size_t *readbytes);
  24. __owur int ossl_quic_write(SSL *s, const void *buf, size_t len, size_t *written);
  25. __owur int ossl_quic_shutdown(SSL *s);
  26. __owur long ossl_quic_ctrl(SSL *s, int cmd, long larg, void *parg);
  27. __owur long ossl_quic_ctx_ctrl(SSL_CTX *ctx, int cmd, long larg, void *parg);
  28. __owur long ossl_quic_callback_ctrl(SSL *s, int cmd, void (*fp) (void));
  29. __owur long ossl_quic_ctx_callback_ctrl(SSL_CTX *ctx, int cmd, void (*fp) (void));
  30. __owur size_t ossl_quic_pending(const SSL *s);
  31. __owur OSSL_TIME ossl_quic_default_timeout(void);
  32. __owur int ossl_quic_num_ciphers(void);
  33. __owur const SSL_CIPHER *ossl_quic_get_cipher(unsigned int u);
  34. int ossl_quic_renegotiate_check(SSL *ssl, int initok);
  35. typedef struct quic_conn_st QUIC_CONNECTION;
  36. typedef struct quic_stream_st QUIC_STREAM;
  37. __owur QUIC_CONNECTION *ossl_quic_conn_from_ssl(SSL *ssl);
  38. int ossl_quic_conn_set_qrx(QUIC_CONNECTION *qc, OSSL_QRX *qrx);
  39. OSSL_QRX *ossl_quic_conn_get_qrx(QUIC_CONNECTION *qc);
  40. int ossl_quic_conn_set_ackm(QUIC_CONNECTION *qc, OSSL_ACKM *ackm);
  41. OSSL_ACKM *ossl_quic_conn_set_akcm(QUIC_CONNECTION *qc);
  42. #endif