8176183: sun/security/mscapi/SignedObjectChain.java fails on Windows
Reviewed-by: weijun
This commit is contained in:
parent
61c3a29e0c
commit
b2a42d78ef
@ -215,8 +215,6 @@ sun/security/tools/jarsigner/warnings/BadKeyUsageTest.java 8026393 generic-
|
||||
javax/net/ssl/DTLS/PacketLossRetransmission.java 8169086 macosx-x64
|
||||
javax/net/ssl/DTLS/RespondToRetransmit.java 8169086 macosx-x64
|
||||
|
||||
sun/security/mscapi/SignedObjectChain.java 8176183 windows-all
|
||||
|
||||
sun/security/krb5/auto/Basic.java 8176296 generic-all
|
||||
|
||||
sun/security/ssl/X509KeyManager/PreferredKey.java 8176354 generic-all
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2015, 2017, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -137,8 +137,17 @@ public class Chain {
|
||||
PrivateKey[] privKeys = new PrivateKey[N];
|
||||
PublicKey[] pubKeys = new PublicKey[N];
|
||||
PublicKey[] anotherPubKeys = new PublicKey[N];
|
||||
KeyPairGenerator kpg = KeyPairGenerator.getInstance(
|
||||
test.keyAlg.name);
|
||||
Signature signature;
|
||||
KeyPairGenerator kpg;
|
||||
if (test.provider != Provider.Default) {
|
||||
signature = Signature.getInstance(test.sigAlg.name,
|
||||
test.provider.name);
|
||||
kpg = KeyPairGenerator.getInstance(
|
||||
test.keyAlg.name, test.provider.name);
|
||||
} else {
|
||||
signature = Signature.getInstance(test.sigAlg.name);
|
||||
kpg = KeyPairGenerator.getInstance(test.keyAlg.name);
|
||||
}
|
||||
for (int j=0; j < N; j++) {
|
||||
KeyPair kp = kpg.genKeyPair();
|
||||
KeyPair anotherKp = kpg.genKeyPair();
|
||||
@ -154,14 +163,6 @@ public class Chain {
|
||||
}
|
||||
}
|
||||
|
||||
Signature signature;
|
||||
if (test.provider != Provider.Default) {
|
||||
signature = Signature.getInstance(test.sigAlg.name,
|
||||
test.provider.name);
|
||||
} else {
|
||||
signature = Signature.getInstance(test.sigAlg.name);
|
||||
}
|
||||
|
||||
// Create a chain of signed objects
|
||||
SignedObject[] objects = new SignedObject[N];
|
||||
objects[0] = new SignedObject(str, privKeys[0], signature);
|
||||
|
Loading…
Reference in New Issue
Block a user