OSSL_CRMF_MSG_get0_tmpl.pod 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. =pod
  2. =head1 NAME
  3. OSSL_CRMF_MSG_get0_tmpl,
  4. OSSL_CRMF_CERTTEMPLATE_get0_publicKey,
  5. OSSL_CRMF_CERTTEMPLATE_get0_subject,
  6. OSSL_CRMF_CERTTEMPLATE_get0_issuer,
  7. OSSL_CRMF_CERTTEMPLATE_get0_serialNumber,
  8. OSSL_CRMF_CERTTEMPLATE_get0_extensions,
  9. OSSL_CRMF_CERTID_get0_serialNumber,
  10. OSSL_CRMF_CERTID_get0_issuer,
  11. OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert,
  12. OSSL_CRMF_MSG_get_certReqId
  13. - functions reading from CRMF CertReqMsg structures
  14. =head1 SYNOPSIS
  15. #include <openssl/crmf.h>
  16. OSSL_CRMF_CERTTEMPLATE *OSSL_CRMF_MSG_get0_tmpl(const OSSL_CRMF_MSG *crm);
  17. const X509_PUBKEY
  18. *OSSL_CRMF_CERTTEMPLATE_get0_publicKey(const OSSL_CRMF_CERTTEMPLATE *tmpl);
  19. const X509_NAME
  20. *OSSL_CRMF_CERTTEMPLATE_get0_subject(const OSSL_CRMF_CERTTEMPLATE *tmpl);
  21. const X509_NAME
  22. *OSSL_CRMF_CERTTEMPLATE_get0_issuer(const OSSL_CRMF_CERTTEMPLATE *tmpl);
  23. const ASN1_INTEGER
  24. *OSSL_CRMF_CERTTEMPLATE_get0_serialNumber(const OSSL_CRMF_CERTTEMPLATE *tmpl);
  25. X509_EXTENSIONS
  26. *OSSL_CRMF_CERTTEMPLATE_get0_extensions(const OSSL_CRMF_CERTTEMPLATE *tmpl);
  27. const ASN1_INTEGER
  28. *OSSL_CRMF_CERTID_get0_serialNumber(const OSSL_CRMF_CERTID *cid);
  29. const X509_NAME *OSSL_CRMF_CERTID_get0_issuer(const OSSL_CRMF_CERTID *cid);
  30. X509
  31. *OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert(const OSSL_CRMF_ENCRYPTEDVALUE *ecert,
  32. OSSL_LIB_CTX *libctx, const char *propq,
  33. EVP_PKEY *pkey);
  34. int OSSL_CRMF_MSG_get_certReqId(const OSSL_CRMF_MSG *crm);
  35. =head1 DESCRIPTION
  36. OSSL_CRMF_MSG_get0_tmpl() retrieves the certificate template of I<crm>.
  37. OSSL_CRMF_CERTTEMPLATE_get0_publicKey() retrieves the public key of the
  38. given certificate template I<tmpl>.
  39. OSSL_CRMF_CERTTEMPLATE_get0_subject() retrieves the subject name of the
  40. given certificate template I<tmpl>.
  41. OSSL_CRMF_CERTTEMPLATE_get0_issuer() retrieves the issuer name of the
  42. given certificate template I<tmpl>.
  43. OSSL_CRMF_CERTTEMPLATE_get0_serialNumber() retrieves the serialNumber of the
  44. given certificate template I<tmpl>.
  45. OSSL_CRMF_CERTTEMPLATE_get0_extensions() retrieves the X.509 extensions
  46. of the given certificate template I<tmpl>, or NULL if not present.
  47. OSSL_CRMF_CERTID_get0_serialNumber retrieves the serialNumber
  48. of the given CertId I<cid>.
  49. OSSL_CRMF_CERTID_get0_issuer retrieves the issuer name
  50. of the given CertId I<cid>, which must be of ASN.1 type GEN_DIRNAME.
  51. OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert() decrypts the certificate in the given
  52. encryptedValue I<ecert>, using the private key I<pkey>, library context
  53. I<libctx> and property query string I<propq> (see L<OSSL_LIB_CTX(3)>).
  54. This is needed for the indirect POPO method as in RFC 4210 section 5.2.8.2.
  55. The function returns the decrypted certificate as a copy, leaving its ownership
  56. with the caller, who is responsible for freeing it.
  57. OSSL_CRMF_MSG_get_certReqId() retrieves the certReqId of I<crm>.
  58. =head1 RETURN VALUES
  59. OSSL_CRMF_MSG_get_certReqId() returns the certificate request ID as a
  60. nonnegative integer or -1 on error.
  61. All other functions return a pointer with the intended result or NULL on error.
  62. =head1 SEE ALSO
  63. RFC 4211
  64. =head1 HISTORY
  65. The OpenSSL CRMF support was added in OpenSSL 3.0.
  66. =head1 COPYRIGHT
  67. Copyright 2007-2021 The OpenSSL Project Authors. All Rights Reserved.
  68. Licensed under the Apache License 2.0 (the "License"). You may not use
  69. this file except in compliance with the License. You can obtain a copy
  70. in the file LICENSE in the source distribution or at
  71. L<https://www.openssl.org/source/license.html>.
  72. =cut