mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8261472: BasicConstraintsExtension::toString shows "PathLen:2147483647" if there is no pathLenConstraint
Reviewed-by: jnimeh
This commit is contained in:
parent
699a3cde74
commit
4619f372ae
1 changed files with 10 additions and 3 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2021, 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
|
||||
|
@ -171,10 +171,17 @@ implements CertAttrSet<String> {
|
|||
* Return user readable form of extension.
|
||||
*/
|
||||
public String toString() {
|
||||
String pathLenAsString;
|
||||
if (pathLen < 0) {
|
||||
pathLenAsString = " undefined";
|
||||
} else if (pathLen == Integer.MAX_VALUE) {
|
||||
pathLenAsString = " no limit";
|
||||
} else {
|
||||
pathLenAsString = String.valueOf(pathLen);
|
||||
}
|
||||
return super.toString() +
|
||||
"BasicConstraints:[\n CA:" + ca +
|
||||
"\n PathLen:" +
|
||||
((pathLen >= 0) ? String.valueOf(pathLen) : " undefined") +
|
||||
"\n PathLen:" + pathLenAsString +
|
||||
"\n]\n";
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue