summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/libssl/src/crypto/asn1/n_pkey.c54
-rw-r--r--lib/libssl/src/crypto/asn1/tasn_typ.c106
-rw-r--r--lib/libssl/src/crypto/ec/ec_asn1.c54
-rw-r--r--lib/libssl/src/crypto/ecdsa/ecs_asn1.c28
-rw-r--r--lib/libssl/src/crypto/ts/ts_asn1.c236
5 files changed, 455 insertions, 23 deletions
diff --git a/lib/libssl/src/crypto/asn1/n_pkey.c b/lib/libssl/src/crypto/asn1/n_pkey.c
index 42431b6e24b..198ca97c09f 100644
--- a/lib/libssl/src/crypto/asn1/n_pkey.c
+++ b/lib/libssl/src/crypto/asn1/n_pkey.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: n_pkey.c,v 1.22 2014/07/12 22:26:01 miod Exp $ */
+/* $OpenBSD: n_pkey.c,v 1.23 2015/02/10 04:01:26 jsing Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -94,7 +94,31 @@ ASN1_BROKEN_SEQUENCE(NETSCAPE_ENCRYPTED_PKEY) = {
DECLARE_ASN1_FUNCTIONS_const(NETSCAPE_ENCRYPTED_PKEY)
DECLARE_ASN1_ENCODE_FUNCTIONS_const(NETSCAPE_ENCRYPTED_PKEY, NETSCAPE_ENCRYPTED_PKEY)
-IMPLEMENT_ASN1_FUNCTIONS_const(NETSCAPE_ENCRYPTED_PKEY)
+
+NETSCAPE_ENCRYPTED_PKEY *
+d2i_NETSCAPE_ENCRYPTED_PKEY(NETSCAPE_ENCRYPTED_PKEY **a, const unsigned char **in, long len)
+{
+ return (NETSCAPE_ENCRYPTED_PKEY *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
+ &NETSCAPE_ENCRYPTED_PKEY_it);
+}
+
+int
+i2d_NETSCAPE_ENCRYPTED_PKEY(const NETSCAPE_ENCRYPTED_PKEY *a, unsigned char **out)
+{
+ return ASN1_item_i2d((ASN1_VALUE *)a, out, &NETSCAPE_ENCRYPTED_PKEY_it);
+}
+
+NETSCAPE_ENCRYPTED_PKEY *
+NETSCAPE_ENCRYPTED_PKEY_new(void)
+{
+ return (NETSCAPE_ENCRYPTED_PKEY *)ASN1_item_new(&NETSCAPE_ENCRYPTED_PKEY_it);
+}
+
+void
+NETSCAPE_ENCRYPTED_PKEY_free(NETSCAPE_ENCRYPTED_PKEY *a)
+{
+ ASN1_item_free((ASN1_VALUE *)a, &NETSCAPE_ENCRYPTED_PKEY_it);
+}
ASN1_SEQUENCE(NETSCAPE_PKEY) = {
ASN1_SIMPLE(NETSCAPE_PKEY, version, LONG),
@@ -104,7 +128,31 @@ ASN1_SEQUENCE(NETSCAPE_PKEY) = {
DECLARE_ASN1_FUNCTIONS_const(NETSCAPE_PKEY)
DECLARE_ASN1_ENCODE_FUNCTIONS_const(NETSCAPE_PKEY, NETSCAPE_PKEY)
-IMPLEMENT_ASN1_FUNCTIONS_const(NETSCAPE_PKEY)
+
+NETSCAPE_PKEY *
+d2i_NETSCAPE_PKEY(NETSCAPE_PKEY **a, const unsigned char **in, long len)
+{
+ return (NETSCAPE_PKEY *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
+ &NETSCAPE_PKEY_it);
+}
+
+int
+i2d_NETSCAPE_PKEY(const NETSCAPE_PKEY *a, unsigned char **out)
+{
+ return ASN1_item_i2d((ASN1_VALUE *)a, out, &NETSCAPE_PKEY_it);
+}
+
+NETSCAPE_PKEY *
+NETSCAPE_PKEY_new(void)
+{
+ return (NETSCAPE_PKEY *)ASN1_item_new(&NETSCAPE_PKEY_it);
+}
+
+void
+NETSCAPE_PKEY_free(NETSCAPE_PKEY *a)
+{
+ ASN1_item_free((ASN1_VALUE *)a, &NETSCAPE_PKEY_it);
+}
static RSA *d2i_RSA_NET_2(RSA **a, ASN1_OCTET_STRING *os,
int (*cb)(char *buf, int len, const char *prompt, int verify), int sgckey);
diff --git a/lib/libssl/src/crypto/asn1/tasn_typ.c b/lib/libssl/src/crypto/asn1/tasn_typ.c
index 2f44b4229bb..6e4650c089c 100644
--- a/lib/libssl/src/crypto/asn1/tasn_typ.c
+++ b/lib/libssl/src/crypto/asn1/tasn_typ.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tasn_typ.c,v 1.7 2015/02/09 15:05:59 jsing Exp $ */
+/* $OpenBSD: tasn_typ.c,v 1.8 2015/02/10 04:01:26 jsing Exp $ */
/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
* project 2000.
*/
@@ -474,18 +474,114 @@ IMPLEMENT_ASN1_TYPE(ASN1_ANY)
/* Just swallow an ASN1_SEQUENCE in an ASN1_STRING */
IMPLEMENT_ASN1_TYPE(ASN1_SEQUENCE)
-IMPLEMENT_ASN1_FUNCTIONS_fname(ASN1_TYPE, ASN1_ANY, ASN1_TYPE)
+
+ASN1_TYPE *
+d2i_ASN1_TYPE(ASN1_TYPE **a, const unsigned char **in, long len)
+{
+ return (ASN1_TYPE *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
+ &ASN1_ANY_it);
+}
+
+int
+i2d_ASN1_TYPE(ASN1_TYPE *a, unsigned char **out)
+{
+ return ASN1_item_i2d((ASN1_VALUE *)a, out, &ASN1_ANY_it);
+}
+
+ASN1_TYPE *
+ASN1_TYPE_new(void)
+{
+ return (ASN1_TYPE *)ASN1_item_new(&ASN1_ANY_it);
+}
+
+void
+ASN1_TYPE_free(ASN1_TYPE *a)
+{
+ ASN1_item_free((ASN1_VALUE *)a, &ASN1_ANY_it);
+}
/* Multistring types */
IMPLEMENT_ASN1_MSTRING(ASN1_PRINTABLE, B_ASN1_PRINTABLE)
-IMPLEMENT_ASN1_FUNCTIONS_name(ASN1_STRING, ASN1_PRINTABLE)
+
+ASN1_STRING *
+d2i_ASN1_PRINTABLE(ASN1_STRING **a, const unsigned char **in, long len)
+{
+ return (ASN1_STRING *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
+ &ASN1_PRINTABLE_it);
+}
+
+int
+i2d_ASN1_PRINTABLE(ASN1_STRING *a, unsigned char **out)
+{
+ return ASN1_item_i2d((ASN1_VALUE *)a, out, &ASN1_PRINTABLE_it);
+}
+
+ASN1_STRING *
+ASN1_PRINTABLE_new(void)
+{
+ return (ASN1_STRING *)ASN1_item_new(&ASN1_PRINTABLE_it);
+}
+
+void
+ASN1_PRINTABLE_free(ASN1_STRING *a)
+{
+ ASN1_item_free((ASN1_VALUE *)a, &ASN1_PRINTABLE_it);
+}
IMPLEMENT_ASN1_MSTRING(DISPLAYTEXT, B_ASN1_DISPLAYTEXT)
-IMPLEMENT_ASN1_FUNCTIONS_name(ASN1_STRING, DISPLAYTEXT)
+
+ASN1_STRING *
+d2i_DISPLAYTEXT(ASN1_STRING **a, const unsigned char **in, long len)
+{
+ return (ASN1_STRING *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
+ &DISPLAYTEXT_it);
+}
+
+int
+i2d_DISPLAYTEXT(ASN1_STRING *a, unsigned char **out)
+{
+ return ASN1_item_i2d((ASN1_VALUE *)a, out, &DISPLAYTEXT_it);
+}
+
+ASN1_STRING *
+DISPLAYTEXT_new(void)
+{
+ return (ASN1_STRING *)ASN1_item_new(&DISPLAYTEXT_it);
+}
+
+void
+DISPLAYTEXT_free(ASN1_STRING *a)
+{
+ ASN1_item_free((ASN1_VALUE *)a, &DISPLAYTEXT_it);
+}
IMPLEMENT_ASN1_MSTRING(DIRECTORYSTRING, B_ASN1_DIRECTORYSTRING)
-IMPLEMENT_ASN1_FUNCTIONS_name(ASN1_STRING, DIRECTORYSTRING)
+
+ASN1_STRING *
+d2i_DIRECTORYSTRING(ASN1_STRING **a, const unsigned char **in, long len)
+{
+ return (ASN1_STRING *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
+ &DIRECTORYSTRING_it);
+}
+
+int
+i2d_DIRECTORYSTRING(ASN1_STRING *a, unsigned char **out)
+{
+ return ASN1_item_i2d((ASN1_VALUE *)a, out, &DIRECTORYSTRING_it);
+}
+
+ASN1_STRING *
+DIRECTORYSTRING_new(void)
+{
+ return (ASN1_STRING *)ASN1_item_new(&DIRECTORYSTRING_it);
+}
+
+void
+DIRECTORYSTRING_free(ASN1_STRING *a)
+{
+ ASN1_item_free((ASN1_VALUE *)a, &DIRECTORYSTRING_it);
+}
/* Three separate BOOLEAN type: normal, DEFAULT TRUE and DEFAULT FALSE */
IMPLEMENT_ASN1_TYPE_ex(ASN1_BOOLEAN, ASN1_BOOLEAN, -1)
diff --git a/lib/libssl/src/crypto/ec/ec_asn1.c b/lib/libssl/src/crypto/ec/ec_asn1.c
index c54f6593d59..11d924d30ff 100644
--- a/lib/libssl/src/crypto/ec/ec_asn1.c
+++ b/lib/libssl/src/crypto/ec/ec_asn1.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ec_asn1.c,v 1.10 2014/07/12 16:03:37 miod Exp $ */
+/* $OpenBSD: ec_asn1.c,v 1.11 2015/02/10 04:01:26 jsing Exp $ */
/*
* Written by Nils Larsch for the OpenSSL project.
*/
@@ -258,7 +258,31 @@ ASN1_CHOICE(ECPKPARAMETERS) = {
} ASN1_CHOICE_END(ECPKPARAMETERS)
DECLARE_ASN1_FUNCTIONS_const(ECPKPARAMETERS)
DECLARE_ASN1_ENCODE_FUNCTIONS_const(ECPKPARAMETERS, ECPKPARAMETERS)
-IMPLEMENT_ASN1_FUNCTIONS_const(ECPKPARAMETERS)
+
+ECPKPARAMETERS *
+d2i_ECPKPARAMETERS(ECPKPARAMETERS **a, const unsigned char **in, long len)
+{
+ return (ECPKPARAMETERS *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
+ &ECPKPARAMETERS_it);
+}
+
+int
+i2d_ECPKPARAMETERS(const ECPKPARAMETERS *a, unsigned char **out)
+{
+ return ASN1_item_i2d((ASN1_VALUE *)a, out, &ECPKPARAMETERS_it);
+}
+
+ECPKPARAMETERS *
+ECPKPARAMETERS_new(void)
+{
+ return (ECPKPARAMETERS *)ASN1_item_new(&ECPKPARAMETERS_it);
+}
+
+void
+ECPKPARAMETERS_free(ECPKPARAMETERS *a)
+{
+ ASN1_item_free((ASN1_VALUE *)a, &ECPKPARAMETERS_it);
+}
ASN1_SEQUENCE(EC_PRIVATEKEY) = {
ASN1_SIMPLE(EC_PRIVATEKEY, version, LONG),
@@ -268,7 +292,31 @@ ASN1_SEQUENCE(EC_PRIVATEKEY) = {
} ASN1_SEQUENCE_END(EC_PRIVATEKEY)
DECLARE_ASN1_FUNCTIONS_const(EC_PRIVATEKEY)
DECLARE_ASN1_ENCODE_FUNCTIONS_const(EC_PRIVATEKEY, EC_PRIVATEKEY)
-IMPLEMENT_ASN1_FUNCTIONS_const(EC_PRIVATEKEY)
+
+EC_PRIVATEKEY *
+d2i_EC_PRIVATEKEY(EC_PRIVATEKEY **a, const unsigned char **in, long len)
+{
+ return (EC_PRIVATEKEY *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
+ &EC_PRIVATEKEY_it);
+}
+
+int
+i2d_EC_PRIVATEKEY(const EC_PRIVATEKEY *a, unsigned char **out)
+{
+ return ASN1_item_i2d((ASN1_VALUE *)a, out, &EC_PRIVATEKEY_it);
+}
+
+EC_PRIVATEKEY *
+EC_PRIVATEKEY_new(void)
+{
+ return (EC_PRIVATEKEY *)ASN1_item_new(&EC_PRIVATEKEY_it);
+}
+
+void
+EC_PRIVATEKEY_free(EC_PRIVATEKEY *a)
+{
+ ASN1_item_free((ASN1_VALUE *)a, &EC_PRIVATEKEY_it);
+}
/* some declarations of internal function */
/* ec_asn1_group2field() sets the values in a X9_62_FIELDID object */
diff --git a/lib/libssl/src/crypto/ecdsa/ecs_asn1.c b/lib/libssl/src/crypto/ecdsa/ecs_asn1.c
index f62df3a8170..4cd5c1bd218 100644
--- a/lib/libssl/src/crypto/ecdsa/ecs_asn1.c
+++ b/lib/libssl/src/crypto/ecdsa/ecs_asn1.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ecs_asn1.c,v 1.3 2015/02/08 13:35:07 jsing Exp $ */
+/* $OpenBSD: ecs_asn1.c,v 1.4 2015/02/10 04:01:26 jsing Exp $ */
/* ====================================================================
* Copyright (c) 2000-2002 The OpenSSL Project. All rights reserved.
*
@@ -64,4 +64,28 @@ ASN1_SEQUENCE(ECDSA_SIG) = {
DECLARE_ASN1_FUNCTIONS_const(ECDSA_SIG)
DECLARE_ASN1_ENCODE_FUNCTIONS_const(ECDSA_SIG, ECDSA_SIG)
-IMPLEMENT_ASN1_FUNCTIONS_const(ECDSA_SIG)
+
+ECDSA_SIG *
+d2i_ECDSA_SIG(ECDSA_SIG **a, const unsigned char **in, long len)
+{
+ return (ECDSA_SIG *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
+ &ECDSA_SIG_it);
+}
+
+int
+i2d_ECDSA_SIG(const ECDSA_SIG *a, unsigned char **out)
+{
+ return ASN1_item_i2d((ASN1_VALUE *)a, out, &ECDSA_SIG_it);
+}
+
+ECDSA_SIG *
+ECDSA_SIG_new(void)
+{
+ return (ECDSA_SIG *)ASN1_item_new(&ECDSA_SIG_it);
+}
+
+void
+ECDSA_SIG_free(ECDSA_SIG *a)
+{
+ ASN1_item_free((ASN1_VALUE *)a, &ECDSA_SIG_it);
+}
diff --git a/lib/libssl/src/crypto/ts/ts_asn1.c b/lib/libssl/src/crypto/ts/ts_asn1.c
index bb87aa1d884..3ef882cf05e 100644
--- a/lib/libssl/src/crypto/ts/ts_asn1.c
+++ b/lib/libssl/src/crypto/ts/ts_asn1.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ts_asn1.c,v 1.5 2014/07/10 22:45:58 jsing Exp $ */
+/* $OpenBSD: ts_asn1.c,v 1.6 2015/02/10 04:01:26 jsing Exp $ */
/* Written by Nils Larsch for the OpenSSL project 2004.
*/
/* ====================================================================
@@ -66,7 +66,31 @@ ASN1_SEQUENCE(TS_MSG_IMPRINT) = {
ASN1_SIMPLE(TS_MSG_IMPRINT, hashed_msg, ASN1_OCTET_STRING)
} ASN1_SEQUENCE_END(TS_MSG_IMPRINT)
-IMPLEMENT_ASN1_FUNCTIONS_const(TS_MSG_IMPRINT)
+
+TS_MSG_IMPRINT *
+d2i_TS_MSG_IMPRINT(TS_MSG_IMPRINT **a, const unsigned char **in, long len)
+{
+ return (TS_MSG_IMPRINT *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
+ &TS_MSG_IMPRINT_it);
+}
+
+int
+i2d_TS_MSG_IMPRINT(const TS_MSG_IMPRINT *a, unsigned char **out)
+{
+ return ASN1_item_i2d((ASN1_VALUE *)a, out, &TS_MSG_IMPRINT_it);
+}
+
+TS_MSG_IMPRINT *
+TS_MSG_IMPRINT_new(void)
+{
+ return (TS_MSG_IMPRINT *)ASN1_item_new(&TS_MSG_IMPRINT_it);
+}
+
+void
+TS_MSG_IMPRINT_free(TS_MSG_IMPRINT *a)
+{
+ ASN1_item_free((ASN1_VALUE *)a, &TS_MSG_IMPRINT_it);
+}
IMPLEMENT_ASN1_DUP_FUNCTION(TS_MSG_IMPRINT)
#ifndef OPENSSL_NO_BIO
@@ -106,7 +130,31 @@ ASN1_SEQUENCE(TS_REQ) = {
ASN1_IMP_SEQUENCE_OF_OPT(TS_REQ, extensions, X509_EXTENSION, 0)
} ASN1_SEQUENCE_END(TS_REQ)
-IMPLEMENT_ASN1_FUNCTIONS_const(TS_REQ)
+
+TS_REQ *
+d2i_TS_REQ(TS_REQ **a, const unsigned char **in, long len)
+{
+ return (TS_REQ *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
+ &TS_REQ_it);
+}
+
+int
+i2d_TS_REQ(const TS_REQ *a, unsigned char **out)
+{
+ return ASN1_item_i2d((ASN1_VALUE *)a, out, &TS_REQ_it);
+}
+
+TS_REQ *
+TS_REQ_new(void)
+{
+ return (TS_REQ *)ASN1_item_new(&TS_REQ_it);
+}
+
+void
+TS_REQ_free(TS_REQ *a)
+{
+ ASN1_item_free((ASN1_VALUE *)a, &TS_REQ_it);
+}
IMPLEMENT_ASN1_DUP_FUNCTION(TS_REQ)
#ifndef OPENSSL_NO_BIO
@@ -141,7 +189,31 @@ ASN1_SEQUENCE(TS_ACCURACY) = {
ASN1_IMP_OPT(TS_ACCURACY, micros, ASN1_INTEGER, 1)
} ASN1_SEQUENCE_END(TS_ACCURACY)
-IMPLEMENT_ASN1_FUNCTIONS_const(TS_ACCURACY)
+
+TS_ACCURACY *
+d2i_TS_ACCURACY(TS_ACCURACY **a, const unsigned char **in, long len)
+{
+ return (TS_ACCURACY *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
+ &TS_ACCURACY_it);
+}
+
+int
+i2d_TS_ACCURACY(const TS_ACCURACY *a, unsigned char **out)
+{
+ return ASN1_item_i2d((ASN1_VALUE *)a, out, &TS_ACCURACY_it);
+}
+
+TS_ACCURACY *
+TS_ACCURACY_new(void)
+{
+ return (TS_ACCURACY *)ASN1_item_new(&TS_ACCURACY_it);
+}
+
+void
+TS_ACCURACY_free(TS_ACCURACY *a)
+{
+ ASN1_item_free((ASN1_VALUE *)a, &TS_ACCURACY_it);
+}
IMPLEMENT_ASN1_DUP_FUNCTION(TS_ACCURACY)
ASN1_SEQUENCE(TS_TST_INFO) = {
@@ -157,7 +229,31 @@ ASN1_SEQUENCE(TS_TST_INFO) = {
ASN1_IMP_SEQUENCE_OF_OPT(TS_TST_INFO, extensions, X509_EXTENSION, 1)
} ASN1_SEQUENCE_END(TS_TST_INFO)
-IMPLEMENT_ASN1_FUNCTIONS_const(TS_TST_INFO)
+
+TS_TST_INFO *
+d2i_TS_TST_INFO(TS_TST_INFO **a, const unsigned char **in, long len)
+{
+ return (TS_TST_INFO *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
+ &TS_TST_INFO_it);
+}
+
+int
+i2d_TS_TST_INFO(const TS_TST_INFO *a, unsigned char **out)
+{
+ return ASN1_item_i2d((ASN1_VALUE *)a, out, &TS_TST_INFO_it);
+}
+
+TS_TST_INFO *
+TS_TST_INFO_new(void)
+{
+ return (TS_TST_INFO *)ASN1_item_new(&TS_TST_INFO_it);
+}
+
+void
+TS_TST_INFO_free(TS_TST_INFO *a)
+{
+ ASN1_item_free((ASN1_VALUE *)a, &TS_TST_INFO_it);
+}
IMPLEMENT_ASN1_DUP_FUNCTION(TS_TST_INFO)
#ifndef OPENSSL_NO_BIO
@@ -194,7 +290,31 @@ ASN1_SEQUENCE(TS_STATUS_INFO) = {
ASN1_OPT(TS_STATUS_INFO, failure_info, ASN1_BIT_STRING)
} ASN1_SEQUENCE_END(TS_STATUS_INFO)
-IMPLEMENT_ASN1_FUNCTIONS_const(TS_STATUS_INFO)
+
+TS_STATUS_INFO *
+d2i_TS_STATUS_INFO(TS_STATUS_INFO **a, const unsigned char **in, long len)
+{
+ return (TS_STATUS_INFO *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
+ &TS_STATUS_INFO_it);
+}
+
+int
+i2d_TS_STATUS_INFO(const TS_STATUS_INFO *a, unsigned char **out)
+{
+ return ASN1_item_i2d((ASN1_VALUE *)a, out, &TS_STATUS_INFO_it);
+}
+
+TS_STATUS_INFO *
+TS_STATUS_INFO_new(void)
+{
+ return (TS_STATUS_INFO *)ASN1_item_new(&TS_STATUS_INFO_it);
+}
+
+void
+TS_STATUS_INFO_free(TS_STATUS_INFO *a)
+{
+ ASN1_item_free((ASN1_VALUE *)a, &TS_STATUS_INFO_it);
+}
IMPLEMENT_ASN1_DUP_FUNCTION(TS_STATUS_INFO)
static int
@@ -247,7 +367,31 @@ ASN1_SEQUENCE_cb(TS_RESP, ts_resp_cb) = {
ASN1_OPT(TS_RESP, token, PKCS7),
} ASN1_SEQUENCE_END_cb(TS_RESP, TS_RESP)
-IMPLEMENT_ASN1_FUNCTIONS_const(TS_RESP)
+
+TS_RESP *
+d2i_TS_RESP(TS_RESP **a, const unsigned char **in, long len)
+{
+ return (TS_RESP *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
+ &TS_RESP_it);
+}
+
+int
+i2d_TS_RESP(const TS_RESP *a, unsigned char **out)
+{
+ return ASN1_item_i2d((ASN1_VALUE *)a, out, &TS_RESP_it);
+}
+
+TS_RESP *
+TS_RESP_new(void)
+{
+ return (TS_RESP *)ASN1_item_new(&TS_RESP_it);
+}
+
+void
+TS_RESP_free(TS_RESP *a)
+{
+ ASN1_item_free((ASN1_VALUE *)a, &TS_RESP_it);
+}
IMPLEMENT_ASN1_DUP_FUNCTION(TS_RESP)
#ifndef OPENSSL_NO_BIO
@@ -281,7 +425,31 @@ ASN1_SEQUENCE(ESS_ISSUER_SERIAL) = {
ASN1_SIMPLE(ESS_ISSUER_SERIAL, serial, ASN1_INTEGER)
} ASN1_SEQUENCE_END(ESS_ISSUER_SERIAL)
-IMPLEMENT_ASN1_FUNCTIONS_const(ESS_ISSUER_SERIAL)
+
+ESS_ISSUER_SERIAL *
+d2i_ESS_ISSUER_SERIAL(ESS_ISSUER_SERIAL **a, const unsigned char **in, long len)
+{
+ return (ESS_ISSUER_SERIAL *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
+ &ESS_ISSUER_SERIAL_it);
+}
+
+int
+i2d_ESS_ISSUER_SERIAL(const ESS_ISSUER_SERIAL *a, unsigned char **out)
+{
+ return ASN1_item_i2d((ASN1_VALUE *)a, out, &ESS_ISSUER_SERIAL_it);
+}
+
+ESS_ISSUER_SERIAL *
+ESS_ISSUER_SERIAL_new(void)
+{
+ return (ESS_ISSUER_SERIAL *)ASN1_item_new(&ESS_ISSUER_SERIAL_it);
+}
+
+void
+ESS_ISSUER_SERIAL_free(ESS_ISSUER_SERIAL *a)
+{
+ ASN1_item_free((ASN1_VALUE *)a, &ESS_ISSUER_SERIAL_it);
+}
IMPLEMENT_ASN1_DUP_FUNCTION(ESS_ISSUER_SERIAL)
ASN1_SEQUENCE(ESS_CERT_ID) = {
@@ -289,7 +457,31 @@ ASN1_SEQUENCE(ESS_CERT_ID) = {
ASN1_OPT(ESS_CERT_ID, issuer_serial, ESS_ISSUER_SERIAL)
} ASN1_SEQUENCE_END(ESS_CERT_ID)
-IMPLEMENT_ASN1_FUNCTIONS_const(ESS_CERT_ID)
+
+ESS_CERT_ID *
+d2i_ESS_CERT_ID(ESS_CERT_ID **a, const unsigned char **in, long len)
+{
+ return (ESS_CERT_ID *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
+ &ESS_CERT_ID_it);
+}
+
+int
+i2d_ESS_CERT_ID(const ESS_CERT_ID *a, unsigned char **out)
+{
+ return ASN1_item_i2d((ASN1_VALUE *)a, out, &ESS_CERT_ID_it);
+}
+
+ESS_CERT_ID *
+ESS_CERT_ID_new(void)
+{
+ return (ESS_CERT_ID *)ASN1_item_new(&ESS_CERT_ID_it);
+}
+
+void
+ESS_CERT_ID_free(ESS_CERT_ID *a)
+{
+ ASN1_item_free((ASN1_VALUE *)a, &ESS_CERT_ID_it);
+}
IMPLEMENT_ASN1_DUP_FUNCTION(ESS_CERT_ID)
ASN1_SEQUENCE(ESS_SIGNING_CERT) = {
@@ -297,7 +489,31 @@ ASN1_SEQUENCE(ESS_SIGNING_CERT) = {
ASN1_SEQUENCE_OF_OPT(ESS_SIGNING_CERT, policy_info, POLICYINFO)
} ASN1_SEQUENCE_END(ESS_SIGNING_CERT)
-IMPLEMENT_ASN1_FUNCTIONS_const(ESS_SIGNING_CERT)
+
+ESS_SIGNING_CERT *
+d2i_ESS_SIGNING_CERT(ESS_SIGNING_CERT **a, const unsigned char **in, long len)
+{
+ return (ESS_SIGNING_CERT *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
+ &ESS_SIGNING_CERT_it);
+}
+
+int
+i2d_ESS_SIGNING_CERT(const ESS_SIGNING_CERT *a, unsigned char **out)
+{
+ return ASN1_item_i2d((ASN1_VALUE *)a, out, &ESS_SIGNING_CERT_it);
+}
+
+ESS_SIGNING_CERT *
+ESS_SIGNING_CERT_new(void)
+{
+ return (ESS_SIGNING_CERT *)ASN1_item_new(&ESS_SIGNING_CERT_it);
+}
+
+void
+ESS_SIGNING_CERT_free(ESS_SIGNING_CERT *a)
+{
+ ASN1_item_free((ASN1_VALUE *)a, &ESS_SIGNING_CERT_it);
+}
IMPLEMENT_ASN1_DUP_FUNCTION(ESS_SIGNING_CERT)
/* Getting encapsulated TS_TST_INFO object from PKCS7. */