diff options
| author | beck <> | 2000-03-19 11:13:58 +0000 |
|---|---|---|
| committer | beck <> | 2000-03-19 11:13:58 +0000 |
| commit | 796d609550df3a33fc11468741c5d2f6d3df4c11 (patch) | |
| tree | 6c6d539061caa20372dad0ac4ddb1dfae2fbe7fe /src/lib/libcrypto/dh/dhtest.c | |
| parent | 5be3114c1fd7e0dfea1e38d3abb4cbba75244419 (diff) | |
| download | openbsd-796d609550df3a33fc11468741c5d2f6d3df4c11.tar.gz openbsd-796d609550df3a33fc11468741c5d2f6d3df4c11.tar.bz2 openbsd-796d609550df3a33fc11468741c5d2f6d3df4c11.zip | |
OpenSSL 0.9.5 merge
*warning* this bumps shared lib minors for libssl and libcrypto from 2.1 to 2.2
if you are using the ssl26 packages for ssh and other things to work you will
need to get new ones (see ~beck/libsslsnap/<arch>) on cvs or ~beck/src-patent.tar.gz on cvs
Diffstat (limited to '')
| -rw-r--r-- | src/lib/libcrypto/dh/dhtest.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/lib/libcrypto/dh/dhtest.c b/src/lib/libcrypto/dh/dhtest.c index 770331971f..d66c28455e 100644 --- a/src/lib/libcrypto/dh/dhtest.c +++ b/src/lib/libcrypto/dh/dhtest.c | |||
| @@ -65,6 +65,7 @@ | |||
| 65 | #include <openssl/crypto.h> | 65 | #include <openssl/crypto.h> |
| 66 | #include <openssl/bio.h> | 66 | #include <openssl/bio.h> |
| 67 | #include <openssl/bn.h> | 67 | #include <openssl/bn.h> |
| 68 | #include <openssl/rand.h> | ||
| 68 | 69 | ||
| 69 | #ifdef NO_DH | 70 | #ifdef NO_DH |
| 70 | int main(int argc, char *argv[]) | 71 | int main(int argc, char *argv[]) |
| @@ -87,19 +88,23 @@ static void MS_CALLBACK cb(int p, int n, void *arg); | |||
| 87 | #include "bss_file.c" | 88 | #include "bss_file.c" |
| 88 | #endif | 89 | #endif |
| 89 | 90 | ||
| 90 | BIO *out=NULL; | 91 | static const char rnd_seed[] = "string to make the random number generator think it has entropy"; |
| 91 | 92 | ||
| 92 | int main(int argc, char *argv[]) | 93 | int main(int argc, char *argv[]) |
| 93 | { | 94 | { |
| 94 | DH *a,*b; | 95 | DH *a; |
| 96 | DH *b=NULL; | ||
| 95 | char buf[12]; | 97 | char buf[12]; |
| 96 | unsigned char *abuf=NULL,*bbuf=NULL; | 98 | unsigned char *abuf=NULL,*bbuf=NULL; |
| 97 | int i,alen,blen,aout,bout,ret=1; | 99 | int i,alen,blen,aout,bout,ret=1; |
| 100 | BIO *out; | ||
| 98 | 101 | ||
| 99 | #ifdef WIN32 | 102 | #ifdef WIN32 |
| 100 | CRYPTO_malloc_init(); | 103 | CRYPTO_malloc_init(); |
| 101 | #endif | 104 | #endif |
| 102 | 105 | ||
| 106 | RAND_seed(rnd_seed, sizeof rnd_seed); | ||
| 107 | |||
| 103 | out=BIO_new(BIO_s_file()); | 108 | out=BIO_new(BIO_s_file()); |
| 104 | if (out == NULL) exit(1); | 109 | if (out == NULL) exit(1); |
| 105 | BIO_set_fp(out,stdout,BIO_NOCLOSE); | 110 | BIO_set_fp(out,stdout,BIO_NOCLOSE); |
| @@ -167,6 +172,9 @@ int main(int argc, char *argv[]) | |||
| 167 | err: | 172 | err: |
| 168 | if (abuf != NULL) Free(abuf); | 173 | if (abuf != NULL) Free(abuf); |
| 169 | if (bbuf != NULL) Free(bbuf); | 174 | if (bbuf != NULL) Free(bbuf); |
| 175 | if(b != NULL) DH_free(b); | ||
| 176 | if(a != NULL) DH_free(a); | ||
| 177 | BIO_free(out); | ||
| 170 | exit(ret); | 178 | exit(ret); |
| 171 | return(ret); | 179 | return(ret); |
| 172 | } | 180 | } |
