X509_get0_signature.pod 3.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. =pod
  2. =head1 NAME
  3. X509_get0_signature, X509_get_signature_nid, X509_get0_tbs_sigalg,
  4. X509_REQ_get0_signature, X509_REQ_get_signature_nid, X509_CRL_get0_signature,
  5. X509_CRL_get_signature_nid - signature information
  6. =head1 SYNOPSIS
  7. #include <openssl/x509.h>
  8. void X509_get0_signature(const ASN1_BIT_STRING **psig,
  9. const X509_ALGOR **palg,
  10. const X509 *x);
  11. int X509_get_signature_nid(const X509 *x);
  12. const X509_ALGOR *X509_get0_tbs_sigalg(const X509 *x);
  13. void X509_REQ_get0_signature(const X509_REQ *crl,
  14. const ASN1_BIT_STRING **psig,
  15. const X509_ALGOR **palg);
  16. int X509_REQ_get_signature_nid(const X509_REQ *crl);
  17. void X509_CRL_get0_signature(const X509_CRL *crl,
  18. const ASN1_BIT_STRING **psig,
  19. const X509_ALGOR **palg);
  20. int X509_CRL_get_signature_nid(const X509_CRL *crl);
  21. =head1 DESCRIPTION
  22. X509_get0_signature() sets B<*psig> to the signature of B<x> and B<*palg>
  23. to the signature algorithm of B<x>. The values returned are internal
  24. pointers which B<MUST NOT> be freed up after the call.
  25. X509_get0_tbs_sigalg() returns the signature algorithm in the signed
  26. portion of B<x>.
  27. X509_get_signature_nid() returns the NID corresponding to the signature
  28. algorithm of B<x>.
  29. X509_REQ_get0_signature(), X509_REQ_get_signature_nid()
  30. X509_CRL_get0_signature() and X509_CRL_get_signature_nid() perform the
  31. same function for certificate requests and CRLs.
  32. =head1 NOTES
  33. These functions provide lower level access to signatures in certificates
  34. where an application wishes to analyse or generate a signature in a form
  35. where X509_sign() et al is not appropriate (for example a non standard
  36. or unsupported format).
  37. =head1 RETURN VALUES
  38. X509_get_signature_nid(), X509_REQ_get_signature_nid() and
  39. X509_CRL_get_signature_nid() return a NID.
  40. X509_get0_signature(), X509_REQ_get0_signature() and
  41. X509_CRL_get0_signature() do not return values.
  42. =head1 SEE ALSO
  43. L<d2i_X509(3)>,
  44. L<ERR_get_error(3)>,
  45. L<X509_CRL_get0_by_serial(3)>,
  46. L<X509_get_ext_d2i(3)>,
  47. L<X509_get_extension_flags(3)>,
  48. L<X509_get_pubkey(3)>,
  49. L<X509_get_subject_name(3)>,
  50. L<X509_get_version(3)>,
  51. L<X509_NAME_add_entry_by_txt(3)>,
  52. L<X509_NAME_ENTRY_get_object(3)>,
  53. L<X509_NAME_get_index_by_NID(3)>,
  54. L<X509_NAME_print_ex(3)>,
  55. L<X509_new(3)>,
  56. L<X509_sign(3)>,
  57. L<X509V3_get_d2i(3)>,
  58. L<X509_verify_cert(3)>
  59. =head1 HISTORY
  60. X509_get0_signature() and X509_get_signature_nid() were first added to
  61. OpenSSL 1.0.2.
  62. X509_REQ_get0_signature(), X509_REQ_get_signature_nid(),
  63. X509_CRL_get0_signature() and X509_CRL_get_signature_nid() were first added
  64. to OpenSSL 1.1.0.
  65. =head1 COPYRIGHT
  66. Copyright 2015-2016 The OpenSSL Project Authors. All Rights Reserved.
  67. Licensed under the OpenSSL license (the "License"). You may not use
  68. this file except in compliance with the License. You can obtain a copy
  69. in the file LICENSE in the source distribution or at
  70. L<https://www.openssl.org/source/license.html>.
  71. =cut