replaced the deprecated class X509Extension by Extension