summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/dh
diff options
context:
space:
mode:
authordjm <>2005-04-29 05:39:33 +0000
committerdjm <>2005-04-29 05:39:33 +0000
commit68edd00d9258df93b1366c71ac124e0cadf7bc08 (patch)
tree3ce4ae2a9747bbc11aed1f95f9bbea92c41f8683 /src/lib/libcrypto/dh
parentf396ed0f5ce0af56bfde2e75e15cf1f52924c779 (diff)
downloadopenbsd-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.c4
-rw-r--r--src/lib/libcrypto/dh/dh_err.c2
-rw-r--r--src/lib/libcrypto/dh/dh_gen.c6
-rw-r--r--src/lib/libcrypto/dh/dh_key.c4
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
73int DH_check(const DH *dh, int *ret) 75int 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
89DH *DH_generate_parameters(int prime_len, int generator, 92DH *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;
151err: 155err:
@@ -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
65static int generate_key(DH *dh); 67static int generate_key(DH *dh);
66static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh); 68static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh);
67static int dh_bn_mod_exp(const DH *dh, BIGNUM *r, 69static 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