summary refs log tree commit diff
diff options
context:
space:
mode:
authorPeter Dettman <peter.dettman@bouncycastle.org>2023-07-25 16:28:44 +0700
committerPeter Dettman <peter.dettman@bouncycastle.org>2023-07-25 16:28:44 +0700
commit9b9414e8c9956f8a4daeaf033e4d56e73040cecd (patch)
treecf64424b21ee10c88d9caf7db4bae0e8c5d247de
parentRemove unused method (diff)
downloadBouncyCastle.NET-ed25519-9b9414e8c9956f8a4daeaf033e4d56e73040cecd.tar.xz
Warnings cleanup
-rw-r--r--crypto/src/asn1/tsp/ArchiveTimeStamp.cs8
-rw-r--r--crypto/src/asn1/tsp/ArchiveTimeStampChain.cs4
-rw-r--r--crypto/src/asn1/tsp/ArchiveTimeStampSequence.cs4
-rw-r--r--crypto/src/asn1/tsp/CryptoInfos.cs2
-rw-r--r--crypto/src/asn1/tsp/EncryptionInfo.cs12
-rw-r--r--crypto/src/asn1/tsp/EvidenceRecord.cs2
-rw-r--r--crypto/src/asn1/tsp/PartialHashtree.cs11
-rw-r--r--crypto/src/crypto/engines/RFC3394WrapEngine.cs2
-rw-r--r--crypto/src/crypto/engines/Rfc5649WrapEngine.cs2
-rw-r--r--crypto/src/pqc/crypto/utils/PqcPublicKeyFactory.cs8
10 files changed, 25 insertions, 30 deletions
diff --git a/crypto/src/asn1/tsp/ArchiveTimeStamp.cs b/crypto/src/asn1/tsp/ArchiveTimeStamp.cs
index 57cc02138..dbc426bc8 100644
--- a/crypto/src/asn1/tsp/ArchiveTimeStamp.cs
+++ b/crypto/src/asn1/tsp/ArchiveTimeStamp.cs
@@ -8,17 +8,17 @@ namespace Org.BouncyCastle.Asn1.Tsp
     /**
      * Implementation of the Archive Timestamp type defined in RFC4998.
      * @see <a href="https://tools.ietf.org/html/rfc4998">RFC 4998</a>
-     * <p>
+     * <p/>
      * ASN.1 Archive Timestamp
-     * <p>
+     * <p/>
      * ArchiveTimeStamp ::= SEQUENCE {
      * digestAlgorithm [Ø] AlgorithmIdentifier OPTIONAL,
      * attributes      [1] Attributes OPTIONAL,
      * reducedHashtree [2] SEQUENCE OF PartialHashtree OPTIONAL,
      * timeStamp       ContentInfo}
-     * <p>
+     * <p/>
      * PartialHashtree ::= SEQUENCE OF OCTET STRING
-     * <p>
+     * <p/>
      * Attributes ::= SET SIZE (1..MAX) OF Attribute
      */
     public class ArchiveTimeStamp
diff --git a/crypto/src/asn1/tsp/ArchiveTimeStampChain.cs b/crypto/src/asn1/tsp/ArchiveTimeStampChain.cs
index 13138d6f9..6d274cf58 100644
--- a/crypto/src/asn1/tsp/ArchiveTimeStampChain.cs
+++ b/crypto/src/asn1/tsp/ArchiveTimeStampChain.cs
@@ -4,10 +4,10 @@ namespace Org.BouncyCastle.Asn1.Tsp
 {
     /**
      * Implementation of ArchiveTimeStampChain type, as defined in RFC4998 and RFC6283.
-     * <p>
+     * <p/>
      * An ArchiveTimeStampChain corresponds to a SEQUENCE OF ArchiveTimeStamps, and has the following
      * ASN.1 Syntax:
-     * <p>
+     * <p/>
      * ArchiveTimeStampChain ::= SEQUENCE OF ArchiveTimeStamp
      */
     public class ArchiveTimeStampChain
diff --git a/crypto/src/asn1/tsp/ArchiveTimeStampSequence.cs b/crypto/src/asn1/tsp/ArchiveTimeStampSequence.cs
index 766f6704c..3c5d963e6 100644
--- a/crypto/src/asn1/tsp/ArchiveTimeStampSequence.cs
+++ b/crypto/src/asn1/tsp/ArchiveTimeStampSequence.cs
@@ -4,10 +4,10 @@ namespace Org.BouncyCastle.Asn1.Tsp
 {
     /**
      * Implementation of ArchiveTimeStampSequence type, as defined in RFC4998.
-     * <p>
+     * <p/>
      * An ArchiveTimeStampSequence corresponds to a SEQUENCE OF ArchiveTimeStampChains and has the
      * following ASN.1 Syntax:
-     * <p>
+     * <p/>
      * ArchiveTimeStampSequence ::= SEQUENCE OF ArchiveTimeStampChain
      */
     public class ArchiveTimeStampSequence
diff --git a/crypto/src/asn1/tsp/CryptoInfos.cs b/crypto/src/asn1/tsp/CryptoInfos.cs
index b0b84c014..b99afad76 100644
--- a/crypto/src/asn1/tsp/CryptoInfos.cs
+++ b/crypto/src/asn1/tsp/CryptoInfos.cs
@@ -4,7 +4,7 @@ namespace Org.BouncyCastle.Asn1.Tsp
 {
     /**
      * Implementation of the CryptoInfos element defined in RFC 4998:
-     * <p>
+     * <p/>
      * CryptoInfos ::= SEQUENCE SIZE (1..MAX) OF Attribute
      */
     public class CryptoInfos
diff --git a/crypto/src/asn1/tsp/EncryptionInfo.cs b/crypto/src/asn1/tsp/EncryptionInfo.cs
index e712c6a00..d8e285a0c 100644
--- a/crypto/src/asn1/tsp/EncryptionInfo.cs
+++ b/crypto/src/asn1/tsp/EncryptionInfo.cs
@@ -4,25 +4,25 @@ namespace Org.BouncyCastle.Asn1.Tsp
 {
     /**
      * Implementation of the EncryptionInfo element defined in RFC 4998:
-     * <p>
+     * <p/>
      * 1988 ASN.1 EncryptionInfo
-     * <p>
+     * <p/>
      * EncryptionInfo       ::=     SEQUENCE {
      * encryptionInfoType     OBJECT IDENTIFIER,
      * encryptionInfoValue    ANY DEFINED BY encryptionInfoType
      * }
-     * <p>
+     * <p/>
      * 1997-ASN.1 EncryptionInfo
-     * <p>
+     * <p/>
      * EncryptionInfo       ::=     SEQUENCE {
      * encryptionInfoType   ENCINFO-TYPE.&amp;id
      * ({SupportedEncryptionAlgorithms}),
      * encryptionInfoValue  ENCINFO-TYPE.&amp;Type
      * ({SupportedEncryptionAlgorithms}{&#064;encryptionInfoType})
      * }
-     * <p>
+     * <p/>
      * ENCINFO-TYPE ::= TYPE-IDENTIFIER
-     * <p>
+     * <p/>
      * SupportedEncryptionAlgorithms ENCINFO-TYPE ::= {...}
      */
     public class EncryptionInfo
diff --git a/crypto/src/asn1/tsp/EvidenceRecord.cs b/crypto/src/asn1/tsp/EvidenceRecord.cs
index 42ec4bf16..1be8a3998 100644
--- a/crypto/src/asn1/tsp/EvidenceRecord.cs
+++ b/crypto/src/asn1/tsp/EvidenceRecord.cs
@@ -8,7 +8,7 @@ namespace Org.BouncyCastle.Asn1.Tsp
     /**
      * <a href="https://tools.ietf.org/html/rfc4998">RFC 4998</a>:
      * Evidence Record Syntax (ERS)
-     * <p>
+     * <p/>
      * <pre>
      * EvidenceRecord ::= SEQUENCE {
      *   version                   INTEGER { v1(1) } ,
diff --git a/crypto/src/asn1/tsp/PartialHashtree.cs b/crypto/src/asn1/tsp/PartialHashtree.cs
index a32a9f18b..dea7c9e37 100644
--- a/crypto/src/asn1/tsp/PartialHashtree.cs
+++ b/crypto/src/asn1/tsp/PartialHashtree.cs
@@ -7,9 +7,9 @@ namespace Org.BouncyCastle.Asn1.Tsp
 {
     /**
      * Implementation of PartialHashtree, as defined in RFC 4998.
-     * <p>
+     * <p/>
      * The ASN.1 notation for a PartialHashTree is:
-     * <p>
+     * <p/>
      * PartialHashtree ::= SEQUENCE OF OCTET STRING
      */
     public class PartialHashtree
@@ -51,12 +51,7 @@ namespace Org.BouncyCastle.Asn1.Tsp
             m_values = values;
         }
 
-        public PartialHashtree(byte[] value)
-        {
-            m_values = new DerSequence(new DerOctetString(Arrays.Clone(value)));
-        }
-
-        public PartialHashtree(byte[][] values)
+        public PartialHashtree(params byte[][] values)
         {
             Asn1EncodableVector v = new Asn1EncodableVector(values.Length);
 
diff --git a/crypto/src/crypto/engines/RFC3394WrapEngine.cs b/crypto/src/crypto/engines/RFC3394WrapEngine.cs
index 5713bb08a..c0f2b3237 100644
--- a/crypto/src/crypto/engines/RFC3394WrapEngine.cs
+++ b/crypto/src/crypto/engines/RFC3394WrapEngine.cs
@@ -8,7 +8,7 @@ namespace Org.BouncyCastle.Crypto.Engines
     /// <summary>An implementation of the AES Key Wrap with Padding specification as described in RFC 3349.</summary>
     /// <remarks>
     /// For further details see: Schaad, J. and R. Housley, "Advanced Encryption Standard (AES) Key Wrap Algorithm",
-    /// RFC 3394, DOI 10.17487/RFC3394, September 2002, <https://www.rfc-editor.org/info/rfc3394>, and
+    /// RFC 3394, DOI 10.17487/RFC3394, September 2002, &lt;https://www.rfc-editor.org/info/rfc3394\&gt;, and
     /// http://csrc.nist.gov/encryption/kms/key-wrap.pdf.
     /// </remarks>
     public class Rfc3394WrapEngine
diff --git a/crypto/src/crypto/engines/Rfc5649WrapEngine.cs b/crypto/src/crypto/engines/Rfc5649WrapEngine.cs
index 09830c7e8..354879913 100644
--- a/crypto/src/crypto/engines/Rfc5649WrapEngine.cs
+++ b/crypto/src/crypto/engines/Rfc5649WrapEngine.cs
@@ -9,7 +9,7 @@ namespace Org.BouncyCastle.Crypto.Engines
     /// <summary>An implementation of the AES Key Wrap with Padding specification as described in RFC 5649.</summary>
     /// <remarks>
     /// For further details see: Housley, R. and M. Dworkin, "Advanced Encryption Standard (AES) Key Wrap with Padding Algorithm",
-    /// RFC 5649, DOI 10.17487/RFC5649, September 2009, <https://www.rfc-editor.org/info/rfc5649>, and
+    /// RFC 5649, DOI 10.17487/RFC5649, September 2009, &lt;https://www.rfc-editor.org/info/rfc5649&gt;, and
     /// http://csrc.nist.gov/encryption/kms/key-wrap.pdf.
     /// </remarks>
     public class Rfc5649WrapEngine
diff --git a/crypto/src/pqc/crypto/utils/PqcPublicKeyFactory.cs b/crypto/src/pqc/crypto/utils/PqcPublicKeyFactory.cs
index 77af73b41..5dcd7ab0c 100644
--- a/crypto/src/pqc/crypto/utils/PqcPublicKeyFactory.cs
+++ b/crypto/src/pqc/crypto/utils/PqcPublicKeyFactory.cs
@@ -411,9 +411,9 @@ namespace Org.BouncyCastle.Pqc.Crypto.Utilities
 
                     return new BikePublicKeyParameters(bikeParams, keyEnc);
                 }
-                catch (Exception e)
+                catch (Exception)
                 {
-                    byte[] keyEnc = keyInfo.PublicKeyData.GetOctets();
+                    byte[] keyEnc = keyInfo.PublicKey.GetOctets();
 
                     BikeParameters bikeParams = PqcUtilities.BikeParamsLookup(keyInfo.Algorithm.Algorithm);
 
@@ -434,10 +434,10 @@ namespace Org.BouncyCastle.Pqc.Crypto.Utilities
 
                     return new HqcPublicKeyParameters(hqcParams, keyEnc);
                 }
-                catch (Exception e)
+                catch (Exception)
                 {
                     // raw encoding
-                    byte[] keyEnc = keyInfo.PublicKeyData.GetOctets();
+                    byte[] keyEnc = keyInfo.PublicKey.GetOctets();
 
                     HqcParameters hqcParams = PqcUtilities.HqcParamsLookup(keyInfo.Algorithm.Algorithm);