public override byte[] GenerateCertificateSignature(byte[] hash) { try { if (TlsUtilities.IsTlsV12(mContext)) { return(mSigner.GenerateRawSignature(mSignatureAndHashAlgorithm, mPrivateKey, hash)); } return(mSigner.GenerateRawSignature(mPrivateKey, hash)); } catch (CryptoException alertCause) { throw new TlsFatalAlert(80, alertCause); } }
/// <exception cref="IOException"></exception> public override byte[] GenerateCertificateSignature(byte[] hash) { try { if (TlsUtilities.IsTlsV12(mContext)) { return(mSigner.GenerateRawSignature(mSignatureAndHashAlgorithm, mPrivateKey, hash)); } else { return(mSigner.GenerateRawSignature(mPrivateKey, hash)); } } catch (CryptoException e) { throw new TlsFatalAlert(AlertDescription.internal_error, e); } }
public virtual byte[] GenerateCertificateSignature(byte[] md5andsha1) { try { return(clientSigner.GenerateRawSignature(context.SecureRandom, clientPrivateKey, md5andsha1)); } catch (CryptoException) { throw new TlsFatalAlert(AlertDescription.internal_error); } }