private static function convertCertToX509(X509 $X509, $certificate)
    {
        $X509Data = $X509->loadX509($certificate);
        return json_decode(json_encode($X509Data), false);
    }
private static function convertCertToX509(X509 $X509, $certificate)
    {
        $X509Data = $X509->loadX509($certificate);
        return json_decode(json_encode($X509Data), false);
    }
private static function convertCertToX509 ( X509 $ X509 , $ certificate ) { $ X509Data = $ X509 -> loadX509 ( $ certificate ) ; return json_decode ( json_encode ( $ X509Data ) , false ) ; }
Return X509 Cert Object.

@param X509 $X509
@param $certificate

@return \stdClass
Return X509 Cert Object .