List of usage examples for java.security InvalidAlgorithmParameterException InvalidAlgorithmParameterException
public InvalidAlgorithmParameterException()
From source file:org.globus.security.stores.ResourceSigningPolicyStore.java
public ResourceSigningPolicyStore(SigningPolicyStoreParameters param) throws InvalidAlgorithmParameterException { if (param == null) { throw new IllegalArgumentException(); }// www .j a v a2 s . c o m if (!(param instanceof ResourceSigningPolicyStoreParameters)) { throw new InvalidAlgorithmParameterException(); } this.parameters = (ResourceSigningPolicyStoreParameters) param; }
From source file:be.fedict.commons.eid.jca.BeIDKeyManagerFactory.java
@Override protected void engineInit(final ManagerFactoryParameters spec) throws InvalidAlgorithmParameterException { LOG.debug("engineInit(spec)"); if (null == spec) { return;/*from w w w . j av a 2s. c o m*/ } if (false == spec instanceof BeIDManagerFactoryParameters) { throw new InvalidAlgorithmParameterException(); } this.beIDSpec = (BeIDManagerFactoryParameters) spec; }
From source file:be.fedict.eid.applet.service.signer.ooxml.RelationshipTransformService.java
@Override public void init(TransformParameterSpec params) throws InvalidAlgorithmParameterException { LOG.debug("init(params)"); if (false == params instanceof RelationshipTransformParameterSpec) { throw new InvalidAlgorithmParameterException(); }/*w ww.j a va 2 s . com*/ RelationshipTransformParameterSpec relParams = (RelationshipTransformParameterSpec) params; for (String sourceId : relParams.getSourceIds()) { this.sourceIds.add(sourceId); } for (String sourceType : relParams.getSourceTypes()) { this.sourceTypes.add(sourceType); } }
From source file:be.fedict.eid.applet.service.signer.ooxml.RelationshipTransformService.java
@Override public void init(XMLStructure parent, XMLCryptoContext context) throws InvalidAlgorithmParameterException { LOG.debug("init(parent,context)"); LOG.debug("parent java type: " + parent.getClass().getName()); DOMStructure domParent = (DOMStructure) parent; Node parentNode = domParent.getNode(); try {/*from w w w.j a va 2 s. co m*/ LOG.debug("parent: " + toString(parentNode)); } catch (TransformerException e) { throw new InvalidAlgorithmParameterException(); } Element nsElement = parentNode.getOwnerDocument().createElement("ns"); nsElement.setAttributeNS(Constants.NamespaceSpecNS, "xmlns:ds", Constants.SignatureSpecNS); nsElement.setAttributeNS(Constants.NamespaceSpecNS, "xmlns:mdssi", "http://schemas.openxmlformats.org/package/2006/digital-signature"); /* * RelationshipReference */ NodeList nodeList; try { nodeList = XPathAPI.selectNodeList(parentNode, "mdssi:RelationshipReference/@SourceId", nsElement); } catch (TransformerException e) { LOG.error("transformer exception: " + e.getMessage(), e); throw new InvalidAlgorithmParameterException(); } for (int nodeIdx = 0; nodeIdx < nodeList.getLength(); nodeIdx++) { Node node = nodeList.item(nodeIdx); String sourceId = node.getTextContent(); LOG.debug("sourceId: " + sourceId); this.sourceIds.add(sourceId); } /* * RelationshipsGroupReference */ try { nodeList = XPathAPI.selectNodeList(parentNode, "mdssi:RelationshipsGroupReference/@SourceType", nsElement); } catch (TransformerException e) { LOG.error("transformer exception: " + e.getMessage(), e); throw new InvalidAlgorithmParameterException(); } for (int nodeIdx = 0; nodeIdx < nodeList.getLength(); nodeIdx++) { Node node = nodeList.item(nodeIdx); String sourceType = node.getTextContent(); LOG.debug("sourceType: " + sourceType); this.sourceTypes.add(sourceType); } }
From source file:org.globus.gsi.stores.ResourceCertStore.java
/** * The sole constructor./* w ww .ja v a2 s .c o m*/ * * @param params * the initialization parameters (may be <code>null</code>) * @throws java.security.InvalidAlgorithmParameterException * if the initialization parameters are inappropriate for this * <code>CertStoreSpi</code> * @throws ResourceStoreException * If error loading certs and crls. */ public ResourceCertStore(CertStoreParameters params) throws InvalidAlgorithmParameterException, ResourceStoreException { super(params); if (params == null) { throw new InvalidAlgorithmParameterException(); } if (params instanceof ResourceCertStoreParameters) { ResourceCertStoreParameters storeParams = (ResourceCertStoreParameters) params; crlDelegate.loadWrappers(storeParams.getCrlLocationPattern()); caDelegate.loadWrappers(storeParams.getCertLocationPattern()); } else { throw new InvalidAlgorithmParameterException(); } }
From source file:org.globus.gsi.stores.ResourceSigningPolicyStore.java
/** * Please use the {@link Stores} class to generate Key/Cert stores *//*w w w . j av a 2 s . c o m*/ public ResourceSigningPolicyStore(SigningPolicyStoreParameters param) throws InvalidAlgorithmParameterException { if (param == null) { throw new IllegalArgumentException(); } if (!(param instanceof ResourceSigningPolicyStoreParameters)) { throw new InvalidAlgorithmParameterException(); } this.parameters = (ResourceSigningPolicyStoreParameters) param; }