|
11 | 11 | * |
12 | 12 | * |
13 | 13 | * IDENTIFICATION |
14 | | - * $PostgreSQL: pgsql/src/interfaces/libpq/fe-secure.c,v 1.66 2005/01/08 22:51:15 tgl Exp $ |
| 14 | + * $PostgreSQL: pgsql/src/interfaces/libpq/fe-secure.c,v 1.67 2005/01/10 00:37:12 tgl Exp $ |
15 | 15 | * |
16 | 16 | * NOTES |
17 | 17 | * [ Most of these notes are wrong/obsolete, but perhaps not all ] |
@@ -768,8 +768,10 @@ static int |
768 | 768 | client_cert_cb(SSL*ssl,X509**x509,EVP_PKEY**pkey) |
769 | 769 | { |
770 | 770 | charhomedir[MAXPGPATH]; |
771 | | -structstatbuf, |
772 | | -buf2; |
| 771 | +structstatbuf; |
| 772 | +#ifndefWIN32 |
| 773 | +structstatbuf2; |
| 774 | +#endif |
773 | 775 | charfnbuf[MAXPGPATH]; |
774 | 776 | FILE*fp; |
775 | 777 | PGconn*conn= (PGconn*)SSL_get_app_data(ssl); |
@@ -831,13 +833,15 @@ client_cert_cb(SSL *ssl, X509 **x509, EVP_PKEY **pkey) |
831 | 833 | fnbuf,pqStrerror(errno,sebuf,sizeof(sebuf))); |
832 | 834 | return0; |
833 | 835 | } |
| 836 | +#ifndefWIN32 |
834 | 837 | if (fstat(fileno(fp),&buf2)==-1|| |
835 | 838 | buf.st_dev!=buf2.st_dev||buf.st_ino!=buf2.st_ino) |
836 | 839 | { |
837 | 840 | printfPQExpBuffer(&conn->errorMessage, |
838 | 841 | libpq_gettext("private key file \"%s\" changed during execution\n"),fnbuf); |
839 | 842 | return0; |
840 | 843 | } |
| 844 | +#endif |
841 | 845 | if (PEM_read_PrivateKey(fp,pkey,cb,NULL)==NULL) |
842 | 846 | { |
843 | 847 | char*err=SSLerrmessage(); |
|