reaperhulk/r509 — Issue #27: R509::Cert#subject_component doesn't let me get components that aren't all upcase.
Author: justfalter
Created: 2012-01-03 17:31:48+00:00
State: open

I'm using www.yahoo.com's certificate for this.

```1.9.1-p243 :003 > cert = OpenSSL::X509::Certificate.new(File.read('test.pem'))
=> #
1.9.1-p243 :004 > r509_cert = R509::Cert.new(:cert => cert)
=> #, @san_names=["www.yahoo.com", "yahoo.com", "us.yahoo.com", "kr.yahoo.com", "uk.yahoo.com", "ie.yahoo.com", "fr.yahoo.com", "in.yahoo.com", "ca.yahoo.com", "br.yahoo.com", "de.yahoo.com", "es.yahoo.com", "mx.yahoo.com", "it.yahoo.com", "sg.yahoo.com", "id.yahoo.com", "ph.yahoo.com", "qc.yahoo.com", "tw.yahoo.com", "hk.yahoo.com", "cn.yahoo.com", "au.yahoo.com", "ar.yahoo.com", "vn.yahoo.com"]>
```

Here's the subject:
```1.9.1-p243 :005 > r509_cert.subject
=> /serialNumber=2g8aO5wI1bKJ2ZD588UsLvDe3gTbg8DU/C=US/ST=California/L=Sunnyvale/O=Yahoo Inc./CN=www.yahoo.com ```

I can access the CN no problem:
```1.9.1-p243 :006 > r509_cert.subject_component('CN')```
=> "www.yahoo.com"

But, trying to get the serialNumber (or other mixed non-uppercase components), it fails:
```1.9.1-p243 :007 > r509_cert.subject_component('serialNumber')
=> nil ```

I think I can fix this quickly enough.