openssl/util
Richard Levitte 1d39620b34 PROV: Add the beginning of a DER writing library
This library is meant to be small and quick.  It's based on WPACKET,
which was extended to support DER writing.  The way it's used is a
bit unusual, as it's used to write the structures backward into a
given buffer.  A typical quick call looks like this:

    /*
     * Fill in this structure:
     *
     * something ::= SEQUENCE {
     *     id OBJECT IDENTIFIER,
     *     x [0] INTEGER OPTIONAL,
     *     y [1] BOOLEAN OPTIONAL,
     *     n INTEGER
     * }
     */
    unsigned char buf[nnnn], *p = NULL;
    size_t encoded_len = 0;
    WPACKET pkt;
    int ok;

    ok =   WPACKET_init_der(&pkt, buf, sizeof(buf)
        && DER_w_start_sequence(&pkt, -1)
        && DER_w_bn(&pkt, -1, bn)
        && DER_w_boolean(&pkt, 1, bool)
        && DER_w_precompiled(&pkt, -1, OID, sizeof(OID))
        && DER_w_end_sequence(&pkt, -1)
        && WPACKET_finish(&pkt)
        && WPACKET_get_total_written(&pkt, &encoded_len)
        && (p = WPACKET_get_curr(&pkt)) != NULL;

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/11450)
2020-04-07 11:16:56 +02:00
..
perl Add perl support to parse and DER encode ASN.1 OID specs 2020-04-07 11:16:56 +02:00
add-depends.pl
build.info
cavs-to-evptest.pl
check-format-test-negatives.c fix false positive of check-format.pl regarding '#if' on preceding line; extend negative tests 2020-03-18 13:43:36 +01:00
check-format-test-positives.c Renew and extend the tool for checking adherence to C coding style rules 2020-03-09 11:03:21 +01:00
check-format.pl fix false positive of check-format.pl regarding '#if' on preceding line; extend negative tests 2020-03-18 13:43:36 +01:00
check-malloc-errs
ck_errf.pl
copy.pl
dofile.pl Refactor the tls/dlts version options 2020-01-13 20:48:03 +03:00
echo.pl
engines.num
err-to-raise Generalize the HTTP client so far implemented mostly in crypto/ocsp/ocsp_ht.c 2020-02-10 16:49:37 +01:00
find-doc-nits make err() message strings of find-doc-nits consistently start with uppercase letters 2020-03-18 14:08:29 +01:00
find-unused-errs
fix-includes Use .cnf for config files, not .conf 2020-03-06 18:25:13 +01:00
fix-includes.sed CRYPTO: split cipher_platform.h into algorithm specific headers 2019-12-19 13:31:29 +01:00
indent.pro Memory allocator code cleanup 2020-02-10 16:49:10 +10:00
libcrypto.num HTTP client: make server/proxy and port params more consistent; minor other improvements 2020-04-02 18:31:06 +02:00
libssl.num TLS: use EVP for HMAC throughout libssl. 2020-01-29 19:49:23 +10:00
local_shlib.com.in
merge-err-lines
missingcrypto111.txt Don't ignore ASN1 when checking for undocumented symbols 2020-02-07 08:35:31 +00:00
missingcrypto.txt PROV: Add the beginning of a DER writing library 2020-04-07 11:16:56 +02:00
missingmacro111.txt Adjust all util/missing*.txt to include the section number 2019-12-21 22:53:54 +01:00
missingmacro.txt DOC: Add documentation related to X509_LOOKUPs 2020-02-18 05:28:31 +01:00
missingssl111.txt Adjust all util/missing*.txt to include the section number 2019-12-21 22:53:54 +01:00
missingssl.txt Adjust all util/missing*.txt to include the section number 2019-12-21 22:53:54 +01:00
mkbuildinf.pl
mkdef.pl Add $debug variable and use it 2020-02-17 12:15:12 +10:00
mkdir-p.pl
mkerr.pl Remove handling of outdated macro's 2019-12-10 18:43:45 +01:00
mknum.pl
mkpod2html.pl Use a wrapper for pod2html 2020-02-26 17:26:39 +01:00
mkrc.pl
mktar.sh Fix util/mktar.sh to use the new VERSION information 2020-02-28 12:19:16 +01:00
openssl-update-copyright
opensslwrap.sh
other.syms HTTP client: make server/proxy and port params more consistent; minor other improvements 2020-04-02 18:31:06 +02:00
providers.num
shlib_wrap.sh.in
su-filter.pl
unlocal_shlib.com.in
wrap.pl util/wrap.pl: Correct exit code when signalled 2020-03-25 10:51:21 +01:00