s2n_crl.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /*
  2. * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License").
  5. * You may not use this file except in compliance with the License.
  6. * A copy of the License is located at
  7. *
  8. * http://aws.amazon.com/apache2.0
  9. *
  10. * or in the "license" file accompanying this file. This file is distributed
  11. * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  12. * express or implied. See the License for the specific language governing
  13. * permissions and limitations under the License.
  14. */
  15. #pragma once
  16. #include <openssl/x509v3.h>
  17. #include "api/s2n.h"
  18. #include "api/unstable/crl.h"
  19. #include "utils/s2n_result.h"
  20. struct s2n_x509_validator;
  21. struct s2n_crl {
  22. X509_CRL *crl;
  23. };
  24. typedef enum {
  25. AWAITING_RESPONSE,
  26. FINISHED
  27. } crl_lookup_callback_status;
  28. struct s2n_crl_lookup {
  29. crl_lookup_callback_status status;
  30. X509 *cert;
  31. uint16_t cert_idx;
  32. struct s2n_crl *crl;
  33. };
  34. S2N_RESULT s2n_crl_handle_lookup_callback_result(struct s2n_x509_validator *validator);
  35. S2N_RESULT s2n_crl_invoke_lookup_callbacks(struct s2n_connection *conn, struct s2n_x509_validator *validator);
  36. S2N_RESULT s2n_crl_get_crls_from_lookup_list(struct s2n_x509_validator *validator, STACK_OF(X509_CRL) *crl_stack);
  37. int s2n_crl_ossl_verify_callback(int default_ossl_ret, X509_STORE_CTX *ctx);