public function getCertificate($justbase64 = true)
    {
        if ($justbase64) {
            $str=str_replace("\n", "", $this->_certs['cert']);
            $str = str_replace("-----BEGIN CERTIFICATE-----","", $str);
            $str = str_replace("-----END CERTIFICATE-----","", $str);
            return $str;
        }

        return $this->_certs['cert'];
    }