openssl/include/internal
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
..
__DECC_INCLUDE_EPILOGUE.H
__DECC_INCLUDE_PROLOGUE.H
bio.h Fix header file include guard names 2019-09-28 20:26:36 +02:00
comp.h
conf.h Fix header file include guard names 2019-09-28 20:26:36 +02:00
constant_time.h s390x assembly pack: process x25519 and x448 non-canonical values 2019-11-05 13:53:04 +01:00
core.h CORE: pass the full algorithm definition to the method constructor 2019-11-29 20:42:12 +01:00
cryptlib.h Put an error on the stack in the event of a fetch failure 2020-03-27 11:12:27 +00:00
dane.h Fix header file include guard names 2019-09-28 20:26:36 +02:00
deprecated.h Deprecate the low level AES functions 2020-01-06 15:09:57 +00:00
der.h PROV: Add the beginning of a DER writing library 2020-04-07 11:16:56 +02:00
dso.h Fix header file include guard names 2019-09-28 20:26:36 +02:00
dsoerr.h Update source files for deprecation at 3.0 2019-11-07 11:37:25 +01:00
err.h Fix header file include guard names 2019-09-28 20:26:36 +02:00
ffc.h EVP: Implement support for key downgrading in backends 2020-03-25 17:01:32 +01:00
ktls.h Add support for in-kernel TLS (KTLS) on FreeBSD. 2019-10-31 10:24:32 +00:00
namemap.h CORE: ossl_namemap_add_names(): new function to add multiple names 2019-11-29 20:42:12 +01:00
nelem.h Fix header file include guard names 2019-09-28 20:26:36 +02:00
numbers.h Fix header file include guard names 2019-09-28 20:26:36 +02:00
o_dir.h Fix header file include guard names 2019-09-28 20:26:36 +02:00
packet.h Add "endfirst" writing to WPACKET 2020-04-04 10:35:09 +01:00
param_build_set.h Add EVP_PKEY_gettable_params support for accessing EVP_PKEY key data fields 2020-04-01 15:51:18 +10:00
property.h Redesign the KEYMGMT libcrypto <-> provider interface - the basics 2020-02-07 09:37:56 +01:00
propertyerr.h Fix some typos 2019-12-11 19:04:01 +01:00
provider.h Add FIPS Self test kats for digests 2020-01-15 10:48:01 +10:00
refcount.h Fix header file include guard names 2019-09-28 20:26:36 +02:00
sha3.h Fix header file include guard names 2019-09-28 20:26:36 +02:00
sizes.h PROV: Adapt the DSA signature implementation to provide Algorithmidentifiers 2020-01-28 08:08:22 +01:00
sm3.h Fix header file include guard names 2019-09-28 20:26:36 +02:00
sockets.h add BIO_socket_wait(), BIO_wait(), and BIO_connect_retry() improving timeout support 2020-02-10 16:49:01 +01:00
sslconf.h Fix header file include guard names 2019-09-28 20:26:36 +02:00
symhacks.h
thread_once.h Make sure we only run the self tests once 2019-11-29 16:14:44 +00:00
tsan_assist.h