X.509 Encrypted/Authenticated Sockets From a Ruby Client

Posted:

9 May 2009
at 11:40am

Tags:

Comments:

Be the first!

On a system I'm working with, our Rails application makes a socket connection to a Java application. The end-client has a requirement, rightly or wrongly, that the socket is encrypted and authenticated using X.509 (the Java application is running on a non-publicly accessible machine behind multiple firewalls and is the least-effective place for an attacker to hit, there are much better targets).

This article isn't to discuss the merits of the situation. However, how to do an X.509 authenticated and encrypted socket (from the client side of the equation) in Ruby isn't documented that widely, so I thought I'd post the solution to try and help some future poor sole who has to do it.


> Read the rest of this article >

Post the first comment!


allrecententries

4 Mar 2009
at 8:58pm

Is there anything GitHub doesn't do?
Many projects developed for a LAMP stack use the mainstay of subversion for version control. It's been a while since I've heard of anyone still using CVS and most LAMP projects haven't yet moved to git. As I'm a dual PHP/Ruby on Rails developer I've jumped the fence and now use git for hosting all projects (except for the ones at my current contract where subversion is still the department standard). There are many reasons why git is better than other version control systems, but in this article I'm just going to talk about one particular git host - GitHub.com and what makes it so great.
View 7 Comments

28 Feb 2009
at 8:29pm

Agile - What's in it for me?
Often the term Agile means so many things to so many different people. Business people can think it means that the developers want to "wing it" without any formal planning. Developers can think that it means the business wants them to be constantly at their beckon call, dropping work to create their "latest urgent job" and doing more work with less people. The truth of the matter is that this is slightly true to a certain point. It may sound to all the agile experts out there that I've been drinking or I don't really understand agile development or project management - trust me, I really grok agile and love living the agile way. My thoughts will become clear.
View 1 Comment

7 Dec 2008
at 10:18pm

4 Reasons Why Ruby Syntax Is Better Than PHP's
Having been a Rails developer for a little over a year now and after completing a few Rails projects successfully, I thought I'd post a set of reasons why I think Ruby has a cleaner syntax than PHP. The worst part of this for me is that PHP can fix a lot of these things and have a much nicer syntax but in the interests of backwards-compatibility are fairly tied to the current syntax.
View 16 Comments

27 Nov 2008
at 9:15pm

Design Patterns vs Agile Development
I don't think there can be a professional developer out there that isn't aware of the term 'Design Patterns'. Put simply these are standard solutions to common program architecture problems that have stood the test of time and have been abstracted to the point of being applicable to a number of different domains without needing simplification first. They are often overused at the start of a project, building in flexibility for potential future requirements. One of the corner "Patterns" of Agile Development is YAGNI - You Ain't Gonna Need It. With Agile Development being "The One True Way" of developing Web Applications, are the two mutually exclusive?
View 5 Comments

20 Nov 2008
at 8:01pm

Developing components considered bad form in Rails
On a typical modern website, most pages are dynamically generated from various database tables. There is normally the main content area which contains content such as the latest news stories. Then there are usually various boxes in a side bar such as the latest pictures from the galleries which contains the latest content in various other tables. How those boxes are developed differs in best practices between Rails and Symfony...
View 5 Comments

7 Nov 2008
at 6:15am

Rebuilding a site from Symfony to Rails
After building my personal site from scratch in Symfony/PHP5 - I decided as I am leaning towards Rails now it was time to rewrite it in Rails. I had some good experiences during the process and overall I'm pleased with it. This may serve as a useful push if you're currently a PHP developer tempted by Rails.
View 16 Comments

11 Jun 2008
at 9:59am

A Video Every Teenage Girl Should Be Made To Watch
In 2006, a young girl named Dallas Jessup made a movie called Just Yell Fire with the support of her local community and her Philipino Street Fighting coach Chad Von Dette. This movie has been released free of charge on the internet and can either be downloaded as a normal PC/Mac playable movie or as a DVD image for burning to a DVD and showing on TVs in school.
Post the first comment!

15 Apr 2008
at 8:12pm

Why I think Ruby on Rails is an ideal web development environment
As a contractor it is always wise to stay on top of upcoming technologies, today's niche market may be tomorrow's big earner. This year I decided to learn Ruby on Rails, so I thought I'd write a post on why I think Rails is such as excellent development system.
View 5 Comments

8 Apr 2008
at 1:47pm

Be careful choosing a domain name for your site
Be very careful how you choose your domain name. A friend at work forwarded this content and it shows some of the pitfalls of innocent sounding names.
Post the first comment!

6 Mar 2008
at 9:35am

Sharing music, pictures and videos between a Mac and an Xbox 360/Playstation 3
After getting our new 20" iMac, we've completely dropped using Windows at home. With an upcoming party this weekend the question pops up "How will we access our music from the computer?". Nullriver to the rescue!
Post the first comment!

allinterestingsites

16 Apr 2009
at 11:10am

Airport CLI utility for Mac OS X
A very useful little CLI tool to determine the current network. Now I'm using my MacBook in two places, it's very handy to know which WiFi network I'm connected to in my scripts/cron jobs.

18 Mar 2009
at 8:49am

Funniest knockout ever!!!
I won't spoil it, but I'd hate to be the referee in this fight!!!

5 Feb 2009
at 1:36pm

Monty's 21st Century Business Model
It's a very interesting read (and would be an amazing company to work for), but I'm not sure how well it will work out. I wish him all the best though and will definitely be following his progress.

17 Dec 2008
at 8:41am

25 Excellent Tips for jQuery
Jon Hobbs-Smith's brilliant article containing 25 real-life tips on jQuery. The article assumes you know the basics of jQuery, but then really does add value for the backend developer who isn't a javascript/jQuery pro.

25 Nov 2008
at 9:02am

Rails 2.2: Information
Ruby Inside has a very nice summary of interesting links for the just-released Rails 2.2. I don't feel like I'm quite ready to be using Edge Rails so at least Rails 2.2 contains some of the goodness that I've been reading about in various blogs.

21 Nov 2008
at 10:48am

Redirecting your RSS to Feedburner without changing any code
After deciding to give Feedburner a try to track statistics, I found this interesting blog post on doing it without actually changing your site code. We'll see how it works, but I know they're using a similar trick at the place I'm currently contracting

8 Jul 2008
at 9:00am

Korean soldiers train for confrontation, black-belt style (NBC)
An introduction piece to Taekwondo in the run-up to the 2008 Beijing Olympic Games; still taught to Korea's elite military units, school children and martial art students around the world.

14 May 2008
at 11:03am

Collective Code Ownership == No Code Ownership?
David Linsen wrote an interesting blog post about the Scrum process and code being abandoned as no specific person has ownership. I've commented a couple of times on the blog post but will probably expand more in to a full blog post here in a week or so.

18 Apr 2008
at 1:12pm

101 Atheist Quotes
If you're an atheist, this is a great collection of quotes as to why religion is a load of ...

28 Feb 2008
at 12:02pm

iPhone: 1.0.3->1.1.4->Aaarrggh!->1.1.3->Yay :-)
After deciding to upgrade my iPhone to 1.1.4 (as iNdependence Beta 5 apparently makes it easy to re-unlock it), I've had a hairy time with my phone not working. After finding this guide (and iJailbreak) it's back working and running 1.1.3.

webfeeds

All your syndication feeds should be taken care of by the list below.

Resume/CV aboutandy

I am a web developer creating sites for a number of clients through my company NextGen Development Ltd using PHP5 and MySQL. Recently I've been using/recommending the Symfony framework as it's an excellent solution for building websites that are robust and have a high level of functionality in a short timeframe.

I've been developing web applications since about 1996 (initially in Perl, then using PHP since 1999) for clients such as OXO, Fortnum & Mason and IPC Media Ltd. I've worked on over 400 sites over this period and am currently focusing most of my energy on a few important clients: IPC Media Ltd, Mansized and Pocket-Lint.

In my spare time I am a Kukki-Taekwondo 3rd Dan black belt, father to two young children and a husband to my darling wife. Then again, what is this spare time thing...?