OSDN Git Service

crypto: Support DER encodings
authorLei He <helei.sig11@bytedance.com>
Sat, 8 Oct 2022 08:50:28 +0000 (16:50 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 2 Nov 2022 10:56:32 +0000 (06:56 -0400)
commit3b34ccad6695f3fd3e48555d895d450f750c00e6
tree69d0ee5b0759c962c07a7f93484aca7bf0c511ae
parent2fda101de0747dd7a79436cba44f17489e5a1799
crypto: Support DER encodings

Add encoding interfaces for DER encoding:
1. support decoding of 'bit string', 'octet string', 'object id'
and 'context specific tag' for DER encoder.
2. implemented a simple DER encoder.
3. add more testsuits for DER encoder.

Signed-off-by: lei he <helei.sig11@bytedance.com>
Message-Id: <20221008085030.70212-3-helei.sig11@bytedance.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
crypto/der.c
crypto/der.h
tests/unit/test-crypto-der.c