mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8291509: Minor cleanup could be done in sun.security
Reviewed-by: weijun
This commit is contained in:
parent
6beeb8471c
commit
4cec141a90
298 changed files with 2650 additions and 3262 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1997, 2020, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1997, 2022, 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
|
||||
|
@ -29,6 +29,7 @@ import java.io.IOException;
|
|||
import java.io.OutputStream;
|
||||
import java.security.cert.CertificateException;
|
||||
import java.util.Date;
|
||||
|
||||
import sun.security.x509.CertificateExtensions;
|
||||
import sun.security.util.*;
|
||||
|
||||
|
@ -507,10 +508,7 @@ public class PKCS9Attribute implements DerEncoder {
|
|||
break;
|
||||
|
||||
case 17: // SignatureTimestampToken attribute
|
||||
value = elems[0].toByteArray();
|
||||
break;
|
||||
|
||||
case 18: // CMSAlgorithmProtection
|
||||
case 18: // CMSAlgorithmProtection
|
||||
value = elems[0].toByteArray();
|
||||
break;
|
||||
|
||||
|
@ -638,9 +636,6 @@ public class PKCS9Attribute implements DerEncoder {
|
|||
// break unnecessary
|
||||
|
||||
case 17: // SignatureTimestampToken
|
||||
temp.write(DerValue.tag_Set, (byte[])value);
|
||||
break;
|
||||
|
||||
case 18: // CMSAlgorithmProtection
|
||||
temp.write(DerValue.tag_Set, (byte[])value);
|
||||
break;
|
||||
|
@ -745,7 +740,6 @@ public class PKCS9Attribute implements DerEncoder {
|
|||
sb.append(value.toString());
|
||||
}
|
||||
sb.append("]");
|
||||
return sb.toString();
|
||||
} else { // multi-valued
|
||||
boolean first = true;
|
||||
Object[] values = (Object[]) value;
|
||||
|
@ -757,8 +751,8 @@ public class PKCS9Attribute implements DerEncoder {
|
|||
sb.append(", ");
|
||||
sb.append(curVal.toString());
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue