IMP_Smime::_signParameters PHP Method

_signParameters() protected method

Returns the parameters needed for signing a message.
protected _signParameters ( ) : array
return array The list of parameters needed by encrypt().
    protected function _signParameters()
    {
        $pubkey = $this->getPersonalPublicKey(true);
        $additional = array();
        if ($pubkey) {
            $additional[] = $this->getPersonalPublicKey();
            $secondary = true;
        } else {
            $pubkey = $this->getPersonalPublicKey();
            $secondary = false;
        }
        $additional[] = $this->getAdditionalCert($secondary);
        if ($secondary) {
            $additional[] = $this->getAdditionalCert();
        }
        return array('type' => 'signature', 'pubkey' => $pubkey, 'privkey' => $this->getPersonalPrivateKey($secondary), 'passphrase' => $this->getPassphrase($secondary), 'sigtype' => 'detach', 'certs' => implode("\n", $additional));
    }