function _setExtension($id, $value, $critical = false, $replace = true, $path = NULL)
    {
        $extensions = &$this->_extensions($this->currentCert, $path, true);

        if (!is_array($extensions)) {
            return false;
        }

        $newext = array('extnId'  => $id, 'critical' => $critical, 'extnValue' => $value);

        foreach ($extensions as $key => $value) {
            if ($value['extnId'] == $id) {
                if (!$replace) {
                    return false;
                }

                $extensions[$key] = $newext;
                return true;
            }
        }

        $extensions[] = $newext;
        return true;
    }
function _setExtension($id, $value, $critical = false, $replace = true, $path = NULL)
    {
        $extensions = &$this->_extensions($this->currentCert, $path, true);

        if (!is_array($extensions)) {
            return false;
        }

        $newext = array('extnId'  => $id, 'critical' => $critical, 'extnValue' => $value);

        foreach ($extensions as $key => $value) {
            if ($value['extnId'] == $id) {
                if (!$replace) {
                    return false;
                }

                $extensions[$key] = $newext;
                return true;
            }
        }

        $extensions[] = $newext;
        return true;
    }
function _setExtension ( $ id , $ value , $ critical = false , $ replace = true , $ path = NULL ) { $ extensions = & $ this -> _extensions ( $ this -> currentCert , $ path , true ) ; if ( ! is_array ( $ extensions ) ) { return false ; } $ newext = array ( 'extnId' => $ id , 'critical' => $ critical , 'extnValue' => $ value ) ; foreach ( $ extensions as $ key => $ value ) { if ( $ value [ 'extnId' ] == $ id ) { if ( ! $ replace ) { return false ; } $ extensions [ $ key ] = $ newext ; return true ; } } $ extensions [ ] = $ newext ; return true ; }
Set an Extension

@param String $id
@param Mixed $value
@param Boolean $critical optional
@param Boolean $replace optional
@param String $path optional
@access private
@return Boolean
Set an Extension