Add BN_native2bn and BN_bn2nativepad, for native BIGNUM import/export
[openssl.git] / include / openssl / buffer.h
index c006c656683404009e3fa05c7738f13bd15c4720..14137263830f1a11a2b68f99f93f6f4db1e92834 100644 (file)
@@ -1,7 +1,7 @@
 /*
- * Copyright 1995-2016 The OpenSSL Project Authors. All Rights Reserved.
+ * Copyright 1995-2018 The OpenSSL Project Authors. All Rights Reserved.
  *
- * Licensed under the OpenSSL license (the "License").  You may not use
+ * Licensed under the Apache License 2.0 (the "License").  You may not use
  * this file except in compliance with the License.  You can obtain a copy
  * in the file LICENSE in the source distribution or at
  * https://www.openssl.org/source/license.html
@@ -14,6 +14,7 @@
 # ifndef HEADER_CRYPTO_H
 #  include <openssl/crypto.h>
 # endif
+# include <openssl/buffererr.h>
 
 
 #ifdef  __cplusplus
@@ -21,10 +22,7 @@ extern "C" {
 #endif
 
 # include <stddef.h>
-
-# if !defined(NO_SYS_TYPES_H)
-#  include <sys/types.h>
-# endif
+# include <sys/types.h>
 
 /*
  * These names are outdated as of OpenSSL 1.1; a future release
@@ -36,7 +34,7 @@ extern "C" {
 # define BUF_strlcpy(dst, src, size)  OPENSSL_strlcpy(dst, src, size)
 # define BUF_strlcat(dst, src, size) OPENSSL_strlcat(dst, src, size)
 # define BUF_strnlen(str, maxlen) OPENSSL_strnlen(str, maxlen)
+
 struct buf_mem_st {
     size_t length;              /* current number of bytes */
     char *data;
@@ -53,23 +51,8 @@ size_t BUF_MEM_grow(BUF_MEM *str, size_t len);
 size_t BUF_MEM_grow_clean(BUF_MEM *str, size_t len);
 void BUF_reverse(unsigned char *out, const unsigned char *in, size_t siz);
 
-/* BEGIN ERROR CODES */
-/*
- * The following lines are auto generated by the script mkerr.pl. Any changes
- * made after this point may be overwritten when the script is next run.
- */
-void ERR_load_BUF_strings(void);
-
-/* Error codes for the BUF functions. */
 
-/* Function codes. */
-# define BUF_F_BUF_MEM_GROW                               100
-# define BUF_F_BUF_MEM_GROW_CLEAN                         105
-# define BUF_F_BUF_MEM_NEW                                101
-
-/* Reason codes. */
-
-#ifdef  __cplusplus
+# ifdef  __cplusplus
 }
-#endif
+# endif
 #endif