Actions
Bug #6703
closedopenssl: using a newly registered extension
Status:
Rejected
Assignee:
-
Target version:
-
ruby -v:
ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]
Backport:
Description
When registering a new ASN.1 extension OBJ_create(), it should make it available for OBJ_ln2nid() and OBJ_sn2nid() searches that are performed in OpenSSL::X509::ExtensionFactory.create_ext
I've attached a ruby case where this should work,
As well as a C sample where you can see it working.
p.s. I wish that OBJ_txt2nid was added to the functions used when searching for the nid
Files
Updated by nahi (Hiroshi Nakamura) over 11 years ago
- Status changed from Open to Assigned
- Assignee set to nahi (Hiroshi Nakamura)
Updated by zzak (zzak _) over 8 years ago
- Assignee changed from nahi (Hiroshi Nakamura) to 7150
Updated by rhenium (Kazuki Yamaguchi) over 7 years ago
- Status changed from Assigned to Rejected
(from ossl_ext_bug.rb)
ef.create_extension('hurr','This is a test')
It doesn't work because OpenSSL (X509V3_EXT_nconf_nid()) doesn't know how to parse "This is a test". Please see x509v3_config(5) for details.
You can use the syntax described in ARBITRARY EXTENSIONS section:
asn1 = OpenSSL::ASN1::OctetString("This is a test")
ef.create_extension("hurr", "DER:#{asn1.to_der.unpack("H*")[0]}")
or using X509::Extension directly:
OpenSSL::X509::Extension.new("hurr", asn1)
Actions
Like0
Like0Like0Like0