docs: private Subject authenticateWithCertificateChain(SSLSession session) throws SSLPeerUnverifiedException, AuthenticationException, CredentialExpiredException, CredentialDestroyedException {
          Subject transportSubject = null;
          if (session != null) {
              Certificate[] certificateChain = session.getPeerCertificates();
              transportSubject = authenticator.authenticate((X509Certificate[]) certificateChain);
              /* Here we need to get the WSCredential from the subject. We will use the subject manager for the same. */
              SubjectHelper subjectHelper = new SubjectHelper();
              WSCredential wsCredential = subjectHelper.getWSCredential(transportSubject);
              /*
               * First we tell the WSCredential that the identity token is in the form of a certificate chain. This is
               * done by setting the property "wssecurity.identity_name" to "ClientCertificate"
               */
              wsCredential.set(Constants.IDENTITY_NAME, Constants.ClientCertificate);
              /*
               * Now we need to put the certificate chain into the WScredential object. By doing this, we
               * make sure that, the authenticated certificates are indeed part of the credential. This credential
               * can be used further down the CSIv2 flow. The certificate is set as a name value pair, with the name
               * "wssecurity.identity_value"
               */
              wsCredential.set(Constants.IDENTITY_VALUE, certificateChain);
          }
          return transportSubject;
      }