|
1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Name : CStateTentative.cpp |
|
15 // Part of : SIPSec, IpSec Plugin |
|
16 // Version : SIP/4.0 |
|
17 // |
|
18 |
|
19 |
|
20 |
|
21 #include "siprequest.h" |
|
22 #include "sipresponse.h" |
|
23 #include "CSipSecAgreeRecord.h" |
|
24 #include "SipSecIpsecParams.h" |
|
25 #include "MIpSecAgreeContextParams.h" |
|
26 #include "CStateTentative.h" |
|
27 |
|
28 // ---------------------------------------------------------------------------- |
|
29 // CTentative::CTentative |
|
30 // ---------------------------------------------------------------------------- |
|
31 // |
|
32 CTentative::CTentative() |
|
33 { |
|
34 } |
|
35 |
|
36 // ---------------------------------------------------------------------------- |
|
37 // CTentative::State |
|
38 // ---------------------------------------------------------------------------- |
|
39 // |
|
40 CState::TSecAgreeRecordState CTentative::State() |
|
41 { |
|
42 return ETentative; |
|
43 } |
|
44 |
|
45 // ---------------------------------------------------------------------------- |
|
46 // CTentative::Resp4xxL |
|
47 // ---------------------------------------------------------------------------- |
|
48 // |
|
49 void CTentative::Resp4xxL( |
|
50 CSipSecAgreeRecord& aRec, |
|
51 CSIPResponse& aResponse, |
|
52 CSIPRequest& aRequest ) |
|
53 { |
|
54 // First copy Security-Client Headers from request |
|
55 aRec.CopyHeadersFromMessageL( aRequest, ETrue ); |
|
56 |
|
57 // Then convert Security-Server Headers of response |
|
58 // into Security-Verify headers |
|
59 aRec.CopyHeadersFromMessageL( aResponse, EFalse ); |
|
60 |
|
61 // Wait for Digest plugin generate a key |
|
62 // Set timer to 4 min while SA is temporal |
|
63 aRec.StartTimerL( KTempTime ); |
|
64 aRec.NextState( EPendingKey ); |
|
65 } |
|
66 |
|
67 // End of File |