* [including the GNU Public Licence.]
*/
-#define OPENSSL_FIPSAPI
+
#include <stdio.h>
#include "cryptlib.h"
#include <openssl/buffer.h>
+size_t BUF_strnlen(const char *str, size_t maxlen)
+ {
+ const char *p;
+
+ for (p = str; maxlen-- != 0 && *p != '\0'; ++p)
+ ;
+
+ return p - str;
+ }
+
char *BUF_strdup(const char *str)
{
if (str == NULL) return(NULL);
if (str == NULL) return(NULL);
+ siz = BUF_strnlen(str, siz);
+
ret=OPENSSL_malloc(siz+1);
if (ret == NULL)
{