X509_get0_distinguishing_id.pod 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. =pod
  2. =head1 NAME
  3. X509_get0_distinguishing_id, X509_set0_distinguishing_id,
  4. X509_REQ_get0_distinguishing_id, X509_REQ_set0_distinguishing_id
  5. - get or set the Distinguishing ID for certificate operations
  6. =head1 SYNOPSIS
  7. #include <openssl/x509.h>
  8. ASN1_OCTET_STRING *X509_get0_distinguishing_id(X509 *x);
  9. void X509_set0_distinguishing_id(X509 *x, ASN1_OCTET_STRING *distid);
  10. ASN1_OCTET_STRING *X509_REQ_get0_distinguishing_id(X509_REQ *x);
  11. void X509_REQ_set0_distinguishing_id(X509_REQ *x, ASN1_OCTET_STRING *distid);
  12. =head1 DESCRIPTION
  13. The Distinguishing ID is defined in FIPS 196 as follows:
  14. =over 4
  15. =item I<Distinguishing identifier>
  16. Information which unambiguously distinguishes
  17. an entity in the authentication process.
  18. =back
  19. The SM2 signature algorithm requires a Distinguishing ID value when generating
  20. and verifying a signature, but the Ddistinguishing ID may also find other uses.
  21. In the context of SM2, the Distinguishing ID is often referred to as the "SM2
  22. ID".
  23. For the purpose off verifying a certificate or a certification request, a
  24. Distinguishing ID may be attached to it, so functions like L<X509_verify(3)>
  25. or L<X509_REQ_verify(3)> have easy access to that identity for signature
  26. verification.
  27. X509_get0_distinguishing_id() gets the Distinguishing ID value of a certificate
  28. B<x> by returning an B<ASN1_OCTET_STRING> object which should not be freed by
  29. the caller.
  30. X509_set0_distinguishing_id() assigns B<distid> to the certificate B<x>.
  31. Calling this function transfers the memory management of the value to the X509
  32. object, and therefore the value that has been passed in should not be freed by
  33. the caller after this function has been called.
  34. X509_REQ_get0_distinguishing_id() and X509_REQ_set0_distinguishing_id()
  35. have the same functionality as X509_get0_distinguishing_id() and
  36. X509_set0_distinguishing_id() except that they deal with B<X509_REQ>
  37. objects instead of B<X509>.
  38. =head1 RETURN VALUES
  39. X509_set0_distinguishing_id() and X509_REQ_set0_distinguishing_id() do not
  40. return a value.
  41. =head1 SEE ALSO
  42. L<X509_verify(3)>, L<SM2(7)>
  43. =head1 COPYRIGHT
  44. Copyright 2019-2020 The OpenSSL Project Authors. All Rights Reserved.
  45. Licensed under the Apache License 2.0 (the "License"). You may not use
  46. this file except in compliance with the License. You can obtain a copy
  47. in the file LICENSE in the source distribution or at
  48. L<https://www.openssl.org/source/license.html>.
  49. =cut