w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML Categories
OpenSSL + Self Signed Cert = OpenSSL::SSL::SSLError: SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed
Extracted from here So basically all you have to do is this ENV['SSL_CERT_FILE'] = "your certificate path" and I guess all will work You might find this Reference useful : http://mislav.uniqpath.com/2013/07/ruby-openssl/ Who reads the value of ENV['SSL_CERT_FILE']? Hope this help

Categories : Ruby On Rails

Download certificate using openssl and setting certificate to libCURL
Never download a root certificate from the server. The whole point of the infrastructure is that you already have a set of trusted root certificates. If someone signed (directly or indirectly) with this root certificate, then you can trust the certificate. If you download the root certificate from the server you are basically dropping the whole idea of certificates and could as well use HTTP. There is an alternative, however, if you are working with your own certificates (self-signed): You can either maintain your own CA and create a special cacert.pem for this purpose or you disable certificate checking (the latter is not recommended as it makes your application less secure!). If you are doing some advanced stuff, i.e. not having a certificate signed by a CA included in standard bundles

Categories : C++

How to use self signed certificate at iOS app
looking at the first tutorial you linked to you should be able to use that or some more advanced form of that and once you have tested and have it working then all you have to do for a client to create and add their own certificate would be to override/replace the localhost.cer file in the apps folder where the file localhost.cer "or whatever name scheme you use" is located. there are many ways to do this but one could be telling the app a link where the certificate is online for download and once downloaded, then replace. Any questions I'll try and help further but hopes this helps you in the right direction.

Categories : Iphone

TLS: How to verify a certificate self-signed with an RSA key
Certificates bind a public key and additional information (such as a identifier and other attributes) together. What makes this association between the public key and the additional information a certificate is the fact it is signed. The reason X.509 certificates are signed and issued by a CA is because the CA asserts the binding between the public key and the rest of the content of the certificate (in particular its subject). The purpose of this is to let a party that knows the CA but doesn't necessarily know the entity to which the certificate was issued verify that the content of the certificate is true, in particular that the public key belongs to the certificate's subject. Since your authentication scheme relies on pre-established knowledge of who or what owns the public keys anyway

Categories : C

WCF client self-signed certificate
You can do that by configuring your service over two separate end points one secured (with certificate) and one without certificate. Check this post for general understanding (not specific to WCF) over Self signed certificate vs CA certificate - Self-signed SSL Cert or CA?

Categories : Wcf

How to verify that app was signed by my certificate?
Use your code for collecting the fingerprint on the device in "test" mode -- meaning you have temporary code to emit that fingerprint to the log (or elsewhere). Be sure to test this using your production signing key, not the debug key! Once you know from the device's perspective, you can remove the temporary code and elsewhere you can compare to what you've previously determined to be the key. Be aware though that you're probably doing this to prevent someone from modifying your app and re-signing it with another key, but someone with the ability to do that also has the ability to modify your key checking. This is a problem that can be addressed with additional obfuscation but you'll need to come up with your own solution to minimize the chance of an attacker knowing what to look for.

Categories : Android

Using JavaMail with a Self Signed Certificate
Get rid of the socket factory stuff: Setting various socketFactory properties. Long, long ago JavaMail didn't have built in support for SSL connections, so it was necessary to set these properties to use SSL. This hasn't been the case for years; remove these properties and simplify your code. The easiest way to enable SSL support in current versions of JavaMail is to set the property "mail.smtp.ssl.enable" to "true". (Replace "smtp" with "imap" or "pop3" as appropriate.) See these Gmail examples. The Gmail certificate needs to be in your trust store, not your key store.

Categories : Java

AJAX and self-signed certificate
I have had this same problem several times. The best I could come up with was something like this: check for a cookie, if they have it, do nothing, if they do not have it, issue a re-direct to the site that generates the cert warning, user accepts the self-signed cert, then the user just needs to go back to your site. If you had any control over the api side, you could probably make it so that you have a bounce back url or something that ends up getting the user back to your site. There really is no elegant way to handle this short of just getting a real SSL cert. On another site, we ended up having to put a link to the service on our page for this very reason, fortunately it was temporary as we had control over the server side too, and planned on replacing the self-signed cert with a real

Categories : Ajax

How i can create a self-signed certificate using phpseclib
You need a private key, plain and simple. Otherwise, what are you going to sign it with? The signature field of an X.509 cert is mandatory. I mean, if all you want is a public key, you don't need to bother with the X.509 overhead. You can just pony up a public key that looks like this: -----BEGIN PUBLIC KEY----- MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCqGKukO1De7zhZj6+H0qtjTkVxwTCpvKe4eCZ0 FPqri0cb2JZfXJ/DgYSF6vUpwmJG8wVQZKjeGcjDOL5UlsuusFncCzWBQ7RKNUSesmQRMSGkVb1/ 3j+skZ6UtW+5u09lHNsj6tQ51s1SPrCBkedbNf0Tp0GbMJDyR4e9T04ZZwIDAQAB -----END PUBLIC KEY----- But X.509 is more than just a public key - it's a signed public key. Technically, a CSR is, too, but CSR's are always self-signed whereas X.509 certs can be signed by anyone.

Categories : PHP

Self-signed certificate with Demo DocusignAPI
Are you talking about including an SSL cert for the event notifications? The only mention I see from their documentation when I search for "SSL" is the signMessageWithX509Cert property on the eventNofication object. This can be viewed on several of their api guide pages like this one. In any case, with all of the comments that have come in on this thread so far I believe your issue is related to your certificates and not with the DocuSign API. Were you able to resolve this yet?

Categories : Misc

curl self-signed certificate web service over SSL
please refer to that following answer: http://stackoverflow.com/a/28927268/1290438 to sum up: % openssl s_client -showcerts -connect example.com:443 </dev/null 2>/dev/null | sed -n '/-----BEGIN CERTIFICATE-----/,/-----END CERTIFICATE-----/p' | grep -m1 -B-1 -- '-----END CERTIFICATE-----' > cert.pem % curl --cacert cert.pem https://example.com and tada, you connect securely to a self-signed website.

Categories : Rest

Can't set a signed SSL certificate on NodeJS/expressJS
I found the issue, it was my mistake the server.key didn't match the server.crt. A simple test found it. See: http://www.madboa.com/geek/openssl/#cert-test openssl s_server -cert mycert.pem -www

Categories : Node Js

How to create self-signed certificate programmatically for WCF service?
I could not make this work, but I found an alternate solution. (Update December 2014: I have now gotten it to work using the accepted answer.) I was able to use the PluralSight.Crypto library to achieve what I need. I had to modify the source code slightly to get the private key to store in the LocalMachine store. The changes I made were to the file CryptContext.cs. I changed the CreateSelfSignedCertificate method. Following is a snippet of code including the change that I made. In essence, I set the Flags member of the CryptKeyProviderInformation structure to set it to 0x20 (CRYPT_MACHINE_KEYSET) if the CryptContext object contains this value in its Flags. byte[] asnName = properties.Name.RawData; GCHandle asnNameHandle = GCHandle.Alloc(asnName, GCHandleType.Pinned);

Categories : C#

Apache couchDB CA signed certificate issues
For anyone who is interested this is how we finally solved the problem: Seems that we couldn't get couchDB to work properly with our intermediate certificate. Since we are running our couchDB server on an AWS EC2 instance, I just created an ELB (Elastic Load Balancer) instance and uploaded my certificates to the ELB, then added the EC2 instance under my load balancer and rerouted my DNS to the load balancer (using Route53 here too). I then turned off SSL completely on couchDB and handed the SSL handshake to the load balancer which supports the use of an intermediate certificate. This does mean that the comms between the ELB and couchDB is insecure but for us that is fine. This also means that we now can add in more couchDB servers under the ELB for scalability so 2 birds 1 stone solut

Categories : Apache

Getting ssl_error_bad_cert_alert on firefox after installing self signed p12 certificate
The ssl_error_bad_cert_alert error in this case means the server doesn't trust your self-signed cert. One way to solve this is to generate certs and CSR's, and then sign them with a local development CA. Then you just add your dev CA to the JVM truststore. It is slightly more setup, but is more flexible (e.g., you can create signed certs for a whole development team, test revocation via OCSP/CRL, etc). These steps are copied from my history and probably require changes: Create a local dev CA openssl genrsa -out ca.key -aes256 -passout pass:changeit 4096 openssl req -new -x509 -key ca.key -config openssl.conf -days 3560 -sha256 -out ca.pem -passin pass:changeit openssl rsa -in ca.key -out ca.key -passin pass:changeit Generate client and server keystores with a keypair in each keytool

Categories : Eclipse

Self signed certificate honoring both, Machine Name & IP Address
You should create a certificate with multiple Subject Alternative Names. What you put in the CN at that stage doesn't really matter (it's only a fallback solution when there are no SANs), but putting the host name should help you identify the certificate in various lists. Note that the entries for host names should be of dNSName type, but the entries for the IP address should be of iPAddress type, so you need a certificate creation tool that supports both. There are more details in this question (not specific to Java). Note that IP addresses can be OK in a development context, but host names are often better anyway. Few (if any) CAs will issue you with a certificate tied to an IP address.

Categories : Ssl

Php SoapClient verify_peer=>true fails with ca-signed certificate
The problem was that php has by default insecure settings to handle https requests. It will not verify the certificate or check that the domain in the certificate is correct. You have to download the file that is used to verify the certificate yourself too. You can download one at: http://curl.haxx.se/ca/cacert.pem The settings to handle them properly are <?php $client = new SoapClient("my-wsdlfile.wsdl" ,array( "location"=>"https://examplesoapserver.com" ,"stream_context"=>stream_context_create( array( "ssl"=>array( "verify_peer"=>true ,"allow_self_signed"=>false

Categories : PHP

Generating self signed certificate for testing nginx via vagrant vm
Author of PuPHPet here. I'm actually trying to solve this issue within PuPHPet itself :) The problem is that the self-signed cert would be generated each time you $ vagrant up a new instance. I don't know what kind of warnings your browser would throw at you, but I'm certainly willing to try. Follow me on twitter @juantreminio and I'll make sure to spam all my followers when the feature has been added!

Categories : Ssl

Android: How to create a HttpClient with self signed certificate and a SSL cache
public class SimpleSSLSocketFactory extends org.apache.http.conn.ssl.SSLSocketFactory { private javax.net.ssl.SSLSocketFactory sslFactory = HttpsURLConnection .getDefaultSSLSocketFactory(); public SimpleSSLSocketFactory(KeyStore truststore) throws NoSuchAlgorithmException, KeyManagementException, KeyStoreException, UnrecoverableKeyException { super(null); try { SSLContext context = SSLContext.getInstance("TLS"); TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() { public java.security.cert.X509Certificate[] getAcceptedIssuers() { return new java.security.cert.X509Certificate[] {}; } public void checkClientTrusted(X509Certificate[] chain,

Categories : Java

Creating a truststore to only validate certificate signed by a custom CA in JAVA
I can only answer part of your questions: The truststore should contain your CA, you can generate it with keytool: http://docs.oracle.com/cd/E19509-01/820-3503/6nf1il6er/index.html No problem you can implement this in android in the same way than in java using java.security.* and org.apache.http.* classes. One warning, for android versions <=2.3, you could need to implement a workaround as some public CA are missing and it doesn't support miss-ordered certificates chains. I can give you more details if needed. I don't know Edit: A good turorial: http://nelenkov.blogspot.com/2011/12/using-custom-certificate-trust-store-on.html

Categories : Java

Perform soap request via https with self-signed certificate by cURL
The error doesnt seem to be on the client side but on the server side. The server says that some security check failed. If it was a client error, you would get nothing but an error by cURL. You get an XML answer. You should look at the server side.

Categories : PHP

signed jar file-- jnlp fails to prompt user to accept certificate
In answer to your specific questions: It is handled automatically by the jar signer tool, don't sweat the names. The Java version of the server is not relevant, unless the server is compiling the code. But even then, Java apps. should be 'forward compatible'. I.E. an app. compiled in 1.5, should run in 1.5, 1.6 & 1.7.. I don't think the jar signer tool does anything different in the file writing since it was first made, so the version is irrelevant. Irrelevant based on point (3).

Categories : Java

Using a self-signed certificate to create a secure client-server connection in android
There is different ways to solve your problem but here is the one I use: All the steps are in this link http://blog.antoine.li/2010/10/22/android-trusting-ssl-certificates/ but some parts can be confused so I will explain all the process: 1.-Store your mycrtfile.crt in a know path I will say c:BKS/mycrtfile.crt. 2.-To create your BKS or key store you will need the file bcprov-jdk15on-146.jar, this class will do all the work for us, there are different versions but this one works for me http://www.bouncycastle.org/download/bcprov-jdk15on-146.jar also store this file into C:BKS/ 3.-Now you will use the Keytool (keytool comes with the Java SDK. You should find it in the directory that contains javac) to generate our keystore and to make sure that is working go to your cmd and type "Keyt

Categories : Android

Create an x509.v3 self-signed Certificate for SAML signing and encryption, Windows 8 R2
This required creating a Certifying Authority installed in the localmachine Trusted Root Certifying Authority and then using it to sign a certificate used by the application. This link provided the details that allowed me to accomplish this: http://www.digitallycreated.net/Blog/38/using-makecert-to-create-certificates-for-development

Categories : Xml

Setting up a subdomain with apache on linux
VirtualHost directive should contain IP address or something resolvable. "myproject.localhost" is not resolvable, and Apache tells you so. You probably need to change that to <VirtualHost *:80>

Categories : Linux

Setting up Git: Init Git on active servers
Yes what you're proposing is fine. Although you should consider setting up a more sophisticated deployment system (ie. using a deployment automation tool) and also using different branches (I'm using live and the development branch is the master).

Categories : GIT

Setting up web farm for DNN 6.2.6 CE with multiple file servers
The recommended way or doing a web farm for DNN is to use a single UNC share. Even with the paid editions of DNN that is the recommended approach. Is it possible to do it any other way, yes, but there is nothing build into DNN to help you do so. If you want to use multiple file servers you start running into issues with file based caching, module installations, etc.

Categories : Caching

Facebook signed request decoding hash does not appear to match exactly
There seem to be two problems... first, the decode of the provided Facebook signature decodes to 33 bytes instead of 32. So I just use the first 32 bytes (don't really care what that last one is... just a function of padding, I guess). The other problem was the URL encoding of + to -. Using URLDecoder to decode the Facebook signature before base 64 decoding didn't solve the problem. Instead, I did this: BASE64Decoder decoder = new BASE64Decoder(); String[] parts = request.getParameter("signed_request").split("\.", 2); String rawSig = parts[0]; rawSig = rawSig.replaceAll("\-", "\+"); byte[] signature = decoder.decodeBuffer(rawSig); and that was sufficient such that the first 32 bits now always match the computed signature. I find it odd that the URL encoding was done

Categories : Java

ssh with putty from session 0 gives 'servers host key does not match ...' alert
Very likely there is no solution with PuTTY. In OpenSSH you have a set of options to completely avoid the host key verification, with the drawback of lowering the security levels. On Unix derivatives that would be: -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null I think in Windows the second option would read "-o UserKnownHostsFile=NULL". One possible "workaround" would be to manually start putty on the very first connection in order to get the host key in the stored cache. Subsequent calls would not require the interaction unless the host key changes (usually due to either a system re-installation or just the SSH server reinstallation).

Categories : Windows

redirect a subdomain to a remote url, preferably via only DNS setting or with httpd.conf, without changing url displayed
Adding a CNAME record for list.mydomain.com to my.emailingapp.com using which you can achieve the following. URL remains list.mydomain.com The arguments get displayed in URL as list.mydomain.com/?stuff=a Your requirement of having /lists/ should be implementable by URL rewrite rules.

Categories : Apache

"error setting certificate" issue in R-studio
I don't know this package. But maybe this http://curl.haxx.se/docs/sslcerts.html can help you. It solved my certificate problem I had with another R package.

Categories : R

Setting permissions on private key for a certificate using code
Apparently because I was opening it from a file each time the key container was being re-generated (or something). Here is the code that works: X509Store store = new X509Store(StoreName.My, StoreLocation.LocalMachine); store.Open(OpenFlags.ReadOnly | OpenFlags.OpenExistingOnly); X509Certificate2 c = store.Certificates .Find(X509FindType.FindBySubjectName, SIGNED_SUBJECT, true) .Cast<X509Certificate2>() .FirstOrDefault(); store.Close(); RSACryptoServiceProvider rsa = c.PrivateKey as RSACryptoServiceProvider; Console.WriteLine("Certificate thumbprint:" + c.Thumbprint); Console.WriteLine("From machine key store?: " + rsa.CspKeyContainerInfo.MachineKeyStore); Console.WriteLine("Key container name: " + rsa.CspKeyContainerInfo.KeyContainerName); Console.WriteLine("Key u

Categories : C#

setting-up ssl certificate on Tomcat: Invalid chain
Keystores are a little tricky to work with. When you look at your keystore by performing "keytool -list -v -keystore [keystorename]" and see multiple certificates chaining then more than likely your installation of the intermediates is fine. The Thawte checker is slightly out of date and is expecting a certificate chain that might differ from modern standards. Depending on the version of keytool it might not like the .pem extension of those files to keytool -import -trustcacerts -alias secondaryIntermediate -keystore your_keystore_filename -file secondary_inter.cer keytool -import -trustcacerts -alias primaryIntermediate -keystore your_keystore_filename -file primary_inter.cer If you play with keystores a lot there is a GUI tool called portecle http://portecle.sourceforge.net/ that

Categories : Tomcat

firefox addon sdk - setting an SSL certificate for https requests
Unfortunately there is no direct way to verify a cert manually and continue with the request. Instead you need to add an override on error yourself and retry. Attempt to make a regular XMLHttpRequest via nsIXMLHttpRequest. There is enough code and samples around on SO and Google describing how to do it. The requests module won't do, as it hides some necessary details. Implement nsIBadCertListener2 and stuff it into req.channel.notificationCallbacks (might want to preserve the original callbacks). If your .notifyCertProblem() get called, that means the cert did not verify. Now it's up to you to verify the cert with your seeded fingerprint (and serial). If your seeded infos match, add a cert override (that won't work for STS hosts, of course) Re-spin the request after adding the override,

Categories : Javascript

Amazon S3 - hostname does not match the server certificate (OpenSSL::SSL::SSLError) + rails
Problem is with naming of bucket, in this case : myproject.de, which is format that Amazon S3 services do not consider as valid.(no dot in the name). I have changed the name of bucket from myproject.de into myprojectde and it works now. Rules for Bucket Naming In all regions except for the US Standard region a bucket name must comply with the following rules. These result in a DNS compliant bucket name. Bucket names must be at least 3 and no more than 63 characters long Bucket name must be a series of one or more labels separated by a period (.), where each label: Must start with a lowercase letter or a number Must end with a lowercase letter or a number Can contain lowercase letters, numbers and dashes Bucket names must not be formatted as an IP

Categories : Ruby On Rails

WCF Client Certificate Authentication, The SSL settings for the service 'SslRequireCert' does not match those of the IIS 'Ssl, SslNegotiateCert'
This can be caused by the IIS settings not matching the WCF configuration. <binding name="TransportWithCertificate"> <security mode="Transport"> <transport clientCredentialType="Certificate" /> </security> </binding> The error message is very explicit. It is saying 'SSLRequireCert' or clientCredentialType="Certificate" does not match IIS settings of 'Ssl, SslNegotiateCert' or Client certificates: Accept. To fix this in IIS you need ClientCertificates: Require. In my case Server 2008 R2/IIS 7.5 behaved differently to Windows 7/IIS 7.5 & Windows 8.1/IIS 8.5. In both of the desktop OS version I could run the application with Require SSL/ Client certificate: Accept. But on Server 2008 R2/IIS 7.5 the page would not load wi

Categories : C#

Why is my certificate not valid unless I put the Sub CA certificate in the trusted root certificate authorities?
To elaborate on Erik's comment, trusting the Root CA certificate means that you will trust what the Root CA directly signs. If you have an intermediate Sub CA in the middle, its certificate is signed by the Root CA, and the Sub CA signs your certificate directly. Root CA ---signs/verifies---> Sub CA ---signs/verifies---> End user certificate As Erik said, if you do not have the Sub CA certificate present, then there is no way to link the Root CA to the End user certificate. The Root can verify the Sub CA certificate, and the Sub CA can verify the End user certificate, but there is no way for the Root to skip over the Sub CA and verify the End user certificate because the root did not sign the End user certificate. 2 ways to resolve this are: include the Sub CA cert in your tru

Categories : C#

Java EE Application Servers and JDK versions need to match certified versions?
your main argument should be that java 6 has been EOL'ed by Oracle and will not be getting any new (freely available) security updates. should you ship a jdk-6-based product some of your customers will definitely complain about it (i know some of the customers of the company i work for routinely scan products they buy and install and notify vendors of any EOL'ed or known-to-be-insecure versions in use).

Categories : Java

Capistrano error: no servers found to match {:once=>true, :eof=>true}
Try deleting # the IP address of the VPS server "[the server ip]", :web, :app, :db, primary: true And declare the domain seperately, like so - # App Domain set :domain, "yourdomain.com or IP address" And then this to replace the line you deleted - # All components of the app on the same server server domain, :app, :web, :db, :primary => true

Categories : Ruby On Rails

Remove Subdomain from URL string , keeping the rest of URL (for replacing subdomain)
You can split the domain as: $url = "city1.domain.com.uk/index.php?page=category/238/12"; list($subDomain, $params) = explode('?', $url); list($domain, $sub) = explode('/', $subDomain); $newUrl = $sub . "?" . $params; echo $newUrl; Cheers!

Categories : PHP

© Copyright 2017 w3hello.com Publishing Limited. All rights reserved.