mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
ALF-9510 checkin. Also some fixes for ALF-8702.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@30070 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package org.alfresco.repo.node.encryption;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.security.InvalidKeyException;
|
||||
import java.security.KeyException;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
@@ -11,7 +10,6 @@ import java.util.Set;
|
||||
import javax.crypto.SealedObject;
|
||||
|
||||
import org.alfresco.encryption.Encryptor;
|
||||
import org.alfresco.encryption.FallbackEncryptor;
|
||||
import org.alfresco.encryption.KeyProvider;
|
||||
import org.alfresco.error.AlfrescoRuntimeException;
|
||||
import org.alfresco.repo.security.authentication.AuthenticationException;
|
||||
@@ -223,23 +221,4 @@ public class MetadataEncryptor
|
||||
// Done
|
||||
return outbound;
|
||||
}
|
||||
|
||||
public Serializable reencrypt(QName propertyQName, Serializable sealed) throws InvalidKeyException
|
||||
{
|
||||
// metadataEncryptor uses a fallback encryptor; decryption will try the
|
||||
// default (new) keys first (which will fail for properties created before the
|
||||
// change in keys), followed by the backup keys.
|
||||
Serializable decrypted = decrypt(propertyQName, sealed);
|
||||
|
||||
// Re-encrypt. The new keys will be used.
|
||||
Serializable resealed = encrypt(propertyQName, decrypted);
|
||||
|
||||
return resealed;
|
||||
}
|
||||
|
||||
public boolean isFallbackAvailable()
|
||||
{
|
||||
return false;
|
||||
// return encryptor.isFallbackAvailable();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user