SERIALIZER: add functions for serialization to file
authorRichard Levitte <levitte@openssl.org>
Mon, 18 Nov 2019 00:32:22 +0000 (01:32 +0100)
committerRichard Levitte <levitte@openssl.org>
Fri, 29 Nov 2019 19:55:16 +0000 (20:55 +0100)
commit742496f1309d04f4921ca64e4b6315a45a47b4af
treee3c21274c6f1ae8e545e458edc986d96663085cc
parent0d003c52d3dcf4b076bb01a6767cdd5ace2d79f6
SERIALIZER: add functions for serialization to file

These functions are added:

- OSSL_SERIALIZER_to_bio()
- OSSL_SERIALIZER_to_fp() (unless 'no-stdio')

OSSL_SERIALIZER_to_bio() and OSSL_SERIALIZER_to_fp() work as wrapper
functions, and call an internal "do_output" function with the given
serializer context and a BIO to output the serialized result to.

The internal "do_output" function must have intimate knowledge of the
object being output.  This will defined independently with context
creators for specific OpenSSL types.

Reviewed-by: Matt Caswell <matt@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/10394)
crypto/serializer/build.info
crypto/serializer/serializer_lib.c [new file with mode: 0644]
crypto/serializer/serializer_local.h
doc/man3/OSSL_SERIALIZER.pod
doc/man3/OSSL_SERIALIZER_to_bio.pod [new file with mode: 0644]
include/openssl/serializer.h
util/libcrypto.num