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? */
397397 if (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" ,
400400 fnbuf , keylength , 8 * DH_size (dh ));
401401 dh = NULL ;
402402 }
@@ -406,18 +406,18 @@ load_dh_file (int keylength)
406406 {
407407 if (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 ());
410410 return NULL ;
411411 }
412412 if (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 );
415415 return NULL ;
416416 }
417417 if ((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" ,
422422 fnbuf );
423423 return NULL ;
@@ -444,7 +444,7 @@ load_dh_buffer (const char *buffer, size_t len)
444444 return NULL ;
445445 dh = PEM_read_bio_DHparams (bio , NULL , NULL , NULL );
446446 if (dh == NULL )
447- elog (DEBUG , "DH load buffer: %s" , SSLerrmessage ());
447+ elog (DEBUG1 , "DH load buffer: %s" , SSLerrmessage ());
448448 BIO_free (bio );
449449
450450 return 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... */
517517 if (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 );
520520 r = DH_generate_parameters (keylength , DH_GENERATOR_2 , NULL , NULL );
521521 }
522522
@@ -553,29 +553,29 @@ info_cb (SSL *ssl, int type, int args)
553553 switch (type )
554554 {
555555 case SSL_CB_HANDSHAKE_START :
556- elog (DEBUG , "SSL: handshake start" );
556+ elog (DEBUG1 , "SSL: handshake start" );
557557 break ;
558558 case SSL_CB_HANDSHAKE_DONE :
559- elog (DEBUG , "SSL: handshake done" );
559+ elog (DEBUG1 , "SSL: handshake done" );
560560 break ;
561561 case SSL_CB_ACCEPT_LOOP :
562562 if (DebugLvl >= 3 )
563- elog (DEBUG , "SSL: accept loop" );
563+ elog (DEBUG1 , "SSL: accept loop" );
564564 break ;
565565 case SSL_CB_ACCEPT_EXIT :
566- elog (DEBUG , "SSL: accept exit (%d)" , args );
566+ elog (DEBUG1 , "SSL: accept exit (%d)" , args );
567567 break ;
568568 case SSL_CB_CONNECT_LOOP :
569- elog (DEBUG , "SSL: connect loop" );
569+ elog (DEBUG1 , "SSL: connect loop" );
570570 break ;
571571 case SSL_CB_CONNECT_EXIT :
572- elog (DEBUG , "SSL: connect exit (%d)" , args );
572+ elog (DEBUG1 , "SSL: connect exit (%d)" , args );
573573 break ;
574574 case SSL_CB_READ_ALERT :
575- elog (DEBUG , "SSL: read alert (0x%04x)" , args );
575+ elog (DEBUG1 , "SSL: read alert (0x%04x)" , args );
576576 break ;
577577 case SSL_CB_WRITE_ALERT :
578- elog (DEBUG , "SSL: write alert (0x%04x)" , args );
578+ elog (DEBUG1 , "SSL: write alert (0x%04x)" , args );
579579 break ;
580580 }
581581}
@@ -701,7 +701,7 @@ open_server_SSL (Port *port)
701701 NID_commonName , port -> peer_cn , sizeof (port -> peer_cn ));
702702 port -> 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 */
707707 SSL_CTX_set_info_callback (SSL_context , info_cb );
0 commit comments