public SignerConf(String conf) { this.hashAlgo = null; this.signatureAlgoControl = null; this.confPairs = new ConfPairs(Args.notBlank(conf, "conf")); if (getConfValue("algo") == null) { throw new IllegalArgumentException("conf must contain the entry 'algo'"); } }
public SignerConf(final String conf) { this.hashAlgo = null; this.signatureAlgoControl = null; ParamUtil.requireNonBlank("conf", conf); this.confPairs = new ConfPairs(conf); if (getConfValue("algo") == null) { throw new IllegalArgumentException("conf must contain the entry 'algo'"); } }
public SignerConf(String confWithoutAlgo, HashAlgo hashAlgo, SignatureAlgoControl signatureAlgoControl) { this.hashAlgo = Args.notNull(hashAlgo, "hashAlgo"); this.signatureAlgoControl = signatureAlgoControl; this.confPairs = new ConfPairs(Args.notBlank(confWithoutAlgo, "confWithoutAlgo")); if (getConfValue("algo") != null) { throw new IllegalArgumentException("confWithoutAlgo may not contain the entry 'algo'"); } }
public SignerConf(final String confWithoutAlgo, final HashAlgoType hashAlgo, final SignatureAlgoControl signatureAlgoControl) { ParamUtil.requireNonBlank("confWithoutAlgo", confWithoutAlgo); this.hashAlgo = ParamUtil.requireNonNull("hashAlgo", hashAlgo); this.signatureAlgoControl = signatureAlgoControl; this.confPairs = new ConfPairs(confWithoutAlgo); if (getConfValue("algo") != null) { throw new IllegalArgumentException("confWithoutAlgo must not contain the entry 'algo'"); } }
sb.append("private key and public key does not match, "); sb.append("key type='").append(signerType).append("'; "); String pwd = signerConf.getConfValue("password"); if (pwd != null) { signerConf.putConfEntry("password", "****");
sb.append("private key and public key does not match, "); sb.append("key type='").append(signerType).append("'; "); String pwd = signerConf.getConfValue("password"); if (pwd != null) { signerConf.putConfEntry("password", "****");
public static AlgorithmIdentifier getSigAlgId(final PublicKey pubKey, final SignerConf signerConf) throws NoSuchAlgorithmException { ParamUtil.requireNonNull("signerConf", signerConf); if (signerConf.hashAlgo() == null) { return getSigAlgId(signerConf.getConfValue("algo")); } else { SignatureAlgoControl algoControl = signerConf.signatureAlgoControl(); HashAlgoType hashAlgo = signerConf.hashAlgo(); boolean rsaMgf1 = (algoControl == null) ? false : algoControl.isRsaMgf1(); boolean dsaPlain = (algoControl == null) ? false : algoControl.isDsaPlain(); if (pubKey instanceof RSAPublicKey) { return getRSASigAlgId(hashAlgo, rsaMgf1); } else if (pubKey instanceof ECPublicKey) { return getECDSASigAlgId(hashAlgo, dsaPlain); } else if (pubKey instanceof DSAPublicKey) { return getDSASigAlgId(hashAlgo); } else { throw new NoSuchAlgorithmException("Unknown public key '" + pubKey.getClass().getName()); } } }
private ConcurrentContentSigner newKeystoreSigner(final SecurityFactory securityFactory, final String type, final SignerConf conf, final X509Certificate[] certificateChain) throws ObjectCreationException { String str = conf.getConfValue("parallelism"); int parallelism = securityFactory.getDefaultSignerParallelism(); if (str != null) { String passwordHint = conf.getConfValue("password"); char[] password; if (passwordHint == null) { str = conf.getConfValue("keystore"); String keyLabel = conf.getConfValue("key-label"); String algoName = conf.getConfValue("algo"); if (algoName != null) { try {
public static AlgorithmIdentifier getSigAlgId(PublicKey pubKey, SignerConf signerConf) throws NoSuchAlgorithmException { if (Args.notNull(signerConf, "signerConf").getHashAlgo() == null) { return getSigAlgId(signerConf.getConfValue("algo")); } else { SignatureAlgoControl algoControl = signerConf.getSignatureAlgoControl(); HashAlgo hashAlgo = signerConf.getHashAlgo(); if (pubKey instanceof RSAPublicKey) { boolean rsaMgf1 = (algoControl == null) ? false : algoControl.isRsaMgf1(); return getRSASigAlgId(hashAlgo, rsaMgf1); } else if (pubKey instanceof ECPublicKey) { boolean dsaPlain = (algoControl == null) ? false : algoControl.isDsaPlain(); boolean gm = (algoControl == null) ? false : algoControl.isGm(); return getECSigAlgId(hashAlgo, dsaPlain, gm); } else if (pubKey instanceof DSAPublicKey) { return getDSASigAlgId(hashAlgo); } else { throw new NoSuchAlgorithmException("Unknown public key '" + pubKey.getClass().getName()); } } }
String str = conf.getConfValue("parallelism"); int parallelism = securityFactory.getDfltSignerParallelism(); if (str != null) { String passwordHint = conf.getConfValue("password"); char[] password; if (passwordHint == null) { str = conf.getConfValue("keystore"); String keyLabel = conf.getConfValue("key-label"); String algoName = conf.getConfValue("algo"); if (algoName != null) { try {
String str = conf.getConfValue("parallelism"); int parallelism = securityFactory.getDfltSignerParallelism(); if (str != null) { String moduleName = conf.getConfValue("module"); str = conf.getConfValue("slot"); Integer slotIndex = (str == null) ? null : Integer.parseInt(str); str = conf.getConfValue("slot-id"); Long slotId = (str == null) ? null : Long.parseLong(str); String keyLabel = conf.getConfValue("key-label"); str = conf.getConfValue("key-id"); byte[] keyId = null; if (str != null) { String algoName = conf.getConfValue("algo"); if (algoName != null) { try {
String str = conf.getConfValue("parallelism"); int parallelism = securityFactory.getDfltSignerParallelism(); if (str != null) { String moduleName = conf.getConfValue("module"); str = conf.getConfValue("slot"); Integer slotIndex = (str == null) ? null : Integer.parseInt(str); str = conf.getConfValue("slot-id"); Long slotId = (str == null) ? null : Long.parseLong(str); String keyLabel = conf.getConfValue("key-label"); str = conf.getConfValue("key-id"); byte[] keyId = null; if (str != null) { String algoName = conf.getConfValue("algo"); if (algoName != null) { try {
String str = conf.getConfValue("parallelism"); int parallelism = securityFactory.getDefaultSignerParallelism(); if (str != null) { String moduleName = conf.getConfValue("module"); str = conf.getConfValue("slot"); Integer slotIndex = (str == null) ? null : Integer.parseInt(str); str = conf.getConfValue("slot-id"); Long slotId = (str == null) ? null : Long.parseLong(str); String keyLabel = conf.getConfValue("key-label"); str = conf.getConfValue("key-id"); byte[] keyId = null; if (str != null) { String algoName = conf.getConfValue("algo"); if (algoName != null) { try {