https

How can I pass SSL options into “rails server” in Rails 3.0?

徘徊边缘 提交于 2019-12-29 06:59:15
问题 Is there a way to pass SSL options into "rails server" (on Rails 3.0.0), using a custom Rack config or something similar? I'm trying to do two things: enable Cucumber to run tests that involve both secure and non-secure URL's, and make things simple for new developers, so they don't have to set up Apache and configure all the SSL/cert stuff before they can even write a line of code. On 2.3.8 we had a forked script/server that would start up a special WEBrick on a second port with all the

How to convert .cer to BKS

此生再无相见时 提交于 2019-12-29 06:48:22
问题 I have a certificate with .cer extension. My application will connect to site with https. I'm trying to create BKS with this command keytool -import -alias tomcat -file X://KeyStore/fidoserver.crt -keypass password - keystore X://KeyStore/keystore.bks -storetype BKS -storepass 222222 -providerClass org.bouncycastle.jce.provider.BouncyCastleProvider -providerpath X://KeyStore/bcprov-jdk16-146.jar , but get FileNotFound X://KeyStore/keystore.bks exception How to get BKS if i have .cer? 回答1: Try

Java Web Start: Unable to tunnel through proxy since Java 8 Update 111

穿精又带淫゛_ 提交于 2019-12-29 05:07:21
问题 Some of our customers cannot run our Java Web Start client anymore since Java 8 Update 111. They get: java.io.IOException: Unable to tunnel through proxy. Proxy returns "HTTP/1.1 407 Proxy Authentication Required Looks like it has to do with this change: Now, proxies requiring Basic authentication when setting up a tunnel for HTTPS will no longer succeed by default. If required, this authentication scheme can be reactivated by removing Basic from the jdk.http.auth.tunneling.disabledSchemes

Detect HTTPS with JavaScript [duplicate]

一笑奈何 提交于 2019-12-29 04:27:34
问题 This question already has answers here : How can I use JavaScript on the client side to detect if the page was encrypted? (3 answers) Closed 4 years ago . I am trying to find how can I detect with JavaScript if I am in a HTTP or HTTPS environment. I am calling an Ajax request so if I am in HTTPS and call HTTP Ajax then I get a 302 Moved Temporarily. I was thinking of getting the current window.location.href and do a string manipulation. What is the best way of detecting HTTPS using JavaScript

Error “You're accessing the development server over HTTPS, but it only supports HTTP”

自古美人都是妖i 提交于 2019-12-29 04:15:07
问题 When I try to write the server link like http:// .... it redirects to https:// and in the terminal : message Bad HTTP/0.9 request type ('\x16\x03\x01\x00\x8b\x01\x00\x00\x87\x03\x01Ð\x118¿JÄ\x19[Òç\x01<O') You're accessing the development server over HTTPS, but it only supports HTTP. 回答1: I think you should create different settings.py ( base_settings.py, local_settings.py, production_settings.py). And in your settings.py do something like this: import socket if socket.gethostname()=="Raouf

HttpWebRequest with https in C#

强颜欢笑 提交于 2019-12-29 03:33:29
问题 This piece of code doesn't work; it's logging in into website which is using https protocol. How to solve this problem? The code stops at GetRequestStream() anytime anywhere saying that protocol violation exception is unhandled.. string username = "user"; string password = "pass"; HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://moje.azet.sk/prihlasenie.phtml?KDE=www.azet.sk%2Findex.phtml%3F"); request.UserAgent = "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR

HttpsURLConnection: Connection Timed out error

核能气质少年 提交于 2019-12-29 01:45:09
问题 I have a simple code for setting up a https connection to google and printing the response obtained. import java.io.OutputStreamWriter; import java.net.URL; import javax.net.ssl.HttpsURLConnection; public class SendCertReq { public static void main(String[] args) throws Exception { URL url = new URL("https://www.google.co.in/"); HttpsURLConnection conn = (HttpsURLConnection)url.openConnection(); conn.setRequestMethod("GET"); conn.setDoOutput(true); OutputStreamWriter wr = new

Login failed. The login is from an untrusted domain and cannot be used with Windows authentication

試著忘記壹切 提交于 2019-12-28 20:34:17
问题 My webpages are on secured server (https), and I am trying to connect the SQL Server 2008 Database, which is normal server. I am writing connectionstring on page itself, not in web.config file. And I am getting following error:- System.Data.SqlClient.SqlException: Login failed. The login is from an untrusted domain and cannot be used with Windows authentication. Please help, how can I connect it, does I have to make some webservices for it. my code is as below: public void FillCity() {

Kerberos authentication in Node.js https.get or https.request

十年热恋 提交于 2019-12-28 13:20:30
问题 I'm trying to write a simple script that requests some data from a tool on an internal network. Here is the code: #!/usr/bin/node var https = require('https'); var fs = require('fs'); var options = { host: '<link>', port: 443, path: '<path>', auth: 'username:password', ca: [fs.readFileSync('../.cert/newca.crt')] }; https.get(options, function(res) { console.log("Got response: " + res.statusCode); res.on('data', function (d) { console.log('BODY: ' + d); }); }).on('error', function(e) { console

Kerberos authentication in Node.js https.get or https.request

[亡魂溺海] 提交于 2019-12-28 13:20:24
问题 I'm trying to write a simple script that requests some data from a tool on an internal network. Here is the code: #!/usr/bin/node var https = require('https'); var fs = require('fs'); var options = { host: '<link>', port: 443, path: '<path>', auth: 'username:password', ca: [fs.readFileSync('../.cert/newca.crt')] }; https.get(options, function(res) { console.log("Got response: " + res.statusCode); res.on('data', function (d) { console.log('BODY: ' + d); }); }).on('error', function(e) { console