x509certificate

How to create a snk from pfx / cer?

本秂侑毒 提交于 2019-11-29 21:23:02
Microsoft seems to have created a certification jungle, that is hard to understand. Microsoft X.509 certificate (.cer) Personal Information Exchange (.pfx) Assembly Signature Key Attribute (.snk) Would it be advisable to create an snk file based on pfx or cer? (Not sure if its even possible, and if its possible how is it done?) While an assembly can be signed with a password protected pfx, it doesn't seem to be strong named though, unless it is signed with snk instead. But the snk has no password protection. Which one is safer to use? As I am the only developer in my project, I don't have the

Azure API The server failed to authenticate the request

*爱你&永不变心* 提交于 2019-11-29 19:29:31
问题 I have a task ( I tried with worker role and to upload a console app and run the .exe) that should run once a day and gather Azure Metrics of some of my VMs. This works flawlessly locally but on a cloud service I get this Error: Unhandled Exception: Microsoft.WindowsAzure.CloudException: ForbiddenError: The server failed to authenticate the request. Verify that the certificate is valid and associated with this subscription. at Microsoft.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSucces .

How to call the default certificate check when overriding ServicePointManager.ServerCertificateValidationCallback in C#?

こ雲淡風輕ζ 提交于 2019-11-29 17:00:42
问题 I need to trust some self-signed certificates in the application, so I override validation callback like this: ServicePointManager.ServerCertificateValidationCallback = MyRemoteCertificateValidationCallback; ... public static bool MyRemoteCertificateValidationCallback( Object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) { if (sslPolicyErrors == SslPolicyErrors.None) return true; if (IsAprrovedByMyApplication(sender, certificate)) // <-- no matter what

how to get the Keyusage value from the X509 certificate?

不羁岁月 提交于 2019-11-29 16:17:59
I want to retrieve the Key usage value from the X509 structured certificate , i tried the following code X509* lcert=NULL; lCert=PEM_read(filename); // function will return the certificate in X509 unsigned long lKeyusage= lCert->ex_kusage; When i print the lKeyusage value .. some times i get 128 ... sometimes i get 0 for the same certificate .. Can any one tell me what is the error .? If i am doing wrong please give me some sample code or Correct API .. I think the easiest way is to use a memory BIO: ... X509 *lcert = NULL; BUF_MEM *bptr = NULL; char *buf = NULL; int loc; FILE *f = fopen("your

Access installed certified to sign

筅森魡賤 提交于 2019-11-29 15:41:45
I am trying to sign an Object in a Java + JSF project. What I have done so far is create my own X509 certificate as well as a CA with XCA and install both of them on Firefox and Chrome. I have been searching for 3 days how could I access it to sign (the typical pop-up asking for select a certificate in case you have more than one installed) but I just cannot find something useful. I have seen multiple times this code line: X509Certificate[] certs = (X509Certificate[]) request.getAttribute("javax.servlet.request.X509Certificate"); but I have no clue about where can I get that request with the

generate key and certificate using keytool

独自空忆成欢 提交于 2019-11-29 15:40:28
问题 I want to generate a self signed trusted certificate and a csr and sign the csr with trusted certificate created. I am trying it with keytool. In the first step of creating a trusted certificate using the below command keytool -genkey -alias mytrustCA -keyalg RSA -keystore keystore.jks -keysize 1024 where it puts the certificate into keystore. How can I store it to a file ? and when I list the contents using keytool -list -v -keystore cert/test.keystore Certificate created with above "genkey"

Accessing Windows Certificate Store certs via Java?

你说的曾经没有我的故事 提交于 2019-11-29 15:09:12
问题 I'm looking to write something that can enumerate and use (to sign) certificates in CurrentUser/My and LocalMachine/My, but I haven't been able to find anything for the Windows cert store, only Java's own secret store. This link looks promising, but I can only use what ships with Java. I found this question asked on SO before, but it's from five years ago, which is a long time in computer years. Thanks! 回答1: Start Java with -Djavax.net.ssl.trustStoreType=WINDOWS-ROOT . See http://www.oracle

This certificate has an invalid issuer keychain

ぃ、小莉子 提交于 2019-11-29 14:26:05
问题 I do have private key(my_ca.key) and public key(my_cert.crt) which is signed by DigiCert. Now I want to generate the SSL certificate (version 3) and sign it by my private key . Here is the way I tried to do that. But when I export into keychain (Mac OS X). I have been getting error like this " This certificate has an invalid issuer keychain ". No idea how to solve this. Here my_cert.crt is extended from DigiCert High Assurance CA-3 and that one extended from DigiCert High Assurance EV Root CA

.NET Standard - Merge a certificate and a private key into a .pfx file programmatically

拟墨画扇 提交于 2019-11-29 14:08:11
Is there any way to combine a certificate and a key (both received separately as Base64 strings from a service) into a .pfx file using C#/.NET Standard programmatically ? Using a tool is not an option, since I need to automate it. The context: I need to load a certificate and a private key (separate Base64 strings without headers and footers) to a X509Certificate2 object to pass it on to the app from a .NET Standard 1.6 library. The problem is, there is no PrivateKey property in the X509Certificate2 class in .NET Standard! So the only way for me to actually load the private key in a

How can you get a certificate in code on Windows Azure

夙愿已清 提交于 2019-11-29 09:28:37
问题 I'm trying to create our own WIF Identity Provider and run it on Azure but I'm struggling when trying to automatically generate the Federation Metadata. This line does not appear to work on Azure: CertificateUtil.GetCertificate(StoreName.My, StoreLocation.LocalMachine, signingCertificateName); The certificate is uploaded to Azure, how can I get hold of it? Thanks 回答1: Try this blog post: http://blogs.msdn.com/b/jnak/archive/2010/01/29/installing-certificates-in-windows-azure-vms.aspx It