Changeset fa1c077f


Ignore:
Timestamp:
Aug 30, 2014 7:00:57 PM (7 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
1238001a
Parents:
8a7c339
Message:
  • Console: Show unavailable crypto on /logs
  • Router: Log warnings for unavailable crypto at startup
Files:
1 added
5 edited

Legend:

Unmodified
Added
Removed
  • apps/routerconsole/java/src/net/i2p/router/web/LogsHelper.java

    r8a7c339 rfa1c077f  
    1010
    1111import net.i2p.I2PAppContext;
     12import net.i2p.crypto.SigType;
    1213import net.i2p.util.FileUtil;
    1314import net.i2p.util.VersionComparator;
     
    2829    public static String jettyVersion() {
    2930        return Server.getVersion();
     31    }
     32
     33    /** @since 0.9.15 */
     34    public String getUnavailableCrypto() {
     35        StringBuilder buf = new StringBuilder(128);
     36        for (SigType t : SigType.values()) {
     37            if (!t.isAvailable()) {
     38                buf.append("<b>Crypto:</b> ").append(t.toString()).append(" unavailable<br>");
     39            }
     40        }
     41        return buf.toString();
    3042    }
    3143
  • apps/routerconsole/jsp/error500.jsp

    r8a7c339 rfa1c077f  
    6161<b>I2P version:</b> <%=net.i2p.router.RouterVersion.FULL_VERSION%><br>
    6262<b>Java version:</b> <%=System.getProperty("java.vendor")%> <%=System.getProperty("java.version")%> (<%=System.getProperty("java.runtime.name")%> <%=System.getProperty("java.runtime.version")%>)<br>
    63 <b>Wrapper version:</b> <%=System.getProperty("wrapper.version", "none")%><br>
    6463 <jsp:useBean class="net.i2p.router.web.LogsHelper" id="logsHelper" scope="request" />
    6564 <jsp:setProperty name="logsHelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
     65<jsp:getProperty name="logsHelper" property="unavailableCrypto" />
     66<b>Wrapper version:</b> <%=System.getProperty("wrapper.version", "none")%><br>
    6667<b>Server version:</b> <jsp:getProperty name="logsHelper" property="jettyVersion" /><br>
    6768<b>Servlet version:</b> <%=getServletInfo()%><br>
  • apps/routerconsole/jsp/logs.jsp

    r8a7c339 rfa1c077f  
    2525<b>I2P version:</b> <%=net.i2p.router.RouterVersion.FULL_VERSION%><br>
    2626<b>Java version:</b> <%=System.getProperty("java.vendor")%> <%=System.getProperty("java.version")%> (<%=System.getProperty("java.runtime.name")%> <%=System.getProperty("java.runtime.version")%>)<br>
    27 <b>Wrapper version:</b> <%=System.getProperty("wrapper.version", "none")%><br>
    2827 <jsp:useBean class="net.i2p.router.web.LogsHelper" id="logsHelper" scope="request" />
    2928 <jsp:setProperty name="logsHelper" property="contextId" value="<%=(String)session.getAttribute(\"i2p.contextId\")%>" />
     29<jsp:getProperty name="logsHelper" property="unavailableCrypto" />
     30<b>Wrapper version:</b> <%=System.getProperty("wrapper.version", "none")%><br>
    3031<b>Server version:</b> <jsp:getProperty name="logsHelper" property="jettyVersion" /><br>
    3132<b>Servlet version:</b> <%=getServletInfo()%><br>
     
    3435<b>Jbigi:</b> <%=net.i2p.util.NativeBigInteger.loadStatus()%><br>
    3536<b>Encoding:</b> <%=System.getProperty("file.encoding")%><br>
    36 <b>Charset:</b> <%=java.nio.charset.Charset.defaultCharset().name()%></p>
     37<b>Charset:</b> <%=java.nio.charset.Charset.defaultCharset().name()%><br>
     38</p>
    3739<p><%=intl._("Note that system information, log timestamps, and log messages may provide clues to your location; please review everything you include in a bug report.")%></p>
    3840<h3><%=intl._("Critical Logs")%></h3><a name="criticallogs"> </a>
  • core/java/src/net/i2p/util/SystemVersion.java

    r8a7c339 rfa1c077f  
    2727    private static final boolean _oneDotSix;
    2828    private static final boolean _oneDotSeven;
     29    private static final boolean _oneDotEight;
    2930    private static final int _androidSDK;
    3031
     
    6162            _oneDotSix = _androidSDK >= 9;
    6263            _oneDotSeven = _androidSDK >= 19;
     64            _oneDotEight = false;
    6365        } else {
    6466            _oneDotSix = VersionComparator.comp(System.getProperty("java.version"), "1.6") >= 0;
    65             _oneDotSeven = VersionComparator.comp(System.getProperty("java.version"), "1.7") >= 0;
     67            _oneDotSeven = _oneDotSix && VersionComparator.comp(System.getProperty("java.version"), "1.7") >= 0;
     68            _oneDotEight = _oneDotSeven && VersionComparator.comp(System.getProperty("java.version"), "1.8") >= 0;
    6669        }
    6770    }
     
    129132
    130133    /**
     134     *
     135     *  @return true if Java 1.8 or higher, false for Android.
     136     *  @since 0.9.15
     137     */
     138    public static boolean isJava8() {
     139        return _oneDotEight;
     140    }
     141
     142    /**
    131143     * This isn't always correct.
    132144     * http://stackoverflow.com/questions/807263/how-do-i-detect-which-kind-of-jre-is-installed-32bit-vs-64bit
  • router/java/src/net/i2p/router/Router.java

    r8a7c339 rfa1c077f  
    318318                SecureFileOutputStream.setPerms(f);
    319319        }
     320        CryptoChecker.warnUnavailableCrypto(_context);
    320321
    321322        _routerInfo = null;
Note: See TracChangeset for help on using the changeset viewer.