diff options
author | tb <> | 2023-07-28 10:17:21 +0000 |
---|---|---|
committer | tb <> | 2023-07-28 10:17:21 +0000 |
commit | 39fd8a543e6f18ed3accea6db537f4a36fdb017d (patch) | |
tree | dc39f416023b0f99ec8cf84560368de1ed8d4d71 /src/lib/libcrypto/buffer/buffer.h | |
parent | e56dd594e13ac1e9a8e37ebda000cf90e2a9ad20 (diff) | |
download | openbsd-39fd8a543e6f18ed3accea6db537f4a36fdb017d.tar.gz openbsd-39fd8a543e6f18ed3accea6db537f4a36fdb017d.tar.bz2 openbsd-39fd8a543e6f18ed3accea6db537f4a36fdb017d.zip |
Remove BUF_[a-z]* API
This are a bunch of strange string handlers with NULL checks that make
no real sense except to some devs who like to sprinkle them everywhere.
Fortunately, nothing uses these anymore, so they can go.
ok jsing
Diffstat (limited to 'src/lib/libcrypto/buffer/buffer.h')
-rw-r--r-- | src/lib/libcrypto/buffer/buffer.h | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/lib/libcrypto/buffer/buffer.h b/src/lib/libcrypto/buffer/buffer.h index c210bfd1c5..d461d6493c 100644 --- a/src/lib/libcrypto/buffer/buffer.h +++ b/src/lib/libcrypto/buffer/buffer.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: buffer.h,v 1.16 2022/07/12 14:42:48 kn Exp $ */ | 1 | /* $OpenBSD: buffer.h,v 1.17 2023/07/28 10:17:21 tb 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 | * |
@@ -58,9 +58,6 @@ | |||
58 | 58 | ||
59 | #ifndef HEADER_BUFFER_H | 59 | #ifndef HEADER_BUFFER_H |
60 | #define HEADER_BUFFER_H | 60 | #define HEADER_BUFFER_H |
61 | #if !defined(HAVE_ATTRIBUTE__BOUNDED__) && !defined(__OpenBSD__) | ||
62 | #define __bounded__(x, y, z) | ||
63 | #endif | ||
64 | 61 | ||
65 | #include <openssl/ossl_typ.h> | 62 | #include <openssl/ossl_typ.h> |
66 | 63 | ||
@@ -85,19 +82,6 @@ void BUF_MEM_free(BUF_MEM *a); | |||
85 | int BUF_MEM_grow(BUF_MEM *str, size_t len); | 82 | int BUF_MEM_grow(BUF_MEM *str, size_t len); |
86 | int BUF_MEM_grow_clean(BUF_MEM *str, size_t len); | 83 | int BUF_MEM_grow_clean(BUF_MEM *str, size_t len); |
87 | 84 | ||
88 | #ifndef LIBRESSL_INTERNAL | ||
89 | char * BUF_strdup(const char *str); | ||
90 | char * BUF_strndup(const char *str, size_t siz); | ||
91 | void * BUF_memdup(const void *data, size_t siz); | ||
92 | void BUF_reverse(unsigned char *out, const unsigned char *in, size_t siz); | ||
93 | |||
94 | /* safe string functions */ | ||
95 | size_t BUF_strlcpy(char *dst, const char *src, size_t siz) | ||
96 | __attribute__ ((__bounded__(__string__,1,3))); | ||
97 | size_t BUF_strlcat(char *dst, const char *src, size_t siz) | ||
98 | __attribute__ ((__bounded__(__string__,1,3))); | ||
99 | #endif | ||
100 | |||
101 | void ERR_load_BUF_strings(void); | 85 | void ERR_load_BUF_strings(void); |
102 | 86 | ||
103 | /* Error codes for the BUF functions. */ | 87 | /* Error codes for the BUF functions. */ |