equal
deleted
inserted
replaced
340 |
340 |
341 return extensions.toArray(new SSLExtension[0]); |
341 return extensions.toArray(new SSLExtension[0]); |
342 } |
342 } |
343 |
343 |
344 /** |
344 /** |
|
345 * Get the enabled extensions for the specific handshake message, excluding |
|
346 * the specified extensions. |
|
347 * |
|
348 * Used to consume handshake extensions. |
|
349 */ |
|
350 SSLExtension[] getExclusiveExtensions(SSLHandshake handshakeType, |
|
351 List<SSLExtension> excluded) { |
|
352 List<SSLExtension> extensions = new ArrayList<>(); |
|
353 for (SSLExtension extension : SSLExtension.values()) { |
|
354 if (extension.handshakeType == handshakeType) { |
|
355 if (isAvailable(extension) && !excluded.contains(extension)) { |
|
356 extensions.add(extension); |
|
357 } |
|
358 } |
|
359 } |
|
360 |
|
361 return extensions.toArray(new SSLExtension[0]); |
|
362 } |
|
363 |
|
364 /** |
345 * Get the enabled extensions for the specific handshake message |
365 * Get the enabled extensions for the specific handshake message |
346 * and the specific protocol version. |
366 * and the specific protocol version. |
347 * |
367 * |
348 * Used to produce handshake extensions after handshake protocol |
368 * Used to produce handshake extensions after handshake protocol |
349 * version negotiation. |
369 * version negotiation. |