1111 *
1212 *
1313 * IDENTIFICATION
14- * $Header: /cvsroot/pgsql/src/backend/libpq/be-secure.c,v 1.7 2002/06/1707:33:25 momjian Exp $
14+ * $Header: /cvsroot/pgsql/src/backend/libpq/be-secure.c,v 1.8 2002/06/1715:19:28 momjian Exp $
1515 *
1616 * Since the server static private key ($DataDir/server.key)
1717 * will normally be stored unencrypted so that the database
@@ -396,7 +396,7 @@ load_dh_file (int keylength)
396396/* is the prime the correct size? */
397397if (dh != NULL && 8 * DH_size (dh )< keylength )
398398{
399- elog (DEBUG1 ,"DH errors (%s): %d bits expected, %d bits found" ,
399+ elog (LOG ,"DH errors (%s): %d bits expected, %d bits found" ,
400400fnbuf ,keylength ,8 * DH_size (dh ));
401401dh = NULL ;
402402}
@@ -406,18 +406,18 @@ load_dh_file (int keylength)
406406{
407407if (DH_check (dh ,& codes ))
408408{
409- elog (DEBUG1 ,"DH_check error (%s): %s" ,fnbuf ,SSLerrmessage ());
409+ elog (LOG ,"DH_check error (%s): %s" ,fnbuf ,SSLerrmessage ());
410410return NULL ;
411411}
412412if (codes & DH_CHECK_P_NOT_PRIME )
413413{
414- elog (DEBUG1 ,"DH error (%s): p is not prime" ,fnbuf );
414+ elog (LOG ,"DH error (%s): p is not prime" ,fnbuf );
415415return NULL ;
416416}
417417if ((codes & DH_NOT_SUITABLE_GENERATOR )&&
418418(codes & DH_CHECK_P_NOT_SAFE_PRIME ))
419419{
420- elog (DEBUG1 ,
420+ elog (LOG ,
421421"DH error (%s): neither suitable generator or safe prime" ,
422422fnbuf );
423423return NULL ;
@@ -547,36 +547,32 @@ verify_cb (int ok, X509_STORE_CTX *ctx)
547547static void
548548info_cb (SSL * ssl ,int type ,int args )
549549{
550- if (DebugLvl < 2 )
551- return ;
552-
553550switch (type )
554551{
555- case SSL_CB_HANDSHAKE_START :
556- elog (DEBUG1 ,"SSL: handshake start" );
557- break ;
558- case SSL_CB_HANDSHAKE_DONE :
559- elog (DEBUG1 ,"SSL: handshake done" );
560- break ;
561- case SSL_CB_ACCEPT_LOOP :
562- if (DebugLvl >=3 )
563- elog (DEBUG1 ,"SSL: accept loop" );
564- break ;
565- case SSL_CB_ACCEPT_EXIT :
566- elog (DEBUG1 ,"SSL: accept exit (%d)" ,args );
567- break ;
568- case SSL_CB_CONNECT_LOOP :
569- elog (DEBUG1 ,"SSL: connect loop" );
570- break ;
571- case SSL_CB_CONNECT_EXIT :
572- elog (DEBUG1 ,"SSL: connect exit (%d)" ,args );
573- break ;
574- case SSL_CB_READ_ALERT :
575- elog (DEBUG1 ,"SSL: read alert (0x%04x)" ,args );
576- break ;
577- case SSL_CB_WRITE_ALERT :
578- elog (DEBUG1 ,"SSL: write alert (0x%04x)" ,args );
579- break ;
552+ case SSL_CB_HANDSHAKE_START :
553+ elog (DEBUG3 ,"SSL: handshake start" );
554+ break ;
555+ case SSL_CB_HANDSHAKE_DONE :
556+ elog (DEBUG3 ,"SSL: handshake done" );
557+ break ;
558+ case SSL_CB_ACCEPT_LOOP :
559+ elog (DEBUG3 ,"SSL: accept loop" );
560+ break ;
561+ case SSL_CB_ACCEPT_EXIT :
562+ elog (DEBUG3 ,"SSL: accept exit (%d)" ,args );
563+ break ;
564+ case SSL_CB_CONNECT_LOOP :
565+ elog (DEBUG3 ,"SSL: connect loop" );
566+ break ;
567+ case SSL_CB_CONNECT_EXIT :
568+ elog (DEBUG3 ,"SSL: connect exit (%d)" ,args );
569+ break ;
570+ case SSL_CB_READ_ALERT :
571+ elog (DEBUG3 ,"SSL: read alert (0x%04x)" ,args );
572+ break ;
573+ case SSL_CB_WRITE_ALERT :
574+ elog (DEBUG3 ,"SSL: write alert (0x%04x)" ,args );
575+ break ;
580576}
581577}
582578