diff options
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) |
