|
1 /* |
|
2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 package com.nokia.mj.impl.installer.midp2.install.steps; |
|
20 |
|
21 import com.nokia.mj.impl.installer.exetable.ExeBall; |
|
22 import com.nokia.mj.impl.installer.exetable.ExeStep; |
|
23 import com.nokia.mj.impl.installer.utils.Log; |
|
24 import com.nokia.mj.impl.security.midp.authentication.AuthenticationModule; |
|
25 import com.nokia.mj.impl.installer.storagehandler.SuiteInfo; |
|
26 |
|
27 public class AuthenticateJar extends ExeStep |
|
28 { |
|
29 public void execute(ExeBall aBall) |
|
30 { |
|
31 InstallBall ball = (InstallBall)aBall; |
|
32 if (ball.iJarAttributes == null || ball.iJarAuthenticated) |
|
33 { |
|
34 return; |
|
35 } |
|
36 |
|
37 ball.log("Authenticating Jar..."); |
|
38 AuthenticationModule.getInstance().authenticateJar |
|
39 (ball.iStorageHandler.getSession(), |
|
40 ball.iSuite.getUid(), |
|
41 (ball.iOldSuite != null? ball.iOldSuite.getUid(): null), |
|
42 ball.iJarFilename, |
|
43 (ball.iSuite.getContentInfo() == SuiteInfo.CONTENT_INFO_DRM? true: false)); |
|
44 ball.iJarAuthenticated = true; |
|
45 // Unregister OCSP listener after Jar authentication. |
|
46 AuthenticationModule.getInstance().unregisterOcspEventListener( |
|
47 ball.iSuite.getUid()); |
|
48 } |
|
49 |
|
50 public void cancel(ExeBall aBall) |
|
51 { |
|
52 // nop |
|
53 } |
|
54 } |