2
0

EVP_PKEY_asn1_get_count.pod 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. =pod
  2. =head1 NAME
  3. EVP_PKEY_asn1_find,
  4. EVP_PKEY_asn1_find_str,
  5. EVP_PKEY_asn1_get_count,
  6. EVP_PKEY_asn1_get0,
  7. EVP_PKEY_asn1_get0_info
  8. - enumerate public key ASN.1 methods
  9. =head1 SYNOPSIS
  10. #include <openssl/evp.h>
  11. int EVP_PKEY_asn1_get_count(void);
  12. const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_get0(int idx);
  13. const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find(ENGINE **pe, int type);
  14. const EVP_PKEY_ASN1_METHOD *EVP_PKEY_asn1_find_str(ENGINE **pe,
  15. const char *str, int len);
  16. int EVP_PKEY_asn1_get0_info(int *ppkey_id, int *pkey_base_id,
  17. int *ppkey_flags, const char **pinfo,
  18. const char **ppem_str,
  19. const EVP_PKEY_ASN1_METHOD *ameth);
  20. =head1 DESCRIPTION
  21. EVP_PKEY_asn1_count() returns a count of the number of public key
  22. ASN.1 methods available: it includes standard methods and any methods
  23. added by the application.
  24. EVP_PKEY_asn1_get0() returns the public key ASN.1 method B<idx>.
  25. The value of B<idx> must be between zero and EVP_PKEY_asn1_get_count()
  26. - 1.
  27. EVP_PKEY_asn1_find() looks up the B<EVP_PKEY_ASN1_METHOD> with NID
  28. B<type>.
  29. If B<pe> isn't B<NULL>, then it will look up an engine implementing a
  30. B<EVP_PKEY_ASN1_METHOD> for the NID B<type> and return that instead,
  31. and also set B<*pe> to point at the engine that implements it.
  32. EVP_PKEY_asn1_find_str() looks up the B<EVP_PKEY_ASN1_METHOD> with PEM
  33. type string B<str>.
  34. Just like EVP_PKEY_asn1_find(), if B<pe> isn't B<NULL>, then it will
  35. look up an engine implementing a B<EVP_PKEY_ASN1_METHOD> for the NID
  36. B<type> and return that instead, and also set B<*pe> to point at the
  37. engine that implements it.
  38. EVP_PKEY_asn1_get0_info() returns the public key ID, base public key
  39. ID (both NIDs), any flags, the method description and PEM type string
  40. associated with the public key ASN.1 method B<*ameth>.
  41. EVP_PKEY_asn1_count(), EVP_PKEY_asn1_get0(), EVP_PKEY_asn1_find() and
  42. EVP_PKEY_asn1_find_str() are not thread safe, but as long as all
  43. B<EVP_PKEY_ASN1_METHOD> objects are added before the application gets
  44. threaded, using them is safe. See L<EVP_PKEY_asn1_add0(3)>.
  45. =head1 RETURN VALUES
  46. EVP_PKEY_asn1_count() returns the number of available public key methods.
  47. EVP_PKEY_asn1_get0() return a public key method or B<NULL> if B<idx> is
  48. out of range.
  49. EVP_PKEY_asn1_get0_info() returns 0 on failure, 1 on success.
  50. =head1 SEE ALSO
  51. L<EVP_PKEY_asn1_new(3)>, L<EVP_PKEY_asn1_add0(3)>
  52. =head1 COPYRIGHT
  53. Copyright 2017 The OpenSSL Project Authors. All Rights Reserved.
  54. Licensed under the OpenSSL license (the "License"). You may not use
  55. this file except in compliance with the License. You can obtain a copy
  56. in the file LICENSE in the source distribution or at
  57. L<https://www.openssl.org/source/license.html>.
  58. =cut