x509certificate

Accessing Windows Certificate Store certs via Java?

ぐ巨炮叔叔 提交于 2019-11-30 09:32:26
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! Start Java with -Djavax.net.ssl.trustStoreType=WINDOWS-ROOT . See http://www.oracle.com/technetwork/articles/javase/security-137537.html for more information. Crypt32 The cross-platform nature

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

ε祈祈猫儿з 提交于 2019-11-30 09:12:38
问题 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

how to convert the Certificate String into X509 structure.?

假装没事ソ 提交于 2019-11-30 08:53:05
can any one tell me how to convert the string content into X509 structure . i am using openssl to read the X509 Structure. example : certificate string -----BEGIN CERTIFICATE----- MIIExDCCA6ygAwIBAgIJAK0JmDc/YXWsMA0GCSqGSIb3DQEBBQUAMIGcMQswCQYD VQQGEwJJTjELMAkGA1UECBMCQVAxDDAKBgNVBAcTA0hZRDEZMBcGA1UEChMQUm9j a3dlbGwgY29sbGluczEcMBoGA1UECxMTSW5kaWEgRGVzaWduIENlbnRlcjEOMAwG A1UEAxMFSU1BQ1MxKTAnBgkqhkiG9w0BCQEWGmJyYWphbkBSb2Nrd2VsbGNvbGxp bnMuY29tMB4XDTExMDYxNjE0MTQyM1oXDTEyMDYxNTE0MTQyM1owgZwxCzAJBgNV BAYTAklOMQswCQYDVQQIEwJBUDEMMAoGA1UEBxMDSFlEMRkwFwYDVQQKExBSb2Nr

Error Importing SSL certificate : Not an X.509 Certificate

心不动则不痛 提交于 2019-11-30 07:53:44
I am trying to Update the SSL certificate in accordance with this post . I am noob in certificates, so i followed this guide . But, when i enter keytool -keystore mycacerts -storepass changeit -importcert -file "C:\Users\Noks\Desktop\cacerts.pem" -v I get the error: keytool error: java.lang.Exception: Input not an X.509 certificate java.lang.Exception: Input not an X.509 certificate at sun.security.tools.KeyTool.addTrustedCert(KeyTool.java:1913) at sun.security.tools.KeyTool.doCommands(KeyTool.java:818) at sun.security.tools.KeyTool.run(KeyTool.java:172) at sun.security.tools.KeyTool.main

How can you get a certificate in code on Windows Azure

家住魔仙堡 提交于 2019-11-30 07:28:05
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 Try this blog post: http://blogs.msdn.com/b/jnak/archive/2010/01/29/installing-certificates-in-windows-azure-vms.aspx It suggests code like: X509Certificate2Collection selectedCerts = new X509Certificate2Collection(); X509Store store

How to validate X509 certificate?

心已入冬 提交于 2019-11-30 07:27:39
问题 I have to write a tool which validates if a X509 certificate is valid or not (input = cert path / subject and password). How can I do that? I don't know much about certs... 回答1: Take a look at X509Certificate2.Verify() 回答2: In general, RFC 3280 includes almost complete instructions regarding how to perform validation, however those instructions are very non-trivial. Additionally you would need to read RFC 2560 (OCSP) and implement OCSP client. For most tasks you will find our

Certificates: Cannot find the certificate and private key for decryption Error when sign

风流意气都作罢 提交于 2019-11-30 07:17:23
问题 I work in company with many servers and Pcs for developers. Servers are win2003, PC developers Windows XP. In a server Win2003 named preiis01, in preproduction environment, other people in company install a client certificate using any other user (domainCompany\adminsystems) for logging in server preiis01. Anyone admin uses the user "domainCompany\adminsystems" for log in server preiis01 (using Terminal Server, Remote Desktop for Windows XP). the admin user is domainCompany\adminsystems",

System.Net.CertificatePolicy to ServerCertificateValidationCallback Accept all certificate policies

流过昼夜 提交于 2019-11-30 07:13:24
I've downloaded some sample code that is a bit outdated. It has the following class: public class TrustAllCertificatePolicy : System.Net.ICertificatePolicy { public TrustAllCertificatePolicy() { } public bool CheckValidationResult(ServicePoint sp, System.Security.Cryptography.X509Certificates.X509Certificate cert, WebRequest req, int problem) { return true; } } later on in the code it calls the following: System.Net.ServicePointManager.CertificatePolicy = new TrustAllCertificatePolicy(); It gives the following warning: Warning 1 'System.Net.ServicePointManager.CertificatePolicy' is obsolete:

How to create a X509 certificate using Java?

折月煮酒 提交于 2019-11-30 07:10:37
问题 I want to create a X509 certificate using Java language and then extract public key from it. I have searched the internet and found many code examples, but all of them have errors (unknown variable or unknown type) or have many warnings that say something like : "the method ... from type ... is deprecated " etc. For example, why the following code doesn't work: PublicKey pk; CertificateFactory cf = CertificateFactory.getInstance("X.509"); String PKstr = pk.toString(); InputStream PKstream =

Generating X509Certificate using bouncycastle X509v3CertificateBuilder

倖福魔咒の 提交于 2019-11-30 07:07:37
问题 I'm attempting to port JXTA to run on App Engine. Given that the BouncyCastle "BC" provider is not yet supported on App Engine, I have to port the existing JXTA code to generate a X509Certificate using white-listed classes. My knowledge of Crypto is minimal and i'm not certain that what i'm trying to accomplish is even possible. Here is the original code from PSEUtils.java from the JXTA project: PSEUtils.java There's a helper class which contains the java.security.cert.X509Certificate :