refs #30 works also with x509 key