summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ts/ts.h
diff options
context:
space:
mode:
authortb <>2022-07-24 08:16:47 +0000
committertb <>2022-07-24 08:16:47 +0000
commitc6dd71252b6c9201b8a8d7cf63bdace12547b030 (patch)
treed4b5a641a1e684361d921596482872ed4f79e586 /src/lib/libcrypto/ts/ts.h
parent180a8f0f93ad83bf01f8c87a002ea920ac0d0429 (diff)
downloadopenbsd-c6dd71252b6c9201b8a8d7cf63bdace12547b030.tar.gz
openbsd-c6dd71252b6c9201b8a8d7cf63bdace12547b030.tar.bz2
openbsd-c6dd71252b6c9201b8a8d7cf63bdace12547b030.zip
Start making ts opaque
Move the not yet exposed EssCertIDv2 struct internals to ts_local.h and move the ASN.1 function prototypes that we don't want to expose with them. Include ts_local.h where necessary or where it will be needed soon. ok jsing
Diffstat (limited to 'src/lib/libcrypto/ts/ts.h')
-rw-r--r--src/lib/libcrypto/ts/ts.h45
1 files changed, 3 insertions, 42 deletions
diff --git a/src/lib/libcrypto/ts/ts.h b/src/lib/libcrypto/ts/ts.h
index bfcf9dfe8f..31b916983e 100644
--- a/src/lib/libcrypto/ts/ts.h
+++ b/src/lib/libcrypto/ts/ts.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: ts.h,v 1.14 2022/07/23 07:13:03 tb Exp $ */ 1/* $OpenBSD: ts.h,v 1.15 2022/07/24 08:16:47 tb Exp $ */
2/* Written by Zoltan Glozik (zglozik@opentsa.org) for the OpenSSL 2/* Written by Zoltan Glozik (zglozik@opentsa.org) for the OpenSSL
3 * project 2002, 2003, 2004. 3 * project 2002, 2003, 2004.
4 */ 4 */
@@ -265,32 +265,10 @@ typedef struct ESS_signing_cert {
265} ESS_SIGNING_CERT; 265} ESS_SIGNING_CERT;
266 266
267#ifdef LIBRESSL_INTERNAL 267#ifdef LIBRESSL_INTERNAL
268/* 268typedef struct ESS_cert_id_v2 ESS_CERT_ID_V2;
269 * ESSCertIDv2 ::= SEQUENCE {
270 * hashAlgorithm AlgorithmIdentifier
271 * DEFAULT {algorithm id-sha256},
272 * certHash Hash,
273 * issuerSerial IssuerSerial OPTIONAL }
274 */
275
276typedef struct ESS_cert_id_v2 {
277 X509_ALGOR *hash_alg; /* Default SHA-256. */
278 ASN1_OCTET_STRING *hash;
279 ESS_ISSUER_SERIAL *issuer_serial;
280} ESS_CERT_ID_V2;
281
282DECLARE_STACK_OF(ESS_CERT_ID_V2) 269DECLARE_STACK_OF(ESS_CERT_ID_V2)
283 270
284/* 271typedef struct ESS_signing_cert_v2 ESS_SIGNING_CERT_V2;
285 * SigningCertificateV2 ::= SEQUENCE {
286 * certs SEQUENCE OF ESSCertIDv2,
287 * policies SEQUENCE OF PolicyInformation OPTIONAL }
288 */
289
290typedef struct ESS_signing_cert_v2 {
291 STACK_OF(ESS_CERT_ID_V2) *cert_ids;
292 STACK_OF(POLICYINFO) *policy_info;
293} ESS_SIGNING_CERT_V2;
294#endif /* LIBRESSL_INTERNAL */ 272#endif /* LIBRESSL_INTERNAL */
295 273
296TS_REQ *TS_REQ_new(void); 274TS_REQ *TS_REQ_new(void);
@@ -379,23 +357,6 @@ ESS_SIGNING_CERT *d2i_ESS_SIGNING_CERT(ESS_SIGNING_CERT **a,
379 const unsigned char **pp, long length); 357 const unsigned char **pp, long length);
380ESS_SIGNING_CERT *ESS_SIGNING_CERT_dup(ESS_SIGNING_CERT *a); 358ESS_SIGNING_CERT *ESS_SIGNING_CERT_dup(ESS_SIGNING_CERT *a);
381 359
382#ifdef LIBRESSL_INTERNAL
383ESS_CERT_ID_V2 *ESS_CERT_ID_V2_new(void);
384void ESS_CERT_ID_V2_free(ESS_CERT_ID_V2 *a);
385int i2d_ESS_CERT_ID_V2(const ESS_CERT_ID_V2 *a, unsigned char **pp);
386ESS_CERT_ID_V2 *d2i_ESS_CERT_ID_V2(ESS_CERT_ID_V2 **a, const unsigned char **pp,
387 long length);
388ESS_CERT_ID_V2 *ESS_CERT_ID_V2_dup(ESS_CERT_ID_V2 *a);
389
390ESS_SIGNING_CERT_V2 *ESS_SIGNING_CERT_V2_new(void);
391void ESS_SIGNING_CERT_V2_free(ESS_SIGNING_CERT_V2 *a);
392int i2d_ESS_SIGNING_CERT_V2(const ESS_SIGNING_CERT_V2 *a,
393 unsigned char **pp);
394ESS_SIGNING_CERT_V2 *d2i_ESS_SIGNING_CERT_V2(ESS_SIGNING_CERT_V2 **a,
395 const unsigned char **pp, long length);
396ESS_SIGNING_CERT_V2 *ESS_SIGNING_CERT_V2_dup(ESS_SIGNING_CERT_V2 *a);
397#endif /* LIBRESSL_INTERNAL */
398
399int TS_REQ_set_version(TS_REQ *a, long version); 360int TS_REQ_set_version(TS_REQ *a, long version);
400long TS_REQ_get_version(const TS_REQ *a); 361long TS_REQ_get_version(const TS_REQ *a);
401 362