4
When we enter the page eCAC - Virtual Call Center and we click on Digital Certificate on the right side of the screen a modal is opened to select certain certificate that we configure in the system (this if there is certificate(s) in the configured system). Follow the image of the modal with the deleted modal description:
I would like to know how I can implement a similar feature in a particular system application using Javascript to load the customer’s NF-e certificate and use it in order to send the bills to the government and carry out other operations with them. I haven’t figured out where to start yet and few materials were found.
Sending the file is even possible, but this is not how the certificate is validated. First because only type A1 would be possible to read and it needs to be computer-based, which requires typing the password. Type A3 cannot read without a specific reader, as it is of the type A3 inviolable.
– Marcos Regis
And this certificate needs to be made available on the server or is only on the client side?
– Giancarlo Abel Giulian
It needs to be installed on the system that will issue the NF, IE, Voce need to pass your certificate and enter your password. All systems I’ve seen that do what Voce wants to do require Voce to make your certificate available to the issuing system. It’s kind of sharing your certificate.
– Marcos Regis
Any example of code that allows this sharing? The certificate is already installed correctly on the machine, a file with extension . pfx has been installed
– Giancarlo Abel Giulian
Since your system is for Java, I believe this project can help you. https://github.com/wmixvideo/nfe
– Marcos Regis
I’m already using it, the question now is, do the same as eCAC does or will have to store the client certificate in a directory on the server?
– Giancarlo Abel Giulian
You will need to create a form where the customer places the certificate (file upload) and password of the A1 certificate. Then just use the class to consume the Sefaz Webservice referring to the correct federation unit. Understand that this model is different from what eCac does where it already reads the certificate directly from the browser that in turn reads from the S.O. To avoid doing this every time you work with this Certificate, you can store the information on the server. In the case of A3 you would need an applet to communicate with the reader EVERY time you use it. You can’t store.
– Marcos Regis
And how do you do it the way eCac does it? In this case I am using ASP.NET MVC, but I believe that if the language used to do this is web, such as javascript, I can implement in ASP.NET as well. How to read the certificate through the browser?
– Jefferson Pedro
I still have this doubt friend and I have not found the solution so far
– Giancarlo Abel Giulian
Giancarlo all right? Well, I’m having the same doubt, managed to find some solution?
– Lucas Fantacucci
Unfortunately not yet, if you find an answer here (;
– Giancarlo Abel Giulian
The process that opens this "modal" is a negotiation in connection time (network layer) called TSL Handshake, I explained a little of how it works, and how I implemented in my own system the flow with PHP(https://answall.com/a/195838/7130) similar
– LeonanCarvalho