我试图在订购者的MSP中使用过期的证书执行package Yahtzee;
import java.util.Scanner;
public class Test1 {
public static void main(String[] args) {
// TODO Auto-generated method stub
Scanner in = new Scanner(System.in);
System.out.println("TIME TO PLAY JAVA YAHTZEE");
System.out.println("Type 1 when ready");
in.nextInt();
for(int i = 0; i <= 25; i++)
{
Test2 nw = new Test2();
}
System.out.println("Congratulations you got " + Test2.rv + " Yahtzees");
}
}
package Yahtzee;
import java.util.Random;
public class Test2 {
public String a;
public String b;
public String c;
public static int rv;
public Test2()
{
System.out.println("");
a = method1();
b = method1();
c = method1();
System.out.println("Your letters are");
System.out.println(a + "\n" + b + "\n" + c);
System.out.print("your set is: " + a + b + c + "\n");
if(a == "A" && b == "A" && c == "A")
{
System.out.println("YAHTZEE!");
rv = (rv + 1);
}
else if(a == "B" && b == "B" && c == "B")
{
System.out.println("YAHTZEE!");
rv = (rv + 1);
}
else if(a == "C" && b == "C" && c == "C")
{
System.out.println("YAHTZEE!");
rv = (rv + 1);
}
}
public static String method1()
{
String letter = "";
Random r = new Random();
for(int i = 0; i <= 2; i++)
{
int cv = r.nextInt(9) + 1;
if(cv <= 3)
{
letter = "A";
}
else if(cv >= 4 && cv <= 6)
{
letter = "B";
}
else if(cv >=7 && cv <=9)
{
letter = "C";
}
}
return letter;
}
}
。
随着它的过期,我的期望是它应该在某处引起一些错误。
但是,实际上,它在任何地方都没有产生错误。
这是正确的行为吗?
是订购者未对invoke
的结果签名,还是对等方未验证签名的有效期?
证书的有效期限和实际日期如下:
invoke
$ openssl x509 -in <Orderer MSP DIR>/signcerts/cert.pem -text | grep "Not After"
Not After : Feb 4 09:57:00 2019 GMT
$ date
Mon Feb 4 10:10:38 UTC 2019
完成没有错误,这对我来说是意外的。
invoke
对于新频道会产生错误,这是预期的。
create channel