ssl3_cbc.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. /*
  2. * Copyright 2022-2023 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. #include <openssl/evp.h>
  10. /* tls_pad.c */
  11. int ssl3_cbc_remove_padding_and_mac(size_t *reclen,
  12. size_t origreclen,
  13. unsigned char *recdata,
  14. unsigned char **mac,
  15. int *alloced,
  16. size_t block_size, size_t mac_size,
  17. OSSL_LIB_CTX *libctx);
  18. int tls1_cbc_remove_padding_and_mac(size_t *reclen,
  19. size_t origreclen,
  20. unsigned char *recdata,
  21. unsigned char **mac,
  22. int *alloced,
  23. size_t block_size, size_t mac_size,
  24. int aead,
  25. OSSL_LIB_CTX *libctx);
  26. /* ssl3_cbc.c */
  27. __owur char ssl3_cbc_record_digest_supported(const EVP_MD_CTX *ctx);
  28. __owur int ssl3_cbc_digest_record(const EVP_MD *md,
  29. unsigned char *md_out,
  30. size_t *md_out_size,
  31. const unsigned char *header,
  32. const unsigned char *data,
  33. size_t data_size,
  34. size_t data_plus_mac_plus_padding_size,
  35. const unsigned char *mac_secret,
  36. size_t mac_secret_length, char is_sslv3);