ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh SSHBase.java SSHUserInfo.java
Date Thu, 16 Oct 2003 11:21:46 GMT
bodewig     2003/10/16 04:21:46

  Modified:    docs/manual/OptionalTasks Tag: ANT_16_BRANCH scp.html
                        sshexec.html
               src/main/org/apache/tools/ant/taskdefs/optional/ssh Tag:
                        ANT_16_BRANCH SSHBase.java SSHUserInfo.java
  Log:
  Merge from HEAD
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.7.2.3   +4 -1      ant/docs/manual/OptionalTasks/scp.html
  
  Index: scp.html
  ===================================================================
  RCS file: /home/cvs/ant/docs/manual/OptionalTasks/scp.html,v
  retrieving revision 1.7.2.2
  retrieving revision 1.7.2.3
  diff -u -r1.7.2.2 -r1.7.2.3
  --- scp.html	9 Oct 2003 21:01:11 -0000	1.7.2.2
  +++ scp.html	16 Oct 2003 11:21:46 -0000	1.7.2.3
  @@ -54,7 +54,10 @@
     </tr>
     <tr>
       <td valign="top">trust</td>
  -    <td valign="top">This trusts all unknown hosts if set to yes/true.</td>
  +    <td valign="top">This trusts all unknown hosts if set to yes/true.<br>
  +      <strong>Note</strong> If you set this to false (the default), the
  +      host you connect to must be listed in your knownhosts file, this
  +      also implies that the file exists.</td>
       <td valian="top" align="center">No, defaults to No.</td>
     </tr>
     <tr>
  
  
  
  1.5.2.3   +5 -1      ant/docs/manual/OptionalTasks/sshexec.html
  
  Index: sshexec.html
  ===================================================================
  RCS file: /home/cvs/ant/docs/manual/OptionalTasks/sshexec.html,v
  retrieving revision 1.5.2.2
  retrieving revision 1.5.2.3
  diff -u -r1.5.2.2 -r1.5.2.3
  --- sshexec.html	9 Oct 2003 21:01:11 -0000	1.5.2.2
  +++ sshexec.html	16 Oct 2003 11:21:46 -0000	1.5.2.3
  @@ -47,7 +47,11 @@
     </tr>
     <tr>
       <td valign="top">trust</td>
  -    <td valign="top">This trusts all unknown hosts if set to yes/true.</td>
  +
  +    <td valign="top">This trusts all unknown hosts if set to yes/true.<br>
  +      <strong>Note</strong> If you set this to false (the default), the
  +      host you connect to must be listed in your knownhosts file, this
  +      also implies that the file exists.</td>
       <td valian="top" align="center">No, defaults to No.</td>
     </tr>
     <tr>
  
  
  
  No                   revision
  No                   revision
  1.5.2.1   +1 -3      ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHBase.java
  
  Index: SSHBase.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHBase.java,v
  retrieving revision 1.5
  retrieving revision 1.5.2.1
  diff -u -r1.5 -r1.5.2.1
  --- SSHBase.java	9 Jul 2003 12:12:59 -0000	1.5
  +++ SSHBase.java	16 Oct 2003 11:21:46 -0000	1.5.2.1
  @@ -77,7 +77,6 @@
       private String host;
       private String keyfile;
       private String knownHosts;
  -    private boolean trust = false;
       private int port = SSH_PORT;
       private boolean failOnError = true;
       private SSHUserInfo userInfo;
  @@ -185,7 +184,6 @@
       public void init() throws BuildException {
           super.init();
           this.knownHosts = System.getProperty("user.home") + "/.ssh/known_hosts";
  -        this.trust = false;
           this.port = SSH_PORT;
       }
   
  @@ -195,7 +193,7 @@
               jsch.addIdentity(userInfo.getKeyfile());
           }
   
  -        if (knownHosts != null) {
  +        if (!userInfo.getTrust() && knownHosts != null) {
               log("Using known hosts: " + knownHosts, Project.MSG_DEBUG);
               jsch.setKnownHosts(knownHosts);
           }
  
  
  
  1.3.2.1   +8 -1      ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHUserInfo.java
  
  Index: SSHUserInfo.java
  ===================================================================
  RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/ssh/SSHUserInfo.java,v
  retrieving revision 1.3
  retrieving revision 1.3.2.1
  diff -u -r1.3 -r1.3.2.1
  --- SSHUserInfo.java	9 Jul 2003 12:12:59 -0000	1.3
  +++ SSHUserInfo.java	16 Oct 2003 11:21:46 -0000	1.3.2.1
  @@ -70,7 +70,7 @@
   
       public SSHUserInfo() {
           super();
  -        this.trustAllCertificates = true;
  +        this.trustAllCertificates = false;
       }
   
       public SSHUserInfo(String password, boolean trustAllCertificates) {
  @@ -144,6 +144,13 @@
        */
       public void setTrust(boolean trust) {
           this.trustAllCertificates = trust;
  +    }
  +
  +    /**
  +     * @return whether to trust or not.
  +     */
  +    public boolean getTrust() {
  +        return this.trustAllCertificates;
       }
   
       /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message