summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjsing <>2016-12-27 16:51:52 +0000
committerjsing <>2016-12-27 16:51:52 +0000
commitf587812b6a95ad47ed4d7255bff485f4b0a750eb (patch)
tree3ece749c6aea5c4ca095c67620b93f86eaeddd72
parentb72186b70e92e0bd62770a5336a295128517b62e (diff)
downloadopenbsd-f587812b6a95ad47ed4d7255bff485f4b0a750eb.tar.gz
openbsd-f587812b6a95ad47ed4d7255bff485f4b0a750eb.tar.bz2
openbsd-f587812b6a95ad47ed4d7255bff485f4b0a750eb.zip
Place the DECLARE_ASN1_* macros under #ifndef LIBRESSL_INTERNAL.
-rw-r--r--src/lib/libcrypto/asn1/asn1.h14
1 files changed, 10 insertions, 4 deletions
diff --git a/src/lib/libcrypto/asn1/asn1.h b/src/lib/libcrypto/asn1/asn1.h
index ca6d994a70..001bc14412 100644
--- a/src/lib/libcrypto/asn1/asn1.h
+++ b/src/lib/libcrypto/asn1/asn1.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: asn1.h,v 1.40 2016/12/27 16:46:45 jsing Exp $ */ 1/* $OpenBSD: asn1.h,v 1.41 2016/12/27 16:51:52 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -287,6 +287,8 @@ typedef struct ASN1_TLC_st ASN1_TLC;
287/* This is just an opaque pointer */ 287/* This is just an opaque pointer */
288typedef struct ASN1_VALUE_st ASN1_VALUE; 288typedef struct ASN1_VALUE_st ASN1_VALUE;
289 289
290#ifndef LIBRESSL_INTERNAL
291
290/* Declare ASN1 functions: the implement macro in in asn1t.h */ 292/* Declare ASN1 functions: the implement macro in in asn1t.h */
291 293
292#define DECLARE_ASN1_FUNCTIONS(type) DECLARE_ASN1_FUNCTIONS_name(type, type) 294#define DECLARE_ASN1_FUNCTIONS(type) DECLARE_ASN1_FUNCTIONS_name(type, type)
@@ -330,6 +332,8 @@ typedef struct ASN1_VALUE_st ASN1_VALUE;
330 int fname##_print_ctx(BIO *out, stname *x, int indent, \ 332 int fname##_print_ctx(BIO *out, stname *x, int indent, \
331 const ASN1_PCTX *pctx); 333 const ASN1_PCTX *pctx);
332 334
335#endif /* !LIBRESSL_INTERNAL */
336
333#define D2I_OF(type) type *(*)(type **,const unsigned char **,long) 337#define D2I_OF(type) type *(*)(type **,const unsigned char **,long)
334#define I2D_OF(type) int (*)(type *,unsigned char **) 338#define I2D_OF(type) int (*)(type *,unsigned char **)
335#define I2D_OF_const(type) int (*)(const type *,unsigned char **) 339#define I2D_OF_const(type) int (*)(const type *,unsigned char **)
@@ -707,7 +711,7 @@ typedef struct BIT_STRING_BITNAME_st {
707 (ASN1_UTF8STRING *)d2i_ASN1_type_bytes\ 711 (ASN1_UTF8STRING *)d2i_ASN1_type_bytes\
708 ((ASN1_STRING **)a,pp,l,B_ASN1_UTF8STRING) 712 ((ASN1_STRING **)a,pp,l,B_ASN1_UTF8STRING)
709 713
710#endif 714#endif /* !LIBRESSL_INTERNAL */
711 715
712#define B_ASN1_TIME \ 716#define B_ASN1_TIME \
713 B_ASN1_UTCTIME | \ 717 B_ASN1_UTCTIME | \
@@ -829,9 +833,11 @@ ASN1_UTCTIME *ASN1_UTCTIME_set(ASN1_UTCTIME *s, time_t t);
829ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t, 833ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t,
830 int offset_day, long offset_sec); 834 int offset_day, long offset_sec);
831int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, const char *str); 835int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, const char *str);
836
832#ifndef LIBRESSL_INTERNAL 837#ifndef LIBRESSL_INTERNAL
833int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t); 838int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t);
834#endif 839#endif /* !LIBRESSL_INTERNAL */
840
835int ASN1_GENERALIZEDTIME_check(ASN1_GENERALIZEDTIME *a); 841int ASN1_GENERALIZEDTIME_check(ASN1_GENERALIZEDTIME *a);
836ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s, 842ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s,
837 time_t t); 843 time_t t);
@@ -1018,7 +1024,7 @@ void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, void *x);
1018#define M_ASN1_free_of(x, type) \ 1024#define M_ASN1_free_of(x, type) \
1019 ASN1_item_free(CHECKED_PTR_OF(type, x), ASN1_ITEM_rptr(type)) 1025 ASN1_item_free(CHECKED_PTR_OF(type, x), ASN1_ITEM_rptr(type))
1020 1026
1021#endif 1027#endif /* !LIBRESSL_INTERNAL */
1022 1028
1023void *ASN1_d2i_fp(void *(*xnew)(void), d2i_of_void *d2i, FILE *in, void **x); 1029void *ASN1_d2i_fp(void *(*xnew)(void), d2i_of_void *d2i, FILE *in, void **x);
1024 1030