ported patch for RSA-PSK

revives some deletions from
a8504e254f6ff23200c6069961ab367c9cec43a0

original patch can be found in
e3c245b951530a92fc610a130faf167a37461073
f06ba1b71fa2cf9e1f3e33ea58cda94aaff88f20