Hit a bug, couldn’t find the answer, documenting it here for the next person.
I’m working on a Rails project where I need SSL in development. The simple way to do this is with the thin gem for example http://www.railway.at/2013/02/12/using-ssl-in-your-local-rails-environment/
It had been working (on OS X El Capitan), but suddenly
blowing up on me, either the server wouldn’t start with:
1 2 3
Or the server would start but would blow up on HTTPS requests:
As I understand it, the issue was that the old NexTSTEP visible bell code accidentally depended on an object not getting garbage collected and that improved GC in El Capitan finally caught up with it.
The bell code has been complete reworked to use a NexTSTEP warning icon instead of flashing the screen.
Writing a blog turns out to be hard.
Last week I wrote about my issue with Emacs’ visible-bell on OS X El Capitan. I figured it was about the most esoteric thing I’ve written, but it may have gotten more comments then any other post. I’m not sure if that’s good or bad…
In any case, before coming up with my work-around, I first tried rebuilding Emacs, in case the issues had been already fixed or simply re-compiling/re-linking would take care of it. That didn’t help, but this is fine time to revisit building Emacs from source on OS X.
After I upgraded to OS X El Capitan, I started having random display issues with my build from source version of Emacs. After a while I realized that it was caused by the visual bell. I hate terminals/widows beeping at me, so I always set:
.emacs. However, under El Capitan this smears (for lack of a
better word) the center of the window with bits of zoomed in text.
Once you have a CA configured, you need to setup the Apache Web server to use it. The process of requesting the certificate from the browser and verifying that it’s properly signed is handled by Apache, which can then pass information about the verification to your application.
Previously, I wrote about the promise of using Client SSL Certificates for authentication. With this post, we start down the road of actually putting this in practice.
The first step is to set up a Certificate Authority (CA).
Ever had to change the URL in 50 files? What do you do?
(You should know by now I’d use Emacs.)
Or whip up a Bash script with
Since dinosaurs roamed the Earth, I’ve been using Perl’s In Place
Let’s break it down, shall we?
Holy crap! You can use SSL client certificates to easily authenticate user logins!
What they hell am I talking about?
So, there’s this thing, SSL client certificates. They are pretty much exactly the same as SSL server certificates. They work like this:
- The web server has a key pair.
- The client generates a key pair.
- The client send the public key to the server.
- The server signs the public key with it’s private key and send a certificate back to the client.
- The client saves the certificate.
What’s that good for? Authentication! How’s it work?
Sometime I want all of Rails’ form bells and whistles for something that isn’t a database backed model. For example, I use this as a handy way to get form validations when starting a session with an API.
This is possible because Rails allows you to use ActiveModel without a database.