ItsPki_TestCases.ttcn 20.9 KB
Newer Older
garciay's avatar
garciay committed
1
2
3
4
5
6
7
8
9
10
11
12
/**
 *  @author   ETSI / STF545
 *  @version  $URL$
 *            $Id$
 *  @desc     Testcases  file for Security Protocol
 *  @reference   ETSI TS ITS-00546v006
 *  @copyright   ETSI Copyright Notification
 *               No part may be reproduced except as authorized by written permission.
 *               The copyright and the foregoing restriction extend to reproduction in all media.
 *               All rights reserved.
 */
module ItsPki_TestCases {
Yann Garcia's avatar
Yann Garcia committed
13
  
garciay's avatar
garciay committed
14
15
16
17
18
  // Libcommon
  import from LibCommon_Time all;
  import from LibCommon_VerdictControl all;
  import from LibCommon_Sync all;
  import from LibCommon_BasicTypesAndValues all;
Yann Garcia's avatar
Yann Garcia committed
19
  import from LibCommon_DataStrings all;
garciay's avatar
garciay committed
20
21
22
23
24
25
26
27
28
29
    
  // LibIts
  import from IEEE1609dot2BaseTypes language "ASN.1:1997" all;
  import from IEEE1609dot2 language "ASN.1:1997" all;
  import from EtsiTs102941BaseTypes language "ASN.1:1997" all;
  import from EtsiTs102941TypesEnrolment language "ASN.1:1997" all;
  import from EtsiTs102941MessagesItss language "ASN.1:1997" all;
  import from EtsiTs103097Module language "ASN.1:1997" all;
  import from ITS_Container language "ASN.1:1997" all;
  import from CAM_PDU_Descriptions language "ASN.1:1997" all;
Yann Garcia's avatar
Yann Garcia committed
30
  
garciay's avatar
garciay committed
31
  // LibItsCommon
Yann Garcia's avatar
Yann Garcia committed
32
  import from LibItsCommon_TypesAndValues all;
garciay's avatar
garciay committed
33
  import from LibItsCommon_Functions all;
Yann Garcia's avatar
Yann Garcia committed
34
  import from LibItsCommon_TypesAndValues all;
garciay's avatar
garciay committed
35
  import from LibItsCommon_ASN1_NamedNumbers all;
Yann Garcia's avatar
Yann Garcia committed
36
37
38
39
40
41
42
43
  
  // LibItsGeoNetworking
  import from LibItsGeoNetworking_TestSystem all;
  import from LibItsGeoNetworking_Functions all;
  import from LibItsGeoNetworking_Templates all;
  import from LibItsGeoNetworking_TypesAndValues all;
  import from LibItsGeoNetworking_Pics all;
  
garciay's avatar
garciay committed
44
45
46
47
48
49
50
  // LibItsSecurity
  import from LibItsSecurity_TypesAndValues all;
  import from LibItsSecurity_TestSystem all;
  import from LibItsSecurity_Templates all;
  import from LibItsSecurity_Functions all;
  import from LibItsSecurity_Pixits all;
  import from LibItsSecurity_Pics all;
Yann Garcia's avatar
Yann Garcia committed
51
  
garciay's avatar
garciay committed
52
53
54
55
56
  // LibItsHttp
  import from LibItsHttp_TypesAndValues all;
  import from LibItsHttp_Templates all;
  import from LibItsHttp_BinaryTemplates all;
  import from LibItsHttp_Functions all;
Yann Garcia's avatar
Yann Garcia committed
57
  import from LibItsHttp_TestSystem all;
garciay's avatar
garciay committed
58
  
garciay's avatar
garciay committed
59
60
  // LibItsPki
  import from LibItsPki_Templates all;
Yann Garcia's avatar
Yann Garcia committed
61
  import from LibItsPki_Functions all;
garciay's avatar
garciay committed
62
  import from LibItsPki_TestSystem all;
garciay's avatar
garciay committed
63
64
  import from LibItsPki_Pics all;
  
garciay's avatar
garciay committed
65
66
67
68
69
70
71
72
73
  // AtsPki
  import from ItsPki_Functions all;

  /**
   * @desc 5.2	ITS-S behaviour
   */
  group itss_behavior {

    group itss_manufacturing {
Yann Garcia's avatar
Yann Garcia committed
74
      
garciay's avatar
garciay committed
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
      /**
       * @desc Check that IUT sends an enrolment request when triggered.
       * <pre>
       * Pics Selection: 
       * Initial conditions: 
       *     with {
       *         the IUT being in the "initial state"
       *     }
       * Expected behaviour:
       *     ensure that {
       *         when {
       *             the IUT is triggered to requested a new Enrolment Certificate (EC)
       *         }
       *         then {
       *             the IUT sends to EA an EnrolmentRequestMessage
       *         }
       *     }
       * </pre>
       * 
       * @see       ETSI TS ITS-00546v006 TP 2
       * @reference ETSI TS 102 941 [2], clause 6.1.3
       */
Yann Garcia's avatar
Yann Garcia committed
97
      testcase TC_SEC_PKI_ITSS_ENR_BV_01() runs on ItsMtc /*system ItsPkiItssSystem*/ {
garciay's avatar
garciay committed
98
        // Local variables
Yann Garcia's avatar
Yann Garcia committed
99
100
101
        var ItsPkiItss v_itss;
        var ItsPki     v_ea;
        
garciay's avatar
garciay committed
102
103
104
105
106
107
108
        // Test control
        if (not PICS_IUT_ITS_S_ROLE) {
          log("*** " & testcasename() & ": PICS_IUT_ITS_S_ROLE required for executing the TC ***");
          setverdict(inconc);
          stop;
        }
      
garciay's avatar
garciay committed
109
        // Test component configuration
Yann Garcia's avatar
Yann Garcia committed
110
111
112
113
114
115
116
        //f_cfUp_itss();
        
        v_itss.start(f_TC_SEC_PKI_ITSS_ENR_BV_01_itss(cc_taCert_A));
        v_ea.start(f_TC_SEC_PKI_ITSS_ENR_BV_01_pki(cc_taCert_A));
        
        // Synchronization
        f_serverSync2ClientsAndStop({c_prDone, c_tbDone, c_poDone});
garciay's avatar
garciay committed
117
        
Yann Garcia's avatar
Yann Garcia committed
118
119
        // Cleanup
        //f_cfDown_itss();
garciay's avatar
garciay committed
120
121
122
        
      } // End of testcase TC_SEC_PKI_ITSS_ENR_BV_01
      
Yann Garcia's avatar
Yann Garcia committed
123
124
125
126
127
128
      group f_TC_SEC_PKI_ITSS_ENR_BV_01 {
        
        function f_TC_SEC_PKI_ITSS_ENR_BV_01_itss(in charstring p_certificate_id) runs on ItsPkiItss /*system ItsPkiItssSystem*/ {
                
            // Local variables
            var LongPosVector v_longPosVectorIut;
Yann Garcia's avatar
Yann Garcia committed
129
130
            var GeoNetworkingInd v_response;
            var EtsiTs103097Certificate v_initial_certificate;
Yann Garcia's avatar
Yann Garcia committed
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
                
            // Test control
            if (not(PICS_GN_SECURITY)) {
                log("*** " & testcasename() & ":ERROR: 'PICS_GN_SECURITY' required for executing the TC ***");
                stop;
            }
            
            // Test component configuration
            f_cf01Up(); // Initialise IUT with CERT_IUT_A_AT signed with CERT_IUT_A_AA
            v_longPosVectorIut := f_getPosition(c_compIut);
                
            // Test adapter configuration
            
            // Preamble
            f_prNeighbour();
            f_acTriggerEvent(m_startPassBeaconing(m_beaconHeader(v_longPosVectorIut).beaconHeader)); // Authorize the TA to forward the received beacons
Yann Garcia's avatar
Yann Garcia committed
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
            // Wait for current certificate
            tc_ac.start;
            alt {
                [] geoNetworkingPort.receive(
                    mw_geoNwInd(
                        mw_geoNwSecPdu(
                            mw_etsiTs103097Data_signed(
                                mw_signedData(
                                    -, 
                                    mw_toBeSignedData(
                                        mw_signedDataPayload,
                                        mw_headerInfo_cam
                                    ),
                                    mw_signerIdentifier_certificate(
                                        mw_etsiTs103097Certificate(
                                            -,
                                            mw_toBeSignedCertificate_at(
                                                { mw_appPermissions(c_its_aid_CAM) }
                                            )
                                        )
                                    )
                                )
                            ), 
                            mw_geoNwShbPacket
                ))) -> value v_response {
                  tc_ac.stop;
                  
                  log("*** " & testcasename() & ": INFO: Receieve initial certificate");
                  // Extract the initial certificate
                  // TODO v_initial_certificate := 
                  f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
                }
                [] geoNetworkingPort.receive(
                    mw_geoNwInd(
                        mw_geoNwSecPdu(
                            mw_etsiTs103097Data_signed
                ))) {
                    log("*** " & testcasename() & ": DEBUG: Still waiting for certificate");
                    repeat;
                }
                [] tc_ac.timeout {
                    log("*** " & testcasename() & ": INCONC: Expected CA message not received ***");
                    f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_timeout);
                } 
            } // End of 'alt' statement
Yann Garcia's avatar
Yann Garcia committed
192
193
194
195
            
            // Test Body
            tc_ac.start;
            alt {
Yann Garcia's avatar
Yann Garcia committed
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
              [] geoNetworkingPort.receive(
                  mw_geoNwInd(
                      mw_geoNwSecPdu(
                          mw_etsiTs103097Data_signed(
                              mw_signedData(
                                  -, 
                                  mw_toBeSignedData(
                                      mw_signedDataPayload,
                                      mw_headerInfo_cam
                                  ),
                                  mw_signerIdentifier_certificate(
                                      v_initial_certificate
                                  )
                              )
                          ), 
                          mw_geoNwShbPacket
                ))) {
                    log("*** " & testcasename() & ": INFO: IUT still using initial certificate ***");
                    repeat;
                }
                [] geoNetworkingPort.receive(
                    mw_geoNwInd(
                        mw_geoNwSecPdu(
                            mw_etsiTs103097Data_signed(
                                mw_signedData(
                                    -, 
                                    mw_toBeSignedData(
                                        mw_signedDataPayload,
                                        mw_headerInfo_gn
                                    ),
                                    mw_signerIdentifier_certificate
                                )
                            )
                ))) {
                  tc_ac.stop;
                  log("*** " & testcasename() & ": PASS: IUT uses new certificate ***");
                  f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
                }
Yann Garcia's avatar
Yann Garcia committed
234
235
236
237
238
                [] geoNetworkingPort.receive(
                    mw_geoNwInd(
                        mw_geoNwSecPdu(
                            mw_etsiTs103097Data_signed
                ))) {
Yann Garcia's avatar
Yann Garcia committed
239
240
                    log("*** " & testcasename() & ": INFO: Unexpected message received, continue ***");
                    repeat;
Yann Garcia's avatar
Yann Garcia committed
241
242
243
244
245
246
247
248
249
250
251
252
253
254
                }
                [] tc_ac.timeout {
                    log("*** " & testcasename() & ": INCONC: Expected message not received ***");
                    f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout);
                }
            } // End of 'alt' statement
            
            // Postamble
            f_acTriggerEvent(m_stopPassBeaconing);
            f_poNeighbour();
            f_cf01Down();
        } // End of testcase f_TC_SEC_PKI_ITSS_ENR_BV_01_itss
        
        function f_TC_SEC_PKI_ITSS_ENR_BV_01_pki(in charstring p_certificate_id) runs on ItsPki /*system ItsPkiItssSystem*/ { 
255
          LibItsPki_Functions.f_cfUp();
Yann Garcia's avatar
Yann Garcia committed
256
          
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
          // Preamble
          tc_ac.start;
          alt {
            [] pkiPort.receive(
                               mw_innerEcRequest
                               ) {
              log("*** " & testcasename() & ": INFO: InnerEcRequest received ***");
              repeat;
            }
            [] pkiPort.receive(
                               mw_innerEcResponse_ok
                               ) {
              tc_ac.stop;
              log("*** " & testcasename() & ": INFO: InnerEcResponse received ***");
              f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
            }
            [] pkiPort.receive { // FIXME Use altstep
              tc_ac.stop;
              log("*** " & testcasename() & ": INCONC: Unexpected message received ***");
              f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_timeout);
            }
            [] tc_ac.timeout {
              log("*** " & testcasename() & ": INCONC: Expected message not received ***");
              f_selfOrClientSyncAndVerdictTestBody(c_prDone, e_timeout);
            }
          } // End of 'alt' statement
          
          // Test Body
          log("*** " & testcasename() & ": PASS: Message triggered ***");
          f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
          
          // Postamble
          LibItsPki_Functions.f_cfDown();
Yann Garcia's avatar
Yann Garcia committed
290
291
292
293
        } // End of testcase f_TC_SEC_PKI_ITSS_ENR_BV_01_pki
        
      } // End of f_TC_SEC_PKI_ITSS_ENR_BV_01
      
garciay's avatar
garciay committed
294
295
296
297
    } // End of group itss_manufacturing
    
    
  } // End of group itss_behavior
Yann Garcia's avatar
Yann Garcia committed
298
  
garciay's avatar
garciay committed
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
  group ea_behavior {
    
    /**
     * @desc The EnrolmentResponse message shall be sent by the EA to the 
     *       ITS-S across the interface at reference point S3 in response 
     *       to a received EnrolmentRequest message.
     * <pre>
     * Pics Selection: 
     * Initial conditions: 
     *     with {
     *         the IUT being in the "operational state"
     *     }
     * Expected behaviour:
     *     ensure that {
     *         when {
     *             the IUT receives an EnrolmentRequestMessage across the interface at the reference point S3
     *         }
     *         then {
     *             the IUT answers with an EnrolmentResponseMessage across the interface at reference point S3
     *         }
     *     }
     * </pre>
     * 
     * @see       ETSI TS ITS-00546v006 TP 20
     * @reference ETSI TS 102 941, clause 6.2.3.2.2
     */
    testcase TC_SEC_PKI_SND_EA_BV_01() runs on ItsPki system ItsPkiSystem {
      // Local variables
garciay's avatar
garciay committed
327
328
329
330
331
      var Oct32 v_private_key;
      var Oct32 v_publicKeyX;
      var Oct32 v_publicKeyY;
      var Oct32 v_publicKeyCompressed;
      var integer v_compressedMode;
Yann Garcia's avatar
Yann Garcia committed
332
      var InnerEcRequest v_inner_ec_request;
garciay's avatar
garciay committed
333
      
garciay's avatar
garciay committed
334
      // Test control
garciay's avatar
garciay committed
335
336
337
338
339
340
      if (not PICS_IUT_EA_ROLE) {
        log("*** " & testcasename() & ": PICS_IUT_EA_ROLE required for executing the TC ***");
        setverdict(inconc);
        stop;
      }
      
garciay's avatar
garciay committed
341
      // Test component configuration
Yann Garcia's avatar
Yann Garcia committed
342
      LibItsPki_Functions.f_cfUp();
garciay's avatar
garciay committed
343
      
Yann Garcia's avatar
Yann Garcia committed
344
      // Test adapter configuration
garciay's avatar
garciay committed
345
      
Yann Garcia's avatar
Yann Garcia committed
346
      // Preamble
garciay's avatar
garciay committed
347
348
      if (f_generate_inner_ec_request(v_private_key, v_publicKeyX, v_publicKeyY, v_publicKeyCompressed, v_compressedMode, v_inner_ec_request) == false) {
        log("*** " & testcasename() & ": FAIL: Failed to setup InnerEcRequest message ***")
garciay's avatar
garciay committed
349
350
351
        f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_error);
        stop;
      }
garciay's avatar
garciay committed
352
      f_sendAcPkiPrimitive(v_private_key, v_publicKeyCompressed, v_compressedMode);
Yann Garcia's avatar
Yann Garcia committed
353
354
355
      f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
    
      // Test Body
garciay's avatar
garciay committed
356
      pkiPort.send(v_inner_ec_request);
Yann Garcia's avatar
Yann Garcia committed
357
358
359
360
      tc_ac.start;
      alt {
        [] pkiPort.receive(
                           mw_innerEcResponse_ok
garciay's avatar
garciay committed
361
                           ) {
Yann Garcia's avatar
Yann Garcia committed
362
          tc_ac.stop;
363
          log("*** " & testcasename() & ": PASS: InnerEcResponse received ***");
Yann Garcia's avatar
Yann Garcia committed
364
365
366
367
          f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
        }
        [] pkiPort.receive { // FIXME Use altstep
          tc_ac.stop;
garciay's avatar
garciay committed
368
          log("*** " & testcasename() & ": FAIL: Unexpected message received ***");
Yann Garcia's avatar
Yann Garcia committed
369
370
371
372
373
374
375
          f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
        }
        [] tc_ac.timeout {
          log("*** " & testcasename() & ": INCONC: Expected message not received ***");
          f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout);
        }
      } // End of 'alt' statement
garciay's avatar
garciay committed
376
    
Yann Garcia's avatar
Yann Garcia committed
377
      // Postamble
Yann Garcia's avatar
Yann Garcia committed
378
      LibItsPki_Functions.f_cfDown();
Yann Garcia's avatar
Yann Garcia committed
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
    
    } // End of testcase TC_SEC_PKI_SND_EA_BV_01

    /**
     * @desc If the enrolment request of the IUT is an initial enrolment request, the itsId 
     *       (contained in the InnerECRequest) shall be set to the canonical identifier, the 
     *       signer (contained in the outer EtsiTs1030971Data-Signed) shall be set to self and 
     *       the outer signature shall be computed using the canonical private key.
     * <pre>
     * Pics Selection: 
     * Initial conditions: 
     *     with {
     *         the IUT being in the "operational state"
     *     }
     * Expected behaviour:
     *     ensure that {
     *         when {
     *             the IUT is requested to send an EnrolmentRequestMessage
     *         }
     *         then {
     *             the IUT sends an EtsiTs103097Data-Encrypted
     *                 containing an encrypted EtsiTs103097Data-Signed
     *                     containing EtsiTs103097Data
     *                          containing InnerECRequestSignedForPOP
     *                             containing InnerEcRequest
     *                                 containing itsId
     *                                     indicating the canonical identifier of the ITS-S 
     *                 and containing signer
     *                     declared as self
     *                 and containing signature 
     *                     computed using the canonical private key
     *         }
     *     }
     * </pre>
     * 
     * @see       ETSI TS ITS-00546v006 TP 20
     * @reference ETSI TS 102 941, clause 6.2.3.2.2
     */
    testcase TC_SEC_PKI_SND_EA_BV_02() runs on ItsPkiHttp system ItsPkiHttpSystem {
      // Local variables
      var Oct32 v_private_key;
      var Oct32 v_publicKeyX;
      var Oct32 v_publicKeyY;
      var Oct32 v_publicKeyCompressed;
      var integer v_compressedMode;
Yann Garcia's avatar
Yann Garcia committed
424
      var Ieee1609Dot2Data v_ieee1609dot2_signed_and_encrypted_data;
garciay's avatar
garciay committed
425
      var HeaderLines v_headers;
426
427
      var HttpMessage v_response;
      var EtsiTs102941Data v_etsi_ts_102941_data;
Yann Garcia's avatar
Yann Garcia committed
428
      
Yann Garcia's avatar
Yann Garcia committed
429
      // Test control
garciay's avatar
garciay committed
430
431
432
433
434
      if (not PICS_IUT_EA_ROLE) {
        log("*** " & testcasename() & ": PICS_IUT_EA_ROLE required for executing the TC ***");
        setverdict(inconc);
        stop;
      }
Yann Garcia's avatar
Yann Garcia committed
435
      
Yann Garcia's avatar
Yann Garcia committed
436
      // Test component configuration
437
      f_cfHttpUp(); // Default value: CERT_TS_A_EA
Yann Garcia's avatar
Yann Garcia committed
438
      
garciay's avatar
garciay committed
439
      // Test adapter configuration
Yann Garcia's avatar
Yann Garcia committed
440
      
garciay's avatar
garciay committed
441
      // Preamble
442
      f_http_build_enrolment_request(v_private_key, v_publicKeyX, v_publicKeyY, v_publicKeyCompressed, v_compressedMode, v_ieee1609dot2_signed_and_encrypted_data);
garciay's avatar
garciay committed
443
      f_init_default_headers_list(v_headers);
garciay's avatar
garciay committed
444
      f_selfOrClientSyncAndVerdictPreamble(c_prDone, e_success);
garciay's avatar
garciay committed
445
      
garciay's avatar
garciay committed
446
447
448
      // Test Body
      httpPort.send(
                    m_http_request(
garciay's avatar
garciay committed
449
450
451
452
453
454
455
                                   m_http_request_get(
                                                      "/its/inner_ec_request",
                                                      v_headers,
                                                      m_http_message_body_binary(
                                                                                 m_binary_body_ieee1609dot2_data(
                                                                                                                 v_ieee1609dot2_signed_and_encrypted_data
                                                                                                                 )))));
garciay's avatar
garciay committed
456
457
458
459
460
461
      tc_ac.start;
      alt {
        [] httpPort.receive(
                            mw_http_response(
                                             mw_http_response_ok(
                                                                 mw_http_message_body_binary(
Yann Garcia's avatar
Yann Garcia committed
462
                                                                                             mw_binary_body_ieee1609dot2_data(
463
464
465
466
467
                                                                                                                              mw_enrolmentResponseMessage(
                                                                                                                                                          mw_encryptedData(
                                                                                                                                                                           -,
                                                                                                                                                                           mw_SymmetricCiphertext_aes128ccm
                                                                                                                                                                           ))))))) -> value v_response {
garciay's avatar
garciay committed
468
          tc_ac.stop;
469
470
471
472
473
474
475
476
477
478
479
480
481
482
          
          if (f_verify_pki_message(vc_eaPrivateEncKey, vc_eaPeerWholeHash, vc_eaCertificate, v_response.response.body.binary_body.ieee1609dot2_data, false, v_etsi_ts_102941_data) == false) {
            log("*** " & testcasename() & ": FAIL: Failed to verify PKI message ***");
            f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
          } else {
            log("*** " & testcasename() & ": LOG: Receive ", v_etsi_ts_102941_data, " ***");
            if (not(match(v_etsi_ts_102941_data.content, mw_enrolmentResponse))) {
              log("*** " & testcasename() & ": FAIL: Unexpected message received ***");
              f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
            } else {
              log("*** " & testcasename() & ": PASS: InnerEcResponse received ***");
              f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_success);
            }
          }
garciay's avatar
garciay committed
483
        }
Yann Garcia's avatar
Yann Garcia committed
484
        [] httpPort.receive( // FIXME Use altstep
garciay's avatar
garciay committed
485
486
487
488
489
490
491
                            mw_http_response(
                                             mw_http_response_ko
                                             )) {
          tc_ac.stop;
          log("*** " & testcasename() & ": FAIL: HTTP error ***");
          f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
        }
Yann Garcia's avatar
Yann Garcia committed
492
        [] httpPort.receive(mw_http_response) { // FIXME Use altstep
garciay's avatar
garciay committed
493
494
495
496
497
498
499
500
501
502
503
          tc_ac.stop;
          log("*** " & testcasename() & ": FAIL: Unexpected response received ***");
          f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_error);
        }
        [] tc_ac.timeout {
          log("*** " & testcasename() & ": INCONC: Expected message not received ***");
          f_selfOrClientSyncAndVerdictTestBody(c_tbDone, e_timeout);
        }
      } // End of 'alt' statement
    
      // Postamble
Yann Garcia's avatar
Yann Garcia committed
504
      f_cfHttpDown();
garciay's avatar
garciay committed
505
    
Yann Garcia's avatar
Yann Garcia committed
506
    } // End of testcase TC_SEC_PKI_SND_EA_BV_02
garciay's avatar
garciay committed
507
508
509
510
511
512
513
514

  } // End of group ea_behavior

  group aa_behavior {

  } // End of group aa_beavior
  
} // End of module ItsPki_TestCases