diff options
author | Richard Levitte <levitte@openssl.org> | 2004-01-23 16:49:39 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2004-01-23 16:49:39 +0000 |
commit | 2bff903483e5d330e06cd1c6e9a120c5dcfb7912 (patch) | |
tree | bea00dc09b8185458483a0d6de392db11653dc2b /crypto/ecdh | |
parent | c4fd5d764d4cc2bd12c487967a3b06f2ab7020ad (diff) | |
download | openssl-new-2bff903483e5d330e06cd1c6e9a120c5dcfb7912.tar.gz |
This branch hasn't been updated with changes from HEAD for a looooong time...
Here goes.
Diffstat (limited to 'crypto/ecdh')
-rw-r--r-- | crypto/ecdh/Makefile.ssl | 48 | ||||
-rw-r--r-- | crypto/ecdh/ech_ossl.c | 5 |
2 files changed, 31 insertions, 22 deletions
diff --git a/crypto/ecdh/Makefile.ssl b/crypto/ecdh/Makefile.ssl index 8a0e43852a..ff46ca041d 100644 --- a/crypto/ecdh/Makefile.ssl +++ b/crypto/ecdh/Makefile.ssl @@ -89,29 +89,37 @@ ech_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h ech_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h ech_err.o: ../../include/openssl/symhacks.h ech_err.c ech_key.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h -ech_key.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h -ech_key.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -ech_key.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h -ech_key.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h -ech_key.o: ../../include/openssl/engine.h ../../include/openssl/err.h -ech_key.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +ech_key.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +ech_key.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h +ech_key.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +ech_key.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +ech_key.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h +ech_key.o: ../../include/openssl/err.h ../../include/openssl/evp.h +ech_key.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h +ech_key.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h ech_key.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h -ech_key.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h -ech_key.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h -ech_key.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h ecdh.h -ech_key.o: ech_key.c +ech_key.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h +ech_key.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +ech_key.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +ech_key.o: ../../include/openssl/store.h ../../include/openssl/symhacks.h +ech_key.o: ../../include/openssl/ui.h ../../include/openssl/x509.h +ech_key.o: ../../include/openssl/x509_vfy.h ecdh.h ech_key.c ech_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h -ech_lib.o: ../../include/openssl/bn.h ../../include/openssl/crypto.h -ech_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h -ech_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h -ech_lib.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h -ech_lib.o: ../../include/openssl/engine.h ../../include/openssl/err.h -ech_lib.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h +ech_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h +ech_lib.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h +ech_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h +ech_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h +ech_lib.o: ../../include/openssl/ecdsa.h ../../include/openssl/engine.h +ech_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h +ech_lib.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h +ech_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h ech_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h -ech_lib.o: ../../include/openssl/rand.h ../../include/openssl/rsa.h -ech_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h -ech_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h ecdh.h -ech_lib.o: ech_lib.c +ech_lib.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h +ech_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h +ech_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h +ech_lib.o: ../../include/openssl/store.h ../../include/openssl/symhacks.h +ech_lib.o: ../../include/openssl/ui.h ../../include/openssl/x509.h +ech_lib.o: ../../include/openssl/x509_vfy.h ecdh.h ech_lib.c ech_ossl.o: ../../e_os.h ../../include/openssl/asn1.h ech_ossl.o: ../../include/openssl/bio.h ../../include/openssl/bn.h ech_ossl.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h diff --git a/crypto/ecdh/ech_ossl.c b/crypto/ecdh/ech_ossl.c index b3cff5ad90..c7633bac7f 100644 --- a/crypto/ecdh/ech_ossl.c +++ b/crypto/ecdh/ech_ossl.c @@ -109,7 +109,8 @@ static int ecdh_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, E BN_CTX *ctx; EC_POINT *tmp=NULL; BIGNUM *x=NULL, *y=NULL; - int ret= -1, buflen, len; + int ret= -1; + size_t buflen, len; unsigned char *buf=NULL; if (outlen > INT_MAX) @@ -172,7 +173,7 @@ static int ecdh_compute_key(void *out, size_t outlen, const EC_POINT *pub_key, E } memset(buf, 0, buflen - len); - if (len != BN_bn2bin(x, buf + buflen - len)) + if (len != (size_t)BN_bn2bin(x, buf + buflen - len)) { ECDHerr(ECDH_F_ECDH_COMPUTE_KEY,ERR_R_BN_LIB); goto err; |