pkix

How is the CSR signature constructed?

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-07 03:58:29
I am trying to generate a CSR (Certificate Signing Request) in an embedded device. I have implemented some OpenSSL functions in one embedded device. Unfortunately I only have a few functions available. So far I've been able to generate an RSA private key and now I need to generate the CSR. My library does NOT have any of the functions such as X509_REQ_new() , X509_REQ_get_subject_name() etc. Therefore I'm building the CSR by means of creating a DER file directly. The CSR in DER format is decoded as follows: ASN1 Sequence Version Subject(s) name(s) Type of encryption Modulus & Exponent (from my

When a TrustManagerFactory is not a TrustManagerFactory (Java)

风格不统一 提交于 2019-12-06 17:04:22
问题 I am trying to add some additional JUnit test to an existing App-Server (TomCat) product. I have run into an issue with the (existing and fielded) custom TrustManager. This thing works fine in production, but during JUnit, gives exception. The customized TrustManager merely loads a keystore from a path, and implicitly trusts our own public certs. For some reason, using this in JUnits causes an exception on the following line: TrustManagerFactory tmFactory = TrustManagerFactory.getInstance(

How to pass trustStore property in gradle build script

安稳与你 提交于 2019-12-05 00:46:26
问题 I am trying to generate classes for a SOAP webservice through a gradle script. I am using a plugin gradle-jaxws-plugin which is available in maven central. My script looks like below: buildscript { repositories { mavenCentral() } dependencies { classpath "eu.schnuckelig.gradle:gradle-jaxws-plugin:1.0.2" } } apply plugin: 'maven' apply plugin: 'jaxws' jaxws { System.setProperty('javax.xml.accessExternalSchema', 'all') packageName = 'com.myservice' wsdlURL = 'https://example.org/services/users

How to pass trustStore property in gradle build script

不羁的心 提交于 2019-12-03 16:43:31
I am trying to generate classes for a SOAP webservice through a gradle script. I am using a plugin gradle-jaxws-plugin which is available in maven central. My script looks like below: buildscript { repositories { mavenCentral() } dependencies { classpath "eu.schnuckelig.gradle:gradle-jaxws-plugin:1.0.2" } } apply plugin: 'maven' apply plugin: 'jaxws' jaxws { System.setProperty('javax.xml.accessExternalSchema', 'all') packageName = 'com.myservice' wsdlURL = 'https://example.org/services/users.svc?wsdl' } repositories { mavenCentral() } If I use this script as it is, I get following error [ant

How to programmatically extract information from certificate?

点点圈 提交于 2019-12-01 07:30:18
问题 I have a generated a certificate, but I would like to be able to extract the information from the certificate, as for example the country, the validity, the public key and so on. I have to compare this information retrived from the certificate with some other that I have stored in my C programe. I know that if I use a function like this it will print me the certificate information: void print_certificate(const char* cert) { X509 *x509 = NULL; BIO *i = BIO_new(BIO_s_file()); BIO *o = BIO_new

golang x509.MarshalPKIXPublicKey vs x509.MarshalPKCS1PublicKey()

久未见 提交于 2019-11-30 04:12:18
问题 Can anyone help me understand the difference between MarshalPKIXPublicKey() and MarshalPKCS1PublicKey()? according to the comment: // MarshalPKIXPublicKey serialises a public key to DER-encoded PKIX format. // MarshalPKCS1PublicKey converts an RSA public key to PKCS#1, ASN.1 DER form. what is a DER-encoded PKIX format ? Thanks 回答1: You don't make clear how much you don't (or do) understand. To start from the basics: ASN.1 (Abstract Syntax Notation One) is a general scheme for defining the

How do I get public key hash for SSL pinning?

末鹿安然 提交于 2019-11-29 21:33:28
How would I get the hash of a public certificate's info to be able to perform SSL Pinning in my application? I am using TrustKit in my iOS application and it is asking for me to set the hash that I am expecting. Where can I get this from? If it is a public website, you can use SSL Labs server test which computes and displays the pin. The Public Key Pinning page over at the Mozilla Developer Network also has commands for obtaining the pin from a key file, a certificate signing request, a certificate or a website (this is the one in @mylogon's answer ). Since this is a programming web-site, i

Error in JavaMail : PKIX path building failed unable to find valid certification path to requested target

最后都变了- 提交于 2019-11-28 21:16:55
I am trying to build an email client app in android and right now i want to configure the javaMail part. i am trying to establish the connection with the imap server but something is wrong with my code.. here is my code: package mailpackage; import java.util.Properties; import javax.mail.Folder; import javax.mail.Message; import javax.mail.MessagingException; import javax.mail.NoSuchProviderException; import javax.mail.PasswordAuthentication; import javax.mail.Session; import javax.mail.Store; public class Connection implements Runnable { boolean done; public Connection() { this.done=false; }

How do I get public key hash for SSL pinning?

五迷三道 提交于 2019-11-28 17:07:35
问题 How would I get the hash of a public certificate's info to be able to perform SSL Pinning in my application? I am using TrustKit in my iOS application and it is asking for me to set the hash that I am expecting. Where can I get this from? 回答1: If it is a public website, you can use SSL Labs server test which computes and displays the pin. The Public Key Pinning page over at the Mozilla Developer Network also has commands for obtaining the pin from a key file, a certificate signing request, a

PKIX path building failed in Eclipse

一笑奈何 提交于 2019-11-28 12:19:17
i'm working with Liferay and i'm using eclipse, and running a client/server model, using an encrypted socket (SSL). Currently, my application is running the client/server connection ok when I run the application in batch mode but when i try to start the server in Eclipse the application is giving me error javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.ssl.Alerts.getSSLException(Alerts.java:192) I