ocsp_err.c 3.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091
  1. /*
  2. * Generated by util/mkerr.pl DO NOT EDIT
  3. * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
  4. *
  5. * Licensed under the OpenSSL license (the "License"). You may not use
  6. * this file except in compliance with the License. You can obtain a copy
  7. * in the file LICENSE in the source distribution or at
  8. * https://www.openssl.org/source/license.html
  9. */
  10. #include <stdio.h>
  11. #include <openssl/err.h>
  12. #include <openssl/ocsp.h>
  13. /* BEGIN ERROR CODES */
  14. #ifndef OPENSSL_NO_ERR
  15. # define ERR_FUNC(func) ERR_PACK(ERR_LIB_OCSP,func,0)
  16. # define ERR_REASON(reason) ERR_PACK(ERR_LIB_OCSP,0,reason)
  17. static ERR_STRING_DATA OCSP_str_functs[] = {
  18. {ERR_FUNC(OCSP_F_D2I_OCSP_NONCE), "d2i_ocsp_nonce"},
  19. {ERR_FUNC(OCSP_F_OCSP_BASIC_ADD1_STATUS), "OCSP_basic_add1_status"},
  20. {ERR_FUNC(OCSP_F_OCSP_BASIC_SIGN), "OCSP_basic_sign"},
  21. {ERR_FUNC(OCSP_F_OCSP_BASIC_VERIFY), "OCSP_basic_verify"},
  22. {ERR_FUNC(OCSP_F_OCSP_CERT_ID_NEW), "OCSP_cert_id_new"},
  23. {ERR_FUNC(OCSP_F_OCSP_CHECK_DELEGATED), "ocsp_check_delegated"},
  24. {ERR_FUNC(OCSP_F_OCSP_CHECK_IDS), "ocsp_check_ids"},
  25. {ERR_FUNC(OCSP_F_OCSP_CHECK_ISSUER), "ocsp_check_issuer"},
  26. {ERR_FUNC(OCSP_F_OCSP_CHECK_VALIDITY), "OCSP_check_validity"},
  27. {ERR_FUNC(OCSP_F_OCSP_MATCH_ISSUERID), "ocsp_match_issuerid"},
  28. {ERR_FUNC(OCSP_F_OCSP_PARSE_URL), "OCSP_parse_url"},
  29. {ERR_FUNC(OCSP_F_OCSP_REQUEST_SIGN), "OCSP_request_sign"},
  30. {ERR_FUNC(OCSP_F_OCSP_REQUEST_VERIFY), "OCSP_request_verify"},
  31. {ERR_FUNC(OCSP_F_OCSP_RESPONSE_GET1_BASIC), "OCSP_response_get1_basic"},
  32. {ERR_FUNC(OCSP_F_PARSE_HTTP_LINE1), "parse_http_line1"},
  33. {0, NULL}
  34. };
  35. static ERR_STRING_DATA OCSP_str_reasons[] = {
  36. {ERR_REASON(OCSP_R_CERTIFICATE_VERIFY_ERROR), "certificate verify error"},
  37. {ERR_REASON(OCSP_R_DIGEST_ERR), "digest err"},
  38. {ERR_REASON(OCSP_R_ERROR_IN_NEXTUPDATE_FIELD),
  39. "error in nextupdate field"},
  40. {ERR_REASON(OCSP_R_ERROR_IN_THISUPDATE_FIELD),
  41. "error in thisupdate field"},
  42. {ERR_REASON(OCSP_R_ERROR_PARSING_URL), "error parsing url"},
  43. {ERR_REASON(OCSP_R_MISSING_OCSPSIGNING_USAGE),
  44. "missing ocspsigning usage"},
  45. {ERR_REASON(OCSP_R_NEXTUPDATE_BEFORE_THISUPDATE),
  46. "nextupdate before thisupdate"},
  47. {ERR_REASON(OCSP_R_NOT_BASIC_RESPONSE), "not basic response"},
  48. {ERR_REASON(OCSP_R_NO_CERTIFICATES_IN_CHAIN), "no certificates in chain"},
  49. {ERR_REASON(OCSP_R_NO_RESPONSE_DATA), "no response data"},
  50. {ERR_REASON(OCSP_R_NO_REVOKED_TIME), "no revoked time"},
  51. {ERR_REASON(OCSP_R_NO_SIGNER_KEY), "no signer key"},
  52. {ERR_REASON(OCSP_R_PRIVATE_KEY_DOES_NOT_MATCH_CERTIFICATE),
  53. "private key does not match certificate"},
  54. {ERR_REASON(OCSP_R_REQUEST_NOT_SIGNED), "request not signed"},
  55. {ERR_REASON(OCSP_R_RESPONSE_CONTAINS_NO_REVOCATION_DATA),
  56. "response contains no revocation data"},
  57. {ERR_REASON(OCSP_R_ROOT_CA_NOT_TRUSTED), "root ca not trusted"},
  58. {ERR_REASON(OCSP_R_SERVER_RESPONSE_ERROR), "server response error"},
  59. {ERR_REASON(OCSP_R_SERVER_RESPONSE_PARSE_ERROR),
  60. "server response parse error"},
  61. {ERR_REASON(OCSP_R_SIGNATURE_FAILURE), "signature failure"},
  62. {ERR_REASON(OCSP_R_SIGNER_CERTIFICATE_NOT_FOUND),
  63. "signer certificate not found"},
  64. {ERR_REASON(OCSP_R_STATUS_EXPIRED), "status expired"},
  65. {ERR_REASON(OCSP_R_STATUS_NOT_YET_VALID), "status not yet valid"},
  66. {ERR_REASON(OCSP_R_STATUS_TOO_OLD), "status too old"},
  67. {ERR_REASON(OCSP_R_UNKNOWN_MESSAGE_DIGEST), "unknown message digest"},
  68. {ERR_REASON(OCSP_R_UNKNOWN_NID), "unknown nid"},
  69. {ERR_REASON(OCSP_R_UNSUPPORTED_REQUESTORNAME_TYPE),
  70. "unsupported requestorname type"},
  71. {0, NULL}
  72. };
  73. #endif
  74. int ERR_load_OCSP_strings(void)
  75. {
  76. #ifndef OPENSSL_NO_ERR
  77. if (ERR_func_error_string(OCSP_str_functs[0].error) == NULL) {
  78. ERR_load_strings(0, OCSP_str_functs);
  79. ERR_load_strings(0, OCSP_str_reasons);
  80. }
  81. #endif
  82. return 1;
  83. }