Added options to sign certificate with x509 extensions

I was using your code to authenticate ipsec windows client on linux server.
Then I need change it because windows ikev2 only authenticate with some extensions enabled in certificate.
However I'm still learning ruby / sinatra. Excuse me if my code is not as elegant.