# HG changeset patch # User hgs # Date 1279877240 -10800 # Node ID abc41079b3130d2a105790b0f8db6e5bd658c0a5 # Parent 023eef975703de5e1893c183c4028ee50a6f5d89 v2.2.7_1 diff -r 023eef975703 -r abc41079b313 build/buildutils/svnchangeids.py --- a/build/buildutils/svnchangeids.py Fri Jul 09 16:35:45 2010 +0300 +++ b/build/buildutils/svnchangeids.py Fri Jul 23 12:27:20 2010 +0300 @@ -59,6 +59,7 @@ re_change_id = re.compile("(\w+\#\d+)\s*,?", re.I | re.M) re_change_id_keyword = re.compile(change_id_keyword + "[:=]?\s*(\w+\#\d+)", re.I | re.M) + re_change_id_keyword_only = re.compile(change_id_keyword, re.I | re.M) svn_change_ids = {} cmd = "svn log -r " + rev_2 + ":" + rev_1 + " " + url #print cmd @@ -67,6 +68,11 @@ if rev: current_rev = rev[0] change_ids = re_change_id_keyword.findall(line) + change_id_keywords = re_change_id_keyword_only.findall(line) + if len(change_id_keywords) > len(change_ids): + print "WARNING: Rev " + current_rev + \ + " has more matching changeid keywords" + \ + " than matching change ids." while change_ids: for change_id in change_ids: if change_id in svn_change_ids: diff -r 023eef975703 -r abc41079b313 build/loc/resources_qt.jar Binary file build/loc/resources_qt.jar has changed diff -r 023eef975703 -r abc41079b313 build/makefile.javaversion --- a/build/makefile.javaversion Fri Jul 09 16:35:45 2010 +0300 +++ b/build/makefile.javaversion Fri Jul 23 12:27:20 2010 +0300 @@ -1,2 +1,2 @@ # Set Java version (must be dot separated, without spaces) -JAVA_VERSION = 2.2.4 +JAVA_VERSION = 2.2.7 diff -r 023eef975703 -r abc41079b313 build/sis/java_3_1.pkg --- a/build/sis/java_3_1.pkg Fri Jul 09 16:35:45 2010 +0300 +++ b/build/sis/java_3_1.pkg Fri Jul 23 12:27:20 2010 +0300 @@ -50,6 +50,8 @@ "\epoc32\release\armv5\urel\javabackup.exe"-"c:\sys\bin\javabackup.exe" "\epoc32\release\armv5\urel\javacaptain.exe"-"c:\sys\bin\javacaptain.exe" "\epoc32\release\armv5\urel\javalauncher.exe"-"c:\sys\bin\javalauncher.exe" +"\epoc32\release\armv5\urel\javaappscheme.exe"-"c:\sys\bin\javaappscheme.exe" +"\epoc32\release\armv5\urel\javaqtrequest.exe"-"c:\sys\bin\javaqtrequest.exe" "\epoc32\release\armv5\urel\javaupgradeapp.exe"-"c:\sys\bin\javaupgradeapp.exe" ;Odc file lists @@ -165,7 +167,6 @@ ; Misc dlls -"\epoc32\release\armv5\urel\javaappschemeplugin.dll"-"c:\sys\bin\javaappschemeplugin.dll" "\epoc32\release\armv5\urel\javabtl2capscplugin.dll"-"c:\sys\bin\javabtl2capscplugin.dll" "\epoc32\release\armv5\urel\javabtsppscplugin.dll"-"c:\sys\bin\javabtsppscplugin.dll" "\epoc32\release\armv5\urel\javabtgoepscplugin.dll"-"c:\sys\bin\javabtgoepscplugin.dll" @@ -217,7 +218,6 @@ #endif ; resources -"\epoc32\data\z\resource\plugins\javaappschemeplugin.rsc" -"c:\resource\plugins\javaappschemeplugin.rsc" "\epoc32\winscw\c\private\102033E6\installer\inst_plugins.cfg"-"c:\private\102033E6\installer\inst_plugins.cfg" "\epoc32\data\Z\Resource\versions\java.txt"-"c:\resource\versions\java.txt" "\epoc32\data\z\resource\java\java_app_92.mif"-"c:\resource\java\java_app.mif" diff -r 023eef975703 -r abc41079b313 inc/build_defines.hrh --- a/inc/build_defines.hrh Fri Jul 09 16:35:45 2010 +0300 +++ b/inc/build_defines.hrh Fri Jul 23 12:27:20 2010 +0300 @@ -15,7 +15,7 @@ * */ -#define RD_JAVA_VERSION 2,2,4 +#define RD_JAVA_VERSION 2,2,7 #define RD_JAVA_SYMBIAN_TARGET #define RD_JAVA_S60_RELEASE_10_1 #define RD_JAVA_S60_RELEASE_10_1_ONWARDS diff -r 023eef975703 -r abc41079b313 inc/java.txt --- a/inc/java.txt Fri Jul 09 16:35:45 2010 +0300 +++ b/inc/java.txt Fri Jul 23 12:27:20 2010 +0300 @@ -1,1 +1,1 @@ -2.2.4 +2.2.7 diff -r 023eef975703 -r abc41079b313 javacommons/gcfprotocols/file/javasrc/com/nokia/mj/impl/file/FileConnectionImpl.java --- a/javacommons/gcfprotocols/file/javasrc/com/nokia/mj/impl/file/FileConnectionImpl.java Fri Jul 09 16:35:45 2010 +0300 +++ b/javacommons/gcfprotocols/file/javasrc/com/nokia/mj/impl/file/FileConnectionImpl.java Fri Jul 23 12:27:20 2010 +0300 @@ -409,10 +409,6 @@ checkConnection(); checkConnectionMode(Connector.WRITE); - if (Connector.READ == iMode) - { - return false; - } return iFileUtility.canWrite(); } diff -r 023eef975703 -r abc41079b313 javacommons/gcfprotocols/socket/socket/build/build.xml --- a/javacommons/gcfprotocols/socket/socket/build/build.xml Fri Jul 09 16:35:45 2010 +0300 +++ b/javacommons/gcfprotocols/socket/socket/build/build.xml Fri Jul 23 12:27:20 2010 +0300 @@ -41,7 +41,8 @@ + com.nokia.mj.impl.socket.ServerSocketConnectionImpl, + com.nokia.mj.impl.properties.socket.SocketDynamicPropertyHandler"/> + + + java.src.paths=${java.src.paths} + microedition.hostname=:socket.SocketDynamicPropertyHandler + + diff -r 023eef975703 -r abc41079b313 javacommons/gcfprotocols/socket/socket/inc/socketlocalhostinfo.h --- a/javacommons/gcfprotocols/socket/socket/inc/socketlocalhostinfo.h Fri Jul 09 16:35:45 2010 +0300 +++ b/javacommons/gcfprotocols/socket/socket/inc/socketlocalhostinfo.h Fri Jul 23 12:27:20 2010 +0300 @@ -27,7 +27,7 @@ public: OS_IMPORT static int getLocalAddress(int aSd, char *aLocalAddr, int aMidletIapId, int aApType); - + static char* getLocalHostName(); }; diff -r 023eef975703 -r abc41079b313 javacommons/gcfprotocols/socket/socket/javasrc/com/nokia/mj/impl/properties/socket/SocketDynamicPropertyHandler.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/javacommons/gcfprotocols/socket/socket/javasrc/com/nokia/mj/impl/properties/socket/SocketDynamicPropertyHandler.java Fri Jul 23 12:27:20 2010 +0300 @@ -0,0 +1,83 @@ +/* +* Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + +package com.nokia.mj.impl.properties.socket; + +import java.util.Hashtable; +import java.io.IOException; +import com.nokia.mj.impl.rt.support.Jvm; +import com.nokia.mj.impl.rt.support.SystemPropertyProvider; +import com.nokia.mj.impl.utils.Logger; + +public final class SocketDynamicPropertyHandler implements SystemPropertyProvider +{ + static + { + try + { + Jvm.loadSystemLibrary("javasocket"); + } + catch (Exception e) + { + Logger.ELOG(Logger.ESOCKET, e.toString()); + } + } + + private static String SOCKET_LOCALHOST_NAME = "microedition.hostname"; + + private static final int LOCALHOST_NAME = 1; + + private static Hashtable iPropertyKeys; + + static + { + iPropertyKeys = new Hashtable(); + iPropertyKeys.put(SOCKET_LOCALHOST_NAME, new Integer( + LOCALHOST_NAME)); + + } + + /** + * Retrieves socket localhost system property. + * + * @param aKey + * The property to retrieve as defined in this class. + * @return The value of the property specified; null if the property is not + * defined + */ + public String getProperty(String aKey) + { + String propertyValue = null; + String propertyName = aKey; + + Object property = iPropertyKeys.get(propertyName); + if (null == property) + { + return "localhost"; + } + propertyValue = _getLocalhostname(); + + return propertyValue; + } + + public boolean isStatic(String aKey) + { + return true; + } + + private static native String _getLocalhostname(); +} diff -r 023eef975703 -r abc41079b313 javacommons/gcfprotocols/socket/socket/src.s60/socketlocalhostinfo.cpp --- a/javacommons/gcfprotocols/socket/socket/src.s60/socketlocalhostinfo.cpp Fri Jul 09 16:35:45 2010 +0300 +++ b/javacommons/gcfprotocols/socket/socket/src.s60/socketlocalhostinfo.cpp Fri Jul 23 12:27:20 2010 +0300 @@ -22,7 +22,24 @@ #include "logger.h" #include "connectionmanager.h" +#define localhost_len 20 int GetlocalIPAdressL(char *localaddr, int aMidletIapId, int aApType); +char* GetlocalHostNameL(); + +char* SocketLocalHostInfo::getLocalHostName() +{ + char* localhostname =NULL; + TRAPD(err,localhostname = GetlocalHostNameL()); + ILOG1(ESOCKET, "err %d ", err); + if (err != KErrNone) + { + localhostname = new char[localhost_len]; + strcpy(localhostname,"localhost"); + return localhostname; + } + else + return localhostname; +} OS_EXPORT int SocketLocalHostInfo::getLocalAddress(int /* aSd */, char *aLocalAddr, int aMidletIapId, int aApType) @@ -190,3 +207,41 @@ } + +char* GetlocalHostNameL() +{ + TUint32 activeIapId = 0; + + TConnectionInfoBuf connectionInfo; + TUint count = 0; + RSocketServ socketServ; + RSocket sock; + RConnection conn; + + User::LeaveIfError(socketServ.Connect()); + User::LeaveIfError(sock.Open(socketServ, KAfInet, KSockStream, + KProtocolInetTcp)); + User::LeaveIfError(conn.Open(socketServ)); + User::LeaveIfError(conn.EnumerateConnections(count)); + + char* localhost = new char[localhost_len]; + + if (count <= 0) + { + strcpy(localhost,"localhost"); + } + else + { + + User::LeaveIfError(conn.GetConnectionInfo(1, connectionInfo)); + activeIapId = connectionInfo().iIapId; + getIPAddressL(activeIapId,localhost); + } + + conn.Close(); + sock.Close(); + socketServ.Close(); + + return localhost; +} + diff -r 023eef975703 -r abc41079b313 javacommons/gcfprotocols/socket/socket/src/socketconnectionjni.cpp --- a/javacommons/gcfprotocols/socket/socket/src/socketconnectionjni.cpp Fri Jul 09 16:35:45 2010 +0300 +++ b/javacommons/gcfprotocols/socket/socket/src/socketconnectionjni.cpp Fri Jul 23 12:27:20 2010 +0300 @@ -17,8 +17,10 @@ #include "com_nokia_mj_impl_socket_SocketConnectionImpl.h" +#include "com_nokia_mj_impl_properties_socket_SocketDynamicPropertyHandler.h" #include "nativesocketconnection.h" - +#include "socketlocalhostinfo.h" +#include "logger.h" using namespace java; @@ -141,3 +143,13 @@ NativeSocketConnection* nativeConn = reinterpret_cast(aNativePeerHandle); delete nativeConn; } + +JNIEXPORT jstring JNICALL Java_com_nokia_mj_impl_properties_socket_SocketDynamicPropertyHandler__1getLocalhostname +(JNIEnv *aJni, jclass) +{ + char* addr; + addr = SocketLocalHostInfo::getLocalHostName(); + jstring jnistring = aJni->NewStringUTF(addr); + delete[] addr; + return jnistring; +} diff -r 023eef975703 -r abc41079b313 javacommons/security/src.s60/telutils.cpp --- a/javacommons/security/src.s60/telutils.cpp Fri Jul 09 16:35:45 2010 +0300 +++ b/javacommons/security/src.s60/telutils.cpp Fri Jul 23 12:27:20 2010 +0300 @@ -63,6 +63,31 @@ } } +signed int TelUtils::getSecureTime() +{ + TTime t; + if (t.UniversalTimeSecure()) + { + t.UniversalTime(); + } + TTimeIntervalSeconds sec; + TTime baseTime(MAKE_TINT64(0x00dcddb3 ,0x0f2f8000)); // 1st Jan 1970 + t.SecondsFrom(baseTime, sec); + return sec.Int(); +} + +/** + * Return 0 if secure time has not been set + */ +int TelUtils::isSecureTimeSet() +{ + TTime t; + if (KErrNoSecureTime == t.UniversalTimeSecure()) + { + return 0; + } + return 1; +} void TelUtils::ConstructL() { diff -r 023eef975703 -r abc41079b313 javacommons/security/src.s60/telutils.h --- a/javacommons/security/src.s60/telutils.h Fri Jul 09 16:35:45 2010 +0300 +++ b/javacommons/security/src.s60/telutils.h Fri Jul 23 12:27:20 2010 +0300 @@ -35,6 +35,8 @@ static TelUtils* createInstance(); void getNetworkCodes(std::string& mnc, std::string& mcc); void getImei(std::string& imei); + static signed int getSecureTime(); + static int isSecureTimeSet(); virtual ~TelUtils(); private: //Methods diff -r 023eef975703 -r abc41079b313 javacommons/security/src/midpauthenticationmoduleimpl.cpp --- a/javacommons/security/src/midpauthenticationmoduleimpl.cpp Fri Jul 09 16:35:45 2010 +0300 +++ b/javacommons/security/src/midpauthenticationmoduleimpl.cpp Fri Jul 23 12:27:20 2010 +0300 @@ -472,7 +472,21 @@ if (X509_verify_cert(x509_ctx) != 1) { ret_code = getErrCode(X509_STORE_CTX_get_error(x509_ctx)); - break; + // If the secure time of the device has not yet been set + // (can happen some times during the first device boot), + // allow installing with not yet valid certificates + if (KCertNotYetValidFailure == ret_code) + { + if (!TelUtils::isSecureTimeSet()) + { + ret_code = KCertAndSignatureOk; + } + } + + if (KCertAndSignatureOk != ret_code) + { + break; + } } // verify the extended key usage: it must point to id-kp-codeSigning (RFC3280 code signing) // or 1.3.6.1.4.1.94.1.49.1.2.2.3 (Nokia Java Code Signing Extension) diff -r 023eef975703 -r abc41079b313 javacommons/utils/inc/logger.h --- a/javacommons/utils/inc/logger.h Fri Jul 09 16:35:45 2010 +0300 +++ b/javacommons/utils/inc/logger.h Fri Jul 23 12:27:20 2010 +0300 @@ -115,8 +115,9 @@ EDebugApi, // =34 EJavaAppMngrPlugin, // =35 EJavaBroadcast, // =36 - EJavaAMMS, // =37 - EJavaSettings, // =38 + EJavaAMMS, // =37 + EJavaSettings, // =38 + EJavaQtServiceApp, // =39 // add id of new components here }; @@ -173,8 +174,9 @@ {"JavaDebugApi.log", "[JavaDebugApi]"}, // EDebugApi {"JavaAppMngrPlugin.log","[JavaAppMngrPlugin]"}, // EJavaAppMngrPlugin {"JavaBroadcast.log", "[JavaBroadcast]"}, // EJavaBroadcast - {"JavaMMAPI.log", "[ MMAPPI ]"}, // EJavaAMMS - {"JavaSettings.log", "[ JavaSettings ]"}, // EJavaSettings + {"JavaMMAPI.log", "[ MMAPPI ]"}, // EJavaAMMS + {"JavaSettings.log", "[ JavaSettings ]"}, // EJavaSettings + {"JavaQtServiceApp.log", "[ QtServiceApp ]"}, // EJavaQtServiceApp // add new component file name and nickname here }; diff -r 023eef975703 -r abc41079b313 javacommons/utils/javasrc/com/nokia/mj/impl/utils/Formatter.java --- a/javacommons/utils/javasrc/com/nokia/mj/impl/utils/Formatter.java Fri Jul 09 16:35:45 2010 +0300 +++ b/javacommons/utils/javasrc/com/nokia/mj/impl/utils/Formatter.java Fri Jul 23 12:27:20 2010 +0300 @@ -1,5 +1,5 @@ /* -* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). +* Copyright (c) 2008-2010 Nokia Corporation and/or its subsidiary(-ies). * All rights reserved. * This component and the accompanying materials are made available * under the terms of "Eclipse Public License v1.0" @@ -28,6 +28,7 @@ *