static byte[] calculateVerifyData(TlsContext context, String asciiLabel, byte[] handshakeHash) { if (isSSL(context)) { return handshakeHash; } SecurityParameters securityParameters = context.getSecurityParameters(); byte[] master_secret = securityParameters.getMasterSecret(); int verify_data_length = securityParameters.getVerifyDataLength(); return PRF(context, master_secret, asciiLabel, handshakeHash, verify_data_length); }
static byte[] calculateVerifyData(TlsContext context, String asciiLabel, byte[] handshakeHash) { if (isSSL(context)) { return handshakeHash; } SecurityParameters securityParameters = context.getSecurityParameters(); byte[] master_secret = securityParameters.getMasterSecret(); int verify_data_length = securityParameters.getVerifyDataLength(); return PRF(context, master_secret, asciiLabel, handshakeHash, verify_data_length); }
return TlsUtils.PRF(this, sp.getMasterSecret(), asciiLabel, seed, length);
return TlsUtils.PRF(this, sp.getMasterSecret(), asciiLabel, seed, length);
static byte[] calculateKeyBlock(TlsContext context, int size) { SecurityParameters securityParameters = context.getSecurityParameters(); byte[] master_secret = securityParameters.getMasterSecret(); byte[] seed = concat(securityParameters.getServerRandom(), securityParameters.getClientRandom()); if (isSSL(context)) { return calculateKeyBlock_SSL(master_secret, seed, size); } return PRF(context, master_secret, ExporterLabel.key_expansion, seed, size); }
static byte[] calculateKeyBlock(TlsContext context, int size) { SecurityParameters securityParameters = context.getSecurityParameters(); byte[] master_secret = securityParameters.getMasterSecret(); byte[] seed = concat(securityParameters.getServerRandom(), securityParameters.getClientRandom()); if (isSSL(context)) { return calculateKeyBlock_SSL(master_secret, seed, size); } return PRF(context, master_secret, ExporterLabel.key_expansion, seed, size); }
if (tlsContext.getSecurityParameters().getMasterSecret() == null && tlsContext.getResumableSession() != null) {
&& ctx.getSecurityParameters().getMasterSecret() != null)
.setCompressionAlgorithm(this.securityParameters.getCompressionAlgorithm()) .setExtendedMasterSecret(securityParameters.isExtendedMasterSecret()) .setMasterSecret(this.securityParameters.getMasterSecret()) .setPeerCertificate(this.peerCertificate) .setPSKIdentity(this.securityParameters.getPSKIdentity())
.setCompressionAlgorithm(securityParameters.getCompressionAlgorithm()) .setExtendedMasterSecret(securityParameters.isExtendedMasterSecret()) .setMasterSecret(securityParameters.getMasterSecret()) .setPeerCertificate(serverCertificate) .setPSKIdentity(securityParameters.getPSKIdentity())