diff options
| author | djm <> | 2005-04-29 05:39:33 +0000 |
|---|---|---|
| committer | djm <> | 2005-04-29 05:39:33 +0000 |
| commit | 68edd00d9258df93b1366c71ac124e0cadf7bc08 (patch) | |
| tree | 3ce4ae2a9747bbc11aed1f95f9bbea92c41f8683 /src/lib/libcrypto/dh | |
| parent | f396ed0f5ce0af56bfde2e75e15cf1f52924c779 (diff) | |
| download | openbsd-68edd00d9258df93b1366c71ac124e0cadf7bc08.tar.gz openbsd-68edd00d9258df93b1366c71ac124e0cadf7bc08.tar.bz2 openbsd-68edd00d9258df93b1366c71ac124e0cadf7bc08.zip | |
resolve conflicts
Diffstat (limited to 'src/lib/libcrypto/dh')
| -rw-r--r-- | src/lib/libcrypto/dh/dh_check.c | 4 | ||||
| -rw-r--r-- | src/lib/libcrypto/dh/dh_err.c | 2 | ||||
| -rw-r--r-- | src/lib/libcrypto/dh/dh_gen.c | 6 | ||||
| -rw-r--r-- | src/lib/libcrypto/dh/dh_key.c | 4 |
4 files changed, 15 insertions, 1 deletions
diff --git a/src/lib/libcrypto/dh/dh_check.c b/src/lib/libcrypto/dh/dh_check.c index f0373f7d68..a7e9920efb 100644 --- a/src/lib/libcrypto/dh/dh_check.c +++ b/src/lib/libcrypto/dh/dh_check.c | |||
| @@ -70,6 +70,8 @@ | |||
| 70 | * should hold. | 70 | * should hold. |
| 71 | */ | 71 | */ |
| 72 | 72 | ||
| 73 | #ifndef OPENSSL_FIPS | ||
| 74 | |||
| 73 | int DH_check(const DH *dh, int *ret) | 75 | int DH_check(const DH *dh, int *ret) |
| 74 | { | 76 | { |
| 75 | int ok=0; | 77 | int ok=0; |
| @@ -118,3 +120,5 @@ err: | |||
| 118 | if (q != NULL) BN_free(q); | 120 | if (q != NULL) BN_free(q); |
| 119 | return(ok); | 121 | return(ok); |
| 120 | } | 122 | } |
| 123 | |||
| 124 | #endif | ||
diff --git a/src/lib/libcrypto/dh/dh_err.c b/src/lib/libcrypto/dh/dh_err.c index d837950aec..c2715044c9 100644 --- a/src/lib/libcrypto/dh/dh_err.c +++ b/src/lib/libcrypto/dh/dh_err.c | |||
| @@ -1,6 +1,6 @@ | |||
| 1 | /* crypto/dh/dh_err.c */ | 1 | /* crypto/dh/dh_err.c */ |
| 2 | /* ==================================================================== | 2 | /* ==================================================================== |
| 3 | * Copyright (c) 1999-2002 The OpenSSL Project. All rights reserved. | 3 | * Copyright (c) 1999-2003 The OpenSSL Project. All rights reserved. |
| 4 | * | 4 | * |
| 5 | * Redistribution and use in source and binary forms, with or without | 5 | * Redistribution and use in source and binary forms, with or without |
| 6 | * modification, are permitted provided that the following conditions | 6 | * modification, are permitted provided that the following conditions |
diff --git a/src/lib/libcrypto/dh/dh_gen.c b/src/lib/libcrypto/dh/dh_gen.c index 06f78b35ab..23777f5a16 100644 --- a/src/lib/libcrypto/dh/dh_gen.c +++ b/src/lib/libcrypto/dh/dh_gen.c | |||
| @@ -86,6 +86,9 @@ | |||
| 86 | * It's just as OK (and in some sense better) to use a generator of the | 86 | * It's just as OK (and in some sense better) to use a generator of the |
| 87 | * order-q subgroup. | 87 | * order-q subgroup. |
| 88 | */ | 88 | */ |
| 89 | |||
| 90 | #ifndef OPENSSL_FIPS | ||
| 91 | |||
| 89 | DH *DH_generate_parameters(int prime_len, int generator, | 92 | DH *DH_generate_parameters(int prime_len, int generator, |
| 90 | void (*callback)(int,int,void *), void *cb_arg) | 93 | void (*callback)(int,int,void *), void *cb_arg) |
| 91 | { | 94 | { |
| @@ -146,6 +149,7 @@ DH *DH_generate_parameters(int prime_len, int generator, | |||
| 146 | if (callback != NULL) callback(3,0,cb_arg); | 149 | if (callback != NULL) callback(3,0,cb_arg); |
| 147 | ret->p=p; | 150 | ret->p=p; |
| 148 | ret->g=BN_new(); | 151 | ret->g=BN_new(); |
| 152 | if (ret->g == NULL) goto err; | ||
| 149 | if (!BN_set_word(ret->g,g)) goto err; | 153 | if (!BN_set_word(ret->g,g)) goto err; |
| 150 | ok=1; | 154 | ok=1; |
| 151 | err: | 155 | err: |
| @@ -167,3 +171,5 @@ err: | |||
| 167 | } | 171 | } |
| 168 | return(ret); | 172 | return(ret); |
| 169 | } | 173 | } |
| 174 | |||
| 175 | #endif | ||
diff --git a/src/lib/libcrypto/dh/dh_key.c b/src/lib/libcrypto/dh/dh_key.c index 77f2f50b51..ff125c2296 100644 --- a/src/lib/libcrypto/dh/dh_key.c +++ b/src/lib/libcrypto/dh/dh_key.c | |||
| @@ -62,6 +62,8 @@ | |||
| 62 | #include <openssl/rand.h> | 62 | #include <openssl/rand.h> |
| 63 | #include <openssl/dh.h> | 63 | #include <openssl/dh.h> |
| 64 | 64 | ||
| 65 | #ifndef OPENSSL_FIPS | ||
| 66 | |||
| 65 | static int generate_key(DH *dh); | 67 | static int generate_key(DH *dh); |
| 66 | static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh); | 68 | static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh); |
| 67 | static int dh_bn_mod_exp(const DH *dh, BIGNUM *r, | 69 | static int dh_bn_mod_exp(const DH *dh, BIGNUM *r, |
| @@ -220,3 +222,5 @@ static int dh_finish(DH *dh) | |||
| 220 | BN_MONT_CTX_free((BN_MONT_CTX *)dh->method_mont_p); | 222 | BN_MONT_CTX_free((BN_MONT_CTX *)dh->method_mont_p); |
| 221 | return(1); | 223 | return(1); |
| 222 | } | 224 | } |
| 225 | |||
| 226 | #endif | ||
