tu.crossing.JavaCryptographicArchitecture.3.1.2.source-code.KeyStore.crysl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of JavaCryptographicArchitecture
Show all versions of JavaCryptographicArchitecture
JavaCryptographicArchitecture CrySL ruleset
The newest version!
SPEC java.security.KeyStore
OBJECTS
java.io.InputStream fileInput;
char[] passwordIn;
char[] passwordOut;
char[] passwordKey;
java.security.KeyStore.Entry entry;
byte[] byteKey;
java.security.KeyStore.LoadStoreParameter paramLoad;
java.security.KeyStore.ProtectionParameter protParamGet;
java.security.KeyStore.ProtectionParameter protParamSet;
java.lang.String aliasGet;
java.lang.String aliasSet;
java.io.OutputStream fileOutput;
java.security.KeyStore.LoadStoreParameter paramStore;
java.lang.String type;
java.security.cert.Certificate cert;
java.security.Key key;
java.lang.String alias;
EVENTS
g1: getInstance(type);
g2: getInstance(type, _);
Get := g1 | g2;
l1: load(fileInput, passwordIn);
l2: load(paramLoad);
Load := l1 | l2;
s1: store(paramStore);
s2: store(fileOutput, passwordOut);
Store := s1 | s2;
ge1: getEntry(aliasGet, protParamGet);
GetEntry := ge1;
se1: setEntry(aliasSet, entry, protParamSet);
SetEntry := se1;
gk1: key = getKey(alias, passwordKey);
GetKey := gk1;
ORDER
Get, Load, ((GetEntry?, GetKey) | (SetEntry, Store))*
CONSTRAINTS
type in {"JCEKS", "JKS", "DKS", "PKCS11", "PKCS12"};
neverTypeOf[passwordIn, java.lang.String];
neverTypeOf[passwordOut, java.lang.String];
neverTypeOf[passwordKey, java.lang.String];
notHardCoded[passwordIn];
ENSURES
generatedKeyStore[this] after Load;
generatedKey[key, _];
generatedPrivkey[key];
generatedPubkey[key];