OSSL_CRMF_MSG_set1_regCtrl_regToken.pod 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. =pod
  2. =head1 NAME
  3. OSSL_CRMF_MSG_get0_regCtrl_regToken,
  4. OSSL_CRMF_MSG_set1_regCtrl_regToken,
  5. OSSL_CRMF_MSG_get0_regCtrl_authenticator,
  6. OSSL_CRMF_MSG_set1_regCtrl_authenticator,
  7. OSSL_CRMF_MSG_PKIPublicationInfo_push0_SinglePubInfo,
  8. OSSL_CRMF_MSG_set0_SinglePubInfo,
  9. OSSL_CRMF_MSG_set_PKIPublicationInfo_action,
  10. OSSL_CRMF_MSG_get0_regCtrl_pkiPublicationInfo,
  11. OSSL_CRMF_MSG_set1_regCtrl_pkiPublicationInfo,
  12. OSSL_CRMF_MSG_get0_regCtrl_protocolEncrKey,
  13. OSSL_CRMF_MSG_set1_regCtrl_protocolEncrKey,
  14. OSSL_CRMF_MSG_get0_regCtrl_oldCertID,
  15. OSSL_CRMF_MSG_set1_regCtrl_oldCertID,
  16. OSSL_CRMF_CERTID_gen
  17. - functions getting or setting CRMF Registration Controls
  18. =head1 SYNOPSIS
  19. #include <openssl/crmf.h>
  20. ASN1_UTF8STRING
  21. *OSSL_CRMF_MSG_get0_regCtrl_regToken(const OSSL_CRMF_MSG *msg);
  22. int OSSL_CRMF_MSG_set1_regCtrl_regToken(OSSL_CRMF_MSG *msg,
  23. const ASN1_UTF8STRING *tok);
  24. ASN1_UTF8STRING
  25. *OSSL_CRMF_MSG_get0_regCtrl_authenticator(const OSSL_CRMF_MSG *msg);
  26. int OSSL_CRMF_MSG_set1_regCtrl_authenticator(OSSL_CRMF_MSG *msg,
  27. const ASN1_UTF8STRING *auth);
  28. int OSSL_CRMF_MSG_PKIPublicationInfo_push0_SinglePubInfo(
  29. OSSL_CRMF_PKIPUBLICATIONINFO *pi,
  30. OSSL_CRMF_SINGLEPUBINFO *spi);
  31. int OSSL_CRMF_MSG_set0_SinglePubInfo(OSSL_CRMF_SINGLEPUBINFO *spi,
  32. int method, GENERAL_NAME *nm);
  33. int OSSL_CRMF_MSG_set_PKIPublicationInfo_action(
  34. OSSL_CRMF_PKIPUBLICATIONINFO *pi, int action);
  35. OSSL_CRMF_PKIPUBLICATIONINFO
  36. *OSSL_CRMF_MSG_get0_regCtrl_pkiPublicationInfo(const OSSL_CRMF_MSG *msg);
  37. int OSSL_CRMF_MSG_set1_regCtrl_pkiPublicationInfo(OSSL_CRMF_MSG *msg,
  38. const OSSL_CRMF_PKIPUBLICATIONINFO *pi);
  39. X509_PUBKEY
  40. *OSSL_CRMF_MSG_get0_regCtrl_protocolEncrKey(const OSSL_CRMF_MSG *msg);
  41. int OSSL_CRMF_MSG_set1_regCtrl_protocolEncrKey(OSSL_CRMF_MSG *msg,
  42. const X509_PUBKEY *pubkey);
  43. OSSL_CRMF_CERTID
  44. *OSSL_CRMF_MSG_get0_regCtrl_oldCertID(const OSSL_CRMF_MSG *msg);
  45. int OSSL_CRMF_MSG_set1_regCtrl_oldCertID(OSSL_CRMF_MSG *msg,
  46. const OSSL_CRMF_CERTID *cid);
  47. OSSL_CRMF_CERTID *OSSL_CRMF_CERTID_gen(const X509_NAME *issuer,
  48. const ASN1_INTEGER *serial);
  49. =head1 DESCRIPTION
  50. Each of the OSSL_CRMF_MSG_get0_regCtrl_X() functions
  51. returns the respective control X in the given I<msg>, if present.
  52. OSSL_CRMF_MSG_set1_regCtrl_regToken() sets the regToken control in the given
  53. I<msg> copying the given I<tok> as value. See RFC 4211, section 6.1.
  54. OSSL_CRMF_MSG_set1_regCtrl_authenticator() sets the authenticator control in
  55. the given I<msg> copying the given I<auth> as value. See RFC 4211, section 6.2.
  56. OSSL_CRMF_MSG_PKIPublicationInfo_push0_SinglePubInfo() pushes the given I<spi>
  57. to I<si>. Consumes the I<spi> pointer.
  58. OSSL_CRMF_MSG_set0_SinglePubInfo() sets in the given SinglePubInfo I<spi>
  59. the I<method> and publication location, in the form of a GeneralName, I<nm>.
  60. The publication location is optional, and therefore I<nm> may be NULL.
  61. The function consumes the I<nm> pointer if present.
  62. Available methods are:
  63. # define OSSL_CRMF_PUB_METHOD_DONTCARE 0
  64. # define OSSL_CRMF_PUB_METHOD_X500 1
  65. # define OSSL_CRMF_PUB_METHOD_WEB 2
  66. # define OSSL_CRMF_PUB_METHOD_LDAP 3
  67. OSSL_CRMF_MSG_set_PKIPublicationInfo_action() sets the action in the given I<pi>
  68. using the given I<action> as value. See RFC 4211, section 6.3.
  69. Available actions are:
  70. # define OSSL_CRMF_PUB_ACTION_DONTPUBLISH 0
  71. # define OSSL_CRMF_PUB_ACTION_PLEASEPUBLISH 1
  72. OSSL_CRMF_MSG_set1_regCtrl_pkiPublicationInfo() sets the pkiPublicationInfo
  73. control in the given I<msg> copying the given I<tok> as value. See RFC 4211,
  74. section 6.3.
  75. OSSL_CRMF_MSG_set1_regCtrl_protocolEncrKey() sets the protocolEncrKey control in
  76. the given I<msg> copying the given I<pubkey> as value. See RFC 4211 section 6.6.
  77. OSSL_CRMF_MSG_set1_regCtrl_oldCertID() sets the B<oldCertID> regToken control in
  78. the given I<msg> copying the given I<cid> as value. See RFC 4211, section 6.5.
  79. OSSL_CRMF_CERTID_gen produces an OSSL_CRMF_CERTID_gen structure copying the
  80. given I<issuer> name and I<serial> number.
  81. =head1 RETURN VALUES
  82. All OSSL_CRMF_MSG_get0_*() functions
  83. return the respective pointer value or NULL if not present and on error.
  84. All OSSL_CRMF_MSG_set1_*() functions return 1 on success, 0 on error.
  85. OSSL_CRMF_CERTID_gen() returns a pointer to the resulting structure
  86. or NULL on error.
  87. =head1 NOTES
  88. A function OSSL_CRMF_MSG_set1_regCtrl_pkiArchiveOptions() for setting an
  89. Archive Options Control is not yet implemented due to missing features to
  90. create the needed OSSL_CRMF_PKIARCHIVEOPTINS content.
  91. =head1 SEE ALSO
  92. RFC 4211
  93. =head1 HISTORY
  94. The OpenSSL CRMF support was added in OpenSSL 3.0.
  95. =head1 COPYRIGHT
  96. Copyright 2007-2022 The OpenSSL Project Authors. All Rights Reserved.
  97. Licensed under the Apache License 2.0 (the "License"). You may not use
  98. this file except in compliance with the License. You can obtain a copy
  99. in the file LICENSE in the source distribution or at
  100. L<https://www.openssl.org/source/license.html>.
  101. =cut