@@ -148,25 +148,20 @@ byte_vector FinEIDv3::sign(const HashAlgorithm hashAlgo, const byte_vector& hash
148148
149149 if (response.sw1 == ResponseApdu::WRONG_LENGTH) {
150150 THROW (SmartCardError,
151- " Wrong data length in command COMPUTE SIGNATURE argument: "
152- + bytes2hexstr (response.toBytes ()));
151+ " Wrong data length in command COMPUTE SIGNATURE argument: " + response);
153152 }
154153 if (!response.isOK ()) {
155- THROW (SmartCardError,
156- " Command COMPUTE SIGNATURE failed with error " + bytes2hexstr (response.toBytes ()));
154+ THROW (SmartCardError, " Command COMPUTE SIGNATURE failed with error " + response);
157155 }
158156
159157 const CommandApdu getSignature {0x00 , 0x2A , 0x9E , 0x9A , LE};
160158 const auto signature = card->transmit (getSignature);
161159
162160 if (signature.sw1 == ResponseApdu::WRONG_LENGTH) {
163- THROW (SmartCardError,
164- " Wrong data length in command GET SIGNATURE argument: "
165- + bytes2hexstr (response.toBytes ()));
161+ THROW (SmartCardError, " Wrong data length in command GET SIGNATURE argument: " + response);
166162 }
167163 if (!signature.isOK ()) {
168- THROW (SmartCardError,
169- " Command GET SIGNATURE failed with error " + bytes2hexstr (signature.toBytes ()));
164+ THROW (SmartCardError, " Command GET SIGNATURE failed with error " + signature);
170165 }
171166
172167 return signature.data ;
@@ -178,8 +173,7 @@ ElectronicID::PinRetriesRemainingAndMax FinEIDv3::pinRetriesLeft(byte_type pinRe
178173 0x00 , 0xCB , 0x00 , 0xFF , {0xA0 , 0x03 , 0x83 , 0x01 , pinReference}};
179174 const auto response = card->transmit (GET_DATA);
180175 if (!response.isOK ()) {
181- THROW (SmartCardError,
182- " Command GET DATA failed with error " + pcsc_cpp::bytes2hexstr (response.toBytes ()));
176+ THROW (SmartCardError, " Command GET DATA failed with error " + response);
183177 }
184178 if (response.data .size () < 21 ) {
185179 THROW (SmartCardError,
0 commit comments