Re: OOPS! Bad libpq patch last time..
От | Bruce Momjian |
---|---|
Тема | Re: OOPS! Bad libpq patch last time.. |
Дата | |
Msg-id | 200201200502.g0K52xY06396@candle.pha.pa.us обсуждение исходный текст |
Ответ на | OOPS! Bad libpq patch last time.. (Jon Marks <j-marks@uiuc.edu>) |
Ответы |
Re: OOPS! Bad libpq patch last time..
|
Список | pgsql-patches |
Jon Marks wrote: > The patch submitted in my previous message was malformed. > I've created a new one which is correct. SORRY for the > trouble!! Did we come to a concusion on this? -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026 diff -urN postgresql-7.1.3/src/interfaces/libpq/fe-connect.c postgresql-7.1.3-opensslfix/src/interfaces/libpq/fe-connect.c --- postgresql-7.1.3/src/interfaces/libpq/fe-connect.c Sat Mar 31 17:14:37 2001 +++ postgresql-7.1.3-opensslfix/src/interfaces/libpq/fe-connect.c Fri Jan 4 15:38:30 2002 @@ -19,6 +19,7 @@ #include <fcntl.h> #include <errno.h> #include <ctype.h> +#include <limits.h> #include "libpq-fe.h" #include "libpq-int.h" @@ -984,6 +985,14 @@ { if (!SSL_context) { + char f_randfile[PATH_MAX]; + + /* Need to seed PRNG, too! */ + if (RAND_egd(RAND_file_name(f_randfile, sizeof(f_randfile))) < 0) { + /* Not an EGD, so read and write it. */ + if (RAND_load_file(f_randfile, -1)) + RAND_write_file(f_randfile); + } SSL_load_error_strings(); SSL_library_init(); SSL_context = SSL_CTX_new(SSLv23_method()); diff -urN postgresql-7.1.3/src/interfaces/libpq/libpq-fe.h postgresql-7.1.3-opensslfix/src/interfaces/libpq/libpq-fe.h --- postgresql-7.1.3/src/interfaces/libpq/libpq-fe.h Wed Mar 21 22:01:27 2001 +++ postgresql-7.1.3-opensslfix/src/interfaces/libpq/libpq-fe.h Thu Jan 3 14:08:18 2002 @@ -27,6 +27,7 @@ #include "postgres_ext.h" #ifdef USE_SSL #include <openssl/ssl.h> +#include <openssl/rand.h> #endif /* Application-visible enum types */
В списке pgsql-patches по дате отправления: