public AAFSSO(String[] args) throws IOException, CadiException {
this(args,new Properties());
}
public AAFSSO(String[] args) throws IOException, CadiException {
this(args,new Properties());
}
public AAFSSO(String[] args, ProcessArgs pa) throws IOException, CadiException {
this(args,pa.process(args, new Properties()));
}
public AAFSSO(String[] args, ProcessArgs pa) throws IOException, CadiException {
this(args,pa.process(args, new Properties()));
}
if (!dot_aaf_kf.exists()) {
// This will create, as required, or reuse
ArtifactDir.getSymm(dot_aaf_kf);
if (!dot_aaf_kf.exists()) {
// This will create, as required, or reuse
ArtifactDir.getSymm(dot_aaf_kf);
String[] naargs = new String[nargs.size()];
nargs.toArray(naargs);
access = new PropAccess(os, naargs);
String[] naargs = new String[nargs.size()];
nargs.toArray(naargs);
access = new PropAccess(os, naargs);
Config.CADI_ALIAS, Config.CADI_KEYSTORE,Config.CADI_KEYSTORE_PASSWORD,Config.CADI_KEY_PASSWORD}) {
access.getProperties().remove(tag);
diskprops.remove(tag);
Config.CADI_ALIAS, Config.CADI_KEYSTORE,Config.CADI_KEYSTORE_PASSWORD,Config.CADI_KEY_PASSWORD}) {
access.getProperties().remove(tag);
diskprops.remove(tag);
String keyfile = access.getProperty(Config.CADI_KEYFILE); // in case its CertificateMan props
if (keyfile == null) {
access.setProperty(Config.CADI_KEYFILE, dot_aaf_kf.getAbsolutePath());
addProp(Config.CADI_KEYFILE,dot_aaf_kf.getAbsolutePath());
}
String keyfile = access.getProperty(Config.CADI_KEYFILE); // in case its CertificateMan props
if (keyfile == null) {
access.setProperty(Config.CADI_KEYFILE, dot_aaf_kf.getAbsolutePath());
addProp(Config.CADI_KEYFILE,dot_aaf_kf.getAbsolutePath());
}
String keystore=access.getProperty(Config.CADI_KEYSTORE);
String keystore_pass=access.getProperty(Config.CADI_KEYSTORE_PASSWORD);
String keystore=access.getProperty(Config.CADI_KEYSTORE);
String keystore_pass=access.getProperty(Config.CADI_KEYSTORE_PASSWORD);
encrypted_pass= access.encrypt(new String(password));
access.setProperty(Config.CADI_KEYSTORE_PASSWORD, encrypted_pass);
addProp(Config.CADI_KEYSTORE_PASSWORD, encrypted_pass);
encrypted_pass= access.encrypt(new String(password));
access.setProperty(Config.CADI_KEYSTORE_PASSWORD, encrypted_pass);
addProp(Config.CADI_KEYSTORE_PASSWORD, encrypted_pass);
// TODO READ Aliases out of Keystore?
user = alias = cons.readLine("Keystore alias: ");
access.setProperty(Config.CADI_ALIAS, user);
// TODO READ Aliases out of Keystore?
user = alias = cons.readLine("Keystore alias: ");
access.setProperty(Config.CADI_ALIAS, user);
String cadiLatitude = access.getProperty(Config.CADI_LATITUDE);
if (cadiLatitude==null) {
System.out.println("# If you do not know your Global Coordinates, we suggest bing.com/maps");
String cadiLatitude = access.getProperty(Config.CADI_LATITUDE);
if (cadiLatitude==null) {
System.out.println("# If you do not know your Global Coordinates, we suggest bing.com/maps");
}
access.setProperty(Config.CADI_LATITUDE, cadiLatitude);
addProp(Config.CADI_LATITUDE, cadiLatitude);
}
access.setProperty(Config.CADI_LATITUDE, cadiLatitude);
addProp(Config.CADI_LATITUDE, cadiLatitude);
access.setProperty(Config.CADI_LONGITUDE, cadiLongitude);
addProp(Config.CADI_LONGITUDE, cadiLongitude);
}
access.setProperty(Config.CADI_LONGITUDE, cadiLongitude);
addProp(Config.CADI_LONGITUDE, cadiLongitude);
}
(name.endsWith(".jks") || name.endsWith(".p12"))) {
select = cons.readLine("Use %s for TrustStore? (y/n):",tsf.getName());
if ("y".equalsIgnoreCase(select)) {
(name.endsWith(".jks") || name.endsWith(".p12"))) {
select = cons.readLine("Use %s for TrustStore? (y/n):",tsf.getName());
if ("y".equalsIgnoreCase(select)) {
final String apiVersion = access.getProperty(Config.AAF_API_VERSION, Config.AAF_DEFAULT_API_VERSION);
final String aaf_root_ns = access.getProperty(Config.AAF_ROOT_NS);
String locateRoot;
final String apiVersion = access.getProperty(Config.AAF_API_VERSION, Config.AAF_DEFAULT_API_VERSION);
final String aaf_root_ns = access.getProperty(Config.AAF_ROOT_NS);
String locateRoot;
private void setReadonly(File file) {
file.setExecutable(false, false);
file.setWritable(false, false);
private void setReadonly(File file) {
file.setExecutable(false, false);
file.setWritable(false, false);
public static interface ProcessArgs {
public Properties process(final String[] args, final Properties props);
}
public static interface ProcessArgs {
public Properties process(final String[] args, final Properties props);
}