Exemplo n.º 1
0
        private void FillTableP7MDocument()
        {
            PKCS7Document document = this._signatureResult.PKCS7Documents[this._requestDocumentIndex];

            TableRow row = this.CreateStandardTableRow();

            row.Cells[0].Text = "Nome file :";
            row.Cells[2].Text = document.DocumentFileName;
            if (!document.SignAlgorithm.Contains("PADES"))
            {
                row.Cells[0].Text  = "Nome file P7M:";
                row.Cells[2].Text += ".P7M";
            }
            row = null;

            row = this.CreateStandardTableRow();
            row.Cells[0].Text = "Livello:";
            row.Cells[2].Text = document.Level.ToString();
            row = null;

            row = this.CreateStandardTableRow();
            row.Cells[0].Text = "Algoritmo di Firma documento:";
            row.Cells[2].Text = document.SignAlgorithm;
            row = null;

            /*
             * if (this._signatureResult.tsInfo != null)
             *  this.AppendRowsTimeStamp(this._signatureResult.tsInfo);
             */
            document = null;
        }
Exemplo n.º 2
0
        private void AppendRowsDocumentSign()
        {
            PKCS7Document   document   = this._signatureResult.PKCS7Documents[this._requestDocumentIndex];
            SignerInfo      signerInfo = getSignerInfo(this._requestDocumentIndex, Request.QueryString["index"]);
            CertificateInfo certInfo   = signerInfo.CertificateInfo;

            TableRow row = this.CreateHeaderTableRow();

            row.Cells[0].Text = "Firma documento";
            row = null;

            row = this.CreateStandardTableRow();
            row.Cells[0].Text = "Algoritmo di Firma documento:";
            row.Cells[2].Text = signerInfo.SignatureAlgorithm;  //document.SignAlgorithm;
            row = null;

            row = this.CreateStandardTableRow();
            row.Cells[0].Text = "Impronta documento:";
            row.Cells[2].Text = document.SignHash;
            row = null;

            row = this.CreateStandardTableRow();
            row.Cells[0].Text = "Controfirmatario:";
            row.Cells[2].Text = signerInfo.isCountersigner?"Vero":"Falso";
            row = null;

            if (signerInfo.SigningTime != DateTime.MinValue)
            {
                row = this.CreateStandardTableRow();
                row.Cells[0].Text = "Data di firma:";
                row.Cells[2].Text = signerInfo.SigningTime.ToLocalTime().ToString();
                row = null;
            }
        }
Exemplo n.º 3
0
        private Microsoft.Web.UI.WebControls.TreeNode GetNodePKCS7Document(PKCS7Document document, int documentIndex)
        {
            Microsoft.Web.UI.WebControls.TreeNode node = new Microsoft.Web.UI.WebControls.TreeNode();
            node.NavigateUrl = DETAIL_PAGE + "?type=pk7mDocument&documentIndex=" + documentIndex.ToString();
            node.Target      = "right";
            node.Text        = String.Format("Documento firmato" /*, document.SignatureType.ToString()*/);;

            string imageUrl = FileManager.getFileIcon(this, "p7m");

            if (document.SignatureType == SignType.PADES)
            {
                imageUrl = FileManager.getFileIcon(this, "pdf");
            }

            node.ImageUrl         = imageUrl;
            node.SelectedImageUrl = imageUrl;

//			TreeNode folderNode=new TreeNode();
//			folderNode.Text="Altre informazioni";

            // Aggiunta nodi relativi alle firme digitali
            node.Nodes.Add(this.GetNodesFirmeDigitali(document.SignersInfo, documentIndex, null));

            // Aggiunta nodi relativi ai certificati
//			folderNode.Nodes.Add(this.GetNodesCertificati(document.SignersInfo,documentIndex));

            //node.Nodes.Add(node);

            return(node);
        }