-# $OpenBSD: Makefile,v 1.50 2021/11/20 18:10:52 jsing Exp $
+# $OpenBSD: Makefile,v 1.51 2021/11/24 01:12:43 beck Exp $
LIB= crypto
LIBREBUILD=y
.if ${COMPILER_VERSION:L} == "clang"
CFLAGS+= -Werror
.endif
-CFLAGS+= -DLIBRESSL_INTERNAL
+CFLAGS+= -DLIBRESSL_INTERNAL -DLIBRESSL_CRYPTO_INTERNAL
.if !defined(NOPIC)
CFLAGS+= -DDSO_DLFCN -DHAVE_DLFCN_H -DHAVE_FUNOPEN
SRCS+= conf_err.c conf_lib.c conf_api.c conf_def.c conf_mod.c
SRCS+= conf_mall.c conf_sap.c
+# ct/
+SRCS += ct_b64.c ct_err.c ct_log.c ct_oct.c ct_policy.c
+SRCS += ct_prn.c ct_sct.c ct_sct_ctx.c ct_vfy.c ct_x509v3.c
+
# curve25519/
SRCS+= curve25519.c curve25519-generic.c
${LCRYPTO_SRC}/cms \
${LCRYPTO_SRC}/comp \
${LCRYPTO_SRC}/conf \
+ ${LCRYPTO_SRC}/ct \
${LCRYPTO_SRC}/curve25519 \
${LCRYPTO_SRC}/des \
${LCRYPTO_SRC}/dh \
${LCRYPTO_SRC}/conf/conf.h \
${LCRYPTO_SRC}/conf/conf_api.h \
${LCRYPTO_SRC}/crypto.h \
+ ${LCRYPTO_SRC}/ct/ct.h \
+ ${LCRYPTO_SRC}/ct/cterr.h \
${LCRYPTO_SRC}/curve25519/curve25519.h \
${LCRYPTO_SRC}/des/des.h \
${LCRYPTO_SRC}/dh/dh.h \
-/* $OpenBSD: err.h,v 1.25 2017/02/20 23:21:19 beck Exp $ */
+/* $OpenBSD: err.h,v 1.26 2021/11/24 01:12:43 beck Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
#define ERR_LIB_HMAC 48
#define ERR_LIB_JPAKE 49
#define ERR_LIB_GOST 50
+#define ERR_LIB_CT 51
#define ERR_LIB_USER 128
#define JPAKEerr(f,r) ERR_PUT_error(ERR_LIB_JPAKE,(f),(r),__FILE__,__LINE__)
#define GOSTerr(f,r) ERR_PUT_error(ERR_LIB_GOST,(f),(r),__FILE__,__LINE__)
#define SSLerr(f,r) ERR_PUT_error(ERR_LIB_SSL,(f),(r),__FILE__,__LINE__)
+#define CTerr(f, r) ERR_PUT_error(ERR_LIB_CT,(f),(r),__FILE__,__LINE__)
#endif
#ifdef LIBRESSL_INTERNAL
#define HMACerror(r) ERR_PUT_error(ERR_LIB_HMAC,(0xfff),(r),__FILE__,__LINE__)
#define JPAKEerror(r) ERR_PUT_error(ERR_LIB_JPAKE,(0xfff),(r),__FILE__,__LINE__)
#define GOSTerror(r) ERR_PUT_error(ERR_LIB_GOST,(0xfff),(r),__FILE__,__LINE__)
+#define CTerror(r) ERR_PUT_error(ERR_LIB_CT,(0xfff),(r),__FILE__,__LINE__)
#endif
#define ERR_PACK(l,f,r) (((((unsigned long)l)&0xffL)<<24L)| \
-/* $OpenBSD: safestack.h,v 1.18 2019/08/11 14:14:14 jsing Exp $ */
+/* $OpenBSD: safestack.h,v 1.19 2021/11/24 01:12:43 beck Exp $ */
/* ====================================================================
* Copyright (c) 1999 The OpenSSL Project. All rights reserved.
*
LHM_lh_stats_bio(SSL_SESSION,lh,out)
#define lh_SSL_SESSION_free(lh) LHM_lh_free(SSL_SESSION,lh)
+#ifdef LIBRESSL_CRYPTO_INTERNAL
+#define sk_CTLOG_new(cmp) SKM_sk_new(CTLOG, (cmp))
+#define sk_CTLOG_new_null() SKM_sk_new_null(CTLOG)
+#define sk_CTLOG_free(st) SKM_sk_free(CTLOG, (st))
+#define sk_CTLOG_num(st) SKM_sk_num(CTLOG, (st))
+#define sk_CTLOG_value(st, i) SKM_sk_value(CTLOG, (st), (i))
+#define sk_CTLOG_set(st, i, val) SKM_sk_set(CTLOG, (st), (i), (val))
+#define sk_CTLOG_zero(st) SKM_sk_zero(CTLOG, (st))
+#define sk_CTLOG_push(st, val) SKM_sk_push(CTLOG, (st), (val))
+#define sk_CTLOG_unshift(st, val) SKM_sk_unshift(CTLOG, (st), (val))
+#define sk_CTLOG_find(st, val) SKM_sk_find(CTLOG, (st), (val))
+#define sk_CTLOG_find_ex(st, val) SKM_sk_find_ex(CTLOG, (st), (val))
+#define sk_CTLOG_delete(st, i) SKM_sk_delete(CTLOG, (st), (i))
+#define sk_CTLOG_delete_ptr(st, ptr) SKM_sk_delete_ptr(CTLOG, (st), (ptr))
+#define sk_CTLOG_insert(st, val, i) SKM_sk_insert(CTLOG, (st), (val), (i))
+#define sk_CTLOG_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(CTLOG, (st), (cmp))
+#define sk_CTLOG_dup(st) SKM_sk_dup(CTLOG, st)
+#define sk_CTLOG_pop_free(st, free_func) SKM_sk_pop_free(CTLOG, (st), (free_func))
+#define sk_CTLOG_shift(st) SKM_sk_shift(CTLOG, (st))
+#define sk_CTLOG_pop(st) SKM_sk_pop(CTLOG, (st))
+#define sk_CTLOG_sort(st) SKM_sk_sort(CTLOG, (st))
+#define sk_CTLOG_is_sorted(st) SKM_sk_is_sorted(CTLOG, (st))
+
+#define sk_SCT_new(cmp) SKM_sk_new(SCT, (cmp))
+#define sk_SCT_new_null() SKM_sk_new_null(SCT)
+#define sk_SCT_free(st) SKM_sk_free(SCT, (st))
+#define sk_SCT_num(st) SKM_sk_num(SCT, (st))
+#define sk_SCT_value(st, i) SKM_sk_value(SCT, (st), (i))
+#define sk_SCT_set(st, i, val) SKM_sk_set(SCT, (st), (i), (val))
+#define sk_SCT_zero(st) SKM_sk_zero(SCT, (st))
+#define sk_SCT_push(st, val) SKM_sk_push(SCT, (st), (val))
+#define sk_SCT_unshift(st, val) SKM_sk_unshift(SCT, (st), (val))
+#define sk_SCT_find(st, val) SKM_sk_find(SCT, (st), (val))
+#define sk_SCT_find_ex(st, val) SKM_sk_find_ex(SCT, (st), (val))
+#define sk_SCT_delete(st, i) SKM_sk_delete(SCT, (st), (i))
+#define sk_SCT_delete_ptr(st, ptr) SKM_sk_delete_ptr(SCT, (st), (ptr))
+#define sk_SCT_insert(st, val, i) SKM_sk_insert(SCT, (st), (val), (i))
+#define sk_SCT_set_cmp_func(st, cmp) SKM_sk_set_cmp_func(SCT, (st), (cmp))
+#define sk_SCT_dup(st) SKM_sk_dup(SCT, st)
+#define sk_SCT_pop_free(st, free_func) SKM_sk_pop_free(SCT, (st), (free_func))
+#define sk_SCT_shift(st) SKM_sk_shift(SCT, (st))
+#define sk_SCT_pop(st) SKM_sk_pop(SCT, (st))
+#define sk_SCT_sort(st) SKM_sk_sort(SCT, (st))
+#define sk_SCT_is_sorted(st) SKM_sk_is_sorted(SCT, (st))
+#endif
+
#endif /* !defined HEADER_SAFESTACK_H */