2
0

OSSL_CRMF_MSG_get0_tmpl.pod 2.7 KB

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