x509

OpenPGP/X.509 bridge: how to verify public key?

岁酱吖の 提交于 2019-12-05 14:06:59
I'd like to use OpenPGP authentication over TLS , but lack of implementations made me use a temporary solution: an OpenPGP/X.509 bridge certificate. The approach is very similar to the approach used in Foaf: https://svn.java.net/svn/sommer~svn/trunk/misc/FoafServer/pgpx509/src/net/java/dev/sommer/foafserver/utils/PgpX509Bridge.java Basically, you create a certificate request starting from a converted PGP private key, including your converted PGP public key into the certificate request. Then you sign the request with your converted PGP private key. I'm using the word " converted " because

Openssl: certificate verification fails when CApath argument is used in SSL_CTX_load_verify_locations API

女生的网名这么多〃 提交于 2019-12-05 13:39:47
I am trying to establish a TLS connection to a server machine. I have created the root CA certificate and the server certificate using openssl CLI commands. I created the server certificate with common name same as its IP address. The common name of the root CA certificate is the FQDN of the server. I am using openssl library APIs to establish connection to the server. I am using the API int SSL_CTX_load_verify_locations(SSL_CTX *ctx, const char *CAfile, const char *CApath) for setting the CA file look up path. Everything works fine when I use the CAfile argument to specify the path of my CA

C# Certificate generation framework

浪尽此生 提交于 2019-12-05 13:39:16
Does anyone know a C# framework that can generate public/private keys, X.509 certificates and sign those certificates? BouncyCastleCrypto, as crazy of a name it is, I am pretty sure has all of these capabilities. Just about all of the RFC standards are implemented. When I used it a few years ago it was poorly documented, but the unit testing was very thorough, so much so that you could search around for certain key words like "509" and find unit tests that are exercising the part of the framework that you need. I really found that I had to read through in great detail some of the RFC standards

Inter-convertability of asymmetric key containers (eg: X.509, PGP, OpenSSH)

ⅰ亾dé卋堺 提交于 2019-12-05 11:47:12
Are asymmetrical cryptographic keys fundamentally inter-convertible between the major key container formats? For example, can I convert an X.509 key file into a PGP or OpenGPG key file? And--assuming the answer is yes--is it "security neutral" to keep one key pair in whatever format and convert into whichever container file format is needed for the occasion? I'm getting a little tired of maintaining so many key pairs for X.509, OpenGPG, and SSH, when they're all RSA at the heart. Yes and no: yes, the RSA keys embedded into certificates and privkeys are just numbers. You can extract them from

Java - How to decode a Base64 encoded Certificate

狂风中的少年 提交于 2019-12-05 06:53:03
Below is my requirement: Program will have an xml file as input with 3 tags: , and . All these data are Base64 encoded. Note: Program is using BC jars Program needs to decode them and verify the data for its authenticity using the signature and certificate Verified data should be Base64 decoded and written into another file Below is my code which tries to decode the certificate: public void executeTask(InputStream arg0, OutputStream arg1) throws SomeException{ try{ BufferedReader br = null; br = new BufferedReader(new InputStreamReader(arg0)); String orgContent = "", splitData = "",

Converting a SSL Cert to a .pem format

ぐ巨炮叔叔 提交于 2019-12-05 06:15:27
问题 Hi I am a little new to all this openSSL and PEM stuf, so I thought I would ask you people here. I have a certificate in text(X509) format like this for example Certificate: Data: Version: 3 (0x2) Serial Number: 1f:19:f6:de:35:dd:63:a1:42:91:8a:d5:2c:c0:ab:12 Signature Algorithm: PKCS #1 SHA-1 With RSA Encryption Issuer: "CN=Thawte SGC CA,O=Thawte Consulting (Pty) Ltd.,C=ZA" Validity: Not Before: Fri Dec 18 00:00:00 2009 Not After : Sun Dec 18 23:59:59 2011 Subject: "CN=mail.google.com,O

How do I secure my service using SSL for Services created using Service stack?

Deadly 提交于 2019-12-05 02:51:16
问题 I would like to secure my REST service implemented over the Service Stack, by means of X509 certificates? I will be hosting my service in a .NET application. I can build the service and it seems to work fine. Any working example using certificates would be highly appreciated. 回答1: I've been following these two examples: http://pfelix.wordpress.com/2012/02/26/enabling-https-with-self-hosted-asp-net-web-api/ http://blogs.msdn.com/b/jpsanders/archive/2009/09/29/walkthrough-using-httplistener-as

Validate if RSA key matches X.509 certificate in Java

青春壹個敷衍的年華 提交于 2019-12-05 02:45:01
问题 I have a RSA Key and a X.509 Certificate which I use for SSL connections. The key and certificate are stored in files in PEM format (generated by OpenSSL) and used in an Apache HTTP server environment. Is there an easy way to validate if the key matches the certificate using only Java code (without executing the openssl binary and parsing the output), for example by using Java security and/or Bouncycastle library methods? 回答1: The following code compares the SHA-1 over the modulus within the

WCF Service Unable to Access Personal Certificate Store Unless Service Account is Logged In

拥有回忆 提交于 2019-12-05 02:37:16
问题 I created a WCF service that has a method which makes a call to a SOAP web service over the internet. In order to make a call to the SOAP web service, it requires that an X.509 certificate be sent with the HttpWebRequest. The X.509 certificates are loaded in the Personal and Trusted Certificate store of the account which the service is running under. When the service account is logged into the server, everything works just fine. However, when the service account is not physically logged onto

unable to extract public key from x509 cert

末鹿安然 提交于 2019-12-04 21:33:07
Here's my code: import java.security.PublicKey; import java.security.spec.InvalidKeySpecException; import java.io.UnsupportedEncodingException; import java.security.NoSuchAlgorithmException; import java.security.spec.X509EncodedKeySpec; import java.security.KeyFactory; class LoadKey { public static void main(String[] args) throws InvalidKeySpecException, UnsupportedEncodingException, NoSuchAlgorithmException { String cert = "-----BEGIN CERTIFICATE-----\n" + "MIIDITCCAoqgAwIBAgIQT52W2WawmStUwpV8tBV9TTANBgkqhkiG9w0BAQUFADBM\n" + "MQswCQYDVQQGEwJaQTElMCMGA1UEChMcVGhhd3RlIENvbnN1bHRpbmcgKFB0eSkg\n