Open dreamx-gruut opened 5 years ago
for (auto &each_signer : signers) { string signer_cert = chain->getUserCert(each_signer.signer_id); if (!ags.verifyPEM(signer_cert, message, each_signer.signer_sig)) return false; }
string Chain::getUserCert(const base58_type &user_id) { return rdb_controller->getUserCert(user_id); }
rdb_controller.cpp
string RdbController::getUserCert(const base58_type &user_id) { try { string user_cert = {}; soci::session db_session(RdbController::pool()); soci::statement st = (db_session.prepare << "select x509 from user_certificates where uid = " + user_id, soci::into(user_cert)); st.execute(true); return user_cert; } catch (const std::exception &e) { logger::ERROR("Failed to get user_cert: {}", e.what()); return string(); } }
참고해서 수정하겠습니다.
인증서와 시점 문제
현재 코드 사용
rdb_controller.cpp