mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +02:00
8246397: Use KnownOIDs for known OIDs
Reviewed-by: xuelei
This commit is contained in:
parent
2bfc64ad1f
commit
bcbe46b0b3
10 changed files with 67 additions and 74 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2019, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2020, 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
|
||||
|
@ -46,6 +46,7 @@ import jdk.internal.access.SharedSecrets;
|
|||
import sun.security.util.Debug;
|
||||
import sun.security.jca.*;
|
||||
import sun.security.jca.GetInstance.Instance;
|
||||
import sun.security.util.KnownOIDs;
|
||||
|
||||
/**
|
||||
* The Signature class is used to provide applications the functionality
|
||||
|
@ -548,7 +549,7 @@ public abstract class Signature extends SignatureSpi {
|
|||
Set<String> critSet = c.getCriticalExtensionOIDs();
|
||||
|
||||
if (critSet != null && !critSet.isEmpty()
|
||||
&& critSet.contains("2.5.29.15")) {
|
||||
&& critSet.contains(KnownOIDs.KeyUsage.value())) {
|
||||
boolean[] keyUsageInfo = c.getKeyUsage();
|
||||
// keyUsageInfo[0] is for digitalSignature.
|
||||
if ((keyUsageInfo != null) && (keyUsageInfo[0] == false))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue