11
11
*
12
12
*
13
13
* 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 $
15
15
*
16
16
* Since the server static private key ($DataDir/server.key)
17
17
* will normally be stored unencrypted so that the database
@@ -396,7 +396,7 @@ load_dh_file (int keylength)
396
396
/* is the prime the correct size? */
397
397
if (dh != NULL && 8 * DH_size (dh ) < keylength )
398
398
{
399
- elog (DEBUG , "DH errors (%s): %d bits expected, %d bits found" ,
399
+ elog (DEBUG1 , "DH errors (%s): %d bits expected, %d bits found" ,
400
400
fnbuf , keylength , 8 * DH_size (dh ));
401
401
dh = NULL ;
402
402
}
@@ -406,18 +406,18 @@ load_dh_file (int keylength)
406
406
{
407
407
if (DH_check (dh , & codes ))
408
408
{
409
- elog (DEBUG , "DH_check error (%s): %s" , fnbuf , SSLerrmessage ());
409
+ elog (DEBUG1 , "DH_check error (%s): %s" , fnbuf , SSLerrmessage ());
10000
410
410
return NULL ;
411
411
}
412
412
if (codes & DH_CHECK_P_NOT_PRIME )
413
413
{
414
- elog (DEBUG , "DH error (%s): p is not prime" , fnbuf );
414
+ elog (DEBUG1 , "DH error (%s): p is not prime" , fnbuf );
415
415
return NULL ;
416
416
}
417
417
if ((codes & DH_NOT_SUITABLE_GENERATOR ) &&
418
418
(codes & DH_CHECK_P_NOT_SAFE_PRIME ))
419
419
{
420
- elog (DEBUG ,
420
+ elog (DEBUG1 ,
421
421
"DH error (%s): neither suitable generator or safe prime" ,
422
422
fnbuf );
423
423
return NULL ;
@@ -444,7 +444,7 @@ load_dh_buffer (const char *buffer, size_t len)
444
444
return NULL ;
445
445
dh = PEM_read_bio_DHparams (bio , NULL , NULL , NULL );
446
446
if (dh == NULL )
447
- elog (DEBUG , "DH load buffer: %s" , SSLerrmessage ());
447
+ elog (DEBUG1 , "DH load buffer: %s" , SSLerrmessage ());
448
448
BIO_free (bio );
449
449
450
450
return dh ;
@@ -516,7 +516,7 @@ tmp_dh_cb (SSL *s, int is_export, int keylength)
516
516
/* this may take a long time, but it may be necessary... */
517
517
if (r == NULL || 8 * DH_size (r ) < keylength )
518
518
{
519
- elog (DEBUG , "DH: generating parameters (%d bits)...." , keylength );
519
+ elog (DEBUG1 , "DH: generating parameters (%d bits)...." , keylength );
520
520
r = DH_generate_parameters (keylength , DH_GENERATOR_2 , NULL , NULL );
521
521
}
522
522
@@ -553,29 +553,29 @@ info_cb (SSL *ssl, int type, int args)
553
553
switch (type )
554
554
{
555
555
case SSL_CB_HANDSHAKE_START :
556
- elog (DEBUG , "SSL: handshake start" );
556
+ elog (DEBUG1 , "SSL: handshake start" );
557
557
break ;
558
558
case SSL_CB_HANDSHAKE_DONE :
559
- elog (DEBUG , "SSL: handshake done" );
559
+ elog (DEBUG1 , "SSL: handshake done" );
560
560
break ;
561
561
case SSL_CB_ACCEPT_LOOP :
562
562
if (DebugLvl >= 3 )
563
- elog (DEBUG , "SSL: accept loop" );
563
+ elog (DEBUG1 , "SSL: accept loop" );
564
564
break ;
565
565
case SSL_CB_ACCEPT_EXIT :
566
- elog (DEBUG , "SSL: accept exit (%d)" , args );
566
+ elog (DEBUG1 , "SSL: accept exit (%d)" , args );
567
567
break ;
568
568
case SSL_CB_CONNECT_LOOP :
569
- elog (DEBUG , "SSL: connect loop" );
569
+ elog (DEBUG1 , "SSL: connect loop" );
570
570
break ;
571
571
case SSL_CB_CONNECT_EXIT :
572
- elog (DEBUG , "SSL: connect exit (%d)" , args );
572
+ elog (DEBUG1 , "SSL: connect exit (%d)" , args );
573
573
break ;
574
574
case SSL_CB_READ_ALERT :
575
- elog (DEBUG , "SSL: read alert (0x%04x)" , args );
575
+ elog (DEBUG1 , "SSL: read alert (0x%04x)" , args );
576
576
break ;
577
577
case SSL_CB_WRITE_ALERT :
578
- elog (DEBUG , "SSL: write alert (0x%04x)" , args );
578
+ elog (DEBUG1 , "SSL: write alert (0x%04x)" , args );
579
579
break ;
580
580
}
581
581
}
@@ -701,7 +701,7 @@ open_server_SSL (Port *port)
701
701
NID_commonName , port -> peer_cn , sizeof (port -> peer_cn ));
702
702
port -> peer_cn [sizeof (port -> peer_cn )- 1 ] = '\0' ;
703
703
}
704
- elog (DEBUG , "secure connection from '%s'" , port -> peer_cn );
704
+ elog (DEBUG1 , "secure connection from '%s'" , port -> peer_cn );
705
705
706
706
/* set up debugging/info callback */
707
707
SSL_CTX_set_info_callback (SSL_context , info_cb );
0 commit comments