std::hex is not your friend. And NEVER CROSS THE STREAMS. local_cpptest
authorKrista Bennett <krista@pep-project.org>
Wed, 09 May 2018 12:54:56 +0200
branchlocal_cpptest
changeset 2670b8fd84950de1
parent 2669 1b103e8a95f7
child 2671 9c3eff7e7b54
std::hex is not your friend. And NEVER CROSS THE STREAMS.
test/include/pEpEngine_test.h
test/msg_2.0.asc
test/src/engine_tests/EncryptForIdentityTests.cc
test/src/engine_tests/ExternalRevokeTests.cc
test/src/engine_tests/MessageTwoPointOhTests.cc
     1.1 --- a/test/include/pEpEngine_test.h	Wed May 09 11:39:10 2018 +0200
     1.2 +++ b/test/include/pEpEngine_test.h	Wed May 09 12:54:56 2018 +0200
     1.3 @@ -1,3 +1,3 @@
     1.4  #include <iomanip>
     1.5  
     1.6 -#define ASSERT_STATUS(status) { cout << setfill('0') << "status: 0x" << hex << setw(4) << status << "\n"; assert(status == PEP_STATUS_OK); }
     1.7 +#define ASSERT_STATUS(status) { cout << setfill('0') << "status: 0x" << hex << setw(4) << status << "\n"; assert(status == PEP_STATUS_OK); cout << std::dec }
     2.1 --- a/test/msg_2.0.asc	Wed May 09 11:39:10 2018 +0200
     2.2 +++ b/test/msg_2.0.asc	Wed May 09 12:54:56 2018 +0200
     2.3 @@ -6,82 +6,82 @@
     2.4   <three-OMGWTFBBQ.edfddffd839274982347239847@pep-project.org>
     2.5  X-pEp-Version: 2.0
     2.6  MIME-Version: 1.0
     2.7 -Content-Type: multipart/mixed; boundary="7fc8987062b7a13c4b986b451a1122ba"
     2.8 +Content-Type: multipart/mixed; boundary="43e2fc7177684651465b76b023683ead"
     2.9  
    2.10 ---7fc8987062b7a13c4b986b451a1122ba
    2.11 +--43e2fc7177684651465b76b023683ead
    2.12  Content-Type: text/plain; charset="utf-8"
    2.13  Content-Transfer-Encoding: quoted-printable
    2.14  Content-Disposition: inline; filename="msg.txt"
    2.15  
    2.16  this message was encrypted with p=E2=89=A1p https://pEp-project.org
    2.17 ---7fc8987062b7a13c4b986b451a1122ba
    2.18 +--43e2fc7177684651465b76b023683ead
    2.19  Content-Type: application/pgp-encrypted
    2.20  
    2.21  Version: 1
    2.22 ---7fc8987062b7a13c4b986b451a1122ba
    2.23 +--43e2fc7177684651465b76b023683ead
    2.24  Content-Type: application/octet-stream
    2.25  Content-Disposition: attachment; filename="msg.asc"
    2.26  
    2.27  -----BEGIN PGP MESSAGE-----
    2.28  
    2.29 -hQEMA1oCBdlzCD9NAQf+K3rqpYDR+0+599UjAf8bkZfzpKWIQEPhnuQzTxP5xogJ
    2.30 -6Boi1pDuwKfa3bX5yJmKaSOuicYlYzxB+bk6/wzl1MyWddkjFoeaHw+zAxlOHpQF
    2.31 -h57crYrkIPp+vb4ZvmOFGOkQHCR/OGh9H6VOBXJM7YhwPO79rFsVEaKLjByoniWI
    2.32 -k9E8oK7FcvJTwFjtx129UdwYhF0x8lA1I1KpKRzFqGyGRMAXdzLyRO57r6Kf7PGi
    2.33 -5j0aXCq9rTjl0VKFGwP1JoZw77HHRwZuKY8prk5GQwji9rglbxr694MmGfJ49wXF
    2.34 -CmEC5R737fmXn7cstfx/mlSLpxxU7dytGxGb05xTGoUBDAOo6/9vKSPoQgEH/jO1
    2.35 -Pv1UniHL+ejAFPGe+KXNkq496xwj7C4xZn3Qe3oTDGENWQLXIMLEMBi3QQGZLiz0
    2.36 -SAmyPZafXezmdFH9gTc5WKUwXqlDRUj7r0PEC3U5ExmfvVTDzcqDR2nSxhvULbvY
    2.37 -bK1YFwcyqcD7Cgk/XDb9LKFe9TZ/le1EAjWR7ivLbwvtDgoU5RpaThwQg2Zb9xpc
    2.38 -GShQFFqIlpUe+/OUOCFmraZapWnSkvtqiaLj/YMMjXq1GTksHkMXhPRIbcqwbdAj
    2.39 -mFrBtLmKKpo2+tS8N3gZjnw/55rcSte3d+E5RaFXihzpGmcFjF8269sfuIQaZp/t
    2.40 -eFoLaF/aAYGr/pnaLcfS6wFTYpFICGyWRDSYd+TlLIpsq9sciSzDgJtUlHzhMdHX
    2.41 -TthwPH+IwQQst3spfF5xf7yJ+VPAOBdiHVJM5O7L/E6Gtb5lWyOWDHuIr+tF9Hdl
    2.42 -tStyuG5SSiQdvhNQQYbLCQozGL9itN1WWQ0HjeGxeq7ml2iVhDEp1FChwmk8wW5b
    2.43 -U2iKZM99OKB01JoHlFBNrWVwBHZhFU3C7QVgv9njNkhiayDUhXQscrdSfeGBjURy
    2.44 -fvYFTFnwLPqk/aa7Yttz4by7FzQWF7jx13KGE8bic7rBDThu8YvMFDYRvEksfcZI
    2.45 -gIuhehAM9SNDUpFd2o3sFMj5E6zhxRDUsA4yt5LtmTBkrlt7zAGavRdkpaGwarVN
    2.46 -bU+vgQRXwg45WakVeBWeOVbj1XuRV5q2sT+OEcyCpIHo1pjHcd+ZzEPMWWQ+iAfh
    2.47 -nD5UHPCrZUvY2/v5UQkoguvAtz+3P6Pc2HBwnZ4oU7JRqFDoSE1q6YSG6SWmzdfE
    2.48 -N7A4JEiCOCSraKd+AhWsPAlb6XcUR0LJdt27B9EvrilWDztpIbsS4bp5WiwWWE9z
    2.49 -7Cbq22xVJx/Z/GTsQfUywuiv6naTy6zQceVMTLGYNPmLpFG6AYC7B0QM92GwJl3h
    2.50 -fh3IvcwBvjnxbRlbtzbMxdroPPJKr/z31xgVCnwgeTKteSGR/87RUVyusWQgFTGH
    2.51 -oRAqrBje8lpMWzuCFo0J1c+FDWW9uKlDcenMGufzrTaaVOILjF7nqG9S44mH8b6/
    2.52 -QvbPDMHrLe08YbOKM+DWxHmi1H5xS6HanvmLnX86LXUzbAOJNkBQybjbCt+AHvMA
    2.53 -SzMUesKv9rMXpZ43wN5OPREAaalp3xFezJi9aGGZecU4ugS3PY5DAAm/CQUs3gTw
    2.54 -SroB7o6Pn4g1dByjPrs9o6Vk8XqmLisJ5KAdWSfDlzNAnSgNvxgBPGy9eSNBvPPa
    2.55 -JKlrw/1KyOI40RRgfaDQdR7tMIyecwSNMQIR09Annr5AoS3T/HB8fxl8I3njnfCJ
    2.56 -CoGkX1BH0NAN9X891bk/h5MqRIQ6UeY80SZR//rAYBpElwSZxbrKs5/82e6bOv47
    2.57 -O2p2iPzGB5yQlk2oXabq23JuHaCo3vjbNTsUP3P3jOc7sEfx9a45+7S6GaUORwJb
    2.58 -4xLeWQTCI63T1/B7BHCLtcSlFbAiMPUpXsBjd69mgo/1NTgOkfez+Csqkk9PThLQ
    2.59 -q/Zc7M1DHG1/mzlNIIdG0miHIsSpIuuXIjtenCQGj+nS4yMuy3mlgXyyQwYT6Q5u
    2.60 -vn4Y8be06skAJYwgD3Lpskd/aGJaE5qoIDeHpcFvp71HHPPARE6ZQIqNYLGYvCEt
    2.61 -Mv+7ouvKQzFu6hMqpvHWn8FqrANoM9r7j51SjIIyg877q1r7pYLNASITvdbf5RmX
    2.62 -lyALr5VH8mgerbdupnvtfbpnOBVAB0eJbux83j0xCCRo2ajH9MHSFOiPLLon9XlW
    2.63 -8ePi6ThjVejbn8MOIyzJIaNPcWvq2oe95cv645s/+8mVhoZRlDXlPcqcfoUhVNfr
    2.64 -CW6tNdo/3Nea2jmIbbgELUlM2zEWJJp9PnpV7IDsWX+DHZGdrhL9DD95Nz2+7i5S
    2.65 -TifPH6hGuzyuroZb5VuivS5uZmP6IJesSa2lnAwYnqtp3CC3eFJW+sWZatZElkmW
    2.66 -Skd+YBfqulxaIKOuRD9DhveD0yfntg+mLiNdkYkOo+Co0XO52y3hUWV6igNJGmo/
    2.67 -REwenK8QdGXQSUcga0zRtUJCjaq0qY+5lrz54CcEDoa7FJ6HrVbUeAj/2Dc7ncUA
    2.68 -Gw4tIz6BLfKlb0tU64bldzDHyh0205IEj2mQi91yFUKjtvNH29eblovCivFlnLRo
    2.69 -yjlOINSsQRSziUwLY5ydmSdLbxaveqQnAYqrHw3avGcpnirdtbf/qYQvhIy5AhwM
    2.70 -UECMDFJRlF/Ty8paaKjJv74aJoPF+TY3kGfkzsPTjhLTDRC8n5s6Vtu/lUuTYTaL
    2.71 -KRF/T0FdmN+sAMt2hoBMiZh7CjK5bryyNMJPsZvb6uvj3Den+wwigGXjn15NKanO
    2.72 -JX5/c2oCPi+HXLef2xOao62mp9nq3rkfG4TqQ1dmTAXAVeyoajhzCBzjcBj7tRmW
    2.73 -mrMD7M+iEXl8Qh5dFw8XCP+NITMAn0W+4vXlO2v5wKm3qQwzcx1BKg4EXQAxvBRm
    2.74 -g3UaTS+kWTKA7fuGb2vC3vKNshlOCZWZohuMh7wH8rZHdLyzZDQQtynpnOJjyEZD
    2.75 -mdEHQzMuuTwvCAj0Op0nkuaA3PUZb5Kb6A3UpBjVPuug7GMwmzBLKmcvWWF9fA2C
    2.76 -kPMhHdJgcbx0TFPMMLb/MnZ0/i58GY2sSnvt+XGVJi7HFps3n3akvJlasTiU9Uph
    2.77 -i/tW8daU3tJjXp0lynepQYeB7xYKrZfCK4aGvc5oljFDy04F6B+wZIczfmoO7ufo
    2.78 -YKOhfrSqUIt6y50vNHViT0ld0GybIHDYbFZAmoEPzNtrHD0bTIgMCcmm4VYVzyOs
    2.79 -SQmL354qJG0J8HThuQV7BfRTz3d+vtwWyQSUzQzR57IUDQswInTN3SfXMzxJMz+j
    2.80 -wfw9zpjCxhRxFuqeon7ZqHaXV3l/ToWFvhqbLU/vaYDcznVte8EPrXjM5SD4yv6M
    2.81 -2ik+74rpUNmEi3BNU1J4KYPJxmjfwhGCasDjB6QZUGPl6f8xNGX3jcieOsNPeCSU
    2.82 -w19CBCB4SyHd6EUwV9KNMs9lR3J9+7Gm3YWUk9V0fVXfVyGR1Wb0zIaU6icVslNP
    2.83 -csDxzocCGyNRcXZxH+9ydIvutu+2rpuaNmqky7AIwryle04qIhgSxxwd1GVn5ZFk
    2.84 -LPFcDwTkyRP9HHEPtNWmgCw720E1g0xwEB/nN2WJtMir13nH7AI5WP3XnUskqEii
    2.85 -cIe1KLyyMKh2HkpX4bwOQg+3+w==
    2.86 -=bxby
    2.87 +hQEMA1oCBdlzCD9NAQf9H5QPaNznfVXLHIBICOdtFARFM9Cw3teFa5vsAcbM97oD
    2.88 +YsDDUKrNc62R+vQDIG8McIJ1SPstSwdm9Z4duSOnaUM1aNfr38n+pgtl0vD8XJdQ
    2.89 +UXCXrsa/q4I0VqEMbI+HVkG8EDizj/dOQiufKte16+5UlJG17voCH0FuCE2m5yHT
    2.90 +FAQgm6QFID3cn68yKH8aAypgXEchrErCfhrzgP8Eu0qFudU41rY5KC9XGYjKJrNF
    2.91 +6T8Lsfx2OVV3ZYlT5PVvro+8RUBZ3p6eQhUt1QKCztL4dD5zemXxIWRKKZSKaeuO
    2.92 +V90tYALe7JJ6cxttWw30NOJuroKjefK03alH/jmqvYUBDAOo6/9vKSPoQgEH/3or
    2.93 +mKeGtovRol7iCBWUN4NjZ0gl0jJKXy4EqIQfLNvmz0PwHo2R5hSyic7/i4qNNHPL
    2.94 +Tci7bsuIG0Z6NVPoB9nYgmkkBPtIguLprGZQGYcntxyS0WpQSABBN5ykg61Q6pFW
    2.95 +ZpDxBWX7DJVEKI8Khby2y2KAoTspmgZjOqEg5c7ZosQqws/WXMu/07c9JEYDfUbL
    2.96 +bKsFJIAERwqZyPSenCM3QfgEB56M7nCLIdUKaGqY83CeU8eqHqtSiMHcR9TYbyr4
    2.97 +hoKeXtb82hy5TloyQ6v5mcsAuJMtyDZsQ7yKIynq0KKY0MVRsJtWsfkBv/b1Qxjz
    2.98 ++uIUSI5kJM0va/THGgrS6wEjj+5jqC527FbMlgRaps9rVmDOwbKCIon9oa23kfl/
    2.99 +CFtfv3gLBDmBG3pNWsR15872IcSCuzNR8R/g3eW8ovLjI/utxxAp9vbOZg81pWLS
   2.100 +qQFirPyJOQIQtd9Ja5R6IPC758Z+dM+6DhAMDnkpImgO3bFcA/VXDNwBoyW1MDYZ
   2.101 +LMCWkrMRW9GCd+Thqxk8tR5GCTWfA70PYlDMOyas5RD6FYg8dcb6gUbg6o2Y7ygX
   2.102 +xQJM4XN/tbke+9Pic9am9AbGXY3XjrKn7iFoHi3XNUHQ5PRx7lzNWbyCpOTiPrhP
   2.103 +c/06G6a6tqUSjqmQeOvE9anluuibAJGScOw+uR3erl2RCvlGnBt/PHjTByEudfkV
   2.104 +rwGS98AviYANJmP2YJOWPeD+ehp6w1Ijl/D8YJkaY5lsdrTJNwDmKSZ5Bml/U0pY
   2.105 +F/rRCad1FuVHJ3BWF4Wq3z9NdEyvgL72cO1Z3Tbz1fs4y7zKwTAmaYk6Q7j0FP/l
   2.106 +SLVsCji9eS7qCFQ15hj3aUmpDwDJ+WcUpiBRn25pYLHPE+8tvEvQpDCCjc8DSNjY
   2.107 +qzRQp7EAWeOiOYcno6DJPQGi34HPrwOqbaQx0ApLu6NnVPInVxiv6J6jL1L67cN/
   2.108 +8/CtqLZugkOp9TAqy3RQfDCyN9uyUZ0U0uB7jsDvpmV71SF17uLZGgnQamMh6kGy
   2.109 +Q2iKY29OCHLNibLpY7L/v/riyeS9AA1A9dPVi8UF3AZH6XkTcPC+wH7nICWV11gN
   2.110 +kWkMd7mRhADEEqqvFODkfl6AIrlByAAODx9VDHZcPWaWpYsFm8uV91qtx9PzSpa8
   2.111 +0lAfefq0Sv5EdmaEDDuMlP//S2PLdma7U2ZMOIb/Udf4AbSfYlejw0i0fTJc53ik
   2.112 +7tybNwjCTz+kZipNcCE50k/y8hWdV6Rs8FCot8qZKpNfF3VZSjXOlhoIlxFrViwU
   2.113 +NZvNI+9Vj12qZQlAR7XjdFGxVj1GnM3rh06lwmuhcmbg9SKMFc8tXsUzlooic0O2
   2.114 +LjDAw4TkF9oAQQTJKWKzMEPUQyj9vCWqUqQR6Dc/f/F3yRQQKRzFxuBaO4b3AE52
   2.115 +KhYlTQFzrHQq86Q+CQBT8b5iB2zw44fkzA1H1RUGXFzcR1x7t7MeYTw2ycXlKTN1
   2.116 +jZF2vhKLqAy1bEK+uqsUIQHoVjbNBaRdfRmA6Jhg8JQT/D4AkVY7y8G3Vl3iOxql
   2.117 +6moNKlL+8EgWwjL5trfpvrOTGiZF73F/mWvbF6pejYoZXkMABAS0ONDPwF5bQYHJ
   2.118 +7H+sepYNjShcG0qF6o+2xnIt2ujWOXnmimgEp1InYtuvb9vV2cFBi01DKTBg2kBj
   2.119 +saD2u/uvKwr1rQK9vAFfOSTMXM27Ce5Xxwt+kDuQAUS1rV8dSWCyAqIqGrlBejEj
   2.120 +cR+IUUWxTZPZG37bDIbuVLxvss+ABV2/PN1500dXC9TYWkYvoKu+GqIt/lZEeZDz
   2.121 +qzQXmYqyRyTafbSS2XIWoF1/LsIMvyMC92UWNYLCZ6OCYdQuSx2405E+nrqnAShD
   2.122 +/Ki2ZTsUf92dcVaAwk5nIaow4NDsOKaXqwTeybKxYsg6ybFWfIpXqO2o9f2F+UiS
   2.123 +MyCfN+z3oiV/cJ6BA8B0VOmcqAQy7Mn2WJikb3XonbJcfXBphHA4atjZL2Ie0OQo
   2.124 +IcA6mT5ITF5sejjDWrbjClZr6q6RZE3yHP03HFzLarxbtbo0WiOOApiMWxcPS3Xy
   2.125 +vSzwfNnpmqHb09TV8ta/vmbZCZ+qH8uKV3cIWJKeDUN6zn6K5RbwlyQ1igprBdwX
   2.126 +tRNj2t+Km4l5VFts5mH6oQS1LwKlItJ2bUnyB1OTsn/53uYAvMI2GkN1Q79skw98
   2.127 +qVHg6fEBjvCVqBOhWusdTieIG2+Sh4xoNANYbwhkaoXqr4FKg+tcXbX69shQKfxI
   2.128 +GsezytNwut4VYxF6b/5LAtXvdgSeaqNak18uLz1+4gr8DAhQmpo8G2Ecdh4EswX0
   2.129 +v10e3gHyMhgiDTrx7zChwFtFu6aPTPm+Ukjbz9iB/YGt6fWTqQGUuscnEZ/gve48
   2.130 +vlWNOgLPjHZAOJagwz7VhGPUPqyX1oMNUOwUtQY8uWa3iGStUnh97yrYHJIlVhZF
   2.131 +FHwPiEx5EVr8I+d8lUEMD/i6Ecq+pwHC0INEYZ9BJCIX0mUubVcRFBuP0G1pWaXf
   2.132 +8DIRm7jdprsZcFdtlhEs5ZLPUINf61JN+1wsu260sN+ZY6nXun7lixOaVdkaDD8k
   2.133 +O66QT7zWUPaGir0+PxJPjA2yhQGbZ2Wv6DwROczSUnEajPa5Q/ZqplEdXH/jMCAU
   2.134 +P7yDOfMF6Aq+E8yMOYjn2MH8sesPK0YajuAAr2mbEODFYym73wCiLOSXx4/cRwM+
   2.135 +Afm+sDHufGhnYc59JeQoa2GjvXfTe5z8zdTCzO7sWQfkK6gLaA2XCs4ZT4Oz446C
   2.136 +10XgSR1I7WUMB8s2Azugq6mmcqBWIJnG6Wc4dljA11aqKoEnbWSMEnfUjjaXvt2d
   2.137 +4LOsCJwPwr5FAaeZTwoUgGjRrTpizyxlExHWEttmCyYeNV8AldAl8Z39WSAXddfI
   2.138 +L8HkmTJo2EaS85DXlKTGhZ562UL6WyErfQLld8lKaJFin47cBfkfbvEqOGyZDt1Y
   2.139 +0Ue9HbmuvXAyY0Ny4Vvl5pm6Q7WbkQhlHvOsX5aNUQ9+UEmTeEb/so3ASglY+iod
   2.140 +FAmUZL5u4qhswwiPQZ6Rvoj+UNzPmJjtPLWd4eJ7qf1oDHkkEQ5gDk8rq+Piikm0
   2.141 +bkCTwS49KBHAAogjlt74Dab2t3ZwsR6rLVNz3x5jVLEv4Ja7VbsY6bc1/N4ZzgE1
   2.142 +xXlllax6LbkrIGM8zVNj8JSrvkdHzQKgln/4nK8Dp0RcOe7mV5fPLjR4ZBgDPNRF
   2.143 +tjGdbhhXfNojQNxf8yEo
   2.144 +=ZpCr
   2.145  -----END PGP MESSAGE-----
   2.146  
   2.147 ---7fc8987062b7a13c4b986b451a1122ba--
   2.148 +--43e2fc7177684651465b76b023683ead--
     3.1 --- a/test/src/engine_tests/EncryptForIdentityTests.cc	Wed May 09 11:39:10 2018 +0200
     3.2 +++ b/test/src/engine_tests/EncryptForIdentityTests.cc	Wed May 09 12:54:56 2018 +0200
     3.3 @@ -82,7 +82,7 @@
     3.4      message* encrypted_msg = nullptr;
     3.5      cout << "calling encrypt_message_for_identity()\n";
     3.6      status = encrypt_message_for_self(session, alice, outgoing_message, NULL, &encrypted_msg, PEP_enc_PGP_MIME, PEP_encrypt_flag_force_unsigned | PEP_encrypt_flag_force_no_attached_key);
     3.7 -    cout << "encrypt_message() returns " << std::hex << status << '.' << endl;
     3.8 +    cout << "encrypt_message() returns " << tl_status_string(status) << '.' << endl;
     3.9      TEST_ASSERT_MSG((status == PEP_STATUS_OK), "status == PEP_STATUS_OK");
    3.10      TEST_ASSERT_MSG((encrypted_msg), "encrypted_msg");
    3.11      cout << "message encrypted.\n";
    3.12 @@ -152,7 +152,7 @@
    3.13  
    3.14      cout << "calling encrypt_message_for_identity()\n";
    3.15      status = encrypt_message_for_self(session, alice, outgoing_message, extra_keys, &encrypted_msg, PEP_enc_PGP_MIME, PEP_encrypt_flag_force_unsigned | PEP_encrypt_flag_force_no_attached_key);
    3.16 -    cout << "encrypt_message() returns " << std::hex << status << '.' << endl;
    3.17 +    cout << "encrypt_message() returns " << tl_status_string(status) << '.' << endl;
    3.18      TEST_ASSERT_MSG((status == PEP_STATUS_OK), "status == PEP_STATUS_OK");
    3.19      TEST_ASSERT_MSG((encrypted_msg), "encrypted_msg");
    3.20      cout << "message encrypted.\n";
    3.21 @@ -207,7 +207,7 @@
    3.22      
    3.23      cout << "calling encrypt_message_for_identity()\n";
    3.24      status = encrypt_message_for_self(session, alice, outgoing_message, extra_keys, &encrypted_msg, PEP_enc_PGP_MIME, PEP_encrypt_flag_force_unsigned | PEP_encrypt_flag_force_no_attached_key);
    3.25 -    cout << "encrypt_message() returns " << std::hex << status << '.' << endl;
    3.26 +    cout << "encrypt_message() returns " << tl_status_string(status) << '.' << endl;
    3.27      TEST_ASSERT_MSG((status != PEP_STATUS_OK), "status != PEP_STATUS_OK");
    3.28  
    3.29      free_message(outgoing_message);
     4.1 --- a/test/src/engine_tests/ExternalRevokeTests.cc	Wed May 09 11:39:10 2018 +0200
     4.2 +++ b/test/src/engine_tests/ExternalRevokeTests.cc	Wed May 09 12:54:56 2018 +0200
     4.3 @@ -115,7 +115,7 @@
     4.4      
     4.5      status = get_trust(session, recip1);
     4.6      
     4.7 -    cout << "Recip's trust DB comm_type = " << hex << tl_ct_string(recip1->comm_type) << endl;
     4.8 +    cout << "Recip's trust DB comm_type = "  << tl_ct_string(recip1->comm_type) << endl;
     4.9      TEST_ASSERT_MSG((recip1->comm_type == PEP_ct_OpenPGP), "recip1->comm_type == PEP_ct_OpenPGP"); // FIXME: PEP_ct_pEp???
    4.10  
    4.11      // decrypt message
    4.12 @@ -200,7 +200,7 @@
    4.13      status = get_trust(session, recip1);
    4.14      recip1->fpr = NULL;
    4.15  
    4.16 -    cout << "Recip's trust DB comm_type = " << hex << tl_ct_string(recip1->comm_type) << endl;
    4.17 +    cout << "Recip's trust DB comm_type = " << tl_ct_string(recip1->comm_type) << endl;
    4.18      TEST_ASSERT_MSG((recip1->comm_type == PEP_ct_unknown || recip1->comm_type == PEP_ct_key_revoked), "recip1->comm_type == PEP_ct_unknown || recip1->comm_type == PEP_ct_key_revoked");
    4.19  
    4.20      free_message(decrypted_msg);
    4.21 @@ -254,7 +254,7 @@
    4.22      
    4.23      status = get_trust(session, recip1);
    4.24  
    4.25 -    cout << "Recip's trust DB comm_type (should be unknown, as we're using a keyring-only key, not in DB) = " << hex << tl_ct_string(recip1->comm_type) << endl;
    4.26 +    cout << "Recip's trust DB comm_type (should be unknown, as we're using a keyring-only key, not in DB) = "  << tl_ct_string(recip1->comm_type) << endl;
    4.27      TEST_ASSERT_MSG((recip1->comm_type != PEP_ct_OpenPGP_unconfirmed), "recip1->comm_type != PEP_ct_OpenPGP_unconfirmed");
    4.28  
    4.29      // decrypt message
    4.30 @@ -284,7 +284,7 @@
    4.31      
    4.32      status = get_trust(session, recip1);
    4.33      
    4.34 -    cout << "Recip's trust DB comm_type (should be unknown - there's nothing in the DB) = " << hex << tl_ct_string(recip1->comm_type) << endl;
    4.35 +    cout << "Recip's trust DB comm_type (should be unknown - there's nothing in the DB) = "  << tl_ct_string(recip1->comm_type) << endl;
    4.36      TEST_ASSERT_MSG((recip1->comm_type == PEP_ct_unknown), "recip1->comm_type == PEP_ct_unknown");
    4.37  
    4.38      free_message(encrypted_outgoing_msg);
     5.1 --- a/test/src/engine_tests/MessageTwoPointOhTests.cc	Wed May 09 11:39:10 2018 +0200
     5.2 +++ b/test/src/engine_tests/MessageTwoPointOhTests.cc	Wed May 09 12:54:56 2018 +0200
     5.3 @@ -93,7 +93,7 @@
     5.4      cout << "calling encrypt_message\n";
     5.5      status = encrypt_message(session, outgoing_message, NULL, 
     5.6          &encrypted_msg, PEP_enc_PGP_MIME, 0);
     5.7 -    cout << "encrypt_message() returns " << std::hex << status << '.' << endl;
     5.8 +    cout << "encrypt_message() returns " << tl_status_string(status) << '.' << endl;
     5.9      TEST_ASSERT_MSG((status == PEP_STATUS_OK), "status == PEP_STATUS_OK");
    5.10      TEST_ASSERT_MSG((encrypted_msg), "encrypted_msg");
    5.11      cout << "message encrypted.\n";