certificate

How to ignore PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException?

拜拜、爱过 提交于 2019-12-17 06:25:20
问题 I got the following exception when try to post a request to a http server: Here is the code I used URL url = new URL( "https://www.abc.com"); HttpURLConnection conn = (HttpURLConnection) url.openConnection(); conn.setRequestMethod("GET"); conn.setDoOutput(true); DataOutputStream wr = new DataOutputStream(conn.getOutputStream()); // wr.writeBytes(params); wr.flush(); wr.close(); BufferedReader br = new BufferedReader(new InputStreamReader( conn.getInputStream())); String line = null; while (

Convert .pfx to .cer

百般思念 提交于 2019-12-17 04:39:34
问题 Is it possible to convert a .pfx (Personal Information Exchange) file to a .cer (Security Certificate) file? Unless I'm mistaken, isn't a .cer somehow embedded inside a .pfx? I'd like some way to extract it, if possible. 回答1: the simple way I believe is to import it then export it, using the certificate manager in Windows Management Console. 回答2: PFX files are PKCS#12 Personal Information Exchange Syntax Standard bundles. They can include arbitrary number of private keys with accompanying X

How can I install a certificate into the local machine store programmatically using c#?

故事扮演 提交于 2019-12-17 04:14:21
问题 I have a certificate generated via MakeCert. I want to use this certificate for WCF message security using PeerTrust. How can I programmatically install the certificate into the "trusted people" local machine certificate store using c# or .NET? I have a CER file, but can also create a PFX. 回答1: I believe that this is correct: using (X509Store store = new X509Store(StoreName.TrustedPeople, StoreLocation.LocalMachine)) { store.Open(OpenFlags.ReadWrite); store.Add(cert); //where cert is an

How to solve “Could not establish trust relationship for the SSL/TLS secure channel with authority”

好久不见. 提交于 2019-12-17 04:13:01
问题 Really thought I had this issue fixed, but it was only disguised before. I have a WCF service hosted in IIS 7 using HTTPS. When I browse to this site in Internet Explorer, it works like a charm, this is because I have added the certificate to the local root certificate authority store. I'm developing on 1 machine, so client and server are same machine. The certificate is self-signed directly from IIS 7 management snap in. I continually get this error now... Could not establish trust

how to pass PEM certificate as first arg of i2d_X509

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-14 02:33:42
问题 I'm creating self-signed certificate by: openssl req -new -x509 -key privkey.pem -out cert.pem -days 1095 How do I pass cert.pem to i2d_X509? I need something like: len = i2d_X509(".\cert.pem", &buf); but my certificate in a PEM file.. Here is my code: (I used the example in https://www.openssl.org/docs/crypto/d2i_X509.html) #include <openssl/x509.h> #include <stdio.h> int main(void) { int len,i; unsigned char *buf; buf = NULL; len = i2d_X509((X509*)".\cert.pem", &buf); if (len < 0){ printf(

Python 'requests' [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)

我只是一个虾纸丫 提交于 2019-12-14 02:19:39
问题 I have a problem verifiying a HTTPS endpoint when providing a specific certificate path to the 'verify' option; setting 'verify' to true DOES work however: import requests def run_tests(): url="https://www.google.com" certfilename="google.crt" generate_cert_file( certfilename ) response = requests.get( url, verify=False ) print "URL:%s, Verify=False. Result: %s"%(url, response.status_code ) response = requests.get( url, verify=True ) print "URL:%s, Verify=True. Result: %s"%(url, response

Security warning prompt for Java Applet

柔情痞子 提交于 2019-12-14 02:13:04
问题 Starting from JRE 1.7 update 55, in some circumstances (not always, expecially if i call application by host-name instead of by IP), security warning is always shown, even if i check "Don't show this message again". Manifest is fixed according to the latest directives UPDATE Investigating JRE security log, i've noticed that, where applet works correctly, i've these lines: security: Caricamento certificati di distribuzione da C:\Users\Redturtle\AppData\LocalLow\Sun\Java\Deployment\security

Distribution Profile requesting a Developer certificate

偶尔善良 提交于 2019-12-14 02:07:52
问题 Using Xcode 9.1, after building an iOS app, I try to archive it. But I get the following error message: Provisioning profile "MyAppProfile" doesn't include signing certificate "iPhone Developer: My Name (X1YZ2AB3CD)". After looking closer, I see that MyAppProfile is a Distribution Provisioning Profile (this is what I want) and X1YZ2AB3CD matches a Developer certificate.But when building MyAppProfile (for App Store) I was provided with the choice of a unique Distribution certificate (No

Certificate chain not found, but keystore contains private key

故事扮演 提交于 2019-12-14 01:44:04
问题 Im trying to sign my apk so I can release an update to my app with this command: jarsigner ­-verbose -sigalg SHA1withRSA -­digestalg SHA1 ­-keystore my­release-key.keystore CordovaApp­release­unsigned.apk alias_name but getting this error: jarsigner: Certificate chain not found for: ¡sigalg. ¡sigalg must reference a valid KeyStore key entry containing a private key and corresponding public key certificate chain. I´ve just moved to a new computer so I copied my .keystore file to it. When I do

The remote certificate is invalid according to the validation procedure - can`t solve this

旧街凉风 提交于 2019-12-13 23:59:09
问题 I hang unsuccessfully for days on this problem and not a single answer to different posts at different websites helped me so solve it. I am working on a Windows 10 System and implementing with VisualStudio 2017. With AspNetCore I`ve implemented the following projects: 1.) Web.AuthServer: IdentityServer4 for authentication. 2.) Web.ApiServer: The first SignalR-Server. 3.) Web.ApiSwitch: The second SignalR-Server. It has a HostedService with 2 SignalR-Clients as a "bridge" between the two