x509certificate

X509AsymmetricSecurityKey.GetAsymmetricAlgorithm returns null after .Net 4.7.2 upgrade

依然范特西╮ 提交于 2019-12-11 15:01:16
问题 I have a problem with X509AsymmetricSecurityKey.GetAsymmetricAlgorithm running in a standard unit test. The test has been passing for years running on .Net Framework version 4.5.2 (C#), however since upgrading the project to version 4.7.2 it has ben failing as GetAsymmetricAlgorithm returns null. The exact same code runs perfect outside the test. X509Certificate2 cert = null; var store = new X509Store(StoreLocation.LocalMachine); store.Open(OpenFlags.ReadOnly); // I'm actually using

Sign SOAP body and Timestamp with X509 certifcate in WCF

点点圈 提交于 2019-12-11 14:17:38
问题 I’m trying to connect to a SOAP WS with the following features: HTTPS Signed Timestamp Signed Body Not encrypted Request That's an example of the Soap Request I want: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <soapenv:Header> <wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"> <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id=

WCF - SignedXml.CheckSignature failing on signed soap body

杀马特。学长 韩版系。学妹 提交于 2019-12-11 12:05:52
问题 I'm trying to validate a signature on a signed SOAP message. (Just to get this out of the way, I have no control at all over the message I'm receiving) The Body of the message is signed and sent over by a Java appliance. The SignedXml.CheckSignature method fails but I'm certain that the message I'm receiving is correct. relevant bit: Dim sdoc As New SignedXml(doc) Dim nodeList As XmlNodeList = doc.GetElementsByTagName("Signature", "http://www.w3.org/2000/09/xmldsig#") sdoc.LoadXml(CType

How to get and install a root CA certificate

懵懂的女人 提交于 2019-12-11 11:02:52
问题 I'm having a problem with SslStream.AuthenticateAsClient taking a "long time" (~15s). This is a known issue, and is explained in this MSDN blog post. It gives two possible solutions Summing up, this behavior is by design. Options we have are: 1) Install the root CA cert locally so we don’t need to go to the Internet for the list of trusted root CA certs. 2) Disable the Automatic Root Certificates Update feature via GPO so we don’t go to the Internet in any case. I've been told option 2 is not

C# Certificates search - why serial from Win view Tool don't work

独自空忆成欢 提交于 2019-12-11 10:17:35
问题 I tryed to search sertificates in local store by serial with the following code: X509Store store = new X509Store(StoreName.My, StoreLocation.CurrentUser); store.Open(OpenFlags.ReadOnly | OpenFlags.OpenExistingOnly); var certSerial = "‎18 99 ac c2 1e ed 69 ae"; //copied from Windows Certificates view tool certSerial = certSerial.Replace(" ", string.Empty).ToUpper(); var foundCerts = store.Certificates.Find( X509FindType.FindBySerialNumber, certSerial , true); ...And found nothing. However then

Duplicate Fiddler.cer being inserted into certificate store

最后都变了- 提交于 2019-12-11 09:57:19
问题 I have put together a bare-bones test case which literally does nothing but FiddlerApplication.Startup(8877, true, true); and even with this after clearing the personal store of FiddlerRoot.cer, i'm getting a bunch of random FiddlerRoot.cer sometimes as many as 10 instantly being inserted into the current users personal store. Here is a screenshot of what happens when running the test case and refreshing a web page. Ultimately it causes Fiddler to spam the error below to my log output: (20/06

Apple Notification Services: Windows server requires re-importing the APNs certificate

只愿长相守 提交于 2019-12-11 08:48:54
问题 I've been successfully running Apple Push Notifications on my Windows Development server (win 7) until a weekend power failure at the office caused my box to shut down (it lasted longer than the UPS unit). I then discovered that the push notifications stopped working until I re-imported the .p12 certificate into the server. Then just to test, I shut down and restarted the development box, and again found that the push notifications were not working, and once more I needed to re-import the

SignedData giving Invalid algorithm specified.exception

自作多情 提交于 2019-12-11 08:04:23
问题 I tried to sign and valid my signed data using myCert.pfx file private and public key. But while signing the data I am getting " Invalid algorithm specified." exception .Net framework we are using is 4.5 and the code is as below public static void CallMainMethod() { string str = "Sign and verify the data"; X509Certificate2 certificate = LoadPrivateKey(); byte[] hashBytes = GetDataHash(str); byte[] signature = GetDigitalSignature(hashBytes); } private static X509Certificate2 LoadPrivateKey() {

How to generate intermediate and root cert from an existing leaf certificate?

谁都会走 提交于 2019-12-11 07:55:04
问题 Now i have a X509 leaf certificate. From the certification path to see, there's a intermediate cert and a root cert in it. I want to generate the intermediate cert(..CA- G3) and the root cert(VerSign). Currently, my way is to double click the intermediate one and then click "Copy to file.." to export it. Do same for the root one too. Is this way to correct to generate intermediate/root certs? From my test result, it seems the generated root cert with wrong fingerprint . The fingerpring doesn

ListenAndServerTLS keeps failing with error: failed to find any PEM data in certificate input

六月ゝ 毕业季﹏ 提交于 2019-12-11 07:34:16
问题 I bought an SSL certificate from Godaddy for a web site. I added the files in the server and run the service and it just returns an error: failed to find any PEM data in certificate input I used cat to generate a server.pem file with all the files, even added a godaddy pem intermediate pem file they provide for a G2 Certificate Chain and nothing. cat generated-private-key.txt > server.pem cat 678f65b8a7391017.crt >> server.pem cat gd_bundle-g2-g1.crt >> server.pem cat gdig2.crt.pem >> server