File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -70,14 +70,14 @@ namespace TIGER_API {
7070
7171 RSA *rsa = create_rsa ((utility::char_t *) key.c_str (), true );
7272 if (rsa == nullptr ) {
73- throw std::runtime_error (U (" RSA creation failed, please check your private key" ));
73+ throw std::runtime_error (Utils::str16to8 (" RSA creation failed, please check your private key" ));
7474 }
7575
7676 int ret = RSA_sign (NID_sha1, hash, SHA_DIGEST_LENGTH,
7777 encrypted, &encrypted_length, rsa);
7878
7979 if (ret != 1 ) {
80- throw std::runtime_error (U (" RSA_sign failed" ));
80+ throw std::runtime_error (Utils::str16to8 (" RSA_sign failed" ));
8181 }
8282
8383 utility::string_t s (encrypted, encrypted + encrypted_length);
@@ -99,7 +99,7 @@ namespace TIGER_API {
9999
100100 RSA *rsa = create_rsa ((utility::char_t *) key.c_str (), false );
101101 if (rsa == nullptr ) {
102- throw std::runtime_error (" RSA creation failed, please check your private key" );
102+ throw std::runtime_error (Utils::str16to8 ( " RSA creation failed, please check your private key" ) );
103103 }
104104 int ret = -1 ;
105105 if (vec_base64_decode.size () > 0 ) {
Original file line number Diff line number Diff line change @@ -125,7 +125,7 @@ namespace TIGER_API {
125125 bool is_sign_ok = Utils::verify_sign (client_config.get_server_pub_key (), params[P_TIMESTAMP].as_string (), res_sign);
126126 if (!is_sign_ok) {
127127 LOG (ERROR) << U (" Exception: response sign verify failed. " );
128- throw std::runtime_error (" Exception: response sign verify failed" );
128+ throw std::runtime_error (Utils::str16to8 ( " Exception: response sign verify failed" ). c_str () );
129129 }
130130 result_data = result[P_DATA];
131131 }
You can’t perform that action at this time.
0 commit comments