*/
#include <stdio.h>
+#include <string.h>
#include <openssl/crypto.h>
#include <openssl/buffer.h>
#include <openssl/dso.h>
#include <openssl/engine.h>
-
+#ifndef OPENSSL_NO_RSA
+#include <openssl/rsa.h>
+#endif
+#ifndef OPENSSL_NO_DSA
+#include <openssl/dsa.h>
+#endif
+#ifndef OPENSSL_NO_DH
+#include <openssl/dh.h>
+#endif
+#include <openssl/bn.h>
#ifndef OPENSSL_NO_HW
#ifndef OPENSSL_NO_HW_NURON
return 1;
}
-static int nuron_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)())
+static int nuron_ctrl(ENGINE *e, int cmd, long i, void *p, void (*f)(void))
{
int initialised = ((pvDSOHandle == NULL) ? 0 : 1);
switch(cmd)
}
#ifndef OPENSSL_NO_RSA
-static int nuron_rsa_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa)
+static int nuron_rsa_mod_exp(BIGNUM *r0, const BIGNUM *I, RSA *rsa, BN_CTX *ctx)
{
- return nuron_mod_exp(r0,I,rsa->d,rsa->n,NULL);
+ return nuron_mod_exp(r0,I,rsa->d,rsa->n,ctx);
}
#endif
#endif
/* This function is aliased to mod_exp (with the mont stuff dropped). */
+#ifndef OPENSSL_NO_RSA
static int nuron_mod_exp_mont(BIGNUM *r, const BIGNUM *a, const BIGNUM *p,
const BIGNUM *m, BN_CTX *ctx, BN_MONT_CTX *m_ctx)
{
return nuron_mod_exp(r, a, p, m, ctx);
}
+#endif
#ifndef OPENSSL_NO_DH
/* This function is aliased to mod_exp (with the dh and mont dropped). */
0,
NULL,
NULL,
+ NULL,
NULL
};
#endif
NULL, /* init */
NULL, /* finish */
0, /* flags */
- NULL /* app_data */
+ NULL, /* app_data */
+ NULL, /* dsa_paramgen */
+ NULL /* dsa_keygen */
};
#endif
NULL,
NULL,
0,
+ NULL,
NULL
};
#endif
return 1;
}
+#ifdef OPENSSL_NO_DYNAMIC_ENGINE
static ENGINE *engine_nuron(void)
{
ENGINE *ret = ENGINE_new();
ENGINE_free(toadd);
ERR_clear_error();
}
+#endif
/* This stuff is needed if this ENGINE is being compiled into a self-contained
* shared-library. */