x509

Cannot find the X.509 Certificate using the following search criteria:

浪尽此生 提交于 2019-11-28 05:09:48
问题 I get this message: Cannot find the X.509 certificate using the following search criteria: StoreName 'My', StoreLocation 'LocalMachine', FindType 'FindBySubjectDistinguishedName', FindValue 'CN=HighBall'. My web.config setup looks like this; Authentication is set like... <authentication mode="Windows" /> The bindings are set for wsHttpBinging and my Service behavior is set as such... <behavior name="HighBall.Services.ServiceVerificationBehavior"> <serviceAuthorization principalPermissionMode=

Validate X.509 certificate against CA in Java

荒凉一梦 提交于 2019-11-28 05:05:24
Lets say I have something like this (client side code): TrustManager[] trustAllCerts = new TrustManager[]{ new X509TrustManager() { @Override public java.security.cert.X509Certificate[] getAcceptedIssuers() { return null; } @Override public void checkClientTrusted( java.security.cert.X509Certificate[] certs, String authType) { } @Override public void checkServerTrusted( java.security.cert.X509Certificate[] certs, String authType) { } } }; SSLContext sslc = SSLContext.getInstance("TLS"); sslc.init(null, trustAllCerts, null); SocketFactory sf = sslc.getSocketFactory(); SSLSocket s = (SSLSocket)

Write x509 certificate into PEM formatted string in java?

给你一囗甜甜゛ 提交于 2019-11-28 03:48:23
Is there some high level way to write an X509Certificate into a PEM formatted string? Currently I'm doing x509cert.encode() to write it into a DER formatted string, then base 64 encoding it and appending the header and footer to create a PEM string, but it seems bad. Especially since I have to throw in line breaks too. ZZ Coder This is not bad. Java doesn't provide any functions to write PEM files. What you are doing is the correct way. Even KeyTool does the same thing, BASE64Encoder encoder = new BASE64Encoder(); out.println(X509Factory.BEGIN_CERT); encoder.encodeBuffer(cert.getEncoded(), out

How can I configure WCF to use x509 certificates over the internet?

泪湿孤枕 提交于 2019-11-28 03:06:34
I need to use an x509 certificate to get secure message level authentication from a rich client via the internet to a secure WCF Web Service. Specifically, I am looking for a working step-by-step guide to setup, configuration, coding, and deployment, including creating a 'dev' certificate, installing it, and obtaining a 'real' certificate for production. Nigel Spencer The following steps are a guide to get you started: 1) Firstly, you need a Root Authority to generate your client and server certificates. You can either use an external Authority Provider (e.g. Verisign) or you can generate your

How to get PEM encoded X509 certificate as C++ string using openssl?

非 Y 不嫁゛ 提交于 2019-11-28 00:30:55
I have a openssl X509 structure with a self signed certificate. I need to get a PEM formatted C++ string from this structure. What are the openssl APIs that I need to use to achieve this? I tried following the example program at https://www.codeblog.org/gonzui/markup/openssl-0.9.8a/demos/x509/mkcert.c . This program shows a way to write the certificate in PEM format to a file. I can read the contents of this file into a C++ string if there is no other way to do it. look at the source of the openssl x509 command and see how it does the operation to read a DER encoded file and writes a PEM one -

WCF username without certificate

[亡魂溺海] 提交于 2019-11-27 20:49:44
问题 I'm working on a project where I need the following. WCF service on the server side (.NET 3.5) WPF client for the client side (.NET 3.0) I have an existing application that I have to use the authentication and authorization from (on the server side). I also need to store some metadata about the user in the WCF Service's Thread Principal (a site object). I do this so that I can get at it in the WCF service if I absolutely have to; some business logic may require it. So my plan was to do the

How to read a RSA public key in PEM + PKCS#1 format

人走茶凉 提交于 2019-11-27 19:42:46
I have a RSA public key in PEM format + PKCS#1(I guess): -----BEGIN RSA PUBLIC KEY----- MIGJAoGBAJNrHWRFgWLqgzSmLBq2G89exgi/Jk1NWhbFB9gHc9MLORmP3BOCJS9k onzT/+Dk1hdZf00JGgZeuJGoXK9PX3CIKQKRQRHpi5e1vmOCrmHN5VMOxGO4d+zn JDEbNHODZR4HzsSdpQ9SGMSx7raJJedEIbr0IP6DgnWgiA7R1mUdAgMBAAE= -----END RSA PUBLIC KEY----- I want to get the SHA1 digest of its ASN1 encoded version in Python. The first step should be to read this key, but I failed to do it in PyCrypto: >> from Crypto.PublicKey import RSA >> RSA.importKey(my_key) ValueError: RSA key format is not supported The documentation of PyCrypto says PEM +

iPhone web service calls to WCF Service with Certificate Authentication

不问归期 提交于 2019-11-27 18:52:17
We are a .Net shop that has standardized on WCF Services. We are in the processs of developing an iPhone application that needs to make secure web services calls to obtain data for the app. To ensure secure communiations we have enabled SSL on our web servers. But this does not ensure the service can only be consumed by authorized apps. We have configured our services to support x509 certificate authentication. Is it even possible to call a secure WCF service with certifcate authentication from an IPhone app? I have spent many hours searching the internet for examples but to no avail. I HAVE

Bouncycastle: X509CertificateHolder to X509Certificate?

蹲街弑〆低调 提交于 2019-11-27 14:19:53
问题 In versions prior to r146 it was possible to create X509Certificate objects directly. Now that API is deprecated and the new one only deliveres a X509CertificateHolder object. I cannot find a way to transform a X509CertificateHolder to X509Certificate . How can this be done? 回答1: I will answer to my own questions, but not delete it, in case someone else got the same problems: return new JcaX509CertificateConverter().setProvider( "BC" ) .getCertificate( certificateHolder ); And for attribute

snk vs. code signing certificate

烈酒焚心 提交于 2019-11-27 13:53:24
问题 In my organization we use snk files with strong names assemblies. We generate the snk ourselves. In addition we use a code signing signature on the binaries. We get the pfx from Verisign. What is the difference between these two processes? Isn't it a problem that the snk is not recevied from Verisign also? 回答1: The snk and pfx are used for two different purposes. The snk is used for strong-naming, which uses a key pair to uniquely identify an assembly. The pfx is for code signing, which is a