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