Skip to content

Commit

Permalink
ApplicationResponse sign
Browse files Browse the repository at this point in the history
- ApplicationResponse sign
- Docs
  • Loading branch information
miguelhuertas committed Feb 26, 2020
1 parent b86186a commit a9c468a
Show file tree
Hide file tree
Showing 9 changed files with 40 additions and 15 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# eFacturacionColombia_V2.Firma (C#)

[![version](https://img.shields.io/badge/version-2.1-blue.svg)](#) [![build](https://img.shields.io/badge/build-passing-brightgreen.svg)](#)
[![version](https://img.shields.io/badge/version-2.2-blue.svg)](#) [![build](https://img.shields.io/badge/build-passing-brightgreen.svg)](#)



Expand Down Expand Up @@ -35,15 +35,15 @@ var fecha = DateTime.Now;
var archivoXml = new FileInfo("path/to/unsigned-invoice.xml");
var facturaFirmada = firma.FirmarFactura(archivoXml, fecha);
// guardar xml firmado
File.WriteAllBytes(facturaFirmada, "path/to/signed-invoice.xml");
File.WriteAllBytes("path/to/signed-invoice.xml", facturaFirmada);


// nota de crédito, variante 2:
// firmar contenido xml (string)
var contenidoXml = File.ReadAllText("path/to/unsigned-credit-note.xml");
var notaCreditoFirmada = firma.FirmarNotaCredito(contenidoXml, fecha);
// guardar xml firmado
File.WriteAllBytes(notaCreditoFirmada, "path/to/signed-credit-note.xml");
File.WriteAllBytes("path/to/signed-credit-note.xml", notaCreditoFirmada);


// nota de débito, variante 3:
Expand Down
Binary file added README.pdf
Binary file not shown.
2 changes: 1 addition & 1 deletion eFacturacionColombia_V2.Firma/FirmaElectronica.cs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ public byte[] FirmarEvento(byte[] bytesXml, DateTime fecha)
xpathExpression.Namespaces.Add("sts", "dian:gov:co:facturaelectronica:Structures-2-1");
xpathExpression.Namespaces.Add("xades", "http://uri.etsi.org/01903/v1.3.2#");
xpathExpression.Namespaces.Add("xades141", "http://uri.etsi.org/01903/v1.4.1#");
xpathExpression.XPathExpression = "/fe:ApplicationResponse/ext:UBLExtensions/ext:UBLExtension[1]/ext:ExtensionContent";
xpathExpression.XPathExpression = "/fe:ApplicationResponse/ext:UBLExtensions/ext:UBLExtension[2]/ext:ExtensionContent";

return FirmarDocumento(bytesXml, fecha, xpathExpression);
}
Expand Down
8 changes: 4 additions & 4 deletions eFacturacionColombia_V2.Firma/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
[assembly: AssemblyTitle("eFacturacionColombia_V2.Firma")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Miguel Anderson Huertas")]
[assembly: AssemblyCompany("Miguel Huertas <[email protected]>")]
[assembly: AssemblyProduct("eFacturacionColombia_V2.Firma")]
[assembly: AssemblyCopyright("Copyright © 2019")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -32,5 +32,5 @@
// Puede especificar todos los valores o usar los números de compilación y de revisión predeterminados
// mediante el carácter "*", como se muestra a continuación:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.1.0.0")]
[assembly: AssemblyFileVersion("2.1.0.0")]
[assembly: AssemblyVersion("2.2.0.0")]
[assembly: AssemblyFileVersion("2.2.0.0")]
9 changes: 2 additions & 7 deletions eFacturacionColombia_V2.Firma/RolFirmante.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;


namespace eFacturacionColombia_V2.Firma
{
public enum RolFirmante
{
EMISOR,
PROVEEDOR_TECNOLOGICO
}
}
}
Binary file added packages/BouncyCastle.1.8.5/.signature.p7s
Binary file not shown.
Binary file not shown.
30 changes: 30 additions & 0 deletions packages/BouncyCastle.1.8.5/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# The Bouncy Castle Crypto Package For C Sharp

The Bouncy Castle Crypto package is a C\# implementation of cryptographic algorithms and protocols, it was developed by the Legion of the Bouncy Castle, a registered Australian Charity, with a little help! The Legion, and the latest goings on with this package, can be found at [http://www.bouncycastle.org](http://www.bouncycastle.org). In addition to providing basic cryptography algorithms, the package also provides support for CMS, TSP, X.509 certificate generation and a variety of other standards such as OpenPGP.

The Legion also gratefully acknowledges the contributions made to this package by others (see [here](http://www.bouncycastle.org/csharp/contributors.html) for the current list). If you would like to contribute to our efforts please feel free to get in touch with us or visit our [donations page](https://www.bouncycastle.org/donate), sponsor some specific work, or purchase a support contract through [Crypto Workshop](http://www.cryptoworkshop.com).

Except where otherwise stated, this software is distributed under a license based on the MIT X Consortium license. To view the license, [see here](http://www.bouncycastle.org/licence.html). The OpenPGP library also includes a modified BZIP2 library which is licensed under the [Apache Software License, Version 2.0](http://www.apache.org/licenses/).

**Note**: this source tree is not the FIPS version of the APIs - if you are interested in our FIPS version please contact us directly at [[email protected]](mailto:[email protected]).

## Mailing Lists

For those who are interested, there are 2 mailing lists for participation in this project. To subscribe use the links below and include the word subscribe in the message body. (To unsubscribe, replace **subscribe** with **unsubscribe** in the message body)

* [[email protected]](mailto:[email protected])
This mailing list is for new release announcements only, general subscribers cannot post to it.
* [[email protected]](mailto:[email protected])
This mailing list is for discussion of development of the package. This includes bugs, comments, requests for enhancements, questions about use or operation.

**NOTE:**You need to be subscribed to send mail to the above mailing list.

## Feedback

If you want to provide feedback directly to the members of **The Legion** then please use [[email protected]](mailto:[email protected]), if you want to help this project survive please consider [donating](https://www.bouncycastle.org/donate).

For bug reporting/requests you can report issues here on github, via feedback-crypto if required, and we also have a [Jira issue tracker](http://www.bouncycastle.org/jira). We will accept pull requests based on this repository as well.

## Finally

Enjoy!
Binary file not shown.

0 comments on commit a9c468a

Please sign in to comment.