diff options
| author | djm <> | 2010-10-01 22:54:18 +0000 |
|---|---|---|
| committer | djm <> | 2010-10-01 22:54:18 +0000 |
| commit | f6ca1ae73bb9eabfb510df2cffc2599db98d35a9 (patch) | |
| tree | def8296400903465cb96345535c0a56935eb05a4 /src/lib/libcrypto/jpake | |
| parent | 0229f29a33371533962d8b0b8264882afac53d70 (diff) | |
| download | openbsd-f6ca1ae73bb9eabfb510df2cffc2599db98d35a9.tar.gz openbsd-f6ca1ae73bb9eabfb510df2cffc2599db98d35a9.tar.bz2 openbsd-f6ca1ae73bb9eabfb510df2cffc2599db98d35a9.zip | |
import OpenSSL-1.0.0a
Diffstat (limited to 'src/lib/libcrypto/jpake')
| -rw-r--r-- | src/lib/libcrypto/jpake/Makefile | 2 | ||||
| -rw-r--r-- | src/lib/libcrypto/jpake/jpake.c | 5 | ||||
| -rw-r--r-- | src/lib/libcrypto/jpake/jpaketest.c | 2 |
3 files changed, 4 insertions, 5 deletions
diff --git a/src/lib/libcrypto/jpake/Makefile b/src/lib/libcrypto/jpake/Makefile index a4a1402f2e..110c49ce0b 100644 --- a/src/lib/libcrypto/jpake/Makefile +++ b/src/lib/libcrypto/jpake/Makefile | |||
| @@ -16,7 +16,7 @@ top: | |||
| 16 | all: lib | 16 | all: lib |
| 17 | 17 | ||
| 18 | lib: $(LIBOBJ) | 18 | lib: $(LIBOBJ) |
| 19 | $(ARX) $(LIB) $(LIBOBJ) | 19 | $(AR) $(LIB) $(LIBOBJ) |
| 20 | $(RANLIB) $(LIB) || echo Never mind. | 20 | $(RANLIB) $(LIB) || echo Never mind. |
| 21 | @touch lib | 21 | @touch lib |
| 22 | 22 | ||
diff --git a/src/lib/libcrypto/jpake/jpake.c b/src/lib/libcrypto/jpake/jpake.c index 577b7ef375..086d9f47e0 100644 --- a/src/lib/libcrypto/jpake/jpake.c +++ b/src/lib/libcrypto/jpake/jpake.c | |||
| @@ -4,7 +4,6 @@ | |||
| 4 | #include <openssl/sha.h> | 4 | #include <openssl/sha.h> |
| 5 | #include <openssl/err.h> | 5 | #include <openssl/err.h> |
| 6 | #include <memory.h> | 6 | #include <memory.h> |
| 7 | #include <assert.h> | ||
| 8 | 7 | ||
| 9 | /* | 8 | /* |
| 10 | * In the definition, (xa, xb, xc, xd) are Alice's (x1, x2, x3, x4) or | 9 | * In the definition, (xa, xb, xc, xd) are Alice's (x1, x2, x3, x4) or |
| @@ -134,7 +133,7 @@ static void hashlength(SHA_CTX *sha, size_t l) | |||
| 134 | { | 133 | { |
| 135 | unsigned char b[2]; | 134 | unsigned char b[2]; |
| 136 | 135 | ||
| 137 | assert(l <= 0xffff); | 136 | OPENSSL_assert(l <= 0xffff); |
| 138 | b[0] = l >> 8; | 137 | b[0] = l >> 8; |
| 139 | b[1] = l&0xff; | 138 | b[1] = l&0xff; |
| 140 | SHA1_Update(sha, b, 2); | 139 | SHA1_Update(sha, b, 2); |
| @@ -172,7 +171,7 @@ static void zkp_hash(BIGNUM *h, const BIGNUM *zkpg, const JPAKE_STEP_PART *p, | |||
| 172 | */ | 171 | */ |
| 173 | SHA1_Init(&sha); | 172 | SHA1_Init(&sha); |
| 174 | hashbn(&sha, zkpg); | 173 | hashbn(&sha, zkpg); |
| 175 | assert(!BN_is_zero(p->zkpx.gr)); | 174 | OPENSSL_assert(!BN_is_zero(p->zkpx.gr)); |
| 176 | hashbn(&sha, p->zkpx.gr); | 175 | hashbn(&sha, p->zkpx.gr); |
| 177 | hashbn(&sha, p->gx); | 176 | hashbn(&sha, p->gx); |
| 178 | hashstring(&sha, proof_name); | 177 | hashstring(&sha, proof_name); |
diff --git a/src/lib/libcrypto/jpake/jpaketest.c b/src/lib/libcrypto/jpake/jpaketest.c index 792fc49eb4..eaba75ed8a 100644 --- a/src/lib/libcrypto/jpake/jpaketest.c +++ b/src/lib/libcrypto/jpake/jpaketest.c | |||
| @@ -182,7 +182,7 @@ int main(int argc, char **argv) | |||
| 182 | BN_free(p); | 182 | BN_free(p); |
| 183 | 183 | ||
| 184 | CRYPTO_cleanup_all_ex_data(); | 184 | CRYPTO_cleanup_all_ex_data(); |
| 185 | ERR_remove_state(0); | 185 | ERR_remove_thread_state(NULL); |
| 186 | ERR_free_strings(); | 186 | ERR_free_strings(); |
| 187 | CRYPTO_mem_leaks(bio_err); | 187 | CRYPTO_mem_leaks(bio_err); |
| 188 | 188 | ||
