OSSL_CRMF_MSG_get0_tmpl.pod 2.5 KB

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