2
0

X509_NAME_ENTRY_get_object.pod 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. =pod
  2. =head1 NAME
  3. X509_NAME_ENTRY_get_object, X509_NAME_ENTRY_get_data,
  4. X509_NAME_ENTRY_set_object, X509_NAME_ENTRY_set_data,
  5. X509_NAME_ENTRY_create_by_txt, X509_NAME_ENTRY_create_by_NID,
  6. X509_NAME_ENTRY_create_by_OBJ - X509_NAME_ENTRY utility functions
  7. =head1 SYNOPSIS
  8. #include <openssl/x509.h>
  9. ASN1_OBJECT * X509_NAME_ENTRY_get_object(X509_NAME_ENTRY *ne);
  10. ASN1_STRING * X509_NAME_ENTRY_get_data(X509_NAME_ENTRY *ne);
  11. int X509_NAME_ENTRY_set_object(X509_NAME_ENTRY *ne, ASN1_OBJECT *obj);
  12. int X509_NAME_ENTRY_set_data(X509_NAME_ENTRY *ne, int type, const unsigned char *bytes, int len);
  13. X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_txt(X509_NAME_ENTRY **ne, const char *field, int type, const unsigned char *bytes, int len);
  14. X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_NID(X509_NAME_ENTRY **ne, int nid, int type,unsigned char *bytes, int len);
  15. X509_NAME_ENTRY *X509_NAME_ENTRY_create_by_OBJ(X509_NAME_ENTRY **ne, ASN1_OBJECT *obj, int type, const unsigned char *bytes, int len);
  16. =head1 DESCRIPTION
  17. X509_NAME_ENTRY_get_object() retrieves the field name of B<ne> in
  18. and B<ASN1_OBJECT> structure.
  19. X509_NAME_ENTRY_get_data() retrieves the field value of B<ne> in
  20. and B<ASN1_STRING> structure.
  21. X509_NAME_ENTRY_set_object() sets the field name of B<ne> to B<obj>.
  22. X509_NAME_ENTRY_set_data() sets the field value of B<ne> to string type
  23. B<type> and value determined by B<bytes> and B<len>.
  24. X509_NAME_ENTRY_create_by_txt(), X509_NAME_ENTRY_create_by_NID()
  25. and X509_NAME_ENTRY_create_by_OBJ() create and return an
  26. B<X509_NAME_ENTRY> structure.
  27. =head1 NOTES
  28. X509_NAME_ENTRY_get_object() and X509_NAME_ENTRY_get_data() can be
  29. used to examine an B<X509_NAME_ENTRY> function as returned by
  30. X509_NAME_get_entry() for example.
  31. X509_NAME_ENTRY_create_by_txt(), X509_NAME_ENTRY_create_by_NID(),
  32. and X509_NAME_ENTRY_create_by_OBJ() create and return an
  33. X509_NAME_ENTRY_create_by_txt(), X509_NAME_ENTRY_create_by_OBJ(),
  34. X509_NAME_ENTRY_create_by_NID() and X509_NAME_ENTRY_set_data()
  35. are seldom used in practice because B<X509_NAME_ENTRY> structures
  36. are almost always part of B<X509_NAME> structures and the
  37. corresponding B<X509_NAME> functions are typically used to
  38. create and add new entries in a single operation.
  39. The arguments of these functions support similar options to the similarly
  40. named ones of the corresponding B<X509_NAME> functions such as
  41. X509_NAME_add_entry_by_txt(). So for example B<type> can be set to
  42. B<MBSTRING_ASC> but in the case of X509_set_data() the field name must be
  43. set first so the relevant field information can be looked up internally.
  44. =head1 RETURN VALUES
  45. =head1 SEE ALSO
  46. L<ERR_get_error(3)|ERR_get_error(3)>, L<d2i_X509_NAME(3)|d2i_X509_NAME(3)>,
  47. L<OBJ_nid2obj(3),OBJ_nid2obj(3)>
  48. =head1 HISTORY
  49. TBA
  50. =cut