return getChannelBindingData(serverCert); } catch (NoSuchAlgorithmException | CertificateEncodingException e) { return null;
/** * Convenience method to handle a channel binding callback. * * @param channelBindingCallback the callback (must not be {@code null}) * @param serverCerts the server certificate chain * @throws UnsupportedCallbackException if the server certificates are not present or unsupported and the callback is not optional */ public static void handleChannelBindingCallback(ChannelBindingCallback channelBindingCallback, X509Certificate[] serverCerts) throws UnsupportedCallbackException { if (serverCerts != null && serverCerts.length > 0) { // tls-server-end-point try { final byte[] bindingData = getChannelBindingData(serverCerts[0]); if (bindingData != null) { channelBindingCallback.setBindingData(bindingData); channelBindingCallback.setBindingType(TLS_SERVER_ENDPOINT); return; } } catch (CertificateEncodingException | NoSuchAlgorithmException e) { // fail silently } } CallbackUtil.unsupported(channelBindingCallback); }
return getChannelBindingData(serverCert); } catch (NoSuchAlgorithmException | CertificateEncodingException e) { return null;
return getChannelBindingData(serverCert); } catch (NoSuchAlgorithmException | CertificateEncodingException e) { return null;
return getChannelBindingData(serverCert); } catch (NoSuchAlgorithmException | CertificateEncodingException e) { return null;
/** * Convenience method to handle a channel binding callback. * * @param channelBindingCallback the callback (must not be {@code null}) * @param serverCerts the server certificate chain * @throws UnsupportedCallbackException if the server certificates are not present or unsupported and the callback is not optional */ public static void handleChannelBindingCallback(ChannelBindingCallback channelBindingCallback, X509Certificate[] serverCerts) throws UnsupportedCallbackException { if (serverCerts != null && serverCerts.length > 0) { // tls-server-end-point try { final byte[] bindingData = getChannelBindingData(serverCerts[0]); if (bindingData != null) { channelBindingCallback.setBindingData(bindingData); channelBindingCallback.setBindingType(TLS_SERVER_ENDPOINT); return; } } catch (CertificateEncodingException | NoSuchAlgorithmException e) { // fail silently } } CallbackUtil.unsupported(channelBindingCallback); }
/** * Convenience method to handle a channel binding callback. * * @param channelBindingCallback the callback (must not be {@code null}) * @param serverCerts the server certificate chain * @throws UnsupportedCallbackException if the server certificates are not present or unsupported and the callback is not optional */ public static void handleChannelBindingCallback(ChannelBindingCallback channelBindingCallback, X509Certificate[] serverCerts) throws UnsupportedCallbackException { if (serverCerts != null && serverCerts.length > 0) { // tls-server-end-point try { final byte[] bindingData = getChannelBindingData(serverCerts[0]); if (bindingData != null) { channelBindingCallback.setBindingData(bindingData); channelBindingCallback.setBindingType(TLS_SERVER_ENDPOINT); return; } } catch (CertificateEncodingException | NoSuchAlgorithmException e) { // fail silently } } CallbackUtil.unsupported(channelBindingCallback); }
/** * Convenience method to handle a channel binding callback. * * @param channelBindingCallback the callback (must not be {@code null}) * @param serverCerts the server certificate chain * @throws UnsupportedCallbackException if the server certificates are not present or unsupported and the callback is not optional */ public static void handleChannelBindingCallback(ChannelBindingCallback channelBindingCallback, X509Certificate[] serverCerts) throws UnsupportedCallbackException { if (serverCerts != null && serverCerts.length > 0) { // tls-server-end-point try { final byte[] bindingData = getChannelBindingData(serverCerts[0]); if (bindingData != null) { channelBindingCallback.setBindingData(bindingData); channelBindingCallback.setBindingType(TLS_SERVER_ENDPOINT); return; } } catch (CertificateEncodingException | NoSuchAlgorithmException e) { // fail silently } } CallbackUtil.unsupported(channelBindingCallback); }