Search in sources :

Example 1 with P11DSASignLoadTest

use of org.xipki.security.speed.p11.P11DSASignLoadTest in project xipki by xipki.

the class BSpeedP11DSASignCmd method nextTester.

@Override
protected LoadExecutor nextTester() throws Exception {
    DSAControl control = queue.poll();
    if (control == null) {
        return null;
    }
    P11Slot slot = getSlot();
    if (control.plen() == 1024) {
        if (!"SHA1withDSA".equalsIgnoreCase(sigAlgo)) {
            throw new IllegalCmdParamException("only SHA1withDSA is permitted for DSA with 1024 bit");
        }
    }
    return new P11DSASignLoadTest(securityFactory, slot, sigAlgo, control.plen(), control.qlen());
}
Also used : DSAControl(org.xipki.security.speed.cmd.DSAControl) P11DSASignLoadTest(org.xipki.security.speed.p11.P11DSASignLoadTest) P11Slot(org.xipki.security.pkcs11.P11Slot) IllegalCmdParamException(org.xipki.console.karaf.IllegalCmdParamException)

Aggregations

IllegalCmdParamException (org.xipki.console.karaf.IllegalCmdParamException)1 P11Slot (org.xipki.security.pkcs11.P11Slot)1 DSAControl (org.xipki.security.speed.cmd.DSAControl)1 P11DSASignLoadTest (org.xipki.security.speed.p11.P11DSASignLoadTest)1