w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
SSL chain validation failed with intermediate cert
You should only need the intermediate certificate. It's more likely to be a problem with the other machine's configuration. You can add -Djavax.net.debug=ssl to your JVM options to show debugging info. (More here http://docs.oracle.com/javase/7/docs/technotes/guides/security/jsse/JSSERefGuide.html#Debug)

Categories : Java

Deployed Scaffold rails app to Heroku. "heroku open" gives "page you were looking for doesn't exist"
It doesn't look like you have an error - just that you haven't set a route for the root. ie. something like this in routes.rb root 'home#index'. PS. Note that Rails 4 does something weird in production - it behaves differently to development mode, and expects an explicit root route defined.

Categories : Ruby On Rails

Heroku and Rails 4: Heroku isn't finding my nested folder under assets/javascripts
Add this to your GEMFILE group :heroku do gem 'rails_log_stdout', github: 'heroku/rails_log_stdout' gem 'rails3_serve_static_assets', github: 'heroku/rails3_serve_static_assets' end If that doesn't work, here is my Rails 4 app on Heroku. https://github.com/andey/bestofama . Feel free to browse the config for any differences

Categories : Javascript

git push heroku master issue. heroku wont allow me to upload my application
Heroku no longer supports SQLite as a database so you will have to switch to the Postgres gem: pg. While you could use sqlite3 for development and postgres for production, it's not recommended as you want to keep your dev and prod environments as similar as possible. Heroku has a guide to get you started

Categories : GIT

Heroku - MacOS Toolbest - multiple heroku accounts ssh key problems
You need to make sure that: your ~/.ssh/config does contain something along the lines of: Host heroku.example HostName heroku.com User prod.heroku@my-domain.com IdentityFile ~/.ssh/identity.heroku.my-prod.pub your git remote url used by heroku is something like: ssh://heroku.example:my-test-app-3027 (note the scp syntax here, with heroku.example being one of the Host entries of the ssh config file.) You can also have a look at a heroku account manager like heroku_plus, and see if that helps.

Categories : GIT

Restoring only some tables into Heroku Postgres via heroku pgbackups:restore
You can run pg_restore locally connected to your Heroku provided Postgres instance. Get you db credentials from heroku config From the database_url key and pass them into pg_restore locally as options. Then you should also be able to use the -t switch to restore your specific table.

Categories : Postgresql

Deploying Django app on Heroku: Can I manually set environment variables in the .env file? Do I need to install tools like autoenv, heroku-config...?
I got stuck with the postgres as well, here's what I did in the settings.py to add local settings: DATABASES = { 'default': dj_database_url.config(default='postgres://<user>:<password>@<host>/<dbname>') } Of course you have to have created the database following postgres steps. Solution was from https://discussion.heroku.com/t/dj-database-url-config-is-returning-an-empty-object/55/9

Categories : Django

How to use "db:transfer" as a heroku command by heroku-valkyrie?
According to Heroku documentation, you will have to export your local database as a dump file by using the pg dump tool and import the file using command., heroku pgbackups:restore DATABASE 'https://s3.amazonaws.com/me/items/3H0q/mydb.dump' Check for complete documentation here

Categories : Ruby On Rails

git push heroku master fails in heroku
Installed MSysGit instead of git. Added the C:Program Files(x86)Gitin directory to the PATH variable and then doing what this answer says solved the problem.

Categories : Windows

Node.js not allowing CA cert from an api?
What I did was to set the rejectUnauthorized option to be false. The default of this option was changed since Version 0.9.2 I assume you can create an agent with the ca specified.

Categories : Javascript

How can I create a cert file?
Use bouncy castle library, that is an open source project originally written in Java and ported to C#. http://www.bouncycastle.org/csharp/

Categories : C#

git not fully working with self-signed cert
ssh+ssl ? But the two aren't related from the client's side perspective (unless you want to do some kind of ssh tunneling through NGiNX) An ssh connection would talk to the ssh daemon (which doesn't need any certificate) and would require that the correct ssh public key has been registered to the server account ~/.ssh/authorized_keys (done by GitLab when a user register said public key in his/her profile page). The gitlab-shell/bin/check error is another issue, again not related with ssh issue. It is gitlab-shell which tries to contact locally gitlab through an https API. Solve that locally, and any connection (https or ssh) from the client will succeed. In particular, check issues 3892, and see if you need to add a CA to the .crt file served by NGiNX. LJ Vankuiken adds in the comment

Categories : Ssl

Having trouble associated SSL cert with Amazon Cloudfront
So I figured out the problem! DNSimple by default makes you a 2432 bit key, which is larger than the max size of 2048bit that Amazon allows. If you want to test the size of your key and cert, run the following: Private Key: openssl rsa -in private.key -text -noout Example: Private-Key: (2048 bit) Cert: openssl x509 -in public.cert -text -noout Example output: Public-Key: (2048 bit) The output of each command will tell you how many bits it is. If you bought a SSL cert from DNSimple, you can message them and they can reauthorize your cert/key with a different size. After doing this, associating your cert with your Cloudfront distribution should work.

Categories : Ssl

GoDaddy SSL Cert Not Working With Java
Update - this "solution" is no longer valid (see my above accepted answer) - keeping this answer because it did help alleviate the problem so long as the side-effects are tolerable. Ok, I may have found a work-around for my case. props.put("mail.smtp.ssl.trust", "smtp.somecompany.com"); I added this to my Session construction, and now it works. This is a work-around, not a fix imho since I still do not know why my Godaddy SSL cert is not default trusted... it is not a self-signed cert. Anyone please feel free to chime in as I'd really like to understand this problem.

Categories : Java

OpenSSL how to load CA cert with DER format
First of all, DER files can have .crt, .cer, and .der endings. As for your question it may be one of many issues. Does your existing server project already work, and to what extent? Could you first try and convert the DER file to PEM and tell us how it went? openssl x509 -inform der -in certificate.cer -out certificate.pem

Categories : C

Cert based Mutual SSL with RESTful WCF service
As your certificate is self-signed you have to had some extra code to your client like that. Before instanciating your WCF client, you should add : ServicePointManager.ServerCertificateValidationCallback = TrustAllCertificatesCallback; TrustAllCertificatesCallback is a callback method which performs service certificate validation. Here is a sample : internal static bool TrustAllCertificatesCallback(object sender, X509Certificate cert, X509Chain chain, SslPolicyErrors errors) { X509Certificate2 certificate = new X509Certificate2(cert); return certificate.Verify(); } You also have to install your certificate in the Trusted Root Certification Authority certificates store, and finally add to your client endpoint configuration : <client> <endpoint address="https://mymac

Categories : Wcf

Possible Performance Bottleneck in Client-Cert System
Of course, but it doesn't happen as often as you might think. The server almost certainly caches the CRL and doesn't reacquire it for some interval like an hour, and your premiss that the client certificate is sent with every request isn't correct either, due to (1) HTTP keepalive and (2) SSL session caching, which keeps reusing the same SSL session for whatever period is configured at the server, maybe 10-15 minutes, maybe also an hour, maybe even a day.

Categories : Apache

CURL: SSL certificate fails, verify that the CA cert is OK
Tardy response but I had same problem and the way I fixed it was to upgrade to php 5.3. I have seen nothing that explicit that says "5.2 does not do proper certificate validation" but you have everything right by using CURLOPT_CAINFO. Upgrade to 5.3 and it will work.

Categories : PHP

Java: method cannot find cert path -- what do I need to set?
So port 465 is used by SMTP SSL, which means that in order for the client to connect to the server, it must trust the server's certificate. Java and Glassfish have a default truststore which will work for any certificate signed by any of the big Cetificate Authorities (Thawt, Verisign, etc..), and since it's not working as is this leads me to believe that your server is using a self signed SSL certificate. This isn't a problem, and is fully supported by lots of internal applications that don't want to pay for those certs. The issue is that GlassFish doesn't know about that self signed certificate so you must import it into the default glassfish truststore. You will find it at $GLASFISH_INSTALL_DIR$/domains/domain1/config/cacerts.jks To import a certificate you can use the keytool that co

Categories : Java

Can I create an SSL cert for a server that doesn't exist yet?
Yes, you can create the CSR (PKCS10) on a different server than the one you install the certificate on. Just make sure you get the whole pfx back, with both the private and public key. However, it will now work if you have a HSM, as the private key will be stored in the HSM, and not be transportable.

Categories : Ssl

PayPal IPN Listener links to cert file...?
The certificates mentioned in the article you linked are for Encrypted Website Payments which is unrelated to Instant Payment Notification (IPN). Well, not entirely unrelated since EWP transactions can send out an IPN post... but that isn't the point of the question. Stick with the files provided in the IPN sample.

Categories : Paypal

HTTPS POST in C# to server with bad cert - timeout
After more searching, I found someone who was having a similar problem and who had found a solution. To debug this and similar situations, enable SSL tracing/logging as described here. http://blogs.msdn.com/b/dgorti/archive/2005/09/18/471003.aspx My problem was that I needed to declare an SSL3 connection as follows ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3; Adding this to my code before calling client.UploadData fixed the problem.

Categories : C#

How to set the intermediate certificates on GAE?
It looks like these directions will help you out. They are for a different CA, but the logic should be the same. Because Google App Engine does not have a separate option to upload an Intermediate Certificate, you have to include this certificate in the public key file. You can do this by opening the certificate for your website and the Intermediate Certificates from GlobalSign in a plain text editor and simply copy and paste all the content from the Intermediate Certificate at the end of the file of the webserver certificate that was issued by GlobalSign. The Google AppEngine Docs say that this is the correct thing to do, but they don't go into the same level of detail as the other link. If the host certificate requires an intermediate or chained certificate (as many Certificat

Categories : Google App Engine

HTTPS (SSL) Request Reading Cert From Keystore Without a Library
Just use an HTTPS URL, with an HttpsURLConnection or even HttpURLConnection. Java will do the rest. No 3rd-party libraries required. If you need to use a custom truststore, set the system property javax.net.ssl.trustStore. Similarly, if you need to use a keystore, i.e. if the server is requesting client authentication, set the system properties javax.net.ssl.keyStore and javax.net.ssl.keyStorePassword.

Categories : Java

Python Requests - SSL error for client side cert
I had this same problem. The verify parameter seems to refer to the server's certificate. You want the cert parameter to specify your client certificate. I had to use OpenSSL to convert to get a certificate PEM file and a key PEM file. import requests cert_file_path = "cert.pem" key_file_path = "key.pem" url = "https://example.com/resource" params = {"param_1": "value_1", "param_2": "value_2"} cert = (cert_file_path, key_file_path) r = requests.get(url, params=params, cert=cert, verify=False) I still had problems with Requests not playing nicely with some SSL servers, but I think the verify / cert distinction might be your problem.

Categories : Python

Compile to Intermediate type
which can be used in other project without having source code and not passing it to End User. It sounds to me like you should compile it to a dll, but perhaps consider ILMerge as part of your build/deploy strategy. And frankly there is rarely any good reason not to simply ship the dll without merging. Note that csc does allow you to output raw modules, via /target:module (presumably then re-combining with /addmodule) - but frankly that will be a real pain to work with.

Categories : C#

intermediate values of counter
Use $timeout , it is Angular's native service: var app = angular.module("moduleCounter", []); app.controller("controllerCounter", function ($scope , $timeout){ $scope.counter = 0; $scope.incrementCounter = function(){ $scope.setTimeout(); } $scope.setTimeout = function(){ $scope.startNext = $timeout( $scope.counterUp , 400); } $scope.counterUp = function(){ $scope.counter++; $scope.setTimeout(); } $scope.stopCounter = function(){ $timeout.cancel($scope.startNext); } }); JSFiddle: http://jsfiddle.net/cherniv/k9r4t/1/

Categories : Javascript

Forms for Intermediate Models
Write a custom form and save the relationship inside it. I have taken the example as classes of of email address associated with an email that i wanted to send class SendForm (forms.ModelForm) : To = forms.ModelMultipleChoiceField( queryset=EmailId.objects.filter(),required=False,widget=FilteredSelectMultiple(('To'), False)) def __init__(self, *args, **kwargs): initial = kwargs.setdefault('initial', {}) if 'instance' in kwargs: initial['To']=kwargs['instance'].To.all() super(SendForm, self).__init__(*args, **kwargs) def save(self, commit=True): instance = forms.ModelForm.save(self, commit) instance.save(send=0) es = [e for es in self.cleaned_data['To']] for relation in instance.To.all():

Categories : Django

Intermediate progress indicator on web
Rather than redirecting to another page, you should submit the form using AJAX (a javascript scripting technique). Check out this tutorial.

Categories : PHP

openssl s_client -cert: Proving a client certificate was sent to the server
You've posted it: write client certificate A after read server certificate request A Send them your client certificate and get them to verify locally that its signers are trusted, with the OpenSSL tools. (Don't send your private key of course.) However it's curious that your client even sent a certificate if the CA isn't recognized. The server sends the list of acceptable CA's in the CertificateRequest message, and the client isn't supposed to send a certificate at all unless it is signed by one of those. As you're using OpenSSL the fault isn't likely to be at your end.

Categories : Ssl

class file for org.bouncycastle.cert.ocsp.BasicOCSPResp not found
Bouncy Castle has classes in several jars. For BasicOCSPResp you need to make sure a bcpkix jar is on the classpath. The latest version is bcpkix-jdk15on-149.jar.

Categories : Java

Cannot push to heroku after adding a remote heroku repo to my existing local repo
The message you are seeing means that changes have been made to the application that you do not have in your local copy. When you push it's rejected because the Heroku remote is further ahead than yours, so you're right in thinking that your partner has pushed to Heroku without pushing to Github - it's a common scenario since you deploy from your local repository when you deploy to Heroku, unlike a traditional Capistrano deploy which would deploy the code from Github typically. It's down to you as a team to come up with ways of working which prevent this from occuring, but if you need to get working right now, you can either git push heroku master -f. This forces your changes and will overwrite what's there presently with your code git pull heroku master to pull the changes from Heroku

Categories : Ruby On Rails

Why is Lua designed to generate intermediate opcodes?
Using virtual machines is an old implementation technique for languages, dating as far back to at least USCD Pascal, BCPL, and Smalltalk. Most scripting languages now use a virtual machine. Some use a general-purpose virtual machine. Lua uses a special purpose virtual machine that reflects the semantics of the language. Hence the specialized opcodes. Lua did introduce novelty in this area by moving in version 5.0 to a register-based virtual machine, instead of a traditional stack-based one.

Categories : Lua

Azure Websites SSL Intermediate certificate
Had a reply on twitter from Microsoft, the reply they give is as follows: "this is a known issue. Not an oversite but rather a bug... Check the MSDN support forum" I checked my post on MSDN forums and the reply they left there is "We will have this support soon".

Categories : Ssl

How to capture intermediate values with Mockito?
If you are supplying list to the class under test, you could perhaps mock that also and perform verification on it, for example: final List<Integer> list = spy(List.class); ... act... final InOrder inOrder = inOrder(list, mockDependency); inOrder.verify(list).add(1); inOrder.verify(mockDependency).handleList(list); inOrder.verify(list).clear(); inOrder.verify(mockDependency).handleList(list); inOrder.verify(list).add(2); However, I'm not sure how this approach would hold up for your actual test. EDIT: Changed from mock to spy based on whaley's comment.

Categories : Java

Discarding Intermediate results in Linq
If you're asking if it's possible to do something like this: var OrderReportParser = from Rep(BlankLine) from TextLine from WhiteSpace.And(Rep(Char('-'))).And(BlankLine) ... ...then the answer is no. The designers of Linq probably never imagined that people would want to select something and then immediately throw it away without looking at it, since with most other Linq providers this parser syntax would create a huge Cartesian product. (Or if they did think about it they didn't consider it to be a useful enough feature.) Why do you want to get rid of the variable names anyway? Personally I think including the variable names is likely to make the intent of the code clearer. If the unused variables bother you so much I guess you can name them something like _1, _2 or d

Categories : C#

jQuery (intermediate value).imagesLoaded is not a function
check your script for ; $.fn.some = function () { return this; } // without ; will produces an error, also check for return this in jQuery extensions

Categories : Jquery

Quicksort in R: How do I print the intermediate steps?
PS: I am not sure, but your implementation might be very inefficient depending on how R implements subscripting with a logical array. You cannot do it without spending too much memory in it in the current state (i.e. using recursion). If you want to keep recursion: This is depth first approach. Initialize an array of arrays. The first index is the depth and the corresponding array would give you the state at that depth. Keep track of depth (i.e. pass depth as a parameter) and append the subarray to the corresponding depth. Code: printableList = Array of empty arrays qs <- function(vec, depth) { printableList[depth] = printableList[depth] + vec if(length(vec) > 1) { pivot <- vec[1] low <- qs(vec[vec < pivot], depth+1) mid <- vec[vec == pivot] high &

Categories : R

java.security.cert.CertificateParsingException: invalid DER-encoded certificate data
Make sure that you certificate starts with -----BEGIN CERTIFICATE----- and ends in -----END CERTIFICATE-----. Your cert should look like: -----BEGIN CERTIFICATE----- MIIDAjCCAmsCEH3Z/gfPqB63EHln+6eJNMYwDQYJKoZIhvcNAQEFBQAwgcExCzAJ BgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xh c3MgMyBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcy MTowOAYDVQQLEzEoYykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3Jp emVkIHVzZSBvbmx5MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMB4X DTk4MDUxODAwMDAwMFoXDTI4MDgwMTIzNTk1OVowgcExCzAJBgNVBAYTAlVTMRcw FQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE8MDoGA1UECxMzQ2xhc3MgMyBQdWJsaWMg UHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eSAtIEcyMTowOAYDVQQLEzEo YykgMTk5OCBWZXJpU2lnbiwgSW5jLiAtIEZvciBhdXRob3JpemVkIHVzZSBvbmx5 MR8wHQYDVQQLExZWZXJpU2lnbiBUcnVzdCBOZXR3b3JrMIGf

Categories : Java

Is there a way to let the user chose whether or not trust the site when we try to use NSURLConnection to connect with SSL for an untrusted cert?
As an example you can save the challenge object to a property and then implement the alertView:clickedButtonAtIndex: delegate method like this (this is for the "trust just once"): - (void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex { if(buttonIndex == alertView.cancelButtonIndex) { [[self.challenge sender] cancelAuthenticationChallenge:self.challenge]; } else { [self.challenge.sender useCredential:[NSURLCredential credentialForTrust:self.challenge.protectionSpace.serverTrust] forAuthenticationChallenge:self.challenge]; self.challenge = nil; } } If you want to trust always you will need to do some more complex things to save and compare the server certificate data. Or make it simple and unsafe by saving th

Categories : IOS



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