销毁管理密钥
This commit is contained in:
parent
efec85a59c
commit
0eb857b6fa
@ -12,6 +12,7 @@ import com.cisd.tms.modules.mk.service.LmkService;
|
|||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
@ -105,4 +106,10 @@ public class LmkController {
|
|||||||
return ApiResponse.success(lmk);
|
return ApiResponse.success(lmk);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/destroyLMKAndIK")
|
||||||
|
public ApiResponse<String> destroyLMKAndIK() {
|
||||||
|
lmkService.destroyLMKAndIK();
|
||||||
|
return ApiResponse.success("主密钥和内部密钥销毁成功!");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -200,4 +200,11 @@ public class LmkService {
|
|||||||
return lmk;
|
return lmk;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void destroyLMKAndIK() {
|
||||||
|
pcieCryptoService.destroyLmk();
|
||||||
|
pcieCryptoService.destroyIk(IKEnums.KEY_TYPE_AUTH.getCode());
|
||||||
|
pcieCryptoService.destroyIk(IKEnums.KEY_TYPE_DEVICE.getCode());
|
||||||
|
keyComponentList = null;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user