(gdb) bt full #0 0x00007faad1d93b85 in _gcry_md_block_write (context=0x619078, inbuf_arg=, inlen=) at /var/tmp/portage/dev-libs/libgcrypt-1.7.6/work/libgcrypt-1.7.6/cipher/hash-common.c:148 inbuf = hd = 0x619078 stack_burn = 0 blocksize = 64 inblocks = __FUNCTION__ = "_gcry_md_block_write" #1 0x00007faad1d8c30f in md_write (a=0x6198f0, inbuf=inbuf@entry=0x411c91, inlen=inlen@entry=8) at /var/tmp/portage/dev-libs/libgcrypt-1.7.6/work/libgcrypt-1.7.6/cipher/md.c:609 r = 0x619060 __FUNCTION__ = "md_write" #2 0x00007faad1d8cf55 in _gcry_md_write (hd=, inbuf=inbuf@entry=0x411c91, inlen=inlen@entry=8) at /var/tmp/portage/dev-libs/libgcrypt-1.7.6/work/libgcrypt-1.7.6/cipher/md.c:621 No locals. #3 0x00007faad1d8fb16 in openpgp_s2k (keybuffer=0x7fff0bb5be50, keysize=16, iterations=137438953472, saltlen=8, salt=0x411c91, hashalgo=2, algo=19, passphraselen=16, passphrase=0x411c9a) at /var/tmp/portage/dev-libs/libgcrypt-1.7.6/work/libgcrypt-1.7.6/cipher/kdf.c:84 len2 = 24 count = 58301536232 ec = GPG_ERR_NO_ERROR key = 0x7fff0bb5be50 "\212\351\tx\246\355\243\037~m@B\237\246(\330\003" i = md = 0x6198f0 pass = used = #4 _gcry_kdf_derive (passphrase=passphrase@entry=0x411c9a, passphraselen=16, algo=algo@entry=19, subalgo=subalgo@entry=2, salt=salt@entry=0x411c91, saltlen=saltlen@entry=8, iterations=iterations@entry=137438953472, keysize=keysize@entry=16, keybuffer=keybuffer@entry=0x7fff0bb5be50) at /var/tmp/portage/dev-libs/libgcrypt-1.7.6/work/libgcrypt-1.7.6/cipher/kdf.c:274 ec = #5 0x00007faad1d771e6 in gcry_kdf_derive (passphrase=passphrase@entry=0x411c9a, passphraselen=, algo=algo@entry=19, hashalgo=hashalgo@entry=2, salt=salt@entry=0x411c91, saltlen=saltlen@entry=8, iterations=iterations@entry=137438953472, keysize=keysize@entry=16, keybuffer=keybuffer@entry=0x7fff0bb5be50) at /var/tmp/portage/dev-libs/libgcrypt-1.7.6/work/libgcrypt-1.7.6/src/visibility.c:1291 No locals. #6 0x0000000000403663 in hash_passphrase (passphrase=passphrase@entry=0x411c9a "123456789abcdef0", hashalgo=hashalgo@entry=2, s2kmode=s2kmode@entry=3, s2ksalt=s2ksalt@entry=0x411c91 "saltsalt", s2kcount=s2kcount@entry=137438953472, key=key@entry=0x7fff0bb5be50 "\212\351\tx\246\355\243\037~m@B\237\246(\330\003", keylen=keylen@entry=16) at protect.c:1410 No locals. #7 0x00000000004036d1 in hash_passphrase (keylen=16, key=0x7fff0bb5be50 "\212\351\tx\246\355\243\037~m@B\237\246(\330\003", s2kcount=137438953472, s2ksalt=0x411c91 "saltsalt", s2kmode=3, hashalgo=2, passphrase=0x411c9a "123456789abcdef0") at protect.c:116 No locals. #8 calibrate_s2k_count_one (count=137438953472) at protect.c:158 keybuf = "\212\351\tx\246\355\243\037~m@B\237\246", starttime = {ticks = 3} #9 0x0000000000403773 in calibrate_s2k_count () at protect.c:176 count = 137438953472 ms = #10 0x0000000000403fa3 in get_standard_s2k_count () at protect.c:207 count = 0 #11 do_encryption (timestamp_exp_len=35, use_ocb=0, s2k_count=0, resultlen=, result=, timestamp_exp=0x7fff0bb5bfb0 "(12:protected-at15:20170303T173603)\v\377\177", passphrase=0x411484 "passphrase", protlen=355, protbegin=0x411579 "(1:d128:\az\323\336(BE\364\200j\033\202\267\236ao\275\350!\310-i\032ef^W\265\372\323\363Ng\364\001\347\275.(i\236\211\331Ėς\031E\256\203\254z\022\061\027j\031k\246\002~w\330W\211\005]P@Jz*\225\261Q/\221\361\220\273\256\367\060\355U\r\"}Q/\211\300ͳ\032\300o\251\241\225\003\335\366\266m\vB\271i\033\375a@\354\027 \377Ċ\340\f4ymș\345)(1:p65:", hashlen=510, hashbegin=0x4114df "(3:rsa(1:n129:") at protect.c:419 key = 0x619040 "8\v\265Ѫ\177" keylen = 16 hd = 0x618260 blklen = modestr = iv = 0x618ad0 "\371C(\317\323nwвb\222Z\035 ԫA\037\017\062\346D\263k\037\377Itw\366\211m\035\346\016R\362u\334p\241\002" s2ksalt = 0x618af0 "\035\346\016R\362u\334p\241\002" rc = outbuf = 0x618920 "\350\020\265Ѫ\177" saltpos = 0 hashvalue = ivsize = ---Type to continue, or q to quit--- ivpos = -773449272 encpos = 32682 enclen = 400 outlen = 412 p = #12 agent_protect (plainkey=0x4114d0 "(11:private-key(3:rsa(1:n129:", passphrase=0x411484 "passphrase", result=result@entry=0x7fff0bb5c0d0, resultlen=resultlen@entry=0x7fff0bb5c0d8, s2k_count=s2k_count@entry=0, use_ocb=0, use_ocb@entry=-1) at protect.c:685 rc = parmlist = prot_from_idx = prot_to_idx = s = 0x4116de "" hash_begin = 0x4114df "(3:rsa(1:n129:" hash_end = prot_begin = 0x411579 "(1:d128:\az\323\336(BE\364\200j\033\202\267\236ao\275\350!\310-i\032ef^W\265\372\323\363Ng\364\001\347\275.(i\236\211\331Ėς\031E\256\203\254z\022\061\027j\031k\246\002~w\330W\211\005]P@Jz*\225\261Q/\221\361\220\273\256\367\060\355U\r\"}Q/\211\300ͳ\032\300o\251\241\225\003\335\366\266m\vB\271i\033\375a@\354\027 \377Ċ\340\f4ymș\345)(1:p65:" prot_end = 0x4116db ")))" real_end = 0x4116dd ")" n = c = infidx = i = timestamp_exp = "(12:protected-at15:20170303T173603)" protected = 0x0 protectedlen = 0 depth = 0 p = have_curve = __PRETTY_FUNCTION__ = "agent_protect" #13 0x0000000000403383 in test_agent_protect () at t-protect.c:196 i = 1 ret = key_rsa_valid = {string = 0x4114d0 "(11:private-key(3:rsa(1:n129:"} key_rsa_bogus_0 = {string = 0x4116e0 "(11:private-key(3:rsa(1:n129:"} key_rsa_bogus_1 = {string = 0x4118f0 "(11:private-key(3:rsa(1:n129:"} key_ecdsa_valid = { string = 0x411af8 "(11:private-key(5:ecdsa(5:curve10:NIST P-256)(1:q65:\004dZ\022o\206|C\207+|\257w\376\330\"1\352扟\252\352c&\274I\355\205\306\322ɋ8\322xu\346\034'W\001š\343\371\037\276\317\301rs\376\244X\266j\222}3\035\002\311\313\022)(1:d33:"} specs = {{key = 0x412e8f "", passphrase = 0x411484 "passphrase", no_result_expected = 1, compare_results = 0, result_expected = 0x0, resultlen_expected = 0, ret_expected = 83, result = 0x0, resultlen = 0}, {key = 0x4114d0 "(11:private-key(3:rsa(1:n129:", passphrase = 0x411484 "passphrase", no_result_expected = 0, compare_results = 0, result_expected = 0x0, resultlen_expected = 0, ret_expected = 0, result = 0x0, resultlen = 0}, {key = 0x4116e0 "(11:private-key(3:rsa(1:n129:", passphrase = 0x411484 "passphrase", no_result_expected = 0, compare_results = 0, result_expected = 0x0, resultlen_expected = 0, ret_expected = 83, result = 0x0, resultlen = 0}, {key = 0x4118f0 "(11:private-key(3:rsa(1:n129:", passphrase = 0x411484 "passphrase", no_result_expected = 0, compare_results = 0, result_expected = 0x0, resultlen_expected = 0, ret_expected = 83, result = 0x0, resultlen = 0}, { key = 0x411af8 "(11:private-key(5:ecdsa(5:curve10:NIST P-256)(1:q65:\004dZ\022o\206|C\207+|\257w\376\330\"1\352扟\252\352c&\274I\355\205\306\322ɋ8\322xu\346\034'W\001š\343\371\037\276\317\301rs\376\244X\266j\222}3\035\002\311\313\022)(1:d33:", passphrase = 0x411484 "passphrase", no_result_expected = 0, compare_results = 0, result_expected = 0x0, resultlen_expected = 0, ret_expected = 0, result = 0x0, resultlen = 0}} __PRETTY_FUNCTION__ = "test_agent_protect" #14 0x0000000000403075 in main (argc=, argv=) at t-protect.c:330 No locals. (gdb)