1111 *
1212 *
1313 * IDENTIFICATION
14- * $Header: /cvsroot/pgsql/src/backend/libpq/be-secure.c,v 1.6 2002/06/14 04:38:04 momjian Exp $
14+ * $Header: /cvsroot/pgsql/src/backend/libpq/be-secure.c,v 1.7 2002/06/17 07:33:25 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 (DEBUG ,"DH errors (%s): %d bits expected, %d bits found" ,
399+ elog (DEBUG1 ,"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 (DEBUG ,"DH_check error (%s): %s" ,fnbuf ,SSLerrmessage ());
409+ elog (DEBUG1 ,"DH_check error (%s): %s" ,fnbuf ,SSLerrmessage ());
410410return NULL ;
411411}
412412if (codes & DH_CHECK_P_NOT_PRIME )
413413{
414- elog (DEBUG ,"DH error (%s): p is not prime" ,fnbuf );
414+ elog (DEBUG1 ,"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 (DEBUG ,
420+ elog (DEBUG1 ,
421421"DH error (%s): neither suitable generator or safe prime" ,
422422fnbuf );
423423return NULL ;
@@ -444,7 +444,7 @@ load_dh_buffer (const char *buffer, size_t len)
444444return NULL ;
445445dh = PEM_read_bio_DHparams (bio ,NULL ,NULL ,NULL );
446446if (dh == NULL )
447- elog (DEBUG ,"DH load buffer: %s" ,SSLerrmessage ());
447+ elog (DEBUG1 ,"DH load buffer: %s" ,SSLerrmessage ());
448448BIO_free (bio );
449449
450450return dh ;
@@ -516,7 +516,7 @@ tmp_dh_cb (SSL *s, int is_export, int keylength)
516516/* this may take a long time, but it may be necessary... */
517517if (r == NULL || 8 * DH_size (r )< keylength )
518518{
519- elog (DEBUG ,"DH: generating parameters (%d bits)...." ,keylength );
519+ elog (DEBUG1 ,"DH: generating parameters (%d bits)...." ,keylength );
520520r = DH_generate_parameters (keylength ,DH_GENERATOR_2 ,NULL ,NULL );
521521}
522522
@@ -553,29 +553,29 @@ info_cb (SSL *ssl, int type, int args)
553553switch (type )
554554{
555555case SSL_CB_HANDSHAKE_START :
556- elog (DEBUG ,"SSL: handshake start" );
556+ elog (DEBUG1 ,"SSL: handshake start" );
557557break ;
558558case SSL_CB_HANDSHAKE_DONE :
559- elog (DEBUG ,"SSL: handshake done" );
559+ elog (DEBUG1 ,"SSL: handshake done" );
560560break ;
561561case SSL_CB_ACCEPT_LOOP :
562562if (DebugLvl >=3 )
563- elog (DEBUG ,"SSL: accept loop" );
563+ elog (DEBUG1 ,"SSL: accept loop" );
564564break ;
565565case SSL_CB_ACCEPT_EXIT :
566- elog (DEBUG ,"SSL: accept exit (%d)" ,args );
566+ elog (DEBUG1 ,"SSL: accept exit (%d)" ,args );
567567break ;
568568case SSL_CB_CONNECT_LOOP :
569- elog (DEBUG ,"SSL: connect loop" );
569+ elog (DEBUG1 ,"SSL: connect loop" );
570570break ;
571571case SSL_CB_CONNECT_EXIT :
572- elog (DEBUG ,"SSL: connect exit (%d)" ,args );
572+ elog (DEBUG1 ,"SSL: connect exit (%d)" ,args );
573573break ;
574574case SSL_CB_READ_ALERT :
575- elog (DEBUG ,"SSL: read alert (0x%04x)" ,args );
575+ elog (DEBUG1 ,"SSL: read alert (0x%04x)" ,args );
576576break ;
577577case SSL_CB_WRITE_ALERT :
578- elog (DEBUG ,"SSL: write alert (0x%04x)" ,args );
578+ elog (DEBUG1 ,"SSL: write alert (0x%04x)" ,args );
579579break ;
580580}
581581}
@@ -701,7 +701,7 @@ open_server_SSL (Port *port)
701701NID_commonName ,port -> peer_cn ,sizeof (port -> peer_cn ));
702702port -> peer_cn [sizeof (port -> peer_cn )- 1 ]= '\0' ;
703703}
704- elog (DEBUG ,"secure connection from '%s'" ,port -> peer_cn );
704+ elog (DEBUG1 ,"secure connection from '%s'" ,port -> peer_cn );
705705
706706/* set up debugging/info callback */
707707SSL_CTX_set_info_callback (SSL_context ,info_cb );