Search in sources :

Example 1 with DSAControl

use of org.xipki.security.speed.cmd.DSAControl in project xipki by xipki.

the class BSpeedP11DSAKeyGenCmd method nextTester.

@Override
protected LoadExecutor nextTester() throws Exception {
    DSAControl control = queue.poll();
    if (control == null) {
        return null;
    }
    P11Slot slot = getSlot();
    return new P11DSAKeyGenLoadTest(slot, control.plen(), control.qlen());
}
Also used : P11DSAKeyGenLoadTest(org.xipki.security.speed.p11.P11DSAKeyGenLoadTest) DSAControl(org.xipki.security.speed.cmd.DSAControl) P11Slot(org.xipki.security.pkcs11.P11Slot)

Example 2 with DSAControl

use of org.xipki.security.speed.cmd.DSAControl 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

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