x509certificate

Store an X509Certificate2 in DB

≡放荡痞女 提交于 2019-12-03 13:59:19
Is it possible to store an X509Certificate2 in a SQL Server table rather than pull a .p12 file from the file system? I'm sure you can but not sure how to go about this. Rohan West This is definitely possible, the X509Certificate2 has a RawData property that can be saved into your SQL Database. To reconstruct the certificate you can use this constructor var cert = new X509Certificate2(filename); var data = cert.RawData; // save data to database... // Fetch data from database... cert = new X509Certificate2(data); Use .Export() then Convert.ToBase64String() and save as NVARCHAR(MAX) To save it:

CertificateException when generateCertificate()

[亡魂溺海] 提交于 2019-12-03 13:59:06
问题 I am developing my android app. I am trying to generate the X509Certificate instance from my certificate file stream, but get CertificateException , here is my simple code: import java.security.cert.CertificateException; import java.security.cert.CertificateFactory; import java.security.cert.X509Certificate; ... public class CertMgr { //my certification file 'mycert.p12' located in my app internal storage File certFile = GET_CERT(); X509Certificate cert = null; try { FileInputStream fis = new

Correctly creating a new certificate with an intermediate certificate using bouny castle

点点圈 提交于 2019-12-03 13:33:35
问题 So my problem is as follows, Basically I want to create a certificate chain using bouncy castle (jdk16 version 1.46). I am rather new to bouncy castle and java.security in general so if my approach might be completely wrong, but anyway this is what I did: So far I am able to create a self signed certificate which I use as the root certificate. This is done using the following code: //-----create CA certificate with key KeyPair caPair = Signing.generateKeyPair("DSA", 1024, null, null); This

How to create eIDAS certificate with QWAC and QSealC profiles (PSD2 specific attributes) for testing

筅森魡賤 提交于 2019-12-03 13:08:02
问题 I want to create a eIDAS certificate with QWAC and QSealC profiles with PSD2 specific attributes as mentioned in the doc. Please help me, this is just for testing purposes. https://docbox.etsi.org/ESI/Open/Latest_Drafts/ts_119495v000003_for-public-review.pdf 回答1: I had the same requirement months ago, and I wrote a eIDAS test certificate generator compliant psd2. I followed the ASN.1 Declaration giving by the "ts_119495v000003_for-public-review.pdf" document. here is the link to generate

How do I create a PKCS12 .p12 file in C#?

孤者浪人 提交于 2019-12-03 13:02:05
问题 this is probably a n00b question, but I don't really have any experience in this area. I need to create a p12 bundle containing an X509 certificate and the private key. I currently have two objects, the X509Certificate2, and the RSAParameters object which contains key information. How do I combine these into a p12 file? I just cannot find any information regarding this. I also have a RSACryptoServiceProvider object that has the parameters from the RSAParameters imported into it if that helps.

How to install my server's self-signed certificate on an iPad

房东的猫 提交于 2019-12-03 12:51:17
问题 Is there a way to install my own self-signed SSL certificate on my iPad? Presumably I can get the .crt via Dropbox or email, but then what do I do with it? Is there an easier way to get the .crt than that (from a PC)? 回答1: This might help found this Apple Support post: I would import the cert on a desktop system through Firefox, then export with private key in .p12 form. Email the resulting cert and you should be all set. http://discussions.apple.com/thread.jspa?threadID=2652502&tstart=0 回答2:

X509 guide/tutorial in C#

删除回忆录丶 提交于 2019-12-03 12:32:32
问题 Can anyone point me to a good introductory materials on X509 certificates with examples in C#. 回答1: You can begin here X509Certificate MSDN Resource The System.Security.Cryptography.X509Certificates namespace contains the common language runtime implementation of the Authenticode X.509 v.3 certificate. This certificate is signed with a private key that uniquely and positively identifies the holder of the certificate. 回答2: I found this C# example pretty helpful in figuring out how to generate

How can I use RFC3161 (trusted) timestamps to prove the age of commits in my Git repository?

人盡茶涼 提交于 2019-12-03 11:17:32
问题 Updated I have posted a script I'm using for this to the StackExchange Code Review site. My original question for this was Is there a way I can sign a Git commit with an X.509 certificate and timestamp? . For a while I thought I could only get things I've signed with my X.509 certificate timestamped by a trusted third party. This is not the case. Digital signing with an X.509 certificate and trusted time stamping are mutually exclusive. I have updated my question to reflect this. As pointed

How to remove certificate from Store cleanly

别来无恙 提交于 2019-12-03 10:37:56
You can install certificate into certificate store using Wizard in certmgr.msc (Right click install)? Does anyone knows how to "cleanly" remove all the certificate by either using wizard/Code (pref.) /Script ? I want to be able to remove everything (that I have installed earlier) from the LocalMachine and/or CurrentUser Store without leaving any residue. Thanks You could try the X509Store and releated classes in the .Net Framework to delete a certificate from the certificate store. The following code example deletes a certificate from the current user's My store: // Use other store locations

Best way to sign data in web form with user certificate

[亡魂溺海] 提交于 2019-12-03 10:34:48
问题 We have a C# web app where users will connect using a digital certificate stored in their browsers. From the examples that we have seen, verifying their identity will be easy once we enable SSL, as we can access the fields in the certificate, using Request.ClientCertificate, to check the user's name. We have also been requested, however, to sign the data sent by the user (a few simple fields and a binary file) so that we can prove, without doubt, which user entered each record in our database