1111 *
1212 *
1313 * IDENTIFICATION
14- * $PostgreSQL: pgsql/src/interfaces/libpq/fe-secure.c,v 1.77 2006/04/2700:53:58 momjian Exp $
14+ * $PostgreSQL: pgsql/src/interfaces/libpq/fe-secure.c,v 1.78 2006/04/2714:01:46 momjian Exp $
1515 *
1616 * NOTES
1717 * [ Most of these notes are wrong/obsolete, but perhaps not all ]
122122#ifdef USE_SSL
123123
124124#ifndef WIN32
125- #define USERCERTFILE ".postgresql/postgresql.crt"
126- #define USERKEYFILE ".postgresql/postgresql.key"
127- #define ROOTCERTFILE ".postgresql/root.crt"
125+ #define USER_CERT_FILE ".postgresql/postgresql.crt"
126+ #define USER_KEY_FILE ".postgresql/postgresql.key"
127+ #define ROOT_CERT_FILE ".postgresql/root.crt"
128128#else
129129/* On Windows, the "home" directory is already PostgreSQL-specific */
130- #define USERCERTFILE "postgresql.crt"
131- #define USERKEYFILE "postgresql.key"
132- #define ROOTCERTFILE "root.crt"
130+ #define USER_CERT_FILE "postgresql.crt"
131+ #define USER_KEY_FILE "postgresql.key"
132+ #define ROOT_CERT_FILE "root.crt"
133133#endif
134134
135135#ifdef NOT_USED
@@ -589,7 +589,7 @@ client_cert_cb(SSL *ssl, X509 **x509, EVP_PKEY **pkey)
589589}
590590
591591/* read the user certificate */
592- snprintf (fnbuf ,sizeof (fnbuf ),"%s/%s" ,homedir ,USERCERTFILE );
592+ snprintf (fnbuf ,sizeof (fnbuf ),"%s/%s" ,homedir ,USER_CERT_FILE );
593593if ((fp = fopen (fnbuf ,"r" ))== NULL )
594594{
595595printfPQExpBuffer (& conn -> errorMessage ,
@@ -611,7 +611,7 @@ client_cert_cb(SSL *ssl, X509 **x509, EVP_PKEY **pkey)
611611fclose (fp );
612612
613613/* read the user key */
614- snprintf (fnbuf ,sizeof (fnbuf ),"%s/%s" ,homedir ,USERKEYFILE );
614+ snprintf (fnbuf ,sizeof (fnbuf ),"%s/%s" ,homedir ,USER_KEY_FILE );
615615if (stat (fnbuf ,& buf )== -1 )
616616{
617617printfPQExpBuffer (& conn -> errorMessage ,
@@ -781,7 +781,7 @@ initialize_SSL(PGconn *conn)
781781/* Set up to verify server cert, if root.crt is present */
782782if (pqGetHomeDirectory (homedir ,sizeof (homedir )))
783783{
784- snprintf (fnbuf ,sizeof (fnbuf ),"%s/%s" ,homedir ,ROOTCERTFILE );
784+ snprintf (fnbuf ,sizeof (fnbuf ),"%s/%s" ,homedir ,ROOT_CERT_FILE );
785785if (stat (fnbuf ,& buf )== 0 )
786786{
787787if (!SSL_CTX_load_verify_locations (SSL_context ,fnbuf ,NULL ))