-/* dso_lib.c -*- mode:C; c-file-style: "eay" -*- */
+/* dso_lib.c */
/*
* Written by Geoff Thorpe (geoff@geoffthorpe.net) for the OpenSSL project
* 2000.
#include <stdio.h>
#include <openssl/crypto.h>
-#include "cryptlib.h"
+#include "internal/cryptlib.h"
#include <openssl/dso.h>
static DSO_METHOD *default_DSO_meth = NULL;
*/
default_DSO_meth = DSO_METHOD_openssl();
}
- ret = OPENSSL_malloc(sizeof(*ret));
+ ret = OPENSSL_zalloc(sizeof(*ret));
if (ret == NULL) {
DSOerr(DSO_F_DSO_NEW_METHOD, ERR_R_MALLOC_FAILURE);
return (NULL);
}
- memset(ret, 0, sizeof(*ret));
ret->meth_data = sk_void_new_null();
if (ret->meth_data == NULL) {
/* sk_new doesn't generate any errors so we do */
DSOerr(DSO_F_DSO_SET_FILENAME, ERR_R_MALLOC_FAILURE);
return (0);
}
- BUF_strlcpy(copied, filename, strlen(filename) + 1);
+ OPENSSL_strlcpy(copied, filename, strlen(filename) + 1);
OPENSSL_free(dso->filename);
dso->filename = copied;
return (1);
DSOerr(DSO_F_DSO_CONVERT_FILENAME, ERR_R_MALLOC_FAILURE);
return (NULL);
}
- BUF_strlcpy(result, filename, strlen(filename) + 1);
+ OPENSSL_strlcpy(result, filename, strlen(filename) + 1);
}
return (result);
}