This commit is contained in:
李子铭 2025-03-10 09:55:30 +08:00
parent 8c2aff8d35
commit 5dfd3c39c3
1 changed files with 4 additions and 0 deletions

View File

@ -119,6 +119,10 @@ func (s *CmbMixRepoImpl) GetRequest(_ context.Context, reqBo *bo.CmbRequestBo) (
func (s *CmbMixRepoImpl) GetMockRequest(_ context.Context, bizContent string) (*v1.CmbRequest, error) {
if len(s.bc.Cmb.CmbSm2Pik) == 0 {
return nil, errors.New("mock cmb sm2 pik is empty")
}
encryptBody, err := cmb.Encrypt(s.bc.Cmb.Sm2Puk, bizContent)
if err != nil {
return nil, err