mirror of
https://github.com/SunnyQjm/MIRCertificationManager.git
synced 2026-06-15 14:04:55 +08:00
add: 修改支持NTRU
This commit is contained in:
@@ -26,7 +26,7 @@ void BlockChainLogger::run() {
|
||||
int offset = 0;
|
||||
|
||||
while (true) {
|
||||
if (expectedSize <= 0) { // 读取一个整型,表示后面跟着的json串的大小
|
||||
if (expectedSize <= 0) { // 读取一个整型,表示后面跟着的json串
|
||||
size = ringBuffer.read(buffer, 4);
|
||||
if (size <= 0) { // 没有数据
|
||||
// std::cout << "wait for data" << std::endl;
|
||||
|
||||
@@ -1,9 +1,7 @@
|
||||
#include <iostream>
|
||||
#include <thread>
|
||||
#include "utils/RedisUtil.h"
|
||||
#include "Server.h"
|
||||
#include "BlockChainLogger.h"
|
||||
|
||||
#include <ndn-cxx/util/NTRUSignUtil.hpp>
|
||||
/**
|
||||
*
|
||||
1. 接收区块链下发的登录信息,加载相应用户的证书到redis数据库中。下发登录信息应包含登录超时时间。
|
||||
@@ -20,13 +18,14 @@ using namespace std;
|
||||
|
||||
int main() {
|
||||
|
||||
ndn::security::ntru::NTRUSignUtil::init();
|
||||
Server server;
|
||||
server.run();
|
||||
std::thread t([]() {
|
||||
BlockChainLogger blockChainLogger;
|
||||
blockChainLogger.run();
|
||||
});
|
||||
|
||||
server.run();
|
||||
ndn::security::ntru::NTRUSignUtil::clean();
|
||||
|
||||
// AddOrUpdateCertificateRequestMessage addOrUpdateCertificateRequestMessage;
|
||||
// addOrUpdateCertificateRequestMessage.parse("{\n"
|
||||
|
||||
Reference in New Issue
Block a user