Uploaded image for project: 'Commons Net'
  1. Commons Net
  2. NET-372

FTPSClient: java.security.cert.CertificateException: No X509TrustManager implementation available if trustManager == null

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.0
    • Component/s: None
    • Labels:
      None

      Description

      FTPSClient defaults to providing the TrustManager provided by FTPSTrustManager.

      It should be possible to use setTrustManager(null) to obtain the default JVM trust manager, however this fails with

      java.security.cert.CertificateException: No X509TrustManager implementation available

      because SSLContext.init(KeyManager[] km, TrustManager[] tm, SecureRandom random) expects null parameters, but does not allow for null entries in the TrustManager array.

      The init call needs to be changed so null is passed instead of an array with a null entry.

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              sebb@apache.org Sebb
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: