*/
#include <stdio.h>
+#include <string.h>
#include <openssl/crypto.h>
/* #include <openssl/pem.h> */
-#include "cryptlib.h"
#include <openssl/dso.h>
#include <openssl/x509.h>
#include <openssl/objects.h>
#include "vendor_defns/hw_4758_cca.h"
#endif
-#include "hw_4758_cca_err.c"
+#include "e_4758_cca_err.c"
static int ibm_4758_cca_destroy(ENGINE *e);
static int ibm_4758_cca_init(ENGINE *e);
RSA_FLAG_SIGN_VER, /* flags */
NULL, /* app_data */
cca_rsa_sign, /* rsa_sign */
- cca_rsa_verify /* rsa_verify */
+ cca_rsa_verify, /* rsa_verify */
+ NULL /* rsa_keygen */
};
#endif
return 1;
}
+#ifdef OPENSSL_NO_DYNAMIC_ENGINE
static ENGINE *engine_4758_cca(void)
{
ENGINE *ret = ENGINE_new();
ENGINE_free(e_4758);
ERR_clear_error();
}
+#endif
static int ibm_4758_cca_destroy(ENGINE *e)
{
if (type == NID_sha1 || type == NID_md5)
{
- memset(hashBuffer, 0, keyLength+1);
+ OPENSSL_cleanse(hashBuffer, keyLength+1);
OPENSSL_free(hashBuffer);
}
if (type == NID_sha1 || type == NID_md5)
{
- memset(hashBuffer, 0, keyLength+1);
+ OPENSSL_cleanse(hashBuffer, keyLength+1);
OPENSSL_free(hashBuffer);
}
}
/* Goo to handle building as a dynamic engine */
-#ifdef ENGINE_DYNAMIC_SUPPORT
+#ifndef OPENSSL_NO_DYNAMIC_ENGINE
static int bind_fn(ENGINE *e, const char *id)
{
if(id && (strcmp(id, engine_4758_cca_id) != 0))
}
IMPLEMENT_DYNAMIC_CHECK_FN()
IMPLEMENT_DYNAMIC_BIND_FN(bind_fn)
-#endif /* ENGINE_DYNAMIC_SUPPORT */
+#endif /* OPENSSL_NO_DYNAMIC_ENGINE */
#endif /* !OPENSSL_NO_HW_4758_CCA */
#endif /* !OPENSSL_NO_HW */