diff options
author | jsing <> | 2019-08-11 10:15:30 +0000 |
---|---|---|
committer | jsing <> | 2019-08-11 10:15:30 +0000 |
commit | aa695fbdbecb8a63a9f0f512222e04a0be2b9734 (patch) | |
tree | a038b26f2da29ed31383201d4852270882e9961e /src/lib/libcrypto/cms/cms_lib.c | |
parent | fa447988cd063cd304b8a827bbc5ad99dea4a159 (diff) | |
download | openbsd-aa695fbdbecb8a63a9f0f512222e04a0be2b9734.tar.gz openbsd-aa695fbdbecb8a63a9f0f512222e04a0be2b9734.tar.bz2 openbsd-aa695fbdbecb8a63a9f0f512222e04a0be2b9734.zip |
Expand ASN.1 macros.
Diffstat (limited to 'src/lib/libcrypto/cms/cms_lib.c')
-rw-r--r-- | src/lib/libcrypto/cms/cms_lib.c | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/src/lib/libcrypto/cms/cms_lib.c b/src/lib/libcrypto/cms/cms_lib.c index 71c6796dbb..7f02d6daae 100644 --- a/src/lib/libcrypto/cms/cms_lib.c +++ b/src/lib/libcrypto/cms/cms_lib.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: cms_lib.c,v 1.10 2019/08/10 18:15:52 jsing Exp $ */ | 1 | /* $OpenBSD: cms_lib.c,v 1.11 2019/08/11 10:15:30 jsing Exp $ */ |
2 | /* | 2 | /* |
3 | * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL | 3 | * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL |
4 | * project. | 4 | * project. |
@@ -61,8 +61,38 @@ | |||
61 | #include <openssl/cms.h> | 61 | #include <openssl/cms.h> |
62 | #include "cms_lcl.h" | 62 | #include "cms_lcl.h" |
63 | 63 | ||
64 | IMPLEMENT_ASN1_FUNCTIONS(CMS_ContentInfo) | 64 | |
65 | IMPLEMENT_ASN1_PRINT_FUNCTION(CMS_ContentInfo) | 65 | CMS_ContentInfo * |
66 | d2i_CMS_ContentInfo(CMS_ContentInfo **a, const unsigned char **in, long len) | ||
67 | { | ||
68 | return (CMS_ContentInfo *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, | ||
69 | &CMS_ContentInfo_it); | ||
70 | } | ||
71 | |||
72 | int | ||
73 | i2d_CMS_ContentInfo(CMS_ContentInfo *a, unsigned char **out) | ||
74 | { | ||
75 | return ASN1_item_i2d((ASN1_VALUE *)a, out, &CMS_ContentInfo_it); | ||
76 | } | ||
77 | |||
78 | CMS_ContentInfo * | ||
79 | CMS_ContentInfo_new(void) | ||
80 | { | ||
81 | return (CMS_ContentInfo *)ASN1_item_new(&CMS_ContentInfo_it); | ||
82 | } | ||
83 | |||
84 | void | ||
85 | CMS_ContentInfo_free(CMS_ContentInfo *a) | ||
86 | { | ||
87 | ASN1_item_free((ASN1_VALUE *)a, &CMS_ContentInfo_it); | ||
88 | } | ||
89 | |||
90 | int | ||
91 | CMS_ContentInfo_print_ctx(BIO *out, CMS_ContentInfo *x, int indent, const ASN1_PCTX *pctx) | ||
92 | { | ||
93 | return ASN1_item_print(out, (ASN1_VALUE *)x, indent, | ||
94 | &CMS_ContentInfo_it, pctx); | ||
95 | } | ||
66 | 96 | ||
67 | const ASN1_OBJECT * | 97 | const ASN1_OBJECT * |
68 | CMS_get0_type(const CMS_ContentInfo *cms) | 98 | CMS_get0_type(const CMS_ContentInfo *cms) |