tls1.h 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. // Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. // http://www.apache.org/licenses/LICENSE-2.0
  7. //
  8. // Unless required by applicable law or agreed to in writing, software
  9. // distributed under the License is distributed on an "AS IS" BASIS,
  10. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  11. // See the License for the specific language governing permissions and
  12. // limitations under the License.
  13. #ifndef _TLS1_H_
  14. #define _TLS1_H_
  15. #ifdef __cplusplus
  16. extern "C" {
  17. #endif
  18. # define TLS1_AD_DECRYPTION_FAILED 21
  19. # define TLS1_AD_RECORD_OVERFLOW 22
  20. # define TLS1_AD_UNKNOWN_CA 48/* fatal */
  21. # define TLS1_AD_ACCESS_DENIED 49/* fatal */
  22. # define TLS1_AD_DECODE_ERROR 50/* fatal */
  23. # define TLS1_AD_DECRYPT_ERROR 51
  24. # define TLS1_AD_EXPORT_RESTRICTION 60/* fatal */
  25. # define TLS1_AD_PROTOCOL_VERSION 70/* fatal */
  26. # define TLS1_AD_INSUFFICIENT_SECURITY 71/* fatal */
  27. # define TLS1_AD_INTERNAL_ERROR 80/* fatal */
  28. # define TLS1_AD_INAPPROPRIATE_FALLBACK 86/* fatal */
  29. # define TLS1_AD_USER_CANCELLED 90
  30. # define TLS1_AD_NO_RENEGOTIATION 100
  31. /* codes 110-114 are from RFC3546 */
  32. # define TLS1_AD_UNSUPPORTED_EXTENSION 110
  33. # define TLS1_AD_CERTIFICATE_UNOBTAINABLE 111
  34. # define TLS1_AD_UNRECOGNIZED_NAME 112
  35. # define TLS1_AD_BAD_CERTIFICATE_STATUS_RESPONSE 113
  36. # define TLS1_AD_BAD_CERTIFICATE_HASH_VALUE 114
  37. # define TLS1_AD_UNKNOWN_PSK_IDENTITY 115/* fatal */
  38. # define TLS1_AD_NO_APPLICATION_PROTOCOL 120 /* fatal */
  39. /* Special value for method supporting multiple versions */
  40. #define TLS_ANY_VERSION 0x10000
  41. #define TLS1_VERSION 0x0301
  42. #define TLS1_1_VERSION 0x0302
  43. #define TLS1_2_VERSION 0x0303
  44. #define SSL_TLSEXT_ERR_OK 0
  45. #define SSL_TLSEXT_ERR_NOACK 3
  46. #ifdef __cplusplus
  47. }
  48. #endif
  49. #endif