Changeset 1388


Ignore:
Timestamp:
14/08/06 10:37:58 (13 years ago)
Author:
spascoe
Message:

Added debug code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TI05-delivery/trunk/src/bbftp-client-3.2.0/bbftpc/bbftp_private.c

    r1265 r1388  
    473473            lentocrypt = buffertosendlength - ((nbpackets-1)*(lenrsa - 42)) ; 
    474474        } 
    475         if (debug) PRINTMESSAGE(stdout,CASE_NORMAL,0,timestamp,"Crypting %d Bytes\n",lentocrypt) ; 
     475        if (debug) { 
     476          int j; 
     477 
     478          PRINTMESSAGE(stdout,CASE_NORMAL,0,timestamp,"Crypting %d Bytes\n<<<",lentocrypt) ; 
     479          for (j=0; j < lentocrypt; j++) { 
     480            if ((strtocrypt[j] >= 32) && (strtocrypt[j] < 127))  
     481              PRINTMESSAGE(stdout, CASE_NORMAL, 0, timestamp, "%c", strtocrypt[j]); 
     482            else 
     483              PRINTMESSAGE(stdout, CASE_NORMAL,0, timestamp, "\\0%o ", (unsigned char)strtocrypt[j]); 
     484          } 
     485          PRINTMESSAGE(stdout, CASE_NORMAL, 0, timestamp, ">>>\n"); 
     486        } 
     487 
    476488        if ( (msg_private->lengthdata = RSA_public_encrypt(lentocrypt,(unsigned char *)strtocrypt,msg_private->cryptdata,hisrsa,RSA_PKCS1_OAEP_PADDING)) < 0 ) { 
    477489            sprintf(logmessage,"Error crypting message : %s ",(char *) ERR_error_string(ERR_get_error(),NULL)) ; 
Note: See TracChangeset for help on using the changeset viewer.