use of org.glassfish.appclient.server.core.jws.servedcontent.AutoSignedContent in project Payara by payara.
the class JWSAdapterManager method appLevelSignedSystemContent.
public synchronized AutoSignedContent appLevelSignedSystemContent(final String relativePathToSystemJar, final String alias) throws FileNotFoundException {
/*
* The key to the map is also the subpath to the file within the
* domain's repository which holds signed system JARs.
*/
final String key = keyToAppLevelSignedSystemContentMap(relativePathToSystemJar, alias);
AutoSignedContent result = appLevelSignedSystemContent.get(key);
if (result == null) {
final File unsignedFile = new File(umbrellaRoot, relativePathToSystemJar);
final File signedFile = new File(systemLevelSignedJARsRoot, key);
result = new AutoSignedContent(unsignedFile, signedFile, alias, jarSigner, relativePathToSystemJar, MANIFEST_APP_NAME_FOR_SYSTEM_FILES);
appLevelSignedSystemContent.put(key, result);
}
return result;
}
use of org.glassfish.appclient.server.core.jws.servedcontent.AutoSignedContent in project Payara by payara.
the class JWSAdapterManager method systemJarSignedContent.
private AutoSignedContent systemJarSignedContent(final File unsignedFile, final String signingAlias) throws FileNotFoundException {
final String relativeURI = relativeSystemPath(unsignedFile.toURI());
final File signedFile = new File(signedSystemContentAliasDir(signingAlias), relativeURI);
return new AutoSignedContent(unsignedFile, signedFile, signingAlias, jarSigner, relativeURI, MANIFEST_APP_NAME_FOR_SYSTEM_FILES);
}
use of org.glassfish.appclient.server.core.jws.servedcontent.AutoSignedContent in project Payara by payara.
the class ApplicationSignedJARManager method autoSignedAppContentEntry.
/*
* Returns information about an auto-signed JAR for a given absolute URI and
* alias, creating the auto-signed content object and adding it to the
* data structures if it is not already present.
*/
private synchronized Map.Entry<URI, StaticContent> autoSignedAppContentEntry(final URI jarURIRelativeToApp, final URI absURIToFile) throws FileNotFoundException {
StaticContent content = relURIToContent.get(jarURIRelativeToApp);
if (content == null) {
final File unsignedFile = new File(absURIToFile);
final File signedFile = signedFileForLib(jarURIRelativeToApp, unsignedFile);
content = new AutoSignedContent(unsignedFile, signedFile, autoSigningAlias, jarSigner, jarURIRelativeToApp.toASCIIString(), helper.appName());
relURIToContent.put(jarURIRelativeToApp, content);
} else {
if (content instanceof AutoSignedContent) {
content = AutoSignedContent.class.cast(content);
} else {
throw new RuntimeException(content.toString() + " != AutoSignedContent");
}
}
return new AbstractMap.SimpleEntry(jarURIRelativeToApp, content);
}
use of org.glassfish.appclient.server.core.jws.servedcontent.AutoSignedContent in project Payara by payara.
the class JavaWebStartInfo method createSignedStaticContent.
private StaticContent createSignedStaticContent(final File unsignedFile, final File signedFile, final URI uriForLookup, final String appName) throws FileNotFoundException {
mkdirs(signedFile.getParentFile());
final StaticContent signedJarContent = new AutoSignedContent(unsignedFile, signedFile, signingAlias, jarSigner, uriForLookup.toASCIIString(), appName);
return signedJarContent;
}
Aggregations