Re-merge fixes for bug 2707, bug 2121 and bug 1993 RCL_3 PDK_3.0.0
authorWilliam Roberts <williamr@symbian.org>
Fri, 28 May 2010 13:54:35 +0100
branchRCL_3
changeset 37 bd9b181e836a
parent 36 ce3df08ce7f6 (current diff)
parent 33 5791d6d30409 (diff)
child 58 5816b2634c8a
Re-merge fixes for bug 2707, bug 2121 and bug 1993
--- a/omadrm/drmengine/group/CryptoPrep.flm	Tue May 25 12:59:35 2010 +0300
+++ b/omadrm/drmengine/group/CryptoPrep.flm	Fri May 28 13:54:35 2010 +0100
@@ -13,29 +13,35 @@
 # Description: DRM Crypto Library build configuration
 #
 
-TMPROOT:=$(subst \,/,$(EPOCROOT))
-EPOCROOT:=$(patsubst %/,%,$(TMPROOT))/
+ifeq ($(_CRYPTOPREP_FLM_),)
+# first instance of this FLM
+_CRYPTOPREP_FLM_:= 1
 
-CREATABLEPATH:=$(EXTENSION_ROOT)/../drmengine/drmcrypto/build
-CLEANTARGETS:=$(CREATABLEPATH)/cmlacrypto.cpp $(CREATABLEPATH)/omacrypto.cpp
+# darios: changing the value of EPOCROOT while make is running
+# messes up the target dependecies
+# also these two lines are not needed for this flm
+#TMPROOT:=$(subst \,/,$(EPOCROOT))
+#EPOCROOT:=$(patsubst %/,%,$(TMPROOT))/
+
+# NB: abspath doesn't like Windows drive letters
+CRYPTO_SOURCE_DRIVE:=$(firstword $(subst :, ,$(EXTENSION_ROOT)))
+ifeq ($(CRYPTO_SOURCE_DRIVE),$(EXTENSION_ROOT))
+CREATABLEPATH:=$(abspath $(EXTENSION_ROOT)/../drmengine/drmcrypto/build))
+else
+CRYPTO_ABSPATH:=$(abspath $(subst $(CRYPTO_SOURCE_DRIVE):,,$(EXTENSION_ROOT)/../drmengine/drmcrypto/build))
+CREATABLEPATH:=$(CRYPTO_SOURCE_DRIVE):$(CRYPTO_ABSPATH)
+endif
 
 crypto_files:=$(wildcard $(EXTENSION_ROOT)/../drmengine/drmcrypto/CMLA/*.cpp)
 
-
-GUARD:=done_$(call sanitise,$(CLEANTARGETS))
-ifeq ($($(GUARD)),)
-$(GUARD):=1
-
-BITMAP :: $(CREATABLEPATH)
+ifeq ($(crypto_files),)
+CMLA_CRYPTO_SOURCE:=$(CREATABLEPATH)/../stub/CmlaCryptoStub.cpp
+else
+CMLA_CRYPTO_SOURCE:=$(CREATABLEPATH)/../CMLA/CmlaCrypto.cpp
+endif
 
-ifeq ($(crypto_files),)
-	$(GNUCP) $(CREATABLEPATH)/../stub/CmlaCryptoStub.cpp $(CREATABLEPATH)/cmlacrypto.cpp
-else
-	$(GNUCP) $(CREATABLEPATH)/../CMLA/CmlaCrypto.cpp $(CREATABLEPATH)/cmlacrypto.cpp
-endif
-	$(GNUCP) $(CREATABLEPATH)/../src/OmaCrypto.cpp $(CREATABLEPATH)/omacrypto.cpp
-	$(GNUCHMOD) u+w $(CREATABLEPATH)/cmlacrypto.cpp
-	$(GNUCHMOD) u+w $(CREATABLEPATH)/omacrypto.cpp
+$(CREATABLEPATH)/cmlacrypto.cpp: $(CMLA_CRYPTO_SOURCE)
+	$(GNUCP) $< $@
 
 # Create dirs
 $(call makepath,$(CREATABLEPATH))
@@ -43,11 +49,10 @@
 ## Clean up
 $(eval $(call GenerateStandardCleanTarget,$(CLEANTARGETS)))
 
-## What
-$(eval $(call whatmacro,$(CLEANTARGETS)))
-
+$(info <debug>$(PLATFORM) $(CFG), selecting $(CMLA_CRYPTO_SOURCE)</debug>)
 
 else
-$(info <debug>$(PLATFORM) $(CFG), up-to-date $(CLEANTARGETS)</debug>)
+$(info <debug>$(PLATFORM) $(CFG), already handled $(CMLA_CRYPTO_SOURCE)</debug>)
+# FLM already included - don't duplicate the targets
 
 endif
--- a/omadrm/drmengine/group/DrmCrypto.mmp	Tue May 25 12:59:35 2010 +0300
+++ b/omadrm/drmengine/group/DrmCrypto.mmp	Fri May 28 13:54:35 2010 +0100
@@ -40,9 +40,11 @@
 SOURCE          drmaescrypto.cpp
 
 SOURCEPATH      ../drmcrypto/build
-SOURCE          omacrypto.cpp
 SOURCE          cmlacrypto.cpp
 
+SOURCEPATH      ../drmcrypto/src
+SOURCE          OmaCrypto.cpp
+
 LIBRARY         euser.lib
 LIBRARY         efsrv.lib
 LIBRARY         asn1.lib
Binary file omadrm/foundationcerts/data/devicekey1024.der has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/omadrm/foundationcerts/data/dummycert.cnf	Fri May 28 13:54:35 2010 +0100
@@ -0,0 +1,40 @@
+# Copyright (c) 2010 Symbian Foundation Ltd.
+# All rights reserved.
+# This component and the accompanying materials are made available
+# under the terms of the License "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:
+# Symbian Foundation - Initial contribution
+# 
+# Description:
+# Config file for generating the dummy certificate
+
+
+# Steps to generate using OpenSSL
+#
+# 1. Generate key
+#
+# openssl genrsa -out devicekey1024.pem 1024
+# openssl rsa -inform pem -in devicekey1024.pem -outform der -out devicekey1024.der
+#
+# 2. Generate self-signed X509 certificate
+#
+# openssl req -new -x509 -keyform der -key devicekey1024.der -outform der -out dummycert.der -config dummycert.cnf
+#
+#
+ 
+
+distinguished_name = Symbian Foundation
+prompt = no
+
+[Symbian Foundation]
+ C                      = GB
+ ST                     = Test State or Province
+ L                      = Test Locality
+ O                      = Organization Name
+ OU                     = Organizational Unit Name
+ CN                     = Common Name
+ emailAddress           = noreply@symbian.org
+
Binary file omadrm/foundationcerts/data/dummycert.der has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/omadrm/foundationcerts/group/bld.inf	Fri May 28 13:54:35 2010 +0100
@@ -0,0 +1,30 @@
+/*
+* Copyright (c) 2010 Symbian Foundation Ltd.
+* All rights reserved.
+* This component and the accompanying materials are made available
+* under the terms of the License "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:
+* Symbian Foundation - Initial contribution
+* 
+* Description:
+* Component to install dummy key & certificate to keep DRM engine alive
+*/
+
+PRJ_EXPORTS
+
+/*
+ * 96b7db19a4d05a4bc8e3a51c885088e679354469 - this directory name should be the SHA1 checksum
+ * of the active part of the certificate public key (see CDrmStdKeyStorage::ImportDataL), but
+ * hasn't been recalculated for this certificate 
+ */
+ 
+../data/devicekey1024.der  z:/private/101F51F2/PKI/96b7db19a4d05a4bc8e3a51c885088e679354469/DevicePrivateKey.der
+../data/dummycert.der      z:/private/101F51F2/PKI/96b7db19a4d05a4bc8e3a51c885088e679354469/DeviceCert.der
+../data/dummycert.der      z:/private/101F51F2/PKI/96b7db19a4d05a4bc8e3a51c885088e679354469/SigningCert00.der
+
+#ifdef __DRM_USER_DATA_TRANSFER
+../data/dummycert.der      z:/private/101F51F2/PKI/UdtCertificate.der
+#endif
--- a/omadrm/group/bld.inf	Tue May 25 12:59:35 2010 +0300
+++ b/omadrm/group/bld.inf	Fri May 28 13:54:35 2010 +0100
@@ -15,8 +15,6 @@
 *
 */
 
-#include <platform_paths.hrh>
-
 PRJ_PLATFORMS
 DEFAULT