# Ruby openssl "no config database"

**URL:** <https://www.ruby-forum.com/t/ruby-openssl-no-config-database/151744>\
**Category:** Ruby\
**Created:** [October 25, 2008, 12:10am UTC](https://www.ruby-forum.com/t/ruby-openssl-no-config-database/151744 "2008-10-25T00:10:24Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![xinit](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/9f8e36/32.png) [@xinit](https://www.ruby-forum.com/u/xinit)\
**Post date:** [October 25, 2008, 12:10am UTC](https://www.ruby-forum.com/t/ruby-openssl-no-config-database/151744/1 "2008-10-25T00:10:24Z")

</div>

Hi all!

I’m creating X509 certificates with ruby openssl. Everything worked  
well, until I was trying to add custom OID’s to the certificatePolicy  
extension. I have a lot of rake tasks running against the library I’m  
building and with every test, I create a new certificate and check for  
certain properties. What is happening is that sometimes I get openssl  
errors that say “no config database” on the ef.create\_extension line  
below. The strange thing is that in a run of 42 tests, it sometimes  
happens and sometimes it doesn’t. Every test creates a certificate in  
exactly the same way. Randomly, one of the tests fail.

I have the following code:

OpenSSL::ASN1::ObjectId.register(“2.16.528.1.1003.1.2.3.1”,  
“authenticiteit.1”, “Authenticiteit\_CP”)  
OpenSSL::ASN1::ObjectId.register(“2.16.528.1.1003.1.2.3.2”,  
“onweerlegbaarheid.1”, “Onweerlegbaarheid\_CP”)  
OpenSSL::ASN1::ObjectId.register(“2.16.528.1.1003.1.2.3.3”,  
“vertrouwelijkheid.1”, “Vertrouwelijkheid\_CP”)

and finally to add the extension to my certificate after setting up the  
ExtensionFactory:

ex \<\< ef.create\_extension(“certificatePolicies”, “authenticiteit.1,  
onweerlegbaarheid.1, vertrouwelijkheid.1”)

All other extensions never give any problems, just this one.

Anyone who has an idea about this? Too bad that ruby-openssl seems to  
lack documentation…

Greetings,

Wouter
