s2n_signature.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334
  1. /* Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
  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. * A copy of the License is located at
  6. *
  7. * http://aws.amazon.com/apache2.0
  8. *
  9. * or in the "license" file accompanying this file. This file is distributed
  10. * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  11. * express or implied. See the License for the specific language governing
  12. * permissions and limitations under the License.
  13. */
  14. #pragma once
  15. #include "tls/s2n_tls_parameters.h"
  16. #define sig_alg_check(a, b) \
  17. do { \
  18. if ((a) != (b)) { \
  19. POSIX_BAIL(S2N_ERR_INVALID_SIGNATURE_ALGORITHM); \
  20. } \
  21. } while (0)
  22. typedef enum {
  23. S2N_SIGNATURE_ANONYMOUS = S2N_TLS_SIGNATURE_ANONYMOUS,
  24. S2N_SIGNATURE_RSA = S2N_TLS_SIGNATURE_RSA,
  25. S2N_SIGNATURE_ECDSA = S2N_TLS_SIGNATURE_ECDSA,
  26. /* Use Private Range for RSA PSS */
  27. S2N_SIGNATURE_RSA_PSS_RSAE = S2N_TLS_SIGNATURE_RSA_PSS_RSAE,
  28. S2N_SIGNATURE_RSA_PSS_PSS
  29. } s2n_signature_algorithm;