Changeset 561 for trunk


Ignore:
Timestamp:
Jun 29, 2021, 10:19:30 PM (3 years ago)
Author:
katerina
Message:

Fix for ticket #451 (signify-openbsd in client/server mode not working).

Location:
trunk
Files:
1 added
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/sh_sig.c

    r553 r561  
    717717  sl_rewind (fdTmp);
    718718
    719 #if 0
     719#if defined(SH_DEBUG_SIGNIFY)
    720720  fin_cp = fdopen(dup(get_the_fd(fdTmp)), "rb");
    721721  FILE * fout = fopen("xxx.out", "w+");
  • trunk/src/sh_xfer_server.c

    r544 r561  
    12301230  int        bytes;
    12311231  SL_TICKET  sfd = -1;
    1232 #ifdef SH_ENCRYPT
    1233   int        blkfac;
    1234   int        rem;
    1235   int        send_bytes;
    1236 #endif
    12371232
    12381233  if (conn == NULL    || conn->FileName == NULL)
     
    12811276      if (bytes >= 0)
    12821277        {
     1278          send_buf = hash_me(conn->K, read_buf,  bytes);
    12831279#ifdef SH_ENCRYPT
    1284           /* need to send N * B_SIZ bytes
    1285            */
    1286           blkfac = bytes / B_SIZ;
    1287           rem    = bytes - (blkfac * B_SIZ);
    1288           if (rem != 0)
    1289             {
    1290               memset(&read_buf[bytes], '\n', (B_SIZ-rem));
    1291               ++blkfac;
    1292               send_bytes = blkfac * B_SIZ;
    1293             }
    1294           else
    1295             send_bytes = bytes;
    1296          
    1297           send_buf = hash_me(conn->K, read_buf,  send_bytes);
    1298          
    1299           sh_xfer_send_crypt (conn, send_buf, send_bytes+KEY_LEN, _("FILE"), 
     1280          sh_xfer_send_crypt (conn, send_buf, bytes+KEY_LEN, _("FILE"), 
    13001281                                      SH_PROTO_BIG|conn->client_entry->encf_flag);
    13011282#else
    1302           send_buf = hash_me(conn->K, read_buf, bytes);
    13031283          sh_xfer_send_crypt (conn, send_buf, bytes+KEY_LEN, _("FILE"), 
    13041284                                      SH_PROTO_BIG);
  • trunk/test/test.sh

    r550 r561  
    164164    echo "  ${S}test.sh 26${E}  -- Test c/s case one        (testrc_2.in)"
    165165    echo "  ${S}test.sh 27${E}  -- Test c/s case two        (testrc_2.in)"
     166    echo "  ${S}test.sh 28${E}  -- Test full c/s w/signify  (testrc_2.in)"
    166167    echo "  ${S}test.sh all${E} -- All tests"
    167168}
     
    175176    echo " (20) testrun_2.sh  (21) testrun_2a.sh  (22) testrun_2b.sh (23) testrun_2c.sh"
    176177    echo " (24) testrun_2d.sh (25) testrun_2e.sh  (26) testrun_2f.sh (27) testrun_2g.sh"
    177 }
     178    echo " (28) testrun_2h.sh"
     179    }
    178180
    179181#
     
    715717    exit $?
    716718fi
     719if test x$1 = x28; then
     720    . ${SCRIPTDIR}/testrun_2a.sh
     721    . ${SCRIPTDIR}/testrun_2h.sh
     722    testrun2h $hostname
     723    print_summary
     724    exit $?
     725fi
    717726if test x$1 = xall; then
    718727    TEST_MAX=0
     
    760769    let "TEST_MAX = TEST_MAX + MAXTEST" >/dev/null
    761770    . ${SCRIPTDIR}/testrun_2g.sh
     771    let "TEST_MAX = TEST_MAX + MAXTEST" >/dev/null
     772    . ${SCRIPTDIR}/testrun_2h.sh
    762773    let "TEST_MAX = TEST_MAX + MAXTEST" >/dev/null
    763774    #
     
    854865    MAXTEST=${TEST_MAX}; export MAXTEST
    855866    testrun2g $hostname
     867    #
     868    . ${SCRIPTDIR}/testrun_2h.sh
     869    MAXTEST=${TEST_MAX}; export MAXTEST
     870    testrun2h $hostname
    856871    #
    857872    print_summary
  • trunk/test/testrun_1i.sh

    r550 r561  
    244244    fi
    245245    if [ -z "$SIGNIFY" ]; then
    246         log_skip 1 $MAXTEST 'gpg not found in $PATH'
    247         log_skip 2 $MAXTEST 'gpg not found in $PATH'
    248         log_skip 3 $MAXTEST 'gpg not found in $PATH'
    249         log_skip 4 $MAXTEST 'gpg not found in $PATH'
     246        log_skip 1 $MAXTEST 'signify not found in $PATH'
     247        log_skip 2 $MAXTEST 'signify not found in $PATH'
     248        log_skip 3 $MAXTEST 'signify not found in $PATH'
     249        log_skip 4 $MAXTEST 'signify not found in $PATH'
    250250    else
    251251        eval "ls ~/.signify/samhain.pub >/dev/null 2>/dev/null"
Note: See TracChangeset for help on using the changeset viewer.