/** {@inheritDoc} */ protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException { EncryptedKey ek = (EncryptedKey) xmlObject; if (ek.getRecipient() != null) { domElement.setAttributeNS(null, EncryptedKey.RECIPIENT_ATTRIB_NAME, ek.getRecipient()); } super.marshallAttributes(xmlObject, domElement); }
/** {@inheritDoc} */ protected void marshallAttributes(XMLObject xmlObject, Element domElement) throws MarshallingException { EncryptedKey ek = (EncryptedKey) xmlObject; if (ek.getRecipient() != null) { domElement.setAttributeNS(null, EncryptedKey.RECIPIENT_ATTRIB_NAME, ek.getRecipient()); } super.marshallAttributes(xmlObject, domElement); }
/** * Get the next encrypted key that will be returned by this iterator. * * @return the next encrypted key to return */ private EncryptedKey getNextKey() { EncryptedKey tempKey; if (keyIterator != null) { while (keyIterator.hasNext()) { tempKey = keyIterator.next(); if (parent.matchRecipient(tempKey.getRecipient())) { log.debug("Found matching encrypted key: {}", tempKey.toString()); return tempKey; } } } keyIterator = getNextKeyIterator(); while (keyIterator != null) { while (keyIterator.hasNext()) { tempKey = keyIterator.next(); if (parent.matchRecipient(tempKey.getRecipient())) { log.debug("Found matching encrypted key: {}", tempKey.toString()); return tempKey; } } keyIterator = getNextKeyIterator(); } return null; }
/** * Get the next encrypted key that will be returned by this iterator. * * @return the next encrypted key to return */ private EncryptedKey getNextKey() { EncryptedKey tempKey; if (keyIterator != null) { while (keyIterator.hasNext()) { tempKey = keyIterator.next(); if (parent.matchRecipient(tempKey.getRecipient())) { log.debug("Found matching encrypted key: {}", tempKey.toString()); return tempKey; } } } keyIterator = getNextKeyIterator(); while (keyIterator != null) { while (keyIterator.hasNext()) { tempKey = keyIterator.next(); if (parent.matchRecipient(tempKey.getRecipient())) { log.debug("Found matching encrypted key: {}", tempKey.toString()); return tempKey; } } keyIterator = getNextKeyIterator(); } return null; }
/** {@inheritDoc} */ public Iterable<EncryptedKey> resolve(EncryptedData encryptedData) { List<EncryptedKey> resolvedEncKeys = new ArrayList<EncryptedKey>(); if (encryptedData.getKeyInfo() == null) { return resolvedEncKeys; } for (EncryptedKey encKey : encryptedData.getKeyInfo().getEncryptedKeys()) { if (matchRecipient(encKey.getRecipient())) { resolvedEncKeys.add(encKey); } } return resolvedEncKeys; }
/** {@inheritDoc} */ public Iterable<EncryptedKey> resolve(EncryptedData encryptedData) { List<EncryptedKey> resolvedEncKeys = new ArrayList<EncryptedKey>(); if (encryptedData.getKeyInfo() == null) { return resolvedEncKeys; } for (EncryptedKey encKey : encryptedData.getKeyInfo().getEncryptedKeys()) { if (matchRecipient(encKey.getRecipient())) { resolvedEncKeys.add(encKey); } } return resolvedEncKeys; }
/** {@inheritDoc} */ public Iterable<EncryptedKey> resolve(EncryptedData encryptedData) { List<EncryptedKey> resolvedEncKeys = new ArrayList<EncryptedKey>(); if (! (encryptedData.getParent() instanceof EncryptedElementType) ) { return resolvedEncKeys; } EncryptedElementType encElementType = (EncryptedElementType) encryptedData.getParent(); for (EncryptedKey encKey : encElementType.getEncryptedKeys()) { if (matchRecipient(encKey.getRecipient())) { resolvedEncKeys.add(encKey); } } return resolvedEncKeys; } }
if (matchRecipient(encKey.getRecipient())) { resolvedEncKeys.add(encKey);
if (matchRecipient(encKey.getRecipient())) { resolvedEncKeys.add(encKey);
/** {@inheritDoc} */ public Iterable<EncryptedKey> resolve(EncryptedData encryptedData) { List<EncryptedKey> resolvedEncKeys = new ArrayList<EncryptedKey>(); if (encryptedData.getKeyInfo() == null) { return resolvedEncKeys; } for (RetrievalMethod rm : encryptedData.getKeyInfo().getRetrievalMethods()) { if (!DatatypeHelper.safeEquals(rm.getType(), EncryptionConstants.TYPE_ENCRYPTED_KEY)) { continue; } if (rm.getTransforms() != null) { log.warn("EncryptedKey RetrievalMethod has transforms, can not process"); continue; } EncryptedKey encKey = dereferenceURI(rm); if (encKey == null) { continue; } if (matchRecipient(encKey.getRecipient())) { resolvedEncKeys.add(encKey); } } return resolvedEncKeys; }
/** {@inheritDoc} */ public Iterable<EncryptedKey> resolve(EncryptedData encryptedData) { List<EncryptedKey> resolvedEncKeys = new ArrayList<EncryptedKey>(); if (encryptedData.getKeyInfo() == null) { return resolvedEncKeys; } for (RetrievalMethod rm : encryptedData.getKeyInfo().getRetrievalMethods()) { if (!DatatypeHelper.safeEquals(rm.getType(), EncryptionConstants.TYPE_ENCRYPTED_KEY)) { continue; } if (rm.getTransforms() != null) { log.warn("EncryptedKey RetrievalMethod has transforms, can not process"); continue; } EncryptedKey encKey = dereferenceURI(rm); if (encKey == null) { continue; } if (matchRecipient(encKey.getRecipient())) { resolvedEncKeys.add(encKey); } } return resolvedEncKeys; }