Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-21283

BasicSSHUserPrivateKey.getPassphrase breaks nullness contract of interface

    XMLWordPrintable

Details

    Description

      SSHUserPrivateKey.getPassphrase is documented to return null if the private key is not protected by passphrase. Yet the constructor of BasicSSHUserPrivateKey does not check for an empty passphrase, and Secret.fromString never returns null, so getPassphrase returns a non-null result even if none was specified (in this case .getPassphrase().getPlainText().isEmpty()).

      Attachments

        Activity

          There are no comments yet on this issue.

          People

            stephenconnolly Stephen Connolly
            jglick Jesse Glick
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: