OSSL_CRMF_MSG_get0_tmpl.pod 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. =pod
  2. =head1 NAME
  3. OSSL_CRMF_MSG_get0_tmpl,
  4. OSSL_CRMF_CERTTEMPLATE_get0_serialNumber,
  5. OSSL_CRMF_CERTTEMPLATE_get0_issuer,
  6. OSSL_CRMF_CERTID_get0_serialNumber,
  7. OSSL_CRMF_CERTID_get0_issuer,
  8. OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert,
  9. OSSL_CRMF_MSG_get_certReqId
  10. - functions reading from CRMF CertReqMsg structures
  11. =head1 SYNOPSIS
  12. #include <openssl/crmf.h>
  13. OSSL_CRMF_CERTTEMPLATE *OSSL_CRMF_MSG_get0_tmpl(const OSSL_CRMF_MSG *crm);
  14. ASN1_INTEGER
  15. *OSSL_CRMF_CERTTEMPLATE_get0_serialNumber(OSSL_CRMF_CERTTEMPLATE *tmpl);
  16. X509_NAME *OSSL_CRMF_CERTTEMPLATE_get0_issuer(OSSL_CRMF_CERTTEMPLATE *tmpl);
  17. ASN1_INTEGER *OSSL_CRMF_CERTID_get0_serialNumber(const OSSL_CRMF_CERTID *cid);
  18. X509_NAME *OSSL_CRMF_CERTID_get0_issuer(const OSSL_CRMF_CERTID *cid);
  19. X509 *OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert(OSSL_CRMF_ENCRYPTEDVALUE *ecert,
  20. EVP_PKEY *pkey);
  21. int OSSL_CRMF_MSG_get_certReqId(OSSL_CRMF_MSG *crm);
  22. =head1 DESCRIPTION
  23. OSSL_CRMF_MSG_get0_tmpl() retrieves the certificate template of B<crm>.
  24. OSSL_CRMF_CERTTEMPLATE_get0_serialNumber() retrieves the serialNumber of the
  25. given certificate template B<tmpl>.
  26. OSSL_CRMF_CERTTEMPLATE_get0_issuer() retrieves the issuer name of the
  27. given certificate template B<tmpl>.
  28. OSSL_CRMF_CERTID_get0_serialNumber retrieves the serialNumber
  29. of the given CertId B<cid>.
  30. OSSL_CRMF_CERTID_get0_issuer retrieves the issuer name
  31. of the given CertId B<cid>, which must be of ASN.1 type GEN_DIRNAME.
  32. OSSL_CRMF_ENCRYPTEDVALUE_get1_encCert() decrypts the certificate in the given
  33. encryptedValue B<ecert>, using the private key B<pkey>.
  34. This is needed for the indirect PoP method as in RFC 4210 section 5.2.8.2.
  35. The function returns the decrypted certificate as a copy, leaving its ownership
  36. with the caller, who is responsible for freeing it.
  37. OSSL_CRMF_MSG_get_certReqId() retrieves the certReqId of B<crm>.
  38. =head1 RETURN VALUES
  39. OSSL_CRMF_MSG_get_certReqId() returns the certificate request ID as a
  40. non-negative integer or -1 on error.
  41. All other functions return a pointer with the intended result or NULL on error.
  42. =head1 SEE ALSO
  43. B<RFC 4211>
  44. =head1 HISTORY
  45. The OpenSSL CRMF support was added in OpenSSL 3.0.
  46. =head1 COPYRIGHT
  47. Copyright 2007-2019 The OpenSSL Project Authors. All Rights Reserved.
  48. Licensed under the Apache License 2.0 (the "License"). You may not use
  49. this file except in compliance with the License. You can obtain a copy
  50. in the file LICENSE in the source distribution or at
  51. L<https://www.openssl.org/source/license.html>.
  52. =cut