public NewSessionTicket getNewSessionTicket() throws IOException { /* * RFC 5077 3.3. If the server determines that it does not want to include a ticket after it * has included the SessionTicket extension in the ServerHello, then it sends a zero-length * ticket in the NewSessionTicket handshake message. */ return new NewSessionTicket(0L, TlsUtils.EMPTY_BYTES); } }
public NewSessionTicket getNewSessionTicket() throws IOException { /* * RFC 5077 3.3. If the server determines that it does not want to include a ticket after it * has included the SessionTicket extension in the ServerHello, then it sends a zero-length * ticket in the NewSessionTicket handshake message. */ return new NewSessionTicket(0L, TlsUtils.EMPTY_BYTES); } }
/** * Parse a {@link NewSessionTicket} from an {@link InputStream}. * * @param input the {@link InputStream} to parse from. * @return a {@link NewSessionTicket} object. * @throws IOException */ public static NewSessionTicket parse(InputStream input) throws IOException { long ticketLifetimeHint = TlsUtils.readUint32(input); byte[] ticket = TlsUtils.readOpaque16(input); return new NewSessionTicket(ticketLifetimeHint, ticket); } }
/** * Parse a {@link NewSessionTicket} from an {@link InputStream}. * * @param input the {@link InputStream} to parse from. * @return a {@link NewSessionTicket} object. * @throws IOException */ public static NewSessionTicket parse(InputStream input) throws IOException { long ticketLifetimeHint = TlsUtils.readUint32(input); byte[] ticket = TlsUtils.readOpaque16(input); return new NewSessionTicket(ticketLifetimeHint, ticket); } }