CryptoServiceImpl.java revision 99d48ef2e4a3c05cde78b89088fad201080e88f0
/*
* The contents of this file are subject to the terms of the Common Development and
* Distribution License (the License). You may not use this file except in compliance with the
* License.
*
* You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
* specific language governing permission and limitations under the License.
*
* When distributing Covered Software, include this CDDL Header Notice in each file and include
* the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
* Header, with the fields enclosed by brackets [] replaced by your own identifying
* information: "Portions Copyrighted [year] [name of copyright owner]".
*
* Copyright © 2011 ForgeRock AS. All rights reserved.
*/
// Java Standard Edition
// OSGi Framework
// Apache Felix Maven SCR Plugin
// JSON Fluent library
// JSON Cryptography library
// OpenIDM
/**
* TODO: Description.
*
* @author Paul C. Bryan
*/
name = "org.forgerock.openidm.crypto",
immediate = true,
)
@Properties({
})
public class CryptoServiceImpl implements CryptoService {
/** TODO: Description. */
private ComponentContext context;
/** TODO: Description. */
private SimpleKeyStoreSelector keySelector;
/** TODO: Description. */
/**
* Opens a connection to the specified URI location and returns an input stream with which
* to read its content. If the URI is not absolute, it is resolved against the root of
* the local file system. If the specified location is or contains {@code null}, this
* method returns {@code null}.
*
* @param location the location to open the stream for.
* @return an input stream for reading the content of the location, or {@code null} if no location.
* @throws JsonNodeException if there was exception opening the stream.
*/
try {
if (uri.isAbsolute()) {
} else {
//TODO Do we really need this if we don't have a unified way to detect the instance root?
//Default to user.dir system parameter. This is not reliable in embedded mode
}
}
} catch (IOException ioe) {
}
}
return result;
}
try {
try {
KeyStore ks = (provider == null ? KeyStore.getInstance(type) : KeyStore.getInstance(type, provider));
} catch (IOException ioe) {
} catch (GeneralSecurityException gse) {
}
}
} catch (JsonNodeException jne) {
}
}
keySelector = null;
}
public JsonTransformer getEncryptionTransformer(String cipher, String alias) throws JsonCryptoException {
}
}
return decryptionTransformers;
}
public JsonNode encrypt(JsonNode node, String cipher, String alias) throws JsonCryptoException, JsonException {
return copy;
}
}
}