mirror of
https://github.com/openjdk/jdk.git
synced 2026-02-27 02:30:06 +00:00
8146725: Issues with SignatureAndHashAlgorithm.getSupportedAlgorithms
Reviewed-by: weijun, wetmore
This commit is contained in:
parent
df98d4abe8
commit
666444c0e8
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2010, 2016, 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
|
||||
@ -153,13 +153,11 @@ final class SignatureAndHashAlgorithm {
|
||||
getSupportedAlgorithms(AlgorithmConstraints constraints) {
|
||||
|
||||
Collection<SignatureAndHashAlgorithm> supported = new ArrayList<>();
|
||||
synchronized (priorityMap) {
|
||||
for (SignatureAndHashAlgorithm sigAlg : priorityMap.values()) {
|
||||
if (sigAlg.priority <= SUPPORTED_ALG_PRIORITY_MAX_NUM &&
|
||||
constraints.permits(SIGNATURE_PRIMITIVE_SET,
|
||||
sigAlg.algorithm, null)) {
|
||||
supported.add(sigAlg);
|
||||
}
|
||||
for (SignatureAndHashAlgorithm sigAlg : priorityMap.values()) {
|
||||
if (sigAlg.priority <= SUPPORTED_ALG_PRIORITY_MAX_NUM &&
|
||||
constraints.permits(SIGNATURE_PRIMITIVE_SET,
|
||||
sigAlg.algorithm, null)) {
|
||||
supported.add(sigAlg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user