зеркало из https://github.com/mozilla/pluotsorbet.git
only use test cert when running tests
This commit is contained in:
Родитель
418a03694e
Коммит
e465f9d565
|
@ -2,5 +2,7 @@
|
|||
*.jad
|
||||
*.class
|
||||
.DS_Store
|
||||
certs/j2se_main.ks
|
||||
certs/j2se_test.ks
|
||||
tests/Testlets.java
|
||||
test.log
|
||||
|
|
|
@ -1,15 +1,23 @@
|
|||
CERTS=$(wildcard *.der)
|
||||
|
||||
MEKEYTOOL ?= mekeytool
|
||||
|
||||
_main.ks: $(CERTS)
|
||||
rm -f _main.ks j2se_main.ks
|
||||
|
||||
for file in $(CERTS) ; do \
|
||||
echo $$file ; \
|
||||
keytool -import -v -trustcacerts -alias $$file -file $$file -keystore j2se_main.ks -storepass javasdk ; \
|
||||
mekeytool -import -MEkeystore _main.ks -keystore j2se_main.ks -alias $$file -domain identified_third_party ; \
|
||||
$(MEKEYTOOL) -import -MEkeystore _main.ks -keystore j2se_main.ks -alias $$file -domain identified_third_party ; \
|
||||
done
|
||||
|
||||
rm -f j2se_main.ks
|
||||
_test.ks: _main.ks ../tests/cert.der
|
||||
rm -f _test.ks j2se_test.ks
|
||||
cp _main.ks _test.ks
|
||||
cp j2se_main.ks j2se_test.ks
|
||||
|
||||
keytool -import -v -trustcacerts -alias ../tests/cert.der -file ../tests/cert.der -keystore j2se_test.ks -storepass javasdk ; \
|
||||
$(MEKEYTOOL) -import -MEkeystore _test.ks -keystore j2se_test.ks -alias ../tests/cert.der -domain identified_third_party ; \
|
||||
|
||||
clean:
|
||||
rm -f _main.ks j2se_main.ks
|
||||
rm -f _main.ks j2se_main.ks _test.ks j2se_test.ks
|
||||
|
|
Двоичные данные
certs/_main.ks
Двоичные данные
certs/_main.ks
Двоичный файл не отображается.
Двоичный файл не отображается.
21
main.js
21
main.js
|
@ -58,6 +58,7 @@ var initFS = new Promise(function(resolve, reject) {
|
|||
new Promise(function(resolve, reject) {
|
||||
fs.mkdir("/Persistent", resolve);
|
||||
}),
|
||||
|
||||
new Promise(function(resolve, reject) {
|
||||
fs.exists("/_main.ks", function(exists) {
|
||||
if (exists) {
|
||||
|
@ -70,7 +71,25 @@ var initFS = new Promise(function(resolve, reject) {
|
|||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
}),
|
||||
|
||||
new Promise(function(resolve, reject) {
|
||||
if (MIDP.midletClassName == "RunTests") {
|
||||
fs.exists("/_test.ks", function(exists) {
|
||||
if (exists) {
|
||||
resolve();
|
||||
} else {
|
||||
load("certs/_test.ks", "blob").then(function(data) {
|
||||
fs.create("/_test.ks", data, function() {
|
||||
resolve();
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
resolve();
|
||||
}
|
||||
}),
|
||||
]);
|
||||
});
|
||||
|
||||
|
|
|
@ -371,7 +371,11 @@ Native.create("com/sun/midp/main/Configuration.getProperty0.(Ljava/lang/String;)
|
|||
var value;
|
||||
switch (util.fromJavaString(key)) {
|
||||
case "com.sun.midp.publickeystore.WebPublicKeyStore":
|
||||
value = "_main.ks";
|
||||
if (MIDP.midletClassName == "RunTests") {
|
||||
value = "_test.ks";
|
||||
} else {
|
||||
value = "_main.ks";
|
||||
}
|
||||
break;
|
||||
case "com.sun.midp.events.dispatchTableInitSize":
|
||||
value = "16";
|
||||
|
|
Загрузка…
Ссылка в новой задаче