projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
size_t-fy crypto/buffer.
[openssl.git]
/
crypto
/
buffer
/
buffer.h
diff --git
a/crypto/buffer/buffer.h
b/crypto/buffer/buffer.h
index 465dc34f3fea5696d723b17ce6b021eb00e31452..178e418282b2eb74ca575f61db678a393a151562 100644
(file)
--- a/
crypto/buffer/buffer.h
+++ b/
crypto/buffer/buffer.h
@@
-59,25
+59,36
@@
#ifndef HEADER_BUFFER_H
#define HEADER_BUFFER_H
#ifndef HEADER_BUFFER_H
#define HEADER_BUFFER_H
+#include <openssl/ossl_typ.h>
+
#ifdef __cplusplus
extern "C" {
#endif
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
#include <stddef.h>
+
+#if !defined(NO_SYS_TYPES_H)
#include <sys/types.h>
#include <sys/types.h>
+#endif
+
+/* Already declared in ossl_typ.h */
+/* typedef struct buf_mem_st BUF_MEM; */
-
typedef
struct buf_mem_st
+struct buf_mem_st
{
{
-
int length;
/* current number of bytes */
+
size_t length;
/* current number of bytes */
char *data;
char *data;
-
int max;
/* size of buffer */
- }
BUF_MEM
;
+
size_t max;
/* size of buffer */
+ };
BUF_MEM *BUF_MEM_new(void);
void BUF_MEM_free(BUF_MEM *a);
BUF_MEM *BUF_MEM_new(void);
void BUF_MEM_free(BUF_MEM *a);
-int BUF_MEM_grow(BUF_MEM *str,
in
t len);
-int BUF_MEM_grow_clean(BUF_MEM *str,
in
t len);
+int BUF_MEM_grow(BUF_MEM *str,
size_
t len);
+int BUF_MEM_grow_clean(BUF_MEM *str,
size_
t len);
char * BUF_strdup(const char *str);
char * BUF_strdup(const char *str);
+char * BUF_strndup(const char *str, size_t siz);
+void * BUF_memdup(const void *data, size_t siz);
+void BUF_reverse(unsigned char *out, unsigned char *in, size_t siz);
/* safe string functions */
size_t BUF_strlcpy(char *dst,const char *src,size_t siz);
/* safe string functions */
size_t BUF_strlcpy(char *dst,const char *src,size_t siz);
@@
-93,9
+104,12
@@
void ERR_load_BUF_strings(void);
/* Error codes for the BUF functions. */
/* Function codes. */
/* Error codes for the BUF functions. */
/* Function codes. */
+#define BUF_F_BUF_MEMDUP 103
#define BUF_F_BUF_MEM_GROW 100
#define BUF_F_BUF_MEM_GROW 100
+#define BUF_F_BUF_MEM_GROW_CLEAN 105
#define BUF_F_BUF_MEM_NEW 101
#define BUF_F_BUF_STRDUP 102
#define BUF_F_BUF_MEM_NEW 101
#define BUF_F_BUF_STRDUP 102
+#define BUF_F_BUF_STRNDUP 104
/* Reason codes. */
/* Reason codes. */