mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 23:34:52 +02:00
8282220: contentType should not be a PKCS7's member
Reviewed-by: xuelei
This commit is contained in:
parent
bc43320fd3
commit
b95310b090
1 changed files with 5 additions and 19 deletions
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* Copyright (c) 1996, 2021, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 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
|
||||
|
@ -53,8 +53,6 @@ import sun.security.x509.*;
|
|||
*/
|
||||
public class PKCS7 {
|
||||
|
||||
private ObjectIdentifier contentType;
|
||||
|
||||
// the ASN.1 members for a signedData (and other) contentTypes
|
||||
private BigInteger version = null;
|
||||
private AlgorithmId[] digestAlgorithmIds = null;
|
||||
|
@ -167,7 +165,7 @@ public class PKCS7 {
|
|||
throws IOException
|
||||
{
|
||||
ContentInfo block = new ContentInfo(derin, oldStyle);
|
||||
contentType = block.contentType;
|
||||
ObjectIdentifier contentType = block.contentType;
|
||||
DerValue content = block.getContent();
|
||||
|
||||
if (contentType.equals(ContentInfo.SIGNED_DATA_OID)) {
|
||||
|
@ -240,14 +238,10 @@ public class PKCS7 {
|
|||
bais.close();
|
||||
bais = null;
|
||||
}
|
||||
} catch (CertificateException ce) {
|
||||
} catch (CertificateException | IOException ce) {
|
||||
ParsingException pe = new ParsingException(ce.getMessage());
|
||||
pe.initCause(ce);
|
||||
throw pe;
|
||||
} catch (IOException ioe) {
|
||||
ParsingException pe = new ParsingException(ioe.getMessage());
|
||||
pe.initCause(ioe);
|
||||
throw pe;
|
||||
} finally {
|
||||
if (bais != null)
|
||||
bais.close();
|
||||
|
@ -330,14 +324,10 @@ public class PKCS7 {
|
|||
}
|
||||
count++;
|
||||
}
|
||||
} catch (CertificateException ce) {
|
||||
} catch (CertificateException | IOException ce) {
|
||||
ParsingException pe = new ParsingException(ce.getMessage());
|
||||
pe.initCause(ce);
|
||||
throw pe;
|
||||
} catch (IOException ioe) {
|
||||
ParsingException pe = new ParsingException(ioe.getMessage());
|
||||
pe.initCause(ioe);
|
||||
throw pe;
|
||||
} finally {
|
||||
if (bais != null)
|
||||
bais.close();
|
||||
|
@ -444,14 +434,10 @@ public class PKCS7 {
|
|||
bais.close();
|
||||
bais = null;
|
||||
}
|
||||
} catch (CertificateException ce) {
|
||||
} catch (CertificateException | IOException ce) {
|
||||
ParsingException pe = new ParsingException(ce.getMessage());
|
||||
pe.initCause(ce);
|
||||
throw pe;
|
||||
} catch (IOException ioe) {
|
||||
ParsingException pe = new ParsingException(ioe.getMessage());
|
||||
pe.initCause(ioe);
|
||||
throw pe;
|
||||
} finally {
|
||||
if (bais != null)
|
||||
bais.close();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue