use of org.xipki.security.pkcs11.P11ObjectIdentifier in project xipki by xipki.
the class P11RSAKeyGenLoadTest method genKeypair.
@Override
protected void genKeypair() throws Exception {
P11ObjectIdentifier objId = slot.generateRSAKeypair(keysize, publicExponent, getDummyLabel(), getControl());
slot.removeIdentity(objId);
}
use of org.xipki.security.pkcs11.P11ObjectIdentifier in project xipki by xipki.
the class P11SM2KeyGenLoadTest method genKeypair.
@Override
protected void genKeypair() throws Exception {
P11ObjectIdentifier objId = slot.generateSM2Keypair(getDummyLabel(), getControl());
slot.removeIdentity(objId);
}
use of org.xipki.security.pkcs11.P11ObjectIdentifier in project xipki by xipki.
the class P11CertDeleteCmd method execute0.
@Override
protected Object execute0() throws Exception {
P11Slot slot = getSlot(moduleName, slotIndex);
P11ObjectIdentifier objectId = slot.getObjectIdForId(Hex.decode(id));
slot.removeCerts(objectId);
println("deleted certificates");
return null;
}
use of org.xipki.security.pkcs11.P11ObjectIdentifier in project xipki by xipki.
the class P11RSAKeyGenCmd method execute0.
@Override
protected Object execute0() throws Exception {
if (keysize % 1024 != 0) {
throw new IllegalCmdParamException("keysize is not multiple of 1024: " + keysize);
}
P11Slot slot = getSlot();
P11ObjectIdentifier objId = slot.generateRSAKeypair(keysize, toBigInt(publicExponent), label, getControl());
finalize("RSA", objId);
return null;
}
use of org.xipki.security.pkcs11.P11ObjectIdentifier in project xipki by xipki.
the class P11CertAddCmd method execute0.
@Override
protected Object execute0() throws Exception {
X509Certificate cert = X509Util.parseCert(certFile);
P11Slot slot = getSlot(moduleName, slotIndex);
P11ObjectIdentifier objectId = slot.addCert(cert);
println("added certificate under " + objectId);
return null;
}
Aggregations