summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjsing <>2026-03-28 13:09:55 +0000
committerjsing <>2026-03-28 13:09:55 +0000
commit3a9cc08fe1f232b197eb16715590dbf27466e220 (patch)
tree505f6cfefaf4aaf9850fc77ab65a864ad7606272 /src
parentf3cceccc18dfd4f96044df85f30c117f39b9cc9f (diff)
downloadopenbsd-3a9cc08fe1f232b197eb16715590dbf27466e220.tar.gz
openbsd-3a9cc08fe1f232b197eb16715590dbf27466e220.tar.bz2
openbsd-3a9cc08fe1f232b197eb16715590dbf27466e220.zip
Provide a crypto_assembly.h internal header.
This will contain defines and macros that we need for assembly code, without polluting other headers that are primarily used for C code. For now, this just unconditionally provides _CET_ENDBR on amd64. ok kenjiro@ tb@
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/crypto_assembly.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/lib/libcrypto/crypto_assembly.h b/src/lib/libcrypto/crypto_assembly.h
new file mode 100644
index 0000000000..0ae78a81ab
--- /dev/null
+++ b/src/lib/libcrypto/crypto_assembly.h
@@ -0,0 +1,30 @@
1/* $OpenBSD: crypto_assembly.h,v 1.1 2026/03/28 13:09:55 jsing Exp $ */
2/*
3 * Copyright (c) 2026 Joel Sing <jsing@openbsd.org>
4 *
5 * Permission to use, copy, modify, and distribute this software for any
6 * purpose with or without fee is hereby granted, provided that the above
7 * copyright notice and this permission notice appear in all copies.
8 *
9 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
10 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
11 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
12 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
13 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
14 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
15 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
16 */
17
18#ifndef HEADER_CRYPTO_ASSEMBLY_H
19#define HEADER_CRYPTO_ASSEMBLY_H
20
21/* Ensure _CET_ENDBR is always defined on amd64. */
22#ifdef __amd64__
23#ifdef __CET__
24#include <cet.h>
25#else
26#define _CET_ENDBR
27#endif
28#endif
29
30#endif