1 files changed, 18 insertions, 7 deletions
diff --git a/crypto/src/cmp/GeneralPkiMessage.cs b/crypto/src/cmp/GeneralPkiMessage.cs
index d91b8ef7e..ad55a8005 100644
--- a/crypto/src/cmp/GeneralPkiMessage.cs
+++ b/crypto/src/cmp/GeneralPkiMessage.cs
@@ -1,8 +1,4 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace Org.BouncyCastle.Asn1.Cmp
+namespace Org.BouncyCastle.Asn1.Cmp
{
public class GeneralPKIMessage
{
@@ -13,17 +9,28 @@ namespace Org.BouncyCastle.Asn1.Cmp
return PkiMessage.GetInstance(Asn1Object.FromByteArray(encoding));
}
+
+ /// <summary>
+ /// Wrap a PKIMessage ASN.1 structure.
+ /// </summary>
+ /// <param name="pkiMessage">PKI message.</param>
public GeneralPKIMessage(PkiMessage pkiMessage)
{
this.pkiMessage = pkiMessage;
}
+ /// <summary>
+ /// Create a PKIMessage from the passed in bytes.
+ /// </summary>
+ /// <param name="encoding">BER/DER encoding of the PKIMessage</param>
public GeneralPKIMessage(byte[] encoding) : this(parseBytes(encoding))
{
}
- public PkiHeader Header {
- get {
+ public PkiHeader Header
+ {
+ get
+ {
return pkiMessage.Header;
}
}
@@ -36,6 +43,10 @@ namespace Org.BouncyCastle.Asn1.Cmp
}
}
+ /// <summary>
+ /// Return true if this message has protection bits on it. A return value of true
+ /// indicates the message can be used to construct a ProtectedPKIMessage.
+ /// </summary>
public bool HasProtection
{
get { return pkiMessage.Protection != null; }
|