public int hashCode() { int result = 17; try { byte[] bytes = getSKIBytes(); for (int i = 0; i < bytes.length; i++) { result = 31 * result + bytes[i]; } } catch (XMLSecurityException e) { LOG.debug(e.getMessage(), e); } return result; }
private void testAndSetInvocation() throws XMLSecurityException { if (invoked) { throw new XMLSecurityException("stax.recursiveKeyReference"); } invoked = true; }
LOG.warning("Security processing failed (actions mismatch)"); XMLSecurityException ex = new XMLSecurityException("empty", new Object[] {"The request was not signed or encrypted"}); throwFault(ex.getMessage(), ex); LOG.warning("The request was not signed"); XMLSecurityException ex = new XMLSecurityException("empty", new Object[] {"The request was not signed"}); throwFault(ex.getMessage(), ex); LOG.warning("The request was not encrypted"); XMLSecurityException ex = new XMLSecurityException("empty", new Object[] {"The request was not encrypted"}); throwFault(ex.getMessage(), ex);
LOG.warning("Security processing failed (actions mismatch)"); XMLSecurityException ex = new XMLSecurityException("empty", new Object[] {"The request was not signed or encrypted"}); throwFault(ex.getMessage(), ex); LOG.warning("The request was not signed"); XMLSecurityException ex = new XMLSecurityException("empty", new Object[] {"The request was not signed"}); throwFault(ex.getMessage(), ex); LOG.warning("The request was not encrypted"); XMLSecurityException ex = new XMLSecurityException("empty", new Object[] {"The request was not encrypted"}); throwFault(ex.getMessage(), ex);
@Override protected InputStream handleXOPInclude(InputProcessorChain inputProcessorChain, EncryptedDataType encryptedDataType, String href, Cipher cipher, InboundSecurityToken inboundSecurityToken) throws XMLSecurityException { throw new XMLSecurityException("errorMessages.NotYetImplementedException"); }
public int hashCode() { int result = 17; try { byte[] bytes = getCertificateBytes(); for (int i = 0; i < bytes.length; i++) { result = 31 * result + bytes[i]; } } catch (XMLSecurityException e) { LOG.debug(e.getMessage(), e); } return result; }
@Override protected void handleCipherReference(InputProcessorChain inputProcessorChain, EncryptedDataType encryptedDataType, Cipher cipher, InboundSecurityToken inboundSecurityToken) throws XMLSecurityException { throw new XMLSecurityException("errorMessages.NotYetImplementedException"); }
public OutboundSecurityToken getSecurityToken() { try { return securityTokenProvider.getSecurityToken(); } catch (XMLSecurityException e) { LOG.debug(e.getMessage(), e); } return null; } };
protected byte[] getBytesFromAttachment(String xopUri, final XMLSecurityProperties securityProperties) throws XMLSecurityException { throw new XMLSecurityException("errorMessages.NotYetImplementedException"); }
private SecretKey getSecretKeyFromToken(KerberosServiceSecurityToken kerberosToken) { try { Map<String, Key> secretKeys = kerberosToken.getSecretKey(); if (secretKeys != null) { SecretKey foundKey = null; for (Entry<String, Key> entry : kerberosToken.getSecretKey().entrySet()) { if (entry.getValue() instanceof SecretKey) { SecretKey secretKey = (SecretKey)entry.getValue(); if (foundKey == null || secretKey.getEncoded().length > foundKey.getEncoded().length) { foundKey = secretKey; } } } return foundKey; } } catch (XMLSecurityException e) { LOG.fine(e.getMessage()); } return null; } }
@Override public void engineInitSign(Key signingKey, AlgorithmParameterSpec algorithmParameterSpec) throws XMLSecurityException { try { mac.init(signingKey, algorithmParameterSpec); } catch (InvalidKeyException e) { throw new XMLSecurityException(e); } catch (InvalidAlgorithmParameterException e) { throw new XMLSecurityException(e); } }
private SecretKey getSecretKeyFromToken(KerberosServiceSecurityToken kerberosToken) { try { Map<String, Key> secretKeys = kerberosToken.getSecretKey(); if (secretKeys != null) { SecretKey foundKey = null; for (Entry<String, Key> entry : kerberosToken.getSecretKey().entrySet()) { if (entry.getValue() instanceof SecretKey) { SecretKey secretKey = (SecretKey)entry.getValue(); if (foundKey == null || secretKey.getEncoded().length > foundKey.getEncoded().length) { foundKey = secretKey; } } } return foundKey; } } catch (XMLSecurityException e) { LOG.fine(e.getMessage()); } return null; } }
@Override public void engineInitSign(Key signingKey, AlgorithmParameterSpec algorithmParameterSpec) throws XMLSecurityException { try { signature.initSign((PrivateKey) signingKey); } catch (InvalidKeyException e) { throw new XMLSecurityException(e); } }
private boolean matchKey(TokenCancellerParameters tokenParameters, byte[] secretKey) { Map<String, Object> messageContext = tokenParameters.getMessageContext(); if (matchDOMSignatureSecret(messageContext, secretKey)) { return true; } try { if (matchStreamingSignatureSecret(messageContext, secretKey)) { return true; } } catch (XMLSecurityException ex) { LOG.log(Level.FINE, ex.getMessage(), ex); return false; } return false; }
@Override public void engineInitSign(Key signingKey) throws XMLSecurityException { try { mac.init(signingKey); } catch (InvalidKeyException e) { throw new XMLSecurityException(e); } }
private boolean matchKey(TokenCancellerParameters tokenParameters, byte[] secretKey) { Map<String, Object> messageContext = tokenParameters.getMessageContext(); if (matchDOMSignatureSecret(messageContext, secretKey)) { return true; } try { if (matchStreamingSignatureSecret(messageContext, secretKey)) { return true; } } catch (XMLSecurityException ex) { LOG.log(Level.FINE, ex.getMessage(), ex); return false; } return false; }
@Override public void engineUpdate(byte[] input) throws XMLSecurityException { try { signature.update(input); } catch (SignatureException e) { throw new XMLSecurityException(e); } }
LOG.log(Level.FINE, e.getMessage(), e); return null;
@Override public void engineUpdate(byte input) throws XMLSecurityException { try { signature.update(input); } catch (SignatureException e) { throw new XMLSecurityException(e); } }