/** * Receives a TLS handshake in the role of server * * @param tlsServer * @throws IOException If handshake was not successful. */ public void accept(TlsServer tlsServer) throws IOException { if (tlsServer == null) { throw new IllegalArgumentException("'tlsServer' cannot be null"); } if (this.tlsServer != null) { throw new IllegalStateException("'accept' can only be called once"); } this.tlsServer = tlsServer; this.securityParameters = new SecurityParameters(); this.securityParameters.entity = ConnectionEnd.server; this.tlsServerContext = new TlsServerContextImpl(secureRandom, securityParameters); this.securityParameters.serverRandom = createRandomBlock(tlsServer.shouldUseGMTUnixTime(), tlsServerContext.getNonceRandomGenerator()); this.tlsServer.init(tlsServerContext); this.recordStream.init(tlsServerContext); this.recordStream.setRestrictReadVersion(false); completeHandshake(); }
this.securityParameters = new SecurityParameters(); this.securityParameters.entity = ConnectionEnd.server;
this.securityParameters = new SecurityParameters(); this.securityParameters.entity = ConnectionEnd.client;
this.securityParameters = new SecurityParameters(); this.securityParameters.entity = ConnectionEnd.client;
SecurityParameters securityParameters = new SecurityParameters(); securityParameters.entity = ConnectionEnd.server;
SecurityParameters securityParameters = new SecurityParameters(); securityParameters.entity = ConnectionEnd.server;
SecurityParameters securityParameters = new SecurityParameters(); securityParameters.entity = ConnectionEnd.client;
SecurityParameters securityParameters = new SecurityParameters(); securityParameters.entity = ConnectionEnd.client;