ossl_DER_w_precompiled.pod 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. =pod
  2. =head1 NAME
  3. ossl_DER_w_precompiled
  4. - internal DER writers for precompiled DER blobs
  5. =head1 SYNOPSIS
  6. #include "internal/der.h"
  7. int ossl_DER_w_precompiled(WPACKET *pkt, int tag,
  8. const unsigned char *precompiled,
  9. size_t precompiled_n);
  10. =head1 DESCRIPTION
  11. There may be already existing DER blobs that can simply be copied to
  12. the buffer held by I<pkt>. For example, precompiled values, such as
  13. OIDs (for example, C<id-sha256>) or complete AlgorithmIdentifiers
  14. (for example, C<sha256Identifier>). To add those as an element in a
  15. structure being DER encoded, use ossl_DER_w_precompiled().
  16. ossl_DER_w_precompiled() will simply take the DER encoded blob given as
  17. I<precompiled> with length I<precompiled_n> and add it to the buffer
  18. held by I<pkt>.
  19. =head1 RETURN VALUES
  20. ossl_DER_w_precompiled() returns 1 on success and 0 on failure. Failure
  21. may mean that the buffer held by the I<pkt> is too small, but may also
  22. mean that the values given to the functions are invalid, such as the provided
  23. I<tag> value being too large for the implementation.
  24. =head1 SEE ALSO
  25. L<DERlib(7)>
  26. =head1 COPYRIGHT
  27. Copyright 2020 The OpenSSL Project Authors. All Rights Reserved.
  28. Licensed under the Apache License 2.0 (the "License"). You may not use
  29. this file except in compliance with the License. You can obtain a copy
  30. in the file LICENSE in the source distribution or at
  31. L<https://www.openssl.org/source/license.html>.
  32. =cut