ASN1_STRING_TABLE_add.pod 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. =pod
  2. =head1 NAME
  3. ASN1_STRING_TABLE, ASN1_STRING_TABLE_add, ASN1_STRING_TABLE_get,
  4. ASN1_STRING_TABLE_cleanup - ASN1_STRING_TABLE manipulation functions
  5. =head1 SYNOPSIS
  6. #include <openssl/asn1.h>
  7. typedef struct asn1_string_table_st ASN1_STRING_TABLE;
  8. int ASN1_STRING_TABLE_add(int nid, long minsize, long maxsize,
  9. unsigned long mask, unsigned long flags);
  10. ASN1_STRING_TABLE *ASN1_STRING_TABLE_get(int nid);
  11. void ASN1_STRING_TABLE_cleanup(void);
  12. =head1 DESCRIPTION
  13. =head2 Types
  14. B<ASN1_STRING_TABLE> is a table which holds string information
  15. (basically minimum size, maximum size, type and etc) for a NID object.
  16. =head2 Functions
  17. ASN1_STRING_TABLE_add() adds a new B<ASN1_STRING_TABLE> item into the
  18. local ASN1 string table based on the I<nid> along with other parameters.
  19. If the item is already in the table, fields of B<ASN1_STRING_TABLE> are
  20. updated (depending on the values of those parameters, e.g., I<minsize>
  21. and I<maxsize> >= 0, I<mask> and I<flags> != 0). If the I<nid> is standard,
  22. a copy of the standard B<ASN1_STRING_TABLE> is created and updated with
  23. other parameters.
  24. ASN1_STRING_TABLE_get() searches for an B<ASN1_STRING_TABLE> item based
  25. on I<nid>. It will search the local table first, then the standard one.
  26. ASN1_STRING_TABLE_cleanup() frees all B<ASN1_STRING_TABLE> items added
  27. by ASN1_STRING_TABLE_add().
  28. =head1 RETURN VALUES
  29. ASN1_STRING_TABLE_add() returns 1 on success, 0 if an error occurred.
  30. ASN1_STRING_TABLE_get() returns a valid B<ASN1_STRING_TABLE> structure
  31. or NULL if nothing is found.
  32. ASN1_STRING_TABLE_cleanup() does not return a value.
  33. =head1 SEE ALSO
  34. L<ERR_get_error(3)>
  35. =head1 COPYRIGHT
  36. Copyright 2017-2020 The OpenSSL Project Authors. All Rights Reserved.
  37. Licensed under the Apache License 2.0 (the "License"). You may not use
  38. this file except in compliance with the License. You can obtain a copy
  39. in the file LICENSE in the source distribution or at
  40. L<https://www.openssl.org/source/license.html>.
  41. =cut