projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update ECDSA and ECDH for OPENSSL_NO_ENGINE.
[openssl.git]
/
crypto
/
ecdsa
/
ecs_lib.c
diff --git
a/crypto/ecdsa/ecs_lib.c
b/crypto/ecdsa/ecs_lib.c
index d553ea1cd6039f260954416ae297375d17110c60..e355a35698526bb37522157d7483c91a75d80532 100644
(file)
--- a/
crypto/ecdsa/ecs_lib.c
+++ b/
crypto/ecdsa/ecs_lib.c
@@
-55,7
+55,9
@@
#include <string.h>
#include "ecdsa.h"
#include <string.h>
#include "ecdsa.h"
+#ifndef OPENSSL_NO_ENGINE
#include <openssl/engine.h>
#include <openssl/engine.h>
+#endif
#include <openssl/err.h>
#include <openssl/bn.h>
#include <openssl/err.h>
#include <openssl/bn.h>
@@
-92,11
+94,13
@@
int ECDSA_set_method(EC_KEY *eckey, const ECDSA_METHOD *meth)
if (mtmp->finish)
mtmp->finish(eckey);
#endif
if (mtmp->finish)
mtmp->finish(eckey);
#endif
+#ifndef OPENSSL_NO_ENGINE
if (ecdsa->engine)
{
ENGINE_finish(ecdsa->engine);
ecdsa->engine = NULL;
}
if (ecdsa->engine)
{
ENGINE_finish(ecdsa->engine);
ecdsa->engine = NULL;
}
+#endif
ecdsa->meth = meth;
#if 0
if (meth->init)
ecdsa->meth = meth;
#if 0
if (meth->init)
@@
-129,6
+133,7
@@
ECDSA_DATA *ECDSA_DATA_new_method(ENGINE *engine)
ret->meth = ECDSA_get_default_method();
ret->engine = engine;
ret->meth = ECDSA_get_default_method();
ret->engine = engine;
+#ifndef OPENSSL_NO_ENGINE
if (!ret->engine)
ret->engine = ENGINE_get_default_ECDSA();
if (ret->engine)
if (!ret->engine)
ret->engine = ENGINE_get_default_ECDSA();
if (ret->engine)
@@
-142,6
+147,7
@@
ECDSA_DATA *ECDSA_DATA_new_method(ENGINE *engine)
return NULL;
}
}
return NULL;
}
}
+#endif
ret->flags = ret->meth->flags;
CRYPTO_new_ex_data(CRYPTO_EX_INDEX_ECDSA, ret, &ret->ex_data);
ret->flags = ret->meth->flags;
CRYPTO_new_ex_data(CRYPTO_EX_INDEX_ECDSA, ret, &ret->ex_data);
@@
-167,8
+173,10
@@
void ECDSA_DATA_free(ECDSA_DATA *r)
if (r->meth->finish)
r->meth->finish(r);
#endif
if (r->meth->finish)
r->meth->finish(r);
#endif
+#ifndef OPENSSL_NO_ENGINE
if (r->engine)
ENGINE_finish(r->engine);
if (r->engine)
ENGINE_finish(r->engine);
+#endif
CRYPTO_free_ex_data(CRYPTO_EX_INDEX_ECDSA, r, &r->ex_data);
CRYPTO_free_ex_data(CRYPTO_EX_INDEX_ECDSA, r, &r->ex_data);