IMP_Smime::deletePersonalKeys PHP Method

deletePersonalKeys() public method

Deletes the specified personal keys from the prefs.
public deletePersonalKeys ( boolean $signkey = false )
$signkey boolean Return the secondary key for signing?
    public function deletePersonalKeys($signkey = false)
    {
        global $prefs;
        // We always delete the secondary keys because we cannot have them
        // without primary keys.
        $prefs->setValue('smime_public_sign_key', '');
        $prefs->setValue('smime_private_sign_key', '');
        $prefs->setValue('smime_additional_sign_cert', '');
        if (!$signkey) {
            $prefs->setValue('smime_public_key', '');
            $prefs->setValue('smime_private_key', '');
            $prefs->setValue('smime_additional_cert', '');
        }
        $this->unsetPassphrase($signkey);
    }