ossl_cmp_sk_X509_add1_cert.pod 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. =pod
  2. =head1 NAME
  3. ossl_cmp_sk_X509_add1_cert,
  4. ossl_cmp_sk_X509_add1_certs,
  5. ossl_cmp_X509_STORE_add1_certs,
  6. ossl_cmp_X509_STORE_get1_certs
  7. - functions manipulating lists of certificates
  8. =head1 SYNOPSIS
  9. #include <openssl/cmp_util.h>
  10. int ossl_cmp_sk_X509_add1_cert(STACK_OF(X509) *sk, X509 *cert,
  11. int no_dup, int prepend);
  12. int ossl_cmp_sk_X509_add1_certs(STACK_OF(X509) *sk, STACK_OF(X509) *certs,
  13. int no_self_signed, int no_dups, int prepend);
  14. int ossl_cmp_X509_STORE_add1_certs(X509_STORE *store, STACK_OF(X509) *certs,
  15. int only_self_signed);
  16. STACK_OF(X509) *ossl_cmp_X509_STORE_get1_certs(X509_STORE *store);
  17. =head1 DESCRIPTION
  18. ossl_cmp_sk_X509_add1_cert() appends or prepends (depending on the I<prepend>
  19. argument) a certificate to the given list,
  20. optionally only if it is not already contained.
  21. On success the reference count of the certificate is increased.
  22. ossl_cmp_sk_X509_add1_certs() appends or prepends (depending on the I<prepend>
  23. argument) a list of certificates to the given list,
  24. optionally only if not self-signed and optionally only if not already contained.
  25. The reference counts of those certificates appended successfully are increased.
  26. ossl_cmp_X509_STORE_add1_certs() adds all or only self-signed certificates from
  27. the given stack to given store. The I<certs> parameter may be NULL.
  28. ossl_cmp_X509_STORE_get1_certs() retrieves a copy of all certificates in the
  29. given store.
  30. =head1 RETURN VALUES
  31. ossl_cmp_X509_STORE_get1_certs() returns a list of certificates, NULL on error.
  32. All other functions return 1 on success, 0 on error.
  33. =head1 HISTORY
  34. The OpenSSL CMP support was added in OpenSSL 3.0.
  35. =head1 COPYRIGHT
  36. Copyright 2007-2019 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