ossl_cmp_pkisi_get_status.pod 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. =pod
  2. =head1 NAME
  3. ossl_cmp_certresponse_get1_cert,
  4. ossl_cmp_pkisi_get_status,
  5. ossl_cmp_PKIStatus_to_string,
  6. ossl_cmp_pkisi_get0_statusString,
  7. ossl_cmp_pkisi_get_pkifailureinfo,
  8. ossl_cmp_pkisi_check_pkifailureinfo
  9. - functions for managing PKI status information
  10. =head1 SYNOPSIS
  11. #include "cmp.h"
  12. # define OSSL_CMP_PKIFAILUREINFO_badAlg 0
  13. # define OSSL_CMP_PKIFAILUREINFO_badMessageCheck 1
  14. # define OSSL_CMP_PKIFAILUREINFO_badRequest 2
  15. # define OSSL_CMP_PKIFAILUREINFO_badTime 3
  16. # define OSSL_CMP_PKIFAILUREINFO_badCertId 4
  17. # define OSSL_CMP_PKIFAILUREINFO_badDataFormat 5
  18. # define OSSL_CMP_PKIFAILUREINFO_wrongAuthority 6
  19. # define OSSL_CMP_PKIFAILUREINFO_incorrectData 7
  20. # define OSSL_CMP_PKIFAILUREINFO_missingTimeStamp 8
  21. # define OSSL_CMP_PKIFAILUREINFO_badPOP 9
  22. # define OSSL_CMP_PKIFAILUREINFO_certRevoked 10
  23. # define OSSL_CMP_PKIFAILUREINFO_certConfirmed 11
  24. # define OSSL_CMP_PKIFAILUREINFO_wrongIntegrity 12
  25. # define OSSL_CMP_PKIFAILUREINFO_badRecipientNonce 13
  26. # define OSSL_CMP_PKIFAILUREINFO_timeNotAvailable 14
  27. # define OSSL_CMP_PKIFAILUREINFO_unacceptedPolicy 15
  28. # define OSSL_CMP_PKIFAILUREINFO_unacceptedExtension 16
  29. # define OSSL_CMP_PKIFAILUREINFO_addInfoNotAvailable 17
  30. # define OSSL_CMP_PKIFAILUREINFO_badSenderNonce 18
  31. # define OSSL_CMP_PKIFAILUREINFO_badCertTemplate 19
  32. # define OSSL_CMP_PKIFAILUREINFO_signerNotTrusted 20
  33. # define OSSL_CMP_PKIFAILUREINFO_transactionIdInUse 21
  34. # define OSSL_CMP_PKIFAILUREINFO_unsupportedVersion 22
  35. # define OSSL_CMP_PKIFAILUREINFO_notAuthorized 23
  36. # define OSSL_CMP_PKIFAILUREINFO_systemUnavail 24
  37. # define OSSL_CMP_PKIFAILUREINFO_systemFailure 25
  38. # define OSSL_CMP_PKIFAILUREINFO_duplicateCertReq 26
  39. # define OSSL_CMP_PKIFAILUREINFO_MAX 26
  40. X509 *ossl_cmp_certresponse_get1_cert(const OSSL_CMP_CERTRESPONSE *crep,
  41. const OSSL_CMP_CTX *ctx, EVP_PKEY *pkey);
  42. int ossl_cmp_pkisi_get_status(const OSSL_CMP_PKISI *si);
  43. const char *ossl_cmp_PKIStatus_to_string(int status);
  44. OSSL_CMP_PKIFREETEXT *ossl_cmp_pkisi_get0_statusString(const OSSL_CMP_PKISI *si);
  45. int ossl_cmp_pkisi_get_pkifailureinfo(const OSSL_CMP_PKISI *si);
  46. int ossl_cmp_pkisi_check_pkifailureinfo(const OSSL_CMP_PKISI *si, int index);
  47. =head1 DESCRIPTION
  48. ossl_cmp_certresponse_get1_cert() returns a pointer to a copy of the newly
  49. enrolled certificate from the given certResponse I<crep>, or NULL on error.
  50. In case of indirect POPO uses data from the I<ctx> and the private key I<pkey>.
  51. ossl_cmp_pkisi_get_status() returns the PKIStatus of I<si>, or -1 on error.
  52. ossl_cmp_PKIStatus_to_string() returns a human-readable string representing
  53. the PKIStatus values as specified in RFC 4210, Appendix F.
  54. ossl_cmp_pkisi_get0_statusString() returns a direct pointer to the statusString
  55. field contained in I<si>.
  56. ossl_cmp_pkisi_get_pkifailureinfo() returns the PKIFailureInfo bits
  57. of I<si>, encoded as integer, or -1 on error.
  58. ossl_cmp_pkisi_check_pkifailureinfo() returns the state of the bit (0 or 1)
  59. with index I<index> in the PKIFailureInfo of the I<si>, or -1 on error.
  60. =head1 NOTES
  61. CMP is defined in RFC 4210 (and CRMF in RFC 4211).
  62. =head1 RETURN VALUES
  63. See the individual functions above.
  64. =head1 SEE ALSO
  65. L<OSSL_CMP_CTX_new(3)>, L<ossl_cmp_certreq_new(3)>
  66. =head1 HISTORY
  67. The OpenSSL CMP support was added in OpenSSL 3.0.
  68. =head1 COPYRIGHT
  69. Copyright 2007-2020 The OpenSSL Project Authors. All Rights Reserved.
  70. Licensed under the Apache License 2.0 (the "License"). You may not use
  71. this file except in compliance with the License. You can obtain a copy
  72. in the file LICENSE in the source distribution or at
  73. L<https://www.openssl.org/source/license.html>.
  74. =cut