OpenJDK / jdk8u / jdk8u / jdk
changeset 9735:2e2a9d062ccc
8046046: Test sun/security/pkcs11/Signature/TestDSAKeyLength.java fails intermittently on Solaris 11 in 8u40 nightly
Summary: Override the upper limit to 1024 for SHA1withDSA when larger DSA key size is supported.
Reviewed-by: mullan, ascarpino
author | valeriep |
---|---|
date | Tue, 01 Jul 2014 20:35:30 +0000 |
parents | 813b77e77de0 |
children | 17175c0b0d1a |
files | src/share/classes/sun/security/pkcs11/P11Signature.java |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/classes/sun/security/pkcs11/P11Signature.java Tue Jul 01 16:51:44 2014 +0100 +++ b/src/share/classes/sun/security/pkcs11/P11Signature.java Tue Jul 01 20:35:30 2014 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2003, 2014, 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 @@ -340,7 +340,10 @@ } int minKeySize = (int) mechInfo.ulMinKeySize; int maxKeySize = (int) mechInfo.ulMaxKeySize; - + // need to override the MAX keysize for SHA1withDSA + if (md != null && mechanism == CKM_DSA && maxKeySize > 1024) { + maxKeySize = 1024; + } int keySize = 0; if (key instanceof P11Key) { keySize = ((P11Key) key).length();