1extern int __VERIFIER_nondet_int(void);
2
3
4
5#line 2 "libacc.c"
6struct JoinPoint {
7 void **(*fp)(struct JoinPoint * ) ;
8 void **args ;
9 int argsCount ;
10 char const **argsType ;
11 void *(*arg)(int , struct JoinPoint * ) ;
12 char const *(*argType)(int , struct JoinPoint * ) ;
13 void **retValue ;
14 char const *retType ;
15 char const *funcName ;
16 char const *targetName ;
17 char const *fileName ;
18 char const *kind ;
19 void *excep_return ;
20};
21#line 18 "libacc.c"
22struct __UTAC__CFLOW_FUNC {
23 int (*func)(int , int ) ;
24 int val ;
25 struct __UTAC__CFLOW_FUNC *next ;
26};
27#line 18 "libacc.c"
28struct __UTAC__EXCEPTION {
29 void *jumpbuf ;
30 unsigned long long prtValue ;
31 int pops ;
32 struct __UTAC__CFLOW_FUNC *cflowfuncs ;
33};
34#line 211 "/usr/lib/gcc/x86_64-linux-gnu/4.4.5/include/stddef.h"
35typedef unsigned long size_t;
36#line 76 "libacc.c"
37struct __ACC__ERR {
38 void *v ;
39 struct __ACC__ERR *next ;
40};
41#line 1 "libacc.o"
42#pragma merger(0,"libacc.i","")
43#line 73 "/usr/include/assert.h"
44extern __attribute__((__nothrow__, __noreturn__)) void __assert_fail(char const *__assertion ,
45 char const *__file ,
46 unsigned int __line ,
47 char const *__function ) ;
48#line 471 "/usr/include/stdlib.h"
49extern __attribute__((__nothrow__)) void *malloc(size_t __size ) __attribute__((__malloc__)) ;
50#line 488
51extern __attribute__((__nothrow__)) void free(void *__ptr ) ;
52#line 32 "libacc.c"
53void __utac__exception__cf_handler_set(void *exception , int (*cflow_func)(int ,
54 int ) ,
55 int val )
56{ struct __UTAC__EXCEPTION *excep ;
57 struct __UTAC__CFLOW_FUNC *cf ;
58 void *tmp ;
59 unsigned long __cil_tmp7 ;
60 unsigned long __cil_tmp8 ;
61 unsigned long __cil_tmp9 ;
62 unsigned long __cil_tmp10 ;
63 unsigned long __cil_tmp11 ;
64 unsigned long __cil_tmp12 ;
65 unsigned long __cil_tmp13 ;
66 unsigned long __cil_tmp14 ;
67 int (**mem_15)(int , int ) ;
68 int *mem_16 ;
69 struct __UTAC__CFLOW_FUNC **mem_17 ;
70 struct __UTAC__CFLOW_FUNC **mem_18 ;
71 struct __UTAC__CFLOW_FUNC **mem_19 ;
72
73 {
74 {
75#line 33
76 excep = (struct __UTAC__EXCEPTION *)exception;
77#line 34
78 tmp = malloc(24UL);
79#line 34
80 cf = (struct __UTAC__CFLOW_FUNC *)tmp;
81#line 36
82 mem_15 = (int (**)(int , int ))cf;
83#line 36
84 *mem_15 = cflow_func;
85#line 37
86 __cil_tmp7 = (unsigned long )cf;
87#line 37
88 __cil_tmp8 = __cil_tmp7 + 8;
89#line 37
90 mem_16 = (int *)__cil_tmp8;
91#line 37
92 *mem_16 = val;
93#line 38
94 __cil_tmp9 = (unsigned long )cf;
95#line 38
96 __cil_tmp10 = __cil_tmp9 + 16;
97#line 38
98 __cil_tmp11 = (unsigned long )excep;
99#line 38
100 __cil_tmp12 = __cil_tmp11 + 24;
101#line 38
102 mem_17 = (struct __UTAC__CFLOW_FUNC **)__cil_tmp10;
103#line 38
104 mem_18 = (struct __UTAC__CFLOW_FUNC **)__cil_tmp12;
105#line 38
106 *mem_17 = *mem_18;
107#line 39
108 __cil_tmp13 = (unsigned long )excep;
109#line 39
110 __cil_tmp14 = __cil_tmp13 + 24;
111#line 39
112 mem_19 = (struct __UTAC__CFLOW_FUNC **)__cil_tmp14;
113#line 39
114 *mem_19 = cf;
115 }
116#line 654 "libacc.c"
117 return;
118}
119}
120#line 44 "libacc.c"
121void __utac__exception__cf_handler_free(void *exception )
122{ struct __UTAC__EXCEPTION *excep ;
123 struct __UTAC__CFLOW_FUNC *cf ;
124 struct __UTAC__CFLOW_FUNC *tmp ;
125 unsigned long __cil_tmp5 ;
126 unsigned long __cil_tmp6 ;
127 struct __UTAC__CFLOW_FUNC *__cil_tmp7 ;
128 unsigned long __cil_tmp8 ;
129 unsigned long __cil_tmp9 ;
130 unsigned long __cil_tmp10 ;
131 unsigned long __cil_tmp11 ;
132 void *__cil_tmp12 ;
133 unsigned long __cil_tmp13 ;
134 unsigned long __cil_tmp14 ;
135 struct __UTAC__CFLOW_FUNC **mem_15 ;
136 struct __UTAC__CFLOW_FUNC **mem_16 ;
137 struct __UTAC__CFLOW_FUNC **mem_17 ;
138
139 {
140#line 45
141 excep = (struct __UTAC__EXCEPTION *)exception;
142#line 46
143 __cil_tmp5 = (unsigned long )excep;
144#line 46
145 __cil_tmp6 = __cil_tmp5 + 24;
146#line 46
147 mem_15 = (struct __UTAC__CFLOW_FUNC **)__cil_tmp6;
148#line 46
149 cf = *mem_15;
150 {
151#line 49
152 while (1) {
153 while_0_continue: ;
154 {
155#line 49
156 __cil_tmp7 = (struct __UTAC__CFLOW_FUNC *)0;
157#line 49
158 __cil_tmp8 = (unsigned long )__cil_tmp7;
159#line 49
160 __cil_tmp9 = (unsigned long )cf;
161#line 49
162 if (__cil_tmp9 != __cil_tmp8) {
163
164 } else {
165 goto while_0_break;
166 }
167 }
168 {
169#line 50
170 tmp = cf;
171#line 51
172 __cil_tmp10 = (unsigned long )cf;
173#line 51
174 __cil_tmp11 = __cil_tmp10 + 16;
175#line 51
176 mem_16 = (struct __UTAC__CFLOW_FUNC **)__cil_tmp11;
177#line 51
178 cf = *mem_16;
179#line 52
180 __cil_tmp12 = (void *)tmp;
181#line 52
182 free(__cil_tmp12);
183 }
184 }
185 while_0_break: ;
186 }
187#line 55
188 __cil_tmp13 = (unsigned long )excep;
189#line 55
190 __cil_tmp14 = __cil_tmp13 + 24;
191#line 55
192 mem_17 = (struct __UTAC__CFLOW_FUNC **)__cil_tmp14;
193#line 55
194 *mem_17 = (struct __UTAC__CFLOW_FUNC *)0;
195#line 694 "libacc.c"
196 return;
197}
198}
199#line 59 "libacc.c"
200void __utac__exception__cf_handler_reset(void *exception )
201{ struct __UTAC__EXCEPTION *excep ;
202 struct __UTAC__CFLOW_FUNC *cf ;
203 unsigned long __cil_tmp5 ;
204 unsigned long __cil_tmp6 ;
205 struct __UTAC__CFLOW_FUNC *__cil_tmp7 ;
206 unsigned long __cil_tmp8 ;
207 unsigned long __cil_tmp9 ;
208 int (*__cil_tmp10)(int , int ) ;
209 unsigned long __cil_tmp11 ;
210 unsigned long __cil_tmp12 ;
211 int __cil_tmp13 ;
212 unsigned long __cil_tmp14 ;
213 unsigned long __cil_tmp15 ;
214 struct __UTAC__CFLOW_FUNC **mem_16 ;
215 int (**mem_17)(int , int ) ;
216 int *mem_18 ;
217 struct __UTAC__CFLOW_FUNC **mem_19 ;
218
219 {
220#line 60
221 excep = (struct __UTAC__EXCEPTION *)exception;
222#line 61
223 __cil_tmp5 = (unsigned long )excep;
224#line 61
225 __cil_tmp6 = __cil_tmp5 + 24;
226#line 61
227 mem_16 = (struct __UTAC__CFLOW_FUNC **)__cil_tmp6;
228#line 61
229 cf = *mem_16;
230 {
231#line 64
232 while (1) {
233 while_1_continue: ;
234 {
235#line 64
236 __cil_tmp7 = (struct __UTAC__CFLOW_FUNC *)0;
237#line 64
238 __cil_tmp8 = (unsigned long )__cil_tmp7;
239#line 64
240 __cil_tmp9 = (unsigned long )cf;
241#line 64
242 if (__cil_tmp9 != __cil_tmp8) {
243
244 } else {
245 goto while_1_break;
246 }
247 }
248 {
249#line 65
250 mem_17 = (int (**)(int , int ))cf;
251#line 65
252 __cil_tmp10 = *mem_17;
253#line 65
254 __cil_tmp11 = (unsigned long )cf;
255#line 65
256 __cil_tmp12 = __cil_tmp11 + 8;
257#line 65
258 mem_18 = (int *)__cil_tmp12;
259#line 65
260 __cil_tmp13 = *mem_18;
261#line 65
262 (*__cil_tmp10)(4, __cil_tmp13);
263#line 66
264 __cil_tmp14 = (unsigned long )cf;
265#line 66
266 __cil_tmp15 = __cil_tmp14 + 16;
267#line 66
268 mem_19 = (struct __UTAC__CFLOW_FUNC **)__cil_tmp15;
269#line 66
270 cf = *mem_19;
271 }
272 }
273 while_1_break: ;
274 }
275 {
276#line 69
277 __utac__exception__cf_handler_free(exception);
278 }
279#line 732 "libacc.c"
280 return;
281}
282}
283#line 80 "libacc.c"
284void *__utac__error_stack_mgt(void *env , int mode , int count ) ;
285#line 80 "libacc.c"
286static struct __ACC__ERR *head = (struct __ACC__ERR *)0;
287#line 79 "libacc.c"
288void *__utac__error_stack_mgt(void *env , int mode , int count )
289{ void *retValue_acc ;
290 struct __ACC__ERR *new ;
291 void *tmp ;
292 struct __ACC__ERR *temp ;
293 struct __ACC__ERR *next ;
294 void *excep ;
295 unsigned long __cil_tmp10 ;
296 unsigned long __cil_tmp11 ;
297 unsigned long __cil_tmp12 ;
298 unsigned long __cil_tmp13 ;
299 void *__cil_tmp14 ;
300 unsigned long __cil_tmp15 ;
301 unsigned long __cil_tmp16 ;
302 void *__cil_tmp17 ;
303 void **mem_18 ;
304 struct __ACC__ERR **mem_19 ;
305 struct __ACC__ERR **mem_20 ;
306 void **mem_21 ;
307 struct __ACC__ERR **mem_22 ;
308 void **mem_23 ;
309 void **mem_24 ;
310
311 {
312#line 82 "libacc.c"
313 if (count == 0) {
314#line 758 "libacc.c"
315 return (retValue_acc);
316 } else {
317
318 }
319#line 86 "libacc.c"
320 if (mode == 0) {
321 {
322#line 87
323 tmp = malloc(16UL);
324#line 87
325 new = (struct __ACC__ERR *)tmp;
326#line 88
327 mem_18 = (void **)new;
328#line 88
329 *mem_18 = env;
330#line 89
331 __cil_tmp10 = (unsigned long )new;
332#line 89
333 __cil_tmp11 = __cil_tmp10 + 8;
334#line 89
335 mem_19 = (struct __ACC__ERR **)__cil_tmp11;
336#line 89
337 *mem_19 = head;
338#line 90
339 head = new;
340#line 776 "libacc.c"
341 retValue_acc = (void *)new;
342 }
343#line 778
344 return (retValue_acc);
345 } else {
346
347 }
348#line 94 "libacc.c"
349 if (mode == 1) {
350#line 95
351 temp = head;
352 {
353#line 98
354 while (1) {
355 while_2_continue: ;
356#line 98
357 if (count > 1) {
358
359 } else {
360 goto while_2_break;
361 }
362 {
363#line 99
364 __cil_tmp12 = (unsigned long )temp;
365#line 99
366 __cil_tmp13 = __cil_tmp12 + 8;
367#line 99
368 mem_20 = (struct __ACC__ERR **)__cil_tmp13;
369#line 99
370 next = *mem_20;
371#line 100
372 mem_21 = (void **)temp;
373#line 100
374 excep = *mem_21;
375#line 101
376 __cil_tmp14 = (void *)temp;
377#line 101
378 free(__cil_tmp14);
379#line 102
380 __utac__exception__cf_handler_reset(excep);
381#line 103
382 temp = next;
383#line 104
384 count = count - 1;
385 }
386 }
387 while_2_break: ;
388 }
389 {
390#line 107
391 __cil_tmp15 = (unsigned long )temp;
392#line 107
393 __cil_tmp16 = __cil_tmp15 + 8;
394#line 107
395 mem_22 = (struct __ACC__ERR **)__cil_tmp16;
396#line 107
397 head = *mem_22;
398#line 108
399 mem_23 = (void **)temp;
400#line 108
401 excep = *mem_23;
402#line 109
403 __cil_tmp17 = (void *)temp;
404#line 109
405 free(__cil_tmp17);
406#line 110
407 __utac__exception__cf_handler_reset(excep);
408#line 820 "libacc.c"
409 retValue_acc = excep;
410 }
411#line 822
412 return (retValue_acc);
413 } else {
414
415 }
416#line 114
417 if (mode == 2) {
418#line 118 "libacc.c"
419 if (head) {
420#line 831
421 mem_24 = (void **)head;
422#line 831
423 retValue_acc = *mem_24;
424#line 833
425 return (retValue_acc);
426 } else {
427#line 837 "libacc.c"
428 retValue_acc = (void *)0;
429#line 839
430 return (retValue_acc);
431 }
432 } else {
433
434 }
435#line 846 "libacc.c"
436 return (retValue_acc);
437}
438}
439#line 122 "libacc.c"
440void *__utac__get_this_arg(int i , struct JoinPoint *this )
441{ void *retValue_acc ;
442 unsigned long __cil_tmp4 ;
443 unsigned long __cil_tmp5 ;
444 int __cil_tmp6 ;
445 int __cil_tmp7 ;
446 unsigned long __cil_tmp8 ;
447 unsigned long __cil_tmp9 ;
448 void **__cil_tmp10 ;
449 void **__cil_tmp11 ;
450 int *mem_12 ;
451 void ***mem_13 ;
452
453 {
454#line 123
455 if (i > 0) {
456 {
457#line 123
458 __cil_tmp4 = (unsigned long )this;
459#line 123
460 __cil_tmp5 = __cil_tmp4 + 16;
461#line 123
462 mem_12 = (int *)__cil_tmp5;
463#line 123
464 __cil_tmp6 = *mem_12;
465#line 123
466 if (i <= __cil_tmp6) {
467
468 } else {
469 {
470#line 123
471 __assert_fail("i > 0 && i <= this->argsCount", "libacc.c",
472 123U, "__utac__get_this_arg");
473 }
474 }
475 }
476 } else {
477 {
478#line 123
479 __assert_fail("i > 0 && i <= this->argsCount", "libacc.c",
480 123U, "__utac__get_this_arg");
481 }
482 }
483#line 870 "libacc.c"
484 __cil_tmp7 = i - 1;
485#line 870
486 __cil_tmp8 = (unsigned long )this;
487#line 870
488 __cil_tmp9 = __cil_tmp8 + 8;
489#line 870
490 mem_13 = (void ***)__cil_tmp9;
491#line 870
492 __cil_tmp10 = *mem_13;
493#line 870
494 __cil_tmp11 = __cil_tmp10 + __cil_tmp7;
495#line 870
496 retValue_acc = *__cil_tmp11;
497#line 872
498 return (retValue_acc);
499#line 879
500 return (retValue_acc);
501}
502}
503#line 129 "libacc.c"
504char const *__utac__get_this_argtype(int i , struct JoinPoint *this )
505{ char const *retValue_acc ;
506 unsigned long __cil_tmp4 ;
507 unsigned long __cil_tmp5 ;
508 int __cil_tmp6 ;
509 int __cil_tmp7 ;
510 unsigned long __cil_tmp8 ;
511 unsigned long __cil_tmp9 ;
512 char const **__cil_tmp10 ;
513 char const **__cil_tmp11 ;
514 int *mem_12 ;
515 char const ***mem_13 ;
516
517 {
518#line 131
519 if (i > 0) {
520 {
521#line 131
522 __cil_tmp4 = (unsigned long )this;
523#line 131
524 __cil_tmp5 = __cil_tmp4 + 16;
525#line 131
526 mem_12 = (int *)__cil_tmp5;
527#line 131
528 __cil_tmp6 = *mem_12;
529#line 131
530 if (i <= __cil_tmp6) {
531
532 } else {
533 {
534#line 131
535 __assert_fail("i > 0 && i <= this->argsCount", "libacc.c",
536 131U, "__utac__get_this_argtype");
537 }
538 }
539 }
540 } else {
541 {
542#line 131
543 __assert_fail("i > 0 && i <= this->argsCount", "libacc.c",
544 131U, "__utac__get_this_argtype");
545 }
546 }
547#line 903 "libacc.c"
548 __cil_tmp7 = i - 1;
549#line 903
550 __cil_tmp8 = (unsigned long )this;
551#line 903
552 __cil_tmp9 = __cil_tmp8 + 24;
553#line 903
554 mem_13 = (char const ***)__cil_tmp9;
555#line 903
556 __cil_tmp10 = *mem_13;
557#line 903
558 __cil_tmp11 = __cil_tmp10 + __cil_tmp7;
559#line 903
560 retValue_acc = *__cil_tmp11;
561#line 905
562 return (retValue_acc);
563#line 912
564 return (retValue_acc);
565}
566}
567#line 1 "wsllib_check.o"
568#pragma merger(0,"wsllib_check.i","")
569#line 3 "wsllib_check.c"
570void __automaton_fail(void)
571{
572
573 {
574 goto ERROR;
575 ERROR: ;
576#line 53 "wsllib_check.c"
577 return;
578}
579}
580#line 1 "Test.o"
581#pragma merger(0,"Test.i","")
582#line 359 "/usr/include/stdio.h"
583extern int printf(char const * __restrict __format , ...) ;
584#line 688
585extern int puts(char const *__s ) ;
586#line 31 "ClientLib.h"
587void setClientAutoResponse(int handle , int value ) ;
588#line 35
589void setClientPrivateKey(int handle , int value ) ;
590#line 39
591int createClientKeyringEntry(int handle ) ;
592#line 41
593int getClientKeyringUser(int handle , int index ) ;
594#line 43
595void setClientKeyringUser(int handle , int index , int value ) ;
596#line 45
597int getClientKeyringPublicKey(int handle , int index ) ;
598#line 47
599void setClientKeyringPublicKey(int handle , int index , int value ) ;
600#line 51
601void setClientForwardReceiver(int handle , int value ) ;
602#line 55
603void setClientId(int handle , int value ) ;
604#line 8 "featureselect.h"
605int __SELECTED_FEATURE_Base ;
606#line 11 "featureselect.h"
607int __SELECTED_FEATURE_Keys ;
608#line 14 "featureselect.h"
609int __SELECTED_FEATURE_Encrypt ;
610#line 17 "featureselect.h"
611int __SELECTED_FEATURE_AutoResponder ;
612#line 20 "featureselect.h"
613int __SELECTED_FEATURE_AddressBook ;
614#line 23 "featureselect.h"
615int __SELECTED_FEATURE_Sign ;
616#line 26 "featureselect.h"
617int __SELECTED_FEATURE_Forward ;
618#line 29 "featureselect.h"
619int __SELECTED_FEATURE_Verify ;
620#line 32 "featureselect.h"
621int __SELECTED_FEATURE_Decrypt ;
622#line 35 "featureselect.h"
623int __GUIDSL_ROOT_PRODUCTION ;
624#line 37 "featureselect.h"
625int __GUIDSL_NON_TERMINAL_main ;
626#line 43
627void select_features(void) ;
628#line 45
629void select_helpers(void) ;
630#line 47
631int valid_product(void) ;
632#line 17 "Client.h"
633int is_queue_empty(void) ;
634#line 19
635int get_queued_client(void) ;
636#line 21
637int get_queued_email(void) ;
638#line 26
639void outgoing(int client , int msg ) ;
640#line 35
641void sendEmail(int sender , int receiver ) ;
642#line 44
643void generateKeyPair(int client , int seed ) ;
644#line 2 "Test.h"
645int bob ;
646#line 5 "Test.h"
647int rjh ;
648#line 8 "Test.h"
649int chuck ;
650#line 11
651void setup_bob(int bob___0 ) ;
652#line 14
653void setup_rjh(int rjh___0 ) ;
654#line 17
655void setup_chuck(int chuck___0 ) ;
656#line 23
657void bobToRjh(void) ;
658#line 26
659void rjhToBob(void) ;
660#line 29
661void test(void) ;
662#line 32
663void setup(void) ;
664#line 35
665int main(void) ;
666#line 36
667void bobKeyAdd(void) ;
668#line 39
669void bobKeyAddChuck(void) ;
670#line 42
671void rjhKeyAdd(void) ;
672#line 45
673void rjhKeyAddChuck(void) ;
674#line 48
675void chuckKeyAdd(void) ;
676#line 51
677void bobKeyChange(void) ;
678#line 54
679void rjhKeyChange(void) ;
680#line 57
681void rjhDeletePrivateKey(void) ;
682#line 60
683void chuckKeyAddRjh(void) ;
684#line 61
685void rjhSetAutoRespond(void) ;
686#line 62
687void rjhEnableForwarding(void) ;
688#line 18 "Test.c"
689void setup_bob__wrappee__Base(int bob___0 )
690{
691
692 {
693 {
694#line 19
695 setClientId(bob___0, bob___0);
696 }
697#line 1334 "Test.c"
698 return;
699}
700}
701#line 23 "Test.c"
702void setup_bob(int bob___0 )
703{
704
705 {
706 {
707#line 24
708 setup_bob__wrappee__Base(bob___0);
709#line 25
710 setClientPrivateKey(bob___0, 123);
711 }
712#line 1356 "Test.c"
713 return;
714}
715}
716#line 33 "Test.c"
717void setup_rjh__wrappee__Base(int rjh___0 )
718{
719
720 {
721 {
722#line 34
723 setClientId(rjh___0, rjh___0);
724 }
725#line 1376 "Test.c"
726 return;
727}
728}
729#line 40 "Test.c"
730void setup_rjh(int rjh___0 )
731{
732
733 {
734 {
735#line 42
736 setup_rjh__wrappee__Base(rjh___0);
737#line 43
738 setClientPrivateKey(rjh___0, 456);
739 }
740#line 1398 "Test.c"
741 return;
742}
743}
744#line 50 "Test.c"
745void setup_chuck__wrappee__Base(int chuck___0 )
746{
747
748 {
749 {
750#line 51
751 setClientId(chuck___0, chuck___0);
752 }
753#line 1418 "Test.c"
754 return;
755}
756}
757#line 57 "Test.c"
758void setup_chuck(int chuck___0 )
759{
760
761 {
762 {
763#line 58
764 setup_chuck__wrappee__Base(chuck___0);
765#line 59
766 setClientPrivateKey(chuck___0, 789);
767 }
768#line 1440 "Test.c"
769 return;
770}
771}
772#line 69 "Test.c"
773void bobToRjh(void)
774{ int tmp ;
775 int tmp___0 ;
776 int tmp___1 ;
777
778 {
779 {
780#line 71
781 puts("Please enter a subject and a message body.\n");
782#line 72
783 sendEmail(bob, rjh);
784#line 73
785 tmp___1 = is_queue_empty();
786 }
787#line 73
788 if (tmp___1) {
789
790 } else {
791 {
792#line 74
793 tmp = get_queued_email();
794#line 74
795 tmp___0 = get_queued_client();
796#line 74
797 outgoing(tmp___0, tmp);
798 }
799 }
800#line 1467 "Test.c"
801 return;
802}
803}
804#line 81 "Test.c"
805void rjhToBob(void)
806{
807
808 {
809 {
810#line 83
811 puts("Please enter a subject and a message body.\n");
812#line 84
813 sendEmail(rjh, bob);
814 }
815#line 1489 "Test.c"
816 return;
817}
818}
819#line 88 "Test.c"
820#line 95 "Test.c"
821void setup(void)
822{ char const * __restrict __cil_tmp1 ;
823 char const * __restrict __cil_tmp2 ;
824 char const * __restrict __cil_tmp3 ;
825
826 {
827 {
828#line 96
829 bob = 1;
830#line 97
831 setup_bob(bob);
832#line 98
833 __cil_tmp1 = (char const * __restrict )"bob: %d\n";
834#line 98
835 printf(__cil_tmp1, bob);
836#line 100
837 rjh = 2;
838#line 101
839 setup_rjh(rjh);
840#line 102
841 __cil_tmp2 = (char const * __restrict )"rjh: %d\n";
842#line 102
843 printf(__cil_tmp2, rjh);
844#line 104
845 chuck = 3;
846#line 105
847 setup_chuck(chuck);
848#line 106
849 __cil_tmp3 = (char const * __restrict )"chuck: %d\n";
850#line 106
851 printf(__cil_tmp3, chuck);
852 }
853#line 1560 "Test.c"
854 return;
855}
856}
857#line 112 "Test.c"
858int main(void)
859{ int retValue_acc ;
860 int tmp ;
861
862 {
863 {
864#line 113
865 select_helpers();
866#line 114
867 select_features();
868#line 115
869 tmp = valid_product();
870 }
871#line 115
872 if (tmp) {
873 {
874#line 116
875 setup();
876#line 117
877 test();
878 }
879 } else {
880
881 }
882#line 1591 "Test.c"
883 return (retValue_acc);
884}
885}
886#line 125 "Test.c"
887void bobKeyAdd(void)
888{ int tmp ;
889 int tmp___0 ;
890 char const * __restrict __cil_tmp3 ;
891 char const * __restrict __cil_tmp4 ;
892
893 {
894 {
895#line 126
896 createClientKeyringEntry(bob);
897#line 127
898 setClientKeyringUser(bob, 0, 2);
899#line 128
900 setClientKeyringPublicKey(bob, 0, 456);
901#line 129
902 puts("bob added rjhs key");
903#line 130
904 tmp = getClientKeyringUser(bob, 0);
905#line 130
906 __cil_tmp3 = (char const * __restrict )"%d\n";
907#line 130
908 printf(__cil_tmp3, tmp);
909#line 131
910 tmp___0 = getClientKeyringPublicKey(bob, 0);
911#line 131
912 __cil_tmp4 = (char const * __restrict )"%d\n";
913#line 131
914 printf(__cil_tmp4, tmp___0);
915 }
916#line 1625 "Test.c"
917 return;
918}
919}
920#line 137 "Test.c"
921void rjhKeyAdd(void)
922{
923
924 {
925 {
926#line 138
927 createClientKeyringEntry(rjh);
928#line 139
929 setClientKeyringUser(rjh, 0, 1);
930#line 140
931 setClientKeyringPublicKey(rjh, 0, 123);
932 }
933#line 1649 "Test.c"
934 return;
935}
936}
937#line 146 "Test.c"
938void rjhKeyAddChuck(void)
939{
940
941 {
942 {
943#line 147
944 createClientKeyringEntry(rjh);
945#line 148
946 setClientKeyringUser(rjh, 0, 3);
947#line 149
948 setClientKeyringPublicKey(rjh, 0, 789);
949 }
950#line 1673 "Test.c"
951 return;
952}
953}
954#line 156 "Test.c"
955void bobKeyAddChuck(void)
956{
957
958 {
959 {
960#line 157
961 createClientKeyringEntry(bob);
962#line 158
963 setClientKeyringUser(bob, 1, 3);
964#line 159
965 setClientKeyringPublicKey(bob, 1, 789);
966 }
967#line 1697 "Test.c"
968 return;
969}
970}
971#line 165 "Test.c"
972void chuckKeyAdd(void)
973{
974
975 {
976 {
977#line 166
978 createClientKeyringEntry(chuck);
979#line 167
980 setClientKeyringUser(chuck, 0, 1);
981#line 168
982 setClientKeyringPublicKey(chuck, 0, 123);
983 }
984#line 1721 "Test.c"
985 return;
986}
987}
988#line 174 "Test.c"
989void chuckKeyAddRjh(void)
990{
991
992 {
993 {
994#line 175
995 createClientKeyringEntry(chuck);
996#line 176
997 setClientKeyringUser(chuck, 0, 2);
998#line 177
999 setClientKeyringPublicKey(chuck, 0, 456);
1000 }
1001#line 1745 "Test.c"
1002 return;
1003}
1004}
1005#line 183 "Test.c"
1006void rjhDeletePrivateKey(void)
1007{
1008
1009 {
1010 {
1011#line 184
1012 setClientPrivateKey(rjh, 0);
1013 }
1014#line 1765 "Test.c"
1015 return;
1016}
1017}
1018#line 190 "Test.c"
1019void bobKeyChange(void)
1020{
1021
1022 {
1023 {
1024#line 191
1025 generateKeyPair(bob, 777);
1026 }
1027#line 1785 "Test.c"
1028 return;
1029}
1030}
1031#line 197 "Test.c"
1032void rjhKeyChange(void)
1033{
1034
1035 {
1036 {
1037#line 198
1038 generateKeyPair(rjh, 666);
1039 }
1040#line 1805 "Test.c"
1041 return;
1042}
1043}
1044#line 204 "Test.c"
1045void rjhSetAutoRespond(void)
1046{
1047
1048 {
1049 {
1050#line 205
1051 setClientAutoResponse(rjh, 1);
1052 }
1053#line 1825 "Test.c"
1054 return;
1055}
1056}
1057#line 211 "Test.c"
1058void rjhEnableForwarding(void)
1059{
1060
1061 {
1062 {
1063#line 212
1064 setClientForwardReceiver(rjh, chuck);
1065 }
1066#line 1845 "Test.c"
1067 return;
1068}
1069}
1070#line 1 "scenario.o"
1071#pragma merger(0,"scenario.i","")
1072#line 1 "scenario.c"
1073void test(void)
1074{ int op1 ;
1075 int op2 ;
1076 int op3 ;
1077 int op4 ;
1078 int op5 ;
1079 int op6 ;
1080 int op7 ;
1081 int op8 ;
1082 int op9 ;
1083 int op10 ;
1084 int op11 ;
1085 int splverifierCounter ;
1086 int tmp ;
1087 int tmp___0 ;
1088 int tmp___1 ;
1089 int tmp___2 ;
1090 int tmp___3 ;
1091 int tmp___4 ;
1092 int tmp___5 ;
1093 int tmp___6 ;
1094 int tmp___7 ;
1095 int tmp___8 ;
1096 int tmp___9 ;
1097
1098 {
1099#line 2
1100 op1 = 0;
1101#line 3
1102 op2 = 0;
1103#line 4
1104 op3 = 0;
1105#line 5
1106 op4 = 0;
1107#line 6
1108 op5 = 0;
1109#line 7
1110 op6 = 0;
1111#line 8
1112 op7 = 0;
1113#line 9
1114 op8 = 0;
1115#line 10
1116 op9 = 0;
1117#line 11
1118 op10 = 0;
1119#line 12
1120 op11 = 0;
1121#line 13
1122 splverifierCounter = 0;
1123 {
1124#line 14
1125 while (1) {
1126 while_3_continue: ;
1127#line 14
1128 if (splverifierCounter < 4) {
1129
1130 } else {
1131 goto while_3_break;
1132 }
1133#line 15
1134 splverifierCounter = splverifierCounter + 1;
1135#line 16
1136 if (! op1) {
1137 {
1138#line 16
1139 tmp___9 = __VERIFIER_nondet_int();
1140 }
1141#line 16
1142 if (tmp___9) {
1143 {
1144#line 17
1145 bobKeyAdd();
1146#line 18
1147 op1 = 1;
1148 }
1149 } else {
1150 goto _L___8;
1151 }
1152 } else {
1153 _L___8:
1154#line 19
1155 if (! op2) {
1156 {
1157#line 19
1158 tmp___8 = __VERIFIER_nondet_int();
1159 }
1160#line 19
1161 if (tmp___8) {
1162 {
1163#line 21
1164 rjhSetAutoRespond();
1165#line 22
1166 op2 = 1;
1167 }
1168 } else {
1169 goto _L___7;
1170 }
1171 } else {
1172 _L___7:
1173#line 23
1174 if (! op3) {
1175 {
1176#line 23
1177 tmp___7 = __VERIFIER_nondet_int();
1178 }
1179#line 23
1180 if (tmp___7) {
1181 {
1182#line 25
1183 rjhDeletePrivateKey();
1184#line 26
1185 op3 = 1;
1186 }
1187 } else {
1188 goto _L___6;
1189 }
1190 } else {
1191 _L___6:
1192#line 27
1193 if (! op4) {
1194 {
1195#line 27
1196 tmp___6 = __VERIFIER_nondet_int();
1197 }
1198#line 27
1199 if (tmp___6) {
1200 {
1201#line 29
1202 rjhKeyAdd();
1203#line 30
1204 op4 = 1;
1205 }
1206 } else {
1207 goto _L___5;
1208 }
1209 } else {
1210 _L___5:
1211#line 31
1212 if (! op5) {
1213 {
1214#line 31
1215 tmp___5 = __VERIFIER_nondet_int();
1216 }
1217#line 31
1218 if (tmp___5) {
1219 {
1220#line 33
1221 chuckKeyAddRjh();
1222#line 34
1223 op5 = 1;
1224 }
1225 } else {
1226 goto _L___4;
1227 }
1228 } else {
1229 _L___4:
1230#line 35
1231 if (! op6) {
1232 {
1233#line 35
1234 tmp___4 = __VERIFIER_nondet_int();
1235 }
1236#line 35
1237 if (tmp___4) {
1238 {
1239#line 37
1240 rjhEnableForwarding();
1241#line 38
1242 op6 = 1;
1243 }
1244 } else {
1245 goto _L___3;
1246 }
1247 } else {
1248 _L___3:
1249#line 39
1250 if (! op7) {
1251 {
1252#line 39
1253 tmp___3 = __VERIFIER_nondet_int();
1254 }
1255#line 39
1256 if (tmp___3) {
1257 {
1258#line 41
1259 rjhKeyChange();
1260#line 42
1261 op7 = 1;
1262 }
1263 } else {
1264 goto _L___2;
1265 }
1266 } else {
1267 _L___2:
1268#line 43
1269 if (! op8) {
1270 {
1271#line 43
1272 tmp___2 = __VERIFIER_nondet_int();
1273 }
1274#line 43
1275 if (tmp___2) {
1276#line 45
1277 op8 = 1;
1278 } else {
1279 goto _L___1;
1280 }
1281 } else {
1282 _L___1:
1283#line 46
1284 if (! op9) {
1285 {
1286#line 46
1287 tmp___1 = __VERIFIER_nondet_int();
1288 }
1289#line 46
1290 if (tmp___1) {
1291 {
1292#line 48
1293 chuckKeyAdd();
1294#line 49
1295 op9 = 1;
1296 }
1297 } else {
1298 goto _L___0;
1299 }
1300 } else {
1301 _L___0:
1302#line 50
1303 if (! op10) {
1304 {
1305#line 50
1306 tmp___0 = __VERIFIER_nondet_int();
1307 }
1308#line 50
1309 if (tmp___0) {
1310 {
1311#line 52
1312 bobKeyChange();
1313#line 53
1314 op10 = 1;
1315 }
1316 } else {
1317 goto _L;
1318 }
1319 } else {
1320 _L:
1321#line 54
1322 if (! op11) {
1323 {
1324#line 54
1325 tmp = __VERIFIER_nondet_int();
1326 }
1327#line 54
1328 if (tmp) {
1329 {
1330#line 56
1331 chuckKeyAdd();
1332#line 57
1333 op11 = 1;
1334 }
1335 } else {
1336 goto while_3_break;
1337 }
1338 } else {
1339 goto while_3_break;
1340 }
1341 }
1342 }
1343 }
1344 }
1345 }
1346 }
1347 }
1348 }
1349 }
1350 }
1351 }
1352 while_3_break: ;
1353 }
1354 {
1355#line 61
1356 bobToRjh();
1357 }
1358#line 169 "scenario.c"
1359 return;
1360}
1361}
1362#line 1 "featureselect.o"
1363#pragma merger(0,"featureselect.i","")
1364#line 41 "featureselect.h"
1365int select_one(void) ;
1366#line 8 "featureselect.c"
1367int select_one(void)
1368{ int retValue_acc ;
1369 int choice = __VERIFIER_nondet_int();
1370
1371 {
1372#line 84 "featureselect.c"
1373 retValue_acc = choice;
1374#line 86
1375 return (retValue_acc);
1376#line 93
1377 return (retValue_acc);
1378}
1379}
1380#line 14 "featureselect.c"
1381void select_features(void)
1382{
1383
1384 {
1385#line 115 "featureselect.c"
1386 return;
1387}
1388}
1389#line 20 "featureselect.c"
1390void select_helpers(void)
1391{
1392
1393 {
1394#line 133 "featureselect.c"
1395 return;
1396}
1397}
1398#line 25 "featureselect.c"
1399int valid_product(void)
1400{ int retValue_acc ;
1401
1402 {
1403#line 151 "featureselect.c"
1404 retValue_acc = 1;
1405#line 153
1406 return (retValue_acc);
1407#line 160
1408 return (retValue_acc);
1409}
1410}
1411#line 1 "Client.o"
1412#pragma merger(0,"Client.i","")
1413#line 4 "ClientLib.h"
1414int initClient(void) ;
1415#line 29
1416int getClientAutoResponse(int handle ) ;
1417#line 33
1418int getClientPrivateKey(int handle ) ;
1419#line 49
1420int getClientForwardReceiver(int handle ) ;
1421#line 53
1422int getClientId(int handle ) ;
1423#line 57
1424int findPublicKey(int handle , int userid ) ;
1425#line 10 "EmailLib.h"
1426int getEmailFrom(int handle ) ;
1427#line 12
1428void setEmailFrom(int handle , int value ) ;
1429#line 14
1430int getEmailTo(int handle ) ;
1431#line 16
1432void setEmailTo(int handle , int value ) ;
1433#line 26
1434int isEncrypted(int handle ) ;
1435#line 28
1436void setEmailIsEncrypted(int handle , int value ) ;
1437#line 30
1438int getEmailEncryptionKey(int handle ) ;
1439#line 32
1440void setEmailEncryptionKey(int handle , int value ) ;
1441#line 34
1442int isSigned(int handle ) ;
1443#line 36
1444void setEmailIsSigned(int handle , int value ) ;
1445#line 38
1446int getEmailSignKey(int handle ) ;
1447#line 40
1448void setEmailSignKey(int handle , int value ) ;
1449#line 44
1450void setEmailIsSignatureVerified(int handle , int value ) ;
1451#line 6 "Email.h"
1452void printMail(int msg ) ;
1453#line 9
1454int isReadable(int msg ) ;
1455#line 12
1456int createEmail(int from , int to ) ;
1457#line 14 "Client.h"
1458void queue(int client , int msg ) ;
1459#line 24
1460void mail(int client , int msg ) ;
1461#line 28
1462void deliver(int client , int msg ) ;
1463#line 30
1464void incoming(int client , int msg ) ;
1465#line 32
1466int createClient(char *name ) ;
1467#line 40
1468int isKeyPairValid(int publicKey , int privateKey ) ;
1469#line 45
1470void autoRespond(int client , int msg ) ;
1471#line 47
1472void sign(int client , int msg ) ;
1473#line 49
1474void forward(int client , int msg ) ;
1475#line 51
1476void verify(int client , int msg ) ;
1477#line 6 "Client.c"
1478int queue_empty = 1;
1479#line 9 "Client.c"
1480int queued_message ;
1481#line 12 "Client.c"
1482int queued_client ;
1483#line 13
1484void __utac_acc__SignForward_spec__1(int client , int msg ) ;
1485#line 18 "Client.c"
1486void mail(int client , int msg )
1487{ int __utac__ad__arg1 ;
1488 int __utac__ad__arg2 ;
1489 int tmp ;
1490
1491 {
1492 {
1493#line 728 "Client.c"
1494 __utac__ad__arg1 = client;
1495#line 729
1496 __utac__ad__arg2 = msg;
1497#line 730
1498 __utac_acc__SignForward_spec__1(__utac__ad__arg1, __utac__ad__arg2);
1499#line 19 "Client.c"
1500 puts("mail sent");
1501#line 20
1502 tmp = getEmailTo(msg);
1503#line 20
1504 incoming(tmp, msg);
1505 }
1506#line 747 "Client.c"
1507 return;
1508}
1509}
1510#line 27 "Client.c"
1511void outgoing__wrappee__Keys(int client , int msg )
1512{ int tmp ;
1513
1514 {
1515 {
1516#line 28
1517 tmp = getClientId(client);
1518#line 28
1519 setEmailFrom(msg, tmp);
1520#line 29
1521 mail(client, msg);
1522 }
1523#line 769 "Client.c"
1524 return;
1525}
1526}
1527#line 33 "Client.c"
1528void outgoing__wrappee__AutoResponder(int client , int msg )
1529{ int receiver ;
1530 int tmp ;
1531 int pubkey ;
1532 int tmp___0 ;
1533
1534 {
1535 {
1536#line 36
1537 tmp = getEmailTo(msg);
1538#line 36
1539 receiver = tmp;
1540#line 37
1541 tmp___0 = findPublicKey(client, receiver);
1542#line 37
1543 pubkey = tmp___0;
1544 }
1545#line 38
1546 if (pubkey) {
1547 {
1548#line 39
1549 setEmailEncryptionKey(msg, pubkey);
1550#line 40
1551 setEmailIsEncrypted(msg, 1);
1552 }
1553 } else {
1554
1555 }
1556 {
1557#line 45
1558 outgoing__wrappee__Keys(client, msg);
1559 }
1560#line 804 "Client.c"
1561 return;
1562}
1563}
1564#line 51 "Client.c"
1565void outgoing(int client , int msg )
1566{
1567
1568 {
1569 {
1570#line 52
1571 sign(client, msg);
1572#line 53
1573 outgoing__wrappee__AutoResponder(client, msg);
1574 }
1575#line 826 "Client.c"
1576 return;
1577}
1578}
1579#line 60 "Client.c"
1580void deliver(int client , int msg )
1581{
1582
1583 {
1584 {
1585#line 61
1586 puts("mail delivered\n");
1587 }
1588#line 846 "Client.c"
1589 return;
1590}
1591}
1592#line 68 "Client.c"
1593void incoming__wrappee__Encrypt(int client , int msg )
1594{
1595
1596 {
1597 {
1598#line 69
1599 deliver(client, msg);
1600 }
1601#line 866 "Client.c"
1602 return;
1603}
1604}
1605#line 75 "Client.c"
1606void incoming__wrappee__Sign(int client , int msg )
1607{ int tmp ;
1608
1609 {
1610 {
1611#line 76
1612 incoming__wrappee__Encrypt(client, msg);
1613#line 77
1614 tmp = getClientAutoResponse(client);
1615 }
1616#line 77
1617 if (tmp) {
1618 {
1619#line 78
1620 autoRespond(client, msg);
1621 }
1622 } else {
1623
1624 }
1625#line 891 "Client.c"
1626 return;
1627}
1628}
1629#line 85 "Client.c"
1630void incoming__wrappee__Forward(int client , int msg )
1631{ int fwreceiver ;
1632 int tmp ;
1633
1634 {
1635 {
1636#line 86
1637 incoming__wrappee__Sign(client, msg);
1638#line 87
1639 tmp = getClientForwardReceiver(client);
1640#line 87
1641 fwreceiver = tmp;
1642 }
1643#line 88
1644 if (fwreceiver) {
1645 {
1646#line 90
1647 setEmailTo(msg, fwreceiver);
1648#line 91
1649 forward(client, msg);
1650 }
1651 } else {
1652
1653 }
1654#line 922 "Client.c"
1655 return;
1656}
1657}
1658#line 99 "Client.c"
1659void incoming__wrappee__Verify(int client , int msg )
1660{
1661
1662 {
1663 {
1664#line 100
1665 verify(client, msg);
1666#line 101
1667 incoming__wrappee__Forward(client, msg);
1668 }
1669#line 944 "Client.c"
1670 return;
1671}
1672}
1673#line 106 "Client.c"
1674void incoming(int client , int msg )
1675{ int privkey ;
1676 int tmp ;
1677 int tmp___0 ;
1678 int tmp___1 ;
1679 int tmp___2 ;
1680
1681 {
1682 {
1683#line 109
1684 tmp = getClientPrivateKey(client);
1685#line 109
1686 privkey = tmp;
1687 }
1688#line 110
1689 if (privkey) {
1690 {
1691#line 118
1692 tmp___0 = isEncrypted(msg);
1693 }
1694#line 118
1695 if (tmp___0) {
1696 {
1697#line 118
1698 tmp___1 = getEmailEncryptionKey(msg);
1699#line 118
1700 tmp___2 = isKeyPairValid(tmp___1, privkey);
1701 }
1702#line 118
1703 if (tmp___2) {
1704 {
1705#line 115
1706 setEmailIsEncrypted(msg, 0);
1707#line 116
1708 setEmailEncryptionKey(msg, 0);
1709 }
1710 } else {
1711
1712 }
1713 } else {
1714
1715 }
1716 } else {
1717
1718 }
1719 {
1720#line 121
1721 incoming__wrappee__Verify(client, msg);
1722 }
1723#line 978 "Client.c"
1724 return;
1725}
1726}
1727#line 125 "Client.c"
1728int createClient(char *name )
1729{ int retValue_acc ;
1730 int client ;
1731 int tmp ;
1732
1733 {
1734 {
1735#line 126
1736 tmp = initClient();
1737#line 126
1738 client = tmp;
1739#line 1000 "Client.c"
1740 retValue_acc = client;
1741 }
1742#line 1002
1743 return (retValue_acc);
1744#line 1009
1745 return (retValue_acc);
1746}
1747}
1748#line 133 "Client.c"
1749void sendEmail(int sender , int receiver )
1750{ int email ;
1751 int tmp ;
1752
1753 {
1754 {
1755#line 134
1756 tmp = createEmail(0, receiver);
1757#line 134
1758 email = tmp;
1759#line 135
1760 outgoing(sender, email);
1761 }
1762#line 1037 "Client.c"
1763 return;
1764}
1765}
1766#line 143 "Client.c"
1767void queue(int client , int msg )
1768{
1769
1770 {
1771#line 144
1772 queue_empty = 0;
1773#line 145
1774 queued_message = msg;
1775#line 146
1776 queued_client = client;
1777#line 1061 "Client.c"
1778 return;
1779}
1780}
1781#line 152 "Client.c"
1782int is_queue_empty(void)
1783{ int retValue_acc ;
1784
1785 {
1786#line 1079 "Client.c"
1787 retValue_acc = queue_empty;
1788#line 1081
1789 return (retValue_acc);
1790#line 1088
1791 return (retValue_acc);
1792}
1793}
1794#line 159 "Client.c"
1795int get_queued_client(void)
1796{ int retValue_acc ;
1797
1798 {
1799#line 1110 "Client.c"
1800 retValue_acc = queued_client;
1801#line 1112
1802 return (retValue_acc);
1803#line 1119
1804 return (retValue_acc);
1805}
1806}
1807#line 166 "Client.c"
1808int get_queued_email(void)
1809{ int retValue_acc ;
1810
1811 {
1812#line 1141 "Client.c"
1813 retValue_acc = queued_message;
1814#line 1143
1815 return (retValue_acc);
1816#line 1150
1817 return (retValue_acc);
1818}
1819}
1820#line 172 "Client.c"
1821int isKeyPairValid(int publicKey , int privateKey )
1822{ int retValue_acc ;
1823 char const * __restrict __cil_tmp4 ;
1824
1825 {
1826 {
1827#line 173
1828 __cil_tmp4 = (char const * __restrict )"keypair valid %d %d";
1829#line 173
1830 printf(__cil_tmp4, publicKey, privateKey);
1831 }
1832#line 174 "Client.c"
1833 if (! publicKey) {
1834#line 1175 "Client.c"
1835 retValue_acc = 0;
1836#line 1177
1837 return (retValue_acc);
1838 } else {
1839#line 174 "Client.c"
1840 if (! privateKey) {
1841#line 1175 "Client.c"
1842 retValue_acc = 0;
1843#line 1177
1844 return (retValue_acc);
1845 } else {
1846
1847 }
1848 }
1849#line 1182 "Client.c"
1850 retValue_acc = privateKey == publicKey;
1851#line 1184
1852 return (retValue_acc);
1853#line 1191
1854 return (retValue_acc);
1855}
1856}
1857#line 182 "Client.c"
1858void generateKeyPair(int client , int seed )
1859{
1860
1861 {
1862 {
1863#line 183
1864 setClientPrivateKey(client, seed);
1865 }
1866#line 1215 "Client.c"
1867 return;
1868}
1869}
1870#line 189 "Client.c"
1871void autoRespond(int client , int msg )
1872{ int sender ;
1873 int tmp ;
1874
1875 {
1876 {
1877#line 190
1878 puts("sending autoresponse\n");
1879#line 191
1880 tmp = getEmailFrom(msg);
1881#line 191
1882 sender = tmp;
1883#line 192
1884 setEmailTo(msg, sender);
1885#line 193
1886 queue(client, msg);
1887 }
1888#line 1357 "Client.c"
1889 return;
1890}
1891}
1892#line 198 "Client.c"
1893void sign(int client , int msg )
1894{ int privkey ;
1895 int tmp ;
1896
1897 {
1898 {
1899#line 199
1900 tmp = getClientPrivateKey(client);
1901#line 199
1902 privkey = tmp;
1903 }
1904#line 200
1905 if (! privkey) {
1906#line 201
1907 return;
1908 } else {
1909
1910 }
1911 {
1912#line 202
1913 setEmailIsSigned(msg, 1);
1914#line 203
1915 setEmailSignKey(msg, privkey);
1916 }
1917#line 1387 "Client.c"
1918 return;
1919}
1920}
1921#line 208 "Client.c"
1922void forward(int client , int msg )
1923{
1924
1925 {
1926 {
1927#line 209
1928 puts("Forwarding message.\n");
1929#line 210
1930 printMail(msg);
1931#line 211
1932 queue(client, msg);
1933 }
1934#line 1411 "Client.c"
1935 return;
1936}
1937}
1938#line 217 "Client.c"
1939void verify(int client , int msg )
1940{ int tmp ;
1941 int tmp___0 ;
1942 int pubkey ;
1943 int tmp___1 ;
1944 int tmp___2 ;
1945 int tmp___3 ;
1946 int tmp___4 ;
1947
1948 {
1949 {
1950#line 222
1951 tmp = isReadable(msg);
1952 }
1953#line 222
1954 if (tmp) {
1955 {
1956#line 222
1957 tmp___0 = isSigned(msg);
1958 }
1959#line 222
1960 if (tmp___0) {
1961
1962 } else {
1963#line 223
1964 return;
1965 }
1966 } else {
1967#line 223
1968 return;
1969 }
1970 {
1971#line 222
1972 tmp___1 = getEmailFrom(msg);
1973#line 222
1974 tmp___2 = findPublicKey(client, tmp___1);
1975#line 222
1976 pubkey = tmp___2;
1977 }
1978#line 223
1979 if (pubkey) {
1980 {
1981#line 223
1982 tmp___3 = getEmailSignKey(msg);
1983#line 223
1984 tmp___4 = isKeyPairValid(tmp___3, pubkey);
1985 }
1986#line 223
1987 if (tmp___4) {
1988 {
1989#line 224
1990 setEmailIsSignatureVerified(msg, 1);
1991 }
1992 } else {
1993
1994 }
1995 } else {
1996
1997 }
1998#line 1442 "Client.c"
1999 return;
2000}
2001}
2002#line 1 "ClientLib.o"
2003#pragma merger(0,"ClientLib.i","")
2004#line 6 "ClientLib.h"
2005char *getClientName(int handle ) ;
2006#line 8
2007void setClientName(int handle , char *value ) ;
2008#line 10
2009int getClientOutbuffer(int handle ) ;
2010#line 12
2011void setClientOutbuffer(int handle , int value ) ;
2012#line 14
2013int getClientAddressBookSize(int handle ) ;
2014#line 16
2015void setClientAddressBookSize(int handle , int value ) ;
2016#line 18
2017int createClientAddressBookEntry(int handle ) ;
2018#line 20
2019int getClientAddressBookAlias(int handle , int index ) ;
2020#line 22
2021void setClientAddressBookAlias(int handle , int index , int value ) ;
2022#line 24
2023int getClientAddressBookAddress(int handle , int index ) ;
2024#line 26
2025void setClientAddressBookAddress(int handle , int index , int value ) ;
2026#line 37
2027int getClientKeyringSize(int handle ) ;
2028#line 59
2029int findClientAddressBookAlias(int handle , int userid ) ;
2030#line 5 "ClientLib.c"
2031int __ste_Client_counter = 0;
2032#line 7 "ClientLib.c"
2033int initClient(void)
2034{ int retValue_acc ;
2035
2036 {
2037#line 12 "ClientLib.c"
2038 if (__ste_Client_counter < 3) {
2039#line 684
2040 __ste_Client_counter = __ste_Client_counter + 1;
2041#line 684
2042 retValue_acc = __ste_Client_counter;
2043#line 686
2044 return (retValue_acc);
2045 } else {
2046#line 692 "ClientLib.c"
2047 retValue_acc = -1;
2048#line 694
2049 return (retValue_acc);
2050 }
2051#line 701 "ClientLib.c"
2052 return (retValue_acc);
2053}
2054}
2055#line 15 "ClientLib.c"
2056char *__ste_client_name0 = (char *)0;
2057#line 17 "ClientLib.c"
2058char *__ste_client_name1 = (char *)0;
2059#line 19 "ClientLib.c"
2060char *__ste_client_name2 = (char *)0;
2061#line 22 "ClientLib.c"
2062char *getClientName(int handle )
2063{ char *retValue_acc ;
2064 void *__cil_tmp3 ;
2065
2066 {
2067#line 31 "ClientLib.c"
2068 if (handle == 1) {
2069#line 732
2070 retValue_acc = __ste_client_name0;
2071#line 734
2072 return (retValue_acc);
2073 } else {
2074#line 736
2075 if (handle == 2) {
2076#line 741
2077 retValue_acc = __ste_client_name1;
2078#line 743
2079 return (retValue_acc);
2080 } else {
2081#line 745
2082 if (handle == 3) {
2083#line 750
2084 retValue_acc = __ste_client_name2;
2085#line 752
2086 return (retValue_acc);
2087 } else {
2088#line 758 "ClientLib.c"
2089 __cil_tmp3 = (void *)0;
2090#line 758
2091 retValue_acc = (char *)__cil_tmp3;
2092#line 760
2093 return (retValue_acc);
2094 }
2095 }
2096 }
2097#line 767 "ClientLib.c"
2098 return (retValue_acc);
2099}
2100}
2101#line 34 "ClientLib.c"
2102void setClientName(int handle , char *value )
2103{
2104
2105 {
2106#line 42
2107 if (handle == 1) {
2108#line 36
2109 __ste_client_name0 = value;
2110 } else {
2111#line 37
2112 if (handle == 2) {
2113#line 38
2114 __ste_client_name1 = value;
2115 } else {
2116#line 39
2117 if (handle == 3) {
2118#line 40
2119 __ste_client_name2 = value;
2120 } else {
2121
2122 }
2123 }
2124 }
2125#line 802 "ClientLib.c"
2126 return;
2127}
2128}
2129#line 44 "ClientLib.c"
2130int __ste_client_outbuffer0 = 0;
2131#line 46 "ClientLib.c"
2132int __ste_client_outbuffer1 = 0;
2133#line 48 "ClientLib.c"
2134int __ste_client_outbuffer2 = 0;
2135#line 50 "ClientLib.c"
2136int __ste_client_outbuffer3 = 0;
2137#line 53 "ClientLib.c"
2138int getClientOutbuffer(int handle )
2139{ int retValue_acc ;
2140
2141 {
2142#line 62 "ClientLib.c"
2143 if (handle == 1) {
2144#line 831
2145 retValue_acc = __ste_client_outbuffer0;
2146#line 833
2147 return (retValue_acc);
2148 } else {
2149#line 835
2150 if (handle == 2) {
2151#line 840
2152 retValue_acc = __ste_client_outbuffer1;
2153#line 842
2154 return (retValue_acc);
2155 } else {
2156#line 844
2157 if (handle == 3) {
2158#line 849
2159 retValue_acc = __ste_client_outbuffer2;
2160#line 851
2161 return (retValue_acc);
2162 } else {
2163#line 857 "ClientLib.c"
2164 retValue_acc = 0;
2165#line 859
2166 return (retValue_acc);
2167 }
2168 }
2169 }
2170#line 866 "ClientLib.c"
2171 return (retValue_acc);
2172}
2173}
2174#line 65 "ClientLib.c"
2175void setClientOutbuffer(int handle , int value )
2176{
2177
2178 {
2179#line 73
2180 if (handle == 1) {
2181#line 67
2182 __ste_client_outbuffer0 = value;
2183 } else {
2184#line 68
2185 if (handle == 2) {
2186#line 69
2187 __ste_client_outbuffer1 = value;
2188 } else {
2189#line 70
2190 if (handle == 3) {
2191#line 71
2192 __ste_client_outbuffer2 = value;
2193 } else {
2194
2195 }
2196 }
2197 }
2198#line 901 "ClientLib.c"
2199 return;
2200}
2201}
2202#line 77 "ClientLib.c"
2203int __ste_ClientAddressBook_size0 = 0;
2204#line 79 "ClientLib.c"
2205int __ste_ClientAddressBook_size1 = 0;
2206#line 81 "ClientLib.c"
2207int __ste_ClientAddressBook_size2 = 0;
2208#line 84 "ClientLib.c"
2209int getClientAddressBookSize(int handle )
2210{ int retValue_acc ;
2211
2212 {
2213#line 93 "ClientLib.c"
2214 if (handle == 1) {
2215#line 928
2216 retValue_acc = __ste_ClientAddressBook_size0;
2217#line 930
2218 return (retValue_acc);
2219 } else {
2220#line 932
2221 if (handle == 2) {
2222#line 937
2223 retValue_acc = __ste_ClientAddressBook_size1;
2224#line 939
2225 return (retValue_acc);
2226 } else {
2227#line 941
2228 if (handle == 3) {
2229#line 946
2230 retValue_acc = __ste_ClientAddressBook_size2;
2231#line 948
2232 return (retValue_acc);
2233 } else {
2234#line 954 "ClientLib.c"
2235 retValue_acc = 0;
2236#line 956
2237 return (retValue_acc);
2238 }
2239 }
2240 }
2241#line 963 "ClientLib.c"
2242 return (retValue_acc);
2243}
2244}
2245#line 96 "ClientLib.c"
2246void setClientAddressBookSize(int handle , int value )
2247{
2248
2249 {
2250#line 104
2251 if (handle == 1) {
2252#line 98
2253 __ste_ClientAddressBook_size0 = value;
2254 } else {
2255#line 99
2256 if (handle == 2) {
2257#line 100
2258 __ste_ClientAddressBook_size1 = value;
2259 } else {
2260#line 101
2261 if (handle == 3) {
2262#line 102
2263 __ste_ClientAddressBook_size2 = value;
2264 } else {
2265
2266 }
2267 }
2268 }
2269#line 998 "ClientLib.c"
2270 return;
2271}
2272}
2273#line 106 "ClientLib.c"
2274int createClientAddressBookEntry(int handle )
2275{ int retValue_acc ;
2276 int size ;
2277 int tmp ;
2278 int __cil_tmp5 ;
2279
2280 {
2281 {
2282#line 107
2283 tmp = getClientAddressBookSize(handle);
2284#line 107
2285 size = tmp;
2286 }
2287#line 108 "ClientLib.c"
2288 if (size < 3) {
2289 {
2290#line 109 "ClientLib.c"
2291 __cil_tmp5 = size + 1;
2292#line 109
2293 setClientAddressBookSize(handle, __cil_tmp5);
2294#line 1025 "ClientLib.c"
2295 retValue_acc = size + 1;
2296 }
2297#line 1027
2298 return (retValue_acc);
2299 } else {
2300#line 1031 "ClientLib.c"
2301 retValue_acc = -1;
2302#line 1033
2303 return (retValue_acc);
2304 }
2305#line 1040 "ClientLib.c"
2306 return (retValue_acc);
2307}
2308}
2309#line 115 "ClientLib.c"
2310int __ste_Client_AddressBook0_Alias0 = 0;
2311#line 117 "ClientLib.c"
2312int __ste_Client_AddressBook0_Alias1 = 0;
2313#line 119 "ClientLib.c"
2314int __ste_Client_AddressBook0_Alias2 = 0;
2315#line 121 "ClientLib.c"
2316int __ste_Client_AddressBook1_Alias0 = 0;
2317#line 123 "ClientLib.c"
2318int __ste_Client_AddressBook1_Alias1 = 0;
2319#line 125 "ClientLib.c"
2320int __ste_Client_AddressBook1_Alias2 = 0;
2321#line 127 "ClientLib.c"
2322int __ste_Client_AddressBook2_Alias0 = 0;
2323#line 129 "ClientLib.c"
2324int __ste_Client_AddressBook2_Alias1 = 0;
2325#line 131 "ClientLib.c"
2326int __ste_Client_AddressBook2_Alias2 = 0;
2327#line 134 "ClientLib.c"
2328int getClientAddressBookAlias(int handle , int index )
2329{ int retValue_acc ;
2330
2331 {
2332#line 167
2333 if (handle == 1) {
2334#line 144 "ClientLib.c"
2335 if (index == 0) {
2336#line 1086
2337 retValue_acc = __ste_Client_AddressBook0_Alias0;
2338#line 1088
2339 return (retValue_acc);
2340 } else {
2341#line 1090
2342 if (index == 1) {
2343#line 1095
2344 retValue_acc = __ste_Client_AddressBook0_Alias1;
2345#line 1097
2346 return (retValue_acc);
2347 } else {
2348#line 1099
2349 if (index == 2) {
2350#line 1104
2351 retValue_acc = __ste_Client_AddressBook0_Alias2;
2352#line 1106
2353 return (retValue_acc);
2354 } else {
2355#line 1112
2356 retValue_acc = 0;
2357#line 1114
2358 return (retValue_acc);
2359 }
2360 }
2361 }
2362 } else {
2363#line 1116 "ClientLib.c"
2364 if (handle == 2) {
2365#line 154 "ClientLib.c"
2366 if (index == 0) {
2367#line 1124
2368 retValue_acc = __ste_Client_AddressBook1_Alias0;
2369#line 1126
2370 return (retValue_acc);
2371 } else {
2372#line 1128
2373 if (index == 1) {
2374#line 1133
2375 retValue_acc = __ste_Client_AddressBook1_Alias1;
2376#line 1135
2377 return (retValue_acc);
2378 } else {
2379#line 1137
2380 if (index == 2) {
2381#line 1142
2382 retValue_acc = __ste_Client_AddressBook1_Alias2;
2383#line 1144
2384 return (retValue_acc);
2385 } else {
2386#line 1150
2387 retValue_acc = 0;
2388#line 1152
2389 return (retValue_acc);
2390 }
2391 }
2392 }
2393 } else {
2394#line 1154 "ClientLib.c"
2395 if (handle == 3) {
2396#line 164 "ClientLib.c"
2397 if (index == 0) {
2398#line 1162
2399 retValue_acc = __ste_Client_AddressBook2_Alias0;
2400#line 1164
2401 return (retValue_acc);
2402 } else {
2403#line 1166
2404 if (index == 1) {
2405#line 1171
2406 retValue_acc = __ste_Client_AddressBook2_Alias1;
2407#line 1173
2408 return (retValue_acc);
2409 } else {
2410#line 1175
2411 if (index == 2) {
2412#line 1180
2413 retValue_acc = __ste_Client_AddressBook2_Alias2;
2414#line 1182
2415 return (retValue_acc);
2416 } else {
2417#line 1188
2418 retValue_acc = 0;
2419#line 1190
2420 return (retValue_acc);
2421 }
2422 }
2423 }
2424 } else {
2425#line 1196 "ClientLib.c"
2426 retValue_acc = 0;
2427#line 1198
2428 return (retValue_acc);
2429 }
2430 }
2431 }
2432#line 1205 "ClientLib.c"
2433 return (retValue_acc);
2434}
2435}
2436#line 171 "ClientLib.c"
2437int findClientAddressBookAlias(int handle , int userid )
2438{ int retValue_acc ;
2439
2440 {
2441#line 204
2442 if (handle == 1) {
2443#line 181 "ClientLib.c"
2444 if (userid == __ste_Client_AddressBook0_Alias0) {
2445#line 1233
2446 retValue_acc = 0;
2447#line 1235
2448 return (retValue_acc);
2449 } else {
2450#line 1237
2451 if (userid == __ste_Client_AddressBook0_Alias1) {
2452#line 1242
2453 retValue_acc = 1;
2454#line 1244
2455 return (retValue_acc);
2456 } else {
2457#line 1246
2458 if (userid == __ste_Client_AddressBook0_Alias2) {
2459#line 1251
2460 retValue_acc = 2;
2461#line 1253
2462 return (retValue_acc);
2463 } else {
2464#line 1259
2465 retValue_acc = -1;
2466#line 1261
2467 return (retValue_acc);
2468 }
2469 }
2470 }
2471 } else {
2472#line 1263 "ClientLib.c"
2473 if (handle == 2) {
2474#line 191 "ClientLib.c"
2475 if (userid == __ste_Client_AddressBook1_Alias0) {
2476#line 1271
2477 retValue_acc = 0;
2478#line 1273
2479 return (retValue_acc);
2480 } else {
2481#line 1275
2482 if (userid == __ste_Client_AddressBook1_Alias1) {
2483#line 1280
2484 retValue_acc = 1;
2485#line 1282
2486 return (retValue_acc);
2487 } else {
2488#line 1284
2489 if (userid == __ste_Client_AddressBook1_Alias2) {
2490#line 1289
2491 retValue_acc = 2;
2492#line 1291
2493 return (retValue_acc);
2494 } else {
2495#line 1297
2496 retValue_acc = -1;
2497#line 1299
2498 return (retValue_acc);
2499 }
2500 }
2501 }
2502 } else {
2503#line 1301 "ClientLib.c"
2504 if (handle == 3) {
2505#line 201 "ClientLib.c"
2506 if (userid == __ste_Client_AddressBook2_Alias0) {
2507#line 1309
2508 retValue_acc = 0;
2509#line 1311
2510 return (retValue_acc);
2511 } else {
2512#line 1313
2513 if (userid == __ste_Client_AddressBook2_Alias1) {
2514#line 1318
2515 retValue_acc = 1;
2516#line 1320
2517 return (retValue_acc);
2518 } else {
2519#line 1322
2520 if (userid == __ste_Client_AddressBook2_Alias2) {
2521#line 1327
2522 retValue_acc = 2;
2523#line 1329
2524 return (retValue_acc);
2525 } else {
2526#line 1335
2527 retValue_acc = -1;
2528#line 1337
2529 return (retValue_acc);
2530 }
2531 }
2532 }
2533 } else {
2534#line 1343 "ClientLib.c"
2535 retValue_acc = -1;
2536#line 1345
2537 return (retValue_acc);
2538 }
2539 }
2540 }
2541#line 1352 "ClientLib.c"
2542 return (retValue_acc);
2543}
2544}
2545#line 208 "ClientLib.c"
2546void setClientAddressBookAlias(int handle , int index , int value )
2547{
2548
2549 {
2550#line 234
2551 if (handle == 1) {
2552#line 217
2553 if (index == 0) {
2554#line 211
2555 __ste_Client_AddressBook0_Alias0 = value;
2556 } else {
2557#line 212
2558 if (index == 1) {
2559#line 213
2560 __ste_Client_AddressBook0_Alias1 = value;
2561 } else {
2562#line 214
2563 if (index == 2) {
2564#line 215
2565 __ste_Client_AddressBook0_Alias2 = value;
2566 } else {
2567
2568 }
2569 }
2570 }
2571 } else {
2572#line 216
2573 if (handle == 2) {
2574#line 225
2575 if (index == 0) {
2576#line 219
2577 __ste_Client_AddressBook1_Alias0 = value;
2578 } else {
2579#line 220
2580 if (index == 1) {
2581#line 221
2582 __ste_Client_AddressBook1_Alias1 = value;
2583 } else {
2584#line 222
2585 if (index == 2) {
2586#line 223
2587 __ste_Client_AddressBook1_Alias2 = value;
2588 } else {
2589
2590 }
2591 }
2592 }
2593 } else {
2594#line 224
2595 if (handle == 3) {
2596#line 233
2597 if (index == 0) {
2598#line 227
2599 __ste_Client_AddressBook2_Alias0 = value;
2600 } else {
2601#line 228
2602 if (index == 1) {
2603#line 229
2604 __ste_Client_AddressBook2_Alias1 = value;
2605 } else {
2606#line 230
2607 if (index == 2) {
2608#line 231
2609 __ste_Client_AddressBook2_Alias2 = value;
2610 } else {
2611
2612 }
2613 }
2614 }
2615 } else {
2616
2617 }
2618 }
2619 }
2620#line 1420 "ClientLib.c"
2621 return;
2622}
2623}
2624#line 236 "ClientLib.c"
2625int __ste_Client_AddressBook0_Address0 = 0;
2626#line 238 "ClientLib.c"
2627int __ste_Client_AddressBook0_Address1 = 0;
2628#line 240 "ClientLib.c"
2629int __ste_Client_AddressBook0_Address2 = 0;
2630#line 242 "ClientLib.c"
2631int __ste_Client_AddressBook1_Address0 = 0;
2632#line 244 "ClientLib.c"
2633int __ste_Client_AddressBook1_Address1 = 0;
2634#line 246 "ClientLib.c"
2635int __ste_Client_AddressBook1_Address2 = 0;
2636#line 248 "ClientLib.c"
2637int __ste_Client_AddressBook2_Address0 = 0;
2638#line 250 "ClientLib.c"
2639int __ste_Client_AddressBook2_Address1 = 0;
2640#line 252 "ClientLib.c"
2641int __ste_Client_AddressBook2_Address2 = 0;
2642#line 255 "ClientLib.c"
2643int getClientAddressBookAddress(int handle , int index )
2644{ int retValue_acc ;
2645
2646 {
2647#line 288
2648 if (handle == 1) {
2649#line 265 "ClientLib.c"
2650 if (index == 0) {
2651#line 1462
2652 retValue_acc = __ste_Client_AddressBook0_Address0;
2653#line 1464
2654 return (retValue_acc);
2655 } else {
2656#line 1466
2657 if (index == 1) {
2658#line 1471
2659 retValue_acc = __ste_Client_AddressBook0_Address1;
2660#line 1473
2661 return (retValue_acc);
2662 } else {
2663#line 1475
2664 if (index == 2) {
2665#line 1480
2666 retValue_acc = __ste_Client_AddressBook0_Address2;
2667#line 1482
2668 return (retValue_acc);
2669 } else {
2670#line 1488
2671 retValue_acc = 0;
2672#line 1490
2673 return (retValue_acc);
2674 }
2675 }
2676 }
2677 } else {
2678#line 1492 "ClientLib.c"
2679 if (handle == 2) {
2680#line 275 "ClientLib.c"
2681 if (index == 0) {
2682#line 1500
2683 retValue_acc = __ste_Client_AddressBook1_Address0;
2684#line 1502
2685 return (retValue_acc);
2686 } else {
2687#line 1504
2688 if (index == 1) {
2689#line 1509
2690 retValue_acc = __ste_Client_AddressBook1_Address1;
2691#line 1511
2692 return (retValue_acc);
2693 } else {
2694#line 1513
2695 if (index == 2) {
2696#line 1518
2697 retValue_acc = __ste_Client_AddressBook1_Address2;
2698#line 1520
2699 return (retValue_acc);
2700 } else {
2701#line 1526
2702 retValue_acc = 0;
2703#line 1528
2704 return (retValue_acc);
2705 }
2706 }
2707 }
2708 } else {
2709#line 1530 "ClientLib.c"
2710 if (handle == 3) {
2711#line 285 "ClientLib.c"
2712 if (index == 0) {
2713#line 1538
2714 retValue_acc = __ste_Client_AddressBook2_Address0;
2715#line 1540
2716 return (retValue_acc);
2717 } else {
2718#line 1542
2719 if (index == 1) {
2720#line 1547
2721 retValue_acc = __ste_Client_AddressBook2_Address1;
2722#line 1549
2723 return (retValue_acc);
2724 } else {
2725#line 1551
2726 if (index == 2) {
2727#line 1556
2728 retValue_acc = __ste_Client_AddressBook2_Address2;
2729#line 1558
2730 return (retValue_acc);
2731 } else {
2732#line 1564
2733 retValue_acc = 0;
2734#line 1566
2735 return (retValue_acc);
2736 }
2737 }
2738 }
2739 } else {
2740#line 1572 "ClientLib.c"
2741 retValue_acc = 0;
2742#line 1574
2743 return (retValue_acc);
2744 }
2745 }
2746 }
2747#line 1581 "ClientLib.c"
2748 return (retValue_acc);
2749}
2750}
2751#line 291 "ClientLib.c"
2752void setClientAddressBookAddress(int handle , int index , int value )
2753{
2754
2755 {
2756#line 317
2757 if (handle == 1) {
2758#line 300
2759 if (index == 0) {
2760#line 294
2761 __ste_Client_AddressBook0_Address0 = value;
2762 } else {
2763#line 295
2764 if (index == 1) {
2765#line 296
2766 __ste_Client_AddressBook0_Address1 = value;
2767 } else {
2768#line 297
2769 if (index == 2) {
2770#line 298
2771 __ste_Client_AddressBook0_Address2 = value;
2772 } else {
2773
2774 }
2775 }
2776 }
2777 } else {
2778#line 299
2779 if (handle == 2) {
2780#line 308
2781 if (index == 0) {
2782#line 302
2783 __ste_Client_AddressBook1_Address0 = value;
2784 } else {
2785#line 303
2786 if (index == 1) {
2787#line 304
2788 __ste_Client_AddressBook1_Address1 = value;
2789 } else {
2790#line 305
2791 if (index == 2) {
2792#line 306
2793 __ste_Client_AddressBook1_Address2 = value;
2794 } else {
2795
2796 }
2797 }
2798 }
2799 } else {
2800#line 307
2801 if (handle == 3) {
2802#line 316
2803 if (index == 0) {
2804#line 310
2805 __ste_Client_AddressBook2_Address0 = value;
2806 } else {
2807#line 311
2808 if (index == 1) {
2809#line 312
2810 __ste_Client_AddressBook2_Address1 = value;
2811 } else {
2812#line 313
2813 if (index == 2) {
2814#line 314
2815 __ste_Client_AddressBook2_Address2 = value;
2816 } else {
2817
2818 }
2819 }
2820 }
2821 } else {
2822
2823 }
2824 }
2825 }
2826#line 1649 "ClientLib.c"
2827 return;
2828}
2829}
2830#line 319 "ClientLib.c"
2831int __ste_client_autoResponse0 = 0;
2832#line 321 "ClientLib.c"
2833int __ste_client_autoResponse1 = 0;
2834#line 323 "ClientLib.c"
2835int __ste_client_autoResponse2 = 0;
2836#line 326 "ClientLib.c"
2837int getClientAutoResponse(int handle )
2838{ int retValue_acc ;
2839
2840 {
2841#line 335 "ClientLib.c"
2842 if (handle == 1) {
2843#line 1676
2844 retValue_acc = __ste_client_autoResponse0;
2845#line 1678
2846 return (retValue_acc);
2847 } else {
2848#line 1680
2849 if (handle == 2) {
2850#line 1685
2851 retValue_acc = __ste_client_autoResponse1;
2852#line 1687
2853 return (retValue_acc);
2854 } else {
2855#line 1689
2856 if (handle == 3) {
2857#line 1694
2858 retValue_acc = __ste_client_autoResponse2;
2859#line 1696
2860 return (retValue_acc);
2861 } else {
2862#line 1702 "ClientLib.c"
2863 retValue_acc = -1;
2864#line 1704
2865 return (retValue_acc);
2866 }
2867 }
2868 }
2869#line 1711 "ClientLib.c"
2870 return (retValue_acc);
2871}
2872}
2873#line 338 "ClientLib.c"
2874void setClientAutoResponse(int handle , int value )
2875{
2876
2877 {
2878#line 346
2879 if (handle == 1) {
2880#line 340
2881 __ste_client_autoResponse0 = value;
2882 } else {
2883#line 341
2884 if (handle == 2) {
2885#line 342
2886 __ste_client_autoResponse1 = value;
2887 } else {
2888#line 343
2889 if (handle == 3) {
2890#line 344
2891 __ste_client_autoResponse2 = value;
2892 } else {
2893
2894 }
2895 }
2896 }
2897#line 1746 "ClientLib.c"
2898 return;
2899}
2900}
2901#line 348 "ClientLib.c"
2902int __ste_client_privateKey0 = 0;
2903#line 350 "ClientLib.c"
2904int __ste_client_privateKey1 = 0;
2905#line 352 "ClientLib.c"
2906int __ste_client_privateKey2 = 0;
2907#line 355 "ClientLib.c"
2908int getClientPrivateKey(int handle )
2909{ int retValue_acc ;
2910
2911 {
2912#line 364 "ClientLib.c"
2913 if (handle == 1) {
2914#line 1773
2915 retValue_acc = __ste_client_privateKey0;
2916#line 1775
2917 return (retValue_acc);
2918 } else {
2919#line 1777
2920 if (handle == 2) {
2921#line 1782
2922 retValue_acc = __ste_client_privateKey1;
2923#line 1784
2924 return (retValue_acc);
2925 } else {
2926#line 1786
2927 if (handle == 3) {
2928#line 1791
2929 retValue_acc = __ste_client_privateKey2;
2930#line 1793
2931 return (retValue_acc);
2932 } else {
2933#line 1799 "ClientLib.c"
2934 retValue_acc = 0;
2935#line 1801
2936 return (retValue_acc);
2937 }
2938 }
2939 }
2940#line 1808 "ClientLib.c"
2941 return (retValue_acc);
2942}
2943}
2944#line 367 "ClientLib.c"
2945void setClientPrivateKey(int handle , int value )
2946{
2947
2948 {
2949#line 375
2950 if (handle == 1) {
2951#line 369
2952 __ste_client_privateKey0 = value;
2953 } else {
2954#line 370
2955 if (handle == 2) {
2956#line 371
2957 __ste_client_privateKey1 = value;
2958 } else {
2959#line 372
2960 if (handle == 3) {
2961#line 373
2962 __ste_client_privateKey2 = value;
2963 } else {
2964
2965 }
2966 }
2967 }
2968#line 1843 "ClientLib.c"
2969 return;
2970}
2971}
2972#line 377 "ClientLib.c"
2973int __ste_ClientKeyring_size0 = 0;
2974#line 379 "ClientLib.c"
2975int __ste_ClientKeyring_size1 = 0;
2976#line 381 "ClientLib.c"
2977int __ste_ClientKeyring_size2 = 0;
2978#line 384 "ClientLib.c"
2979int getClientKeyringSize(int handle )
2980{ int retValue_acc ;
2981
2982 {
2983#line 393 "ClientLib.c"
2984 if (handle == 1) {
2985#line 1870
2986 retValue_acc = __ste_ClientKeyring_size0;
2987#line 1872
2988 return (retValue_acc);
2989 } else {
2990#line 1874
2991 if (handle == 2) {
2992#line 1879
2993 retValue_acc = __ste_ClientKeyring_size1;
2994#line 1881
2995 return (retValue_acc);
2996 } else {
2997#line 1883
2998 if (handle == 3) {
2999#line 1888
3000 retValue_acc = __ste_ClientKeyring_size2;
3001#line 1890
3002 return (retValue_acc);
3003 } else {
3004#line 1896 "ClientLib.c"
3005 retValue_acc = 0;
3006#line 1898
3007 return (retValue_acc);
3008 }
3009 }
3010 }
3011#line 1905 "ClientLib.c"
3012 return (retValue_acc);
3013}
3014}
3015#line 396 "ClientLib.c"
3016void setClientKeyringSize(int handle , int value )
3017{
3018
3019 {
3020#line 404
3021 if (handle == 1) {
3022#line 398
3023 __ste_ClientKeyring_size0 = value;
3024 } else {
3025#line 399
3026 if (handle == 2) {
3027#line 400
3028 __ste_ClientKeyring_size1 = value;
3029 } else {
3030#line 401
3031 if (handle == 3) {
3032#line 402
3033 __ste_ClientKeyring_size2 = value;
3034 } else {
3035
3036 }
3037 }
3038 }
3039#line 1940 "ClientLib.c"
3040 return;
3041}
3042}
3043#line 406 "ClientLib.c"
3044int createClientKeyringEntry(int handle )
3045{ int retValue_acc ;
3046 int size ;
3047 int tmp ;
3048 int __cil_tmp5 ;
3049
3050 {
3051 {
3052#line 407
3053 tmp = getClientKeyringSize(handle);
3054#line 407
3055 size = tmp;
3056 }
3057#line 408 "ClientLib.c"
3058 if (size < 2) {
3059 {
3060#line 409 "ClientLib.c"
3061 __cil_tmp5 = size + 1;
3062#line 409
3063 setClientKeyringSize(handle, __cil_tmp5);
3064#line 1967 "ClientLib.c"
3065 retValue_acc = size + 1;
3066 }
3067#line 1969
3068 return (retValue_acc);
3069 } else {
3070#line 1973 "ClientLib.c"
3071 retValue_acc = -1;
3072#line 1975
3073 return (retValue_acc);
3074 }
3075#line 1982 "ClientLib.c"
3076 return (retValue_acc);
3077}
3078}
3079#line 414 "ClientLib.c"
3080int __ste_Client_Keyring0_User0 = 0;
3081#line 416 "ClientLib.c"
3082int __ste_Client_Keyring0_User1 = 0;
3083#line 418 "ClientLib.c"
3084int __ste_Client_Keyring0_User2 = 0;
3085#line 420 "ClientLib.c"
3086int __ste_Client_Keyring1_User0 = 0;
3087#line 422 "ClientLib.c"
3088int __ste_Client_Keyring1_User1 = 0;
3089#line 424 "ClientLib.c"
3090int __ste_Client_Keyring1_User2 = 0;
3091#line 426 "ClientLib.c"
3092int __ste_Client_Keyring2_User0 = 0;
3093#line 428 "ClientLib.c"
3094int __ste_Client_Keyring2_User1 = 0;
3095#line 430 "ClientLib.c"
3096int __ste_Client_Keyring2_User2 = 0;
3097#line 433 "ClientLib.c"
3098int getClientKeyringUser(int handle , int index )
3099{ int retValue_acc ;
3100
3101 {
3102#line 466
3103 if (handle == 1) {
3104#line 443 "ClientLib.c"
3105 if (index == 0) {
3106#line 2028
3107 retValue_acc = __ste_Client_Keyring0_User0;
3108#line 2030
3109 return (retValue_acc);
3110 } else {
3111#line 2032
3112 if (index == 1) {
3113#line 2037
3114 retValue_acc = __ste_Client_Keyring0_User1;
3115#line 2039
3116 return (retValue_acc);
3117 } else {
3118#line 2045
3119 retValue_acc = 0;
3120#line 2047
3121 return (retValue_acc);
3122 }
3123 }
3124 } else {
3125#line 2049 "ClientLib.c"
3126 if (handle == 2) {
3127#line 453 "ClientLib.c"
3128 if (index == 0) {
3129#line 2057
3130 retValue_acc = __ste_Client_Keyring1_User0;
3131#line 2059
3132 return (retValue_acc);
3133 } else {
3134#line 2061
3135 if (index == 1) {
3136#line 2066
3137 retValue_acc = __ste_Client_Keyring1_User1;
3138#line 2068
3139 return (retValue_acc);
3140 } else {
3141#line 2074
3142 retValue_acc = 0;
3143#line 2076
3144 return (retValue_acc);
3145 }
3146 }
3147 } else {
3148#line 2078 "ClientLib.c"
3149 if (handle == 3) {
3150#line 463 "ClientLib.c"
3151 if (index == 0) {
3152#line 2086
3153 retValue_acc = __ste_Client_Keyring2_User0;
3154#line 2088
3155 return (retValue_acc);
3156 } else {
3157#line 2090
3158 if (index == 1) {
3159#line 2095
3160 retValue_acc = __ste_Client_Keyring2_User1;
3161#line 2097
3162 return (retValue_acc);
3163 } else {
3164#line 2103
3165 retValue_acc = 0;
3166#line 2105
3167 return (retValue_acc);
3168 }
3169 }
3170 } else {
3171#line 2111 "ClientLib.c"
3172 retValue_acc = 0;
3173#line 2113
3174 return (retValue_acc);
3175 }
3176 }
3177 }
3178#line 2120 "ClientLib.c"
3179 return (retValue_acc);
3180}
3181}
3182#line 473 "ClientLib.c"
3183void setClientKeyringUser(int handle , int index , int value )
3184{
3185
3186 {
3187#line 499
3188 if (handle == 1) {
3189#line 482
3190 if (index == 0) {
3191#line 476
3192 __ste_Client_Keyring0_User0 = value;
3193 } else {
3194#line 477
3195 if (index == 1) {
3196#line 478
3197 __ste_Client_Keyring0_User1 = value;
3198 } else {
3199
3200 }
3201 }
3202 } else {
3203#line 479
3204 if (handle == 2) {
3205#line 490
3206 if (index == 0) {
3207#line 484
3208 __ste_Client_Keyring1_User0 = value;
3209 } else {
3210#line 485
3211 if (index == 1) {
3212#line 486
3213 __ste_Client_Keyring1_User1 = value;
3214 } else {
3215
3216 }
3217 }
3218 } else {
3219#line 487
3220 if (handle == 3) {
3221#line 498
3222 if (index == 0) {
3223#line 492
3224 __ste_Client_Keyring2_User0 = value;
3225 } else {
3226#line 493
3227 if (index == 1) {
3228#line 494
3229 __ste_Client_Keyring2_User1 = value;
3230 } else {
3231
3232 }
3233 }
3234 } else {
3235
3236 }
3237 }
3238 }
3239#line 2176 "ClientLib.c"
3240 return;
3241}
3242}
3243#line 501 "ClientLib.c"
3244int __ste_Client_Keyring0_PublicKey0 = 0;
3245#line 503 "ClientLib.c"
3246int __ste_Client_Keyring0_PublicKey1 = 0;
3247#line 505 "ClientLib.c"
3248int __ste_Client_Keyring0_PublicKey2 = 0;
3249#line 507 "ClientLib.c"
3250int __ste_Client_Keyring1_PublicKey0 = 0;
3251#line 509 "ClientLib.c"
3252int __ste_Client_Keyring1_PublicKey1 = 0;
3253#line 511 "ClientLib.c"
3254int __ste_Client_Keyring1_PublicKey2 = 0;
3255#line 513 "ClientLib.c"
3256int __ste_Client_Keyring2_PublicKey0 = 0;
3257#line 515 "ClientLib.c"
3258int __ste_Client_Keyring2_PublicKey1 = 0;
3259#line 517 "ClientLib.c"
3260int __ste_Client_Keyring2_PublicKey2 = 0;
3261#line 520 "ClientLib.c"
3262int getClientKeyringPublicKey(int handle , int index )
3263{ int retValue_acc ;
3264
3265 {
3266#line 553
3267 if (handle == 1) {
3268#line 530 "ClientLib.c"
3269 if (index == 0) {
3270#line 2218
3271 retValue_acc = __ste_Client_Keyring0_PublicKey0;
3272#line 2220
3273 return (retValue_acc);
3274 } else {
3275#line 2222
3276 if (index == 1) {
3277#line 2227
3278 retValue_acc = __ste_Client_Keyring0_PublicKey1;
3279#line 2229
3280 return (retValue_acc);
3281 } else {
3282#line 2235
3283 retValue_acc = 0;
3284#line 2237
3285 return (retValue_acc);
3286 }
3287 }
3288 } else {
3289#line 2239 "ClientLib.c"
3290 if (handle == 2) {
3291#line 540 "ClientLib.c"
3292 if (index == 0) {
3293#line 2247
3294 retValue_acc = __ste_Client_Keyring1_PublicKey0;
3295#line 2249
3296 return (retValue_acc);
3297 } else {
3298#line 2251
3299 if (index == 1) {
3300#line 2256
3301 retValue_acc = __ste_Client_Keyring1_PublicKey1;
3302#line 2258
3303 return (retValue_acc);
3304 } else {
3305#line 2264
3306 retValue_acc = 0;
3307#line 2266
3308 return (retValue_acc);
3309 }
3310 }
3311 } else {
3312#line 2268 "ClientLib.c"
3313 if (handle == 3) {
3314#line 550 "ClientLib.c"
3315 if (index == 0) {
3316#line 2276
3317 retValue_acc = __ste_Client_Keyring2_PublicKey0;
3318#line 2278
3319 return (retValue_acc);
3320 } else {
3321#line 2280
3322 if (index == 1) {
3323#line 2285
3324 retValue_acc = __ste_Client_Keyring2_PublicKey1;
3325#line 2287
3326 return (retValue_acc);
3327 } else {
3328#line 2293
3329 retValue_acc = 0;
3330#line 2295
3331 return (retValue_acc);
3332 }
3333 }
3334 } else {
3335#line 2301 "ClientLib.c"
3336 retValue_acc = 0;
3337#line 2303
3338 return (retValue_acc);
3339 }
3340 }
3341 }
3342#line 2310 "ClientLib.c"
3343 return (retValue_acc);
3344}
3345}
3346#line 557 "ClientLib.c"
3347int findPublicKey(int handle , int userid )
3348{ int retValue_acc ;
3349
3350 {
3351#line 591
3352 if (handle == 1) {
3353#line 568 "ClientLib.c"
3354 if (userid == __ste_Client_Keyring0_User0) {
3355#line 2338
3356 retValue_acc = __ste_Client_Keyring0_PublicKey0;
3357#line 2340
3358 return (retValue_acc);
3359 } else {
3360#line 2342
3361 if (userid == __ste_Client_Keyring0_User1) {
3362#line 2347
3363 retValue_acc = __ste_Client_Keyring0_PublicKey1;
3364#line 2349
3365 return (retValue_acc);
3366 } else {
3367#line 2355
3368 retValue_acc = 0;
3369#line 2357
3370 return (retValue_acc);
3371 }
3372 }
3373 } else {
3374#line 2359 "ClientLib.c"
3375 if (handle == 2) {
3376#line 578 "ClientLib.c"
3377 if (userid == __ste_Client_Keyring1_User0) {
3378#line 2367
3379 retValue_acc = __ste_Client_Keyring1_PublicKey0;
3380#line 2369
3381 return (retValue_acc);
3382 } else {
3383#line 2371
3384 if (userid == __ste_Client_Keyring1_User1) {
3385#line 2376
3386 retValue_acc = __ste_Client_Keyring1_PublicKey1;
3387#line 2378
3388 return (retValue_acc);
3389 } else {
3390#line 2384
3391 retValue_acc = 0;
3392#line 2386
3393 return (retValue_acc);
3394 }
3395 }
3396 } else {
3397#line 2388 "ClientLib.c"
3398 if (handle == 3) {
3399#line 588 "ClientLib.c"
3400 if (userid == __ste_Client_Keyring2_User0) {
3401#line 2396
3402 retValue_acc = __ste_Client_Keyring2_PublicKey0;
3403#line 2398
3404 return (retValue_acc);
3405 } else {
3406#line 2400
3407 if (userid == __ste_Client_Keyring2_User1) {
3408#line 2405
3409 retValue_acc = __ste_Client_Keyring2_PublicKey1;
3410#line 2407
3411 return (retValue_acc);
3412 } else {
3413#line 2413
3414 retValue_acc = 0;
3415#line 2415
3416 return (retValue_acc);
3417 }
3418 }
3419 } else {
3420#line 2421 "ClientLib.c"
3421 retValue_acc = 0;
3422#line 2423
3423 return (retValue_acc);
3424 }
3425 }
3426 }
3427#line 2430 "ClientLib.c"
3428 return (retValue_acc);
3429}
3430}
3431#line 595 "ClientLib.c"
3432void setClientKeyringPublicKey(int handle , int index , int value )
3433{
3434
3435 {
3436#line 621
3437 if (handle == 1) {
3438#line 604
3439 if (index == 0) {
3440#line 598
3441 __ste_Client_Keyring0_PublicKey0 = value;
3442 } else {
3443#line 599
3444 if (index == 1) {
3445#line 600
3446 __ste_Client_Keyring0_PublicKey1 = value;
3447 } else {
3448
3449 }
3450 }
3451 } else {
3452#line 601
3453 if (handle == 2) {
3454#line 612
3455 if (index == 0) {
3456#line 606
3457 __ste_Client_Keyring1_PublicKey0 = value;
3458 } else {
3459#line 607
3460 if (index == 1) {
3461#line 608
3462 __ste_Client_Keyring1_PublicKey1 = value;
3463 } else {
3464
3465 }
3466 }
3467 } else {
3468#line 609
3469 if (handle == 3) {
3470#line 620
3471 if (index == 0) {
3472#line 614
3473 __ste_Client_Keyring2_PublicKey0 = value;
3474 } else {
3475#line 615
3476 if (index == 1) {
3477#line 616
3478 __ste_Client_Keyring2_PublicKey1 = value;
3479 } else {
3480
3481 }
3482 }
3483 } else {
3484
3485 }
3486 }
3487 }
3488#line 2486 "ClientLib.c"
3489 return;
3490}
3491}
3492#line 623 "ClientLib.c"
3493int __ste_client_forwardReceiver0 = 0;
3494#line 625 "ClientLib.c"
3495int __ste_client_forwardReceiver1 = 0;
3496#line 627 "ClientLib.c"
3497int __ste_client_forwardReceiver2 = 0;
3498#line 629 "ClientLib.c"
3499int __ste_client_forwardReceiver3 = 0;
3500#line 631 "ClientLib.c"
3501int getClientForwardReceiver(int handle )
3502{ int retValue_acc ;
3503
3504 {
3505#line 640 "ClientLib.c"
3506 if (handle == 1) {
3507#line 2515
3508 retValue_acc = __ste_client_forwardReceiver0;
3509#line 2517
3510 return (retValue_acc);
3511 } else {
3512#line 2519
3513 if (handle == 2) {
3514#line 2524
3515 retValue_acc = __ste_client_forwardReceiver1;
3516#line 2526
3517 return (retValue_acc);
3518 } else {
3519#line 2528
3520 if (handle == 3) {
3521#line 2533
3522 retValue_acc = __ste_client_forwardReceiver2;
3523#line 2535
3524 return (retValue_acc);
3525 } else {
3526#line 2541 "ClientLib.c"
3527 retValue_acc = 0;
3528#line 2543
3529 return (retValue_acc);
3530 }
3531 }
3532 }
3533#line 2550 "ClientLib.c"
3534 return (retValue_acc);
3535}
3536}
3537#line 643 "ClientLib.c"
3538void setClientForwardReceiver(int handle , int value )
3539{
3540
3541 {
3542#line 651
3543 if (handle == 1) {
3544#line 645
3545 __ste_client_forwardReceiver0 = value;
3546 } else {
3547#line 646
3548 if (handle == 2) {
3549#line 647
3550 __ste_client_forwardReceiver1 = value;
3551 } else {
3552#line 648
3553 if (handle == 3) {
3554#line 649
3555 __ste_client_forwardReceiver2 = value;
3556 } else {
3557
3558 }
3559 }
3560 }
3561#line 2585 "ClientLib.c"
3562 return;
3563}
3564}
3565#line 653 "ClientLib.c"
3566int __ste_client_idCounter0 = 0;
3567#line 655 "ClientLib.c"
3568int __ste_client_idCounter1 = 0;
3569#line 657 "ClientLib.c"
3570int __ste_client_idCounter2 = 0;
3571#line 660 "ClientLib.c"
3572int getClientId(int handle )
3573{ int retValue_acc ;
3574
3575 {
3576#line 669 "ClientLib.c"
3577 if (handle == 1) {
3578#line 2612
3579 retValue_acc = __ste_client_idCounter0;
3580#line 2614
3581 return (retValue_acc);
3582 } else {
3583#line 2616
3584 if (handle == 2) {
3585#line 2621
3586 retValue_acc = __ste_client_idCounter1;
3587#line 2623
3588 return (retValue_acc);
3589 } else {
3590#line 2625
3591 if (handle == 3) {
3592#line 2630
3593 retValue_acc = __ste_client_idCounter2;
3594#line 2632
3595 return (retValue_acc);
3596 } else {
3597#line 2638 "ClientLib.c"
3598 retValue_acc = 0;
3599#line 2640
3600 return (retValue_acc);
3601 }
3602 }
3603 }
3604#line 2647 "ClientLib.c"
3605 return (retValue_acc);
3606}
3607}
3608#line 672 "ClientLib.c"
3609void setClientId(int handle , int value )
3610{
3611
3612 {
3613#line 680
3614 if (handle == 1) {
3615#line 674
3616 __ste_client_idCounter0 = value;
3617 } else {
3618#line 675
3619 if (handle == 2) {
3620#line 676
3621 __ste_client_idCounter1 = value;
3622 } else {
3623#line 677
3624 if (handle == 3) {
3625#line 678
3626 __ste_client_idCounter2 = value;
3627 } else {
3628
3629 }
3630 }
3631 }
3632#line 2682 "ClientLib.c"
3633 return;
3634}
3635}
3636#line 1 "Email.o"
3637#pragma merger(0,"Email.i","")
3638#line 6 "EmailLib.h"
3639int getEmailId(int handle ) ;
3640#line 42
3641int isVerified(int handle ) ;
3642#line 15 "Email.h"
3643int cloneEmail(int msg ) ;
3644#line 9 "Email.c"
3645void printMail__wrappee__Keys(int msg )
3646{ int tmp ;
3647 int tmp___0 ;
3648 int tmp___1 ;
3649 int tmp___2 ;
3650 char const * __restrict __cil_tmp6 ;
3651 char const * __restrict __cil_tmp7 ;
3652 char const * __restrict __cil_tmp8 ;
3653 char const * __restrict __cil_tmp9 ;
3654
3655 {
3656 {
3657#line 10
3658 tmp = getEmailId(msg);
3659#line 10
3660 __cil_tmp6 = (char const * __restrict )"ID:\n %i\n";
3661#line 10
3662 printf(__cil_tmp6, tmp);
3663#line 11
3664 tmp___0 = getEmailFrom(msg);
3665#line 11
3666 __cil_tmp7 = (char const * __restrict )"FROM:\n %i\n";
3667#line 11
3668 printf(__cil_tmp7, tmp___0);
3669#line 12
3670 tmp___1 = getEmailTo(msg);
3671#line 12
3672 __cil_tmp8 = (char const * __restrict )"TO:\n %i\n";
3673#line 12
3674 printf(__cil_tmp8, tmp___1);
3675#line 13
3676 tmp___2 = isReadable(msg);
3677#line 13
3678 __cil_tmp9 = (char const * __restrict )"IS_READABLE\n %i\n";
3679#line 13
3680 printf(__cil_tmp9, tmp___2);
3681 }
3682#line 601 "Email.c"
3683 return;
3684}
3685}
3686#line 17 "Email.c"
3687void printMail__wrappee__AutoResponder(int msg )
3688{ int tmp ;
3689 int tmp___0 ;
3690 char const * __restrict __cil_tmp4 ;
3691 char const * __restrict __cil_tmp5 ;
3692
3693 {
3694 {
3695#line 18
3696 printMail__wrappee__Keys(msg);
3697#line 19
3698 tmp = isEncrypted(msg);
3699#line 19
3700 __cil_tmp4 = (char const * __restrict )"ENCRYPTED\n %d\n";
3701#line 19
3702 printf(__cil_tmp4, tmp);
3703#line 20
3704 tmp___0 = getEmailEncryptionKey(msg);
3705#line 20
3706 __cil_tmp5 = (char const * __restrict )"ENCRYPTION KEY\n %d\n";
3707#line 20
3708 printf(__cil_tmp5, tmp___0);
3709 }
3710#line 625 "Email.c"
3711 return;
3712}
3713}
3714#line 26 "Email.c"
3715void printMail__wrappee__Forward(int msg )
3716{ int tmp ;
3717 int tmp___0 ;
3718 char const * __restrict __cil_tmp4 ;
3719 char const * __restrict __cil_tmp5 ;
3720
3721 {
3722 {
3723#line 27
3724 printMail__wrappee__AutoResponder(msg);
3725#line 28
3726 tmp = isSigned(msg);
3727#line 28
3728 __cil_tmp4 = (char const * __restrict )"SIGNED\n %i\n";
3729#line 28
3730 printf(__cil_tmp4, tmp);
3731#line 29
3732 tmp___0 = getEmailSignKey(msg);
3733#line 29
3734 __cil_tmp5 = (char const * __restrict )"SIGNATURE\n %i\n";
3735#line 29
3736 printf(__cil_tmp5, tmp___0);
3737 }
3738#line 649 "Email.c"
3739 return;
3740}
3741}
3742#line 33 "Email.c"
3743void printMail(int msg )
3744{ int tmp ;
3745 char const * __restrict __cil_tmp3 ;
3746
3747 {
3748 {
3749#line 34
3750 printMail__wrappee__Forward(msg);
3751#line 35
3752 tmp = isVerified(msg);
3753#line 35
3754 __cil_tmp3 = (char const * __restrict )"SIGNATURE VERIFIED\n %d\n";
3755#line 35
3756 printf(__cil_tmp3, tmp);
3757 }
3758#line 671 "Email.c"
3759 return;
3760}
3761}
3762#line 41 "Email.c"
3763int isReadable__wrappee__Keys(int msg )
3764{ int retValue_acc ;
3765
3766 {
3767#line 689 "Email.c"
3768 retValue_acc = 1;
3769#line 691
3770 return (retValue_acc);
3771#line 698
3772 return (retValue_acc);
3773}
3774}
3775#line 49 "Email.c"
3776int isReadable(int msg )
3777{ int retValue_acc ;
3778 int tmp ;
3779
3780 {
3781 {
3782#line 53
3783 tmp = isEncrypted(msg);
3784 }
3785#line 53 "Email.c"
3786 if (tmp) {
3787#line 727
3788 retValue_acc = 0;
3789#line 729
3790 return (retValue_acc);
3791 } else {
3792 {
3793#line 721 "Email.c"
3794 retValue_acc = isReadable__wrappee__Keys(msg);
3795 }
3796#line 723
3797 return (retValue_acc);
3798 }
3799#line 736 "Email.c"
3800 return (retValue_acc);
3801}
3802}
3803#line 57 "Email.c"
3804int cloneEmail(int msg )
3805{ int retValue_acc ;
3806
3807 {
3808#line 758 "Email.c"
3809 retValue_acc = msg;
3810#line 760
3811 return (retValue_acc);
3812#line 767
3813 return (retValue_acc);
3814}
3815}
3816#line 62 "Email.c"
3817int createEmail(int from , int to )
3818{ int retValue_acc ;
3819 int msg ;
3820
3821 {
3822 {
3823#line 63
3824 msg = 1;
3825#line 64
3826 setEmailFrom(msg, from);
3827#line 65
3828 setEmailTo(msg, to);
3829#line 797 "Email.c"
3830 retValue_acc = msg;
3831 }
3832#line 799
3833 return (retValue_acc);
3834#line 806
3835 return (retValue_acc);
3836}
3837}
3838#line 1 "Util.o"
3839#pragma merger(0,"Util.i","")
3840#line 1 "Util.h"
3841int prompt(char *msg ) ;
3842#line 9 "Util.c"
3843int prompt(char *msg )
3844{ int retValue_acc ;
3845 int retval ;
3846 char const * __restrict __cil_tmp4 ;
3847
3848 {
3849 {
3850#line 10
3851 __cil_tmp4 = (char const * __restrict )"%s\n";
3852#line 10
3853 printf(__cil_tmp4, msg);
3854#line 518 "Util.c"
3855 retValue_acc = retval;
3856 }
3857#line 520
3858 return (retValue_acc);
3859#line 527
3860 return (retValue_acc);
3861}
3862}
3863#line 1 "SignForward_spec.o"
3864#pragma merger(0,"SignForward_spec.i","")
3865#line 13 "SignForward_spec.c"
3866void __utac_acc__SignForward_spec__1(int client , int msg )
3867{ int tmp ;
3868 int tmp___0 ;
3869
3870 {
3871 {
3872#line 15
3873 puts("before mail\n");
3874#line 16
3875 tmp___0 = isSigned(msg);
3876 }
3877#line 16
3878 if (tmp___0) {
3879 {
3880#line 20
3881 tmp = getClientPrivateKey(client);
3882 }
3883#line 20
3884 if (tmp == 0) {
3885 {
3886#line 18
3887 __automaton_fail();
3888 }
3889 } else {
3890
3891 }
3892 } else {
3893
3894 }
3895#line 18
3896 return;
3897}
3898}
3899#line 1 "EmailLib.o"
3900#pragma merger(0,"EmailLib.i","")
3901#line 4 "EmailLib.h"
3902int initEmail(void) ;
3903#line 8
3904void setEmailId(int handle , int value ) ;
3905#line 18
3906char *getEmailSubject(int handle ) ;
3907#line 20
3908void setEmailSubject(int handle , char *value ) ;
3909#line 22
3910char *getEmailBody(int handle ) ;
3911#line 24
3912void setEmailBody(int handle , char *value ) ;
3913#line 5 "EmailLib.c"
3914int __ste_Email_counter = 0;
3915#line 7 "EmailLib.c"
3916int initEmail(void)
3917{ int retValue_acc ;
3918
3919 {
3920#line 12 "EmailLib.c"
3921 if (__ste_Email_counter < 2) {
3922#line 670
3923 __ste_Email_counter = __ste_Email_counter + 1;
3924#line 670
3925 retValue_acc = __ste_Email_counter;
3926#line 672
3927 return (retValue_acc);
3928 } else {
3929#line 678 "EmailLib.c"
3930 retValue_acc = -1;
3931#line 680
3932 return (retValue_acc);
3933 }
3934#line 687 "EmailLib.c"
3935 return (retValue_acc);
3936}
3937}
3938#line 15 "EmailLib.c"
3939int __ste_email_id0 = 0;
3940#line 17 "EmailLib.c"
3941int __ste_email_id1 = 0;
3942#line 19 "EmailLib.c"
3943int getEmailId(int handle )
3944{ int retValue_acc ;
3945
3946 {
3947#line 26 "EmailLib.c"
3948 if (handle == 1) {
3949#line 716
3950 retValue_acc = __ste_email_id0;
3951#line 718
3952 return (retValue_acc);
3953 } else {
3954#line 720
3955 if (handle == 2) {
3956#line 725
3957 retValue_acc = __ste_email_id1;
3958#line 727
3959 return (retValue_acc);
3960 } else {
3961#line 733 "EmailLib.c"
3962 retValue_acc = 0;
3963#line 735
3964 return (retValue_acc);
3965 }
3966 }
3967#line 742 "EmailLib.c"
3968 return (retValue_acc);
3969}
3970}
3971#line 29 "EmailLib.c"
3972void setEmailId(int handle , int value )
3973{
3974
3975 {
3976#line 35
3977 if (handle == 1) {
3978#line 31
3979 __ste_email_id0 = value;
3980 } else {
3981#line 32
3982 if (handle == 2) {
3983#line 33
3984 __ste_email_id1 = value;
3985 } else {
3986
3987 }
3988 }
3989#line 773 "EmailLib.c"
3990 return;
3991}
3992}
3993#line 37 "EmailLib.c"
3994int __ste_email_from0 = 0;
3995#line 39 "EmailLib.c"
3996int __ste_email_from1 = 0;
3997#line 41 "EmailLib.c"
3998int getEmailFrom(int handle )
3999{ int retValue_acc ;
4000
4001 {
4002#line 48 "EmailLib.c"
4003 if (handle == 1) {
4004#line 798
4005 retValue_acc = __ste_email_from0;
4006#line 800
4007 return (retValue_acc);
4008 } else {
4009#line 802
4010 if (handle == 2) {
4011#line 807
4012 retValue_acc = __ste_email_from1;
4013#line 809
4014 return (retValue_acc);
4015 } else {
4016#line 815 "EmailLib.c"
4017 retValue_acc = 0;
4018#line 817
4019 return (retValue_acc);
4020 }
4021 }
4022#line 824 "EmailLib.c"
4023 return (retValue_acc);
4024}
4025}
4026#line 51 "EmailLib.c"
4027void setEmailFrom(int handle , int value )
4028{
4029
4030 {
4031#line 57
4032 if (handle == 1) {
4033#line 53
4034 __ste_email_from0 = value;
4035 } else {
4036#line 54
4037 if (handle == 2) {
4038#line 55
4039 __ste_email_from1 = value;
4040 } else {
4041
4042 }
4043 }
4044#line 855 "EmailLib.c"
4045 return;
4046}
4047}
4048#line 59 "EmailLib.c"
4049int __ste_email_to0 = 0;
4050#line 61 "EmailLib.c"
4051int __ste_email_to1 = 0;
4052#line 63 "EmailLib.c"
4053int getEmailTo(int handle )
4054{ int retValue_acc ;
4055
4056 {
4057#line 70 "EmailLib.c"
4058 if (handle == 1) {
4059#line 880
4060 retValue_acc = __ste_email_to0;
4061#line 882
4062 return (retValue_acc);
4063 } else {
4064#line 884
4065 if (handle == 2) {
4066#line 889
4067 retValue_acc = __ste_email_to1;
4068#line 891
4069 return (retValue_acc);
4070 } else {
4071#line 897 "EmailLib.c"
4072 retValue_acc = 0;
4073#line 899
4074 return (retValue_acc);
4075 }
4076 }
4077#line 906 "EmailLib.c"
4078 return (retValue_acc);
4079}
4080}
4081#line 73 "EmailLib.c"
4082void setEmailTo(int handle , int value )
4083{
4084
4085 {
4086#line 79
4087 if (handle == 1) {
4088#line 75
4089 __ste_email_to0 = value;
4090 } else {
4091#line 76
4092 if (handle == 2) {
4093#line 77
4094 __ste_email_to1 = value;
4095 } else {
4096
4097 }
4098 }
4099#line 937 "EmailLib.c"
4100 return;
4101}
4102}
4103#line 81 "EmailLib.c"
4104char *__ste_email_subject0 ;
4105#line 83 "EmailLib.c"
4106char *__ste_email_subject1 ;
4107#line 85 "EmailLib.c"
4108char *getEmailSubject(int handle )
4109{ char *retValue_acc ;
4110 void *__cil_tmp3 ;
4111
4112 {
4113#line 92 "EmailLib.c"
4114 if (handle == 1) {
4115#line 962
4116 retValue_acc = __ste_email_subject0;
4117#line 964
4118 return (retValue_acc);
4119 } else {
4120#line 966
4121 if (handle == 2) {
4122#line 971
4123 retValue_acc = __ste_email_subject1;
4124#line 973
4125 return (retValue_acc);
4126 } else {
4127#line 979 "EmailLib.c"
4128 __cil_tmp3 = (void *)0;
4129#line 979
4130 retValue_acc = (char *)__cil_tmp3;
4131#line 981
4132 return (retValue_acc);
4133 }
4134 }
4135#line 988 "EmailLib.c"
4136 return (retValue_acc);
4137}
4138}
4139#line 95 "EmailLib.c"
4140void setEmailSubject(int handle , char *value )
4141{
4142
4143 {
4144#line 101
4145 if (handle == 1) {
4146#line 97
4147 __ste_email_subject0 = value;
4148 } else {
4149#line 98
4150 if (handle == 2) {
4151#line 99
4152 __ste_email_subject1 = value;
4153 } else {
4154
4155 }
4156 }
4157#line 1019 "EmailLib.c"
4158 return;
4159}
4160}
4161#line 103 "EmailLib.c"
4162char *__ste_email_body0 = (char *)0;
4163#line 105 "EmailLib.c"
4164char *__ste_email_body1 = (char *)0;
4165#line 107 "EmailLib.c"
4166char *getEmailBody(int handle )
4167{ char *retValue_acc ;
4168 void *__cil_tmp3 ;
4169
4170 {
4171#line 114 "EmailLib.c"
4172 if (handle == 1) {
4173#line 1044
4174 retValue_acc = __ste_email_body0;
4175#line 1046
4176 return (retValue_acc);
4177 } else {
4178#line 1048
4179 if (handle == 2) {
4180#line 1053
4181 retValue_acc = __ste_email_body1;
4182#line 1055
4183 return (retValue_acc);
4184 } else {
4185#line 1061 "EmailLib.c"
4186 __cil_tmp3 = (void *)0;
4187#line 1061
4188 retValue_acc = (char *)__cil_tmp3;
4189#line 1063
4190 return (retValue_acc);
4191 }
4192 }
4193#line 1070 "EmailLib.c"
4194 return (retValue_acc);
4195}
4196}
4197#line 117 "EmailLib.c"
4198void setEmailBody(int handle , char *value )
4199{
4200
4201 {
4202#line 123
4203 if (handle == 1) {
4204#line 119
4205 __ste_email_body0 = value;
4206 } else {
4207#line 120
4208 if (handle == 2) {
4209#line 121
4210 __ste_email_body1 = value;
4211 } else {
4212
4213 }
4214 }
4215#line 1101 "EmailLib.c"
4216 return;
4217}
4218}
4219#line 125 "EmailLib.c"
4220int __ste_email_isEncrypted0 = 0;
4221#line 127 "EmailLib.c"
4222int __ste_email_isEncrypted1 = 0;
4223#line 129 "EmailLib.c"
4224int isEncrypted(int handle )
4225{ int retValue_acc ;
4226
4227 {
4228#line 136 "EmailLib.c"
4229 if (handle == 1) {
4230#line 1126
4231 retValue_acc = __ste_email_isEncrypted0;
4232#line 1128
4233 return (retValue_acc);
4234 } else {
4235#line 1130
4236 if (handle == 2) {
4237#line 1135
4238 retValue_acc = __ste_email_isEncrypted1;
4239#line 1137
4240 return (retValue_acc);
4241 } else {
4242#line 1143 "EmailLib.c"
4243 retValue_acc = 0;
4244#line 1145
4245 return (retValue_acc);
4246 }
4247 }
4248#line 1152 "EmailLib.c"
4249 return (retValue_acc);
4250}
4251}
4252#line 139 "EmailLib.c"
4253void setEmailIsEncrypted(int handle , int value )
4254{
4255
4256 {
4257#line 145
4258 if (handle == 1) {
4259#line 141
4260 __ste_email_isEncrypted0 = value;
4261 } else {
4262#line 142
4263 if (handle == 2) {
4264#line 143
4265 __ste_email_isEncrypted1 = value;
4266 } else {
4267
4268 }
4269 }
4270#line 1183 "EmailLib.c"
4271 return;
4272}
4273}
4274#line 147 "EmailLib.c"
4275int __ste_email_encryptionKey0 = 0;
4276#line 149 "EmailLib.c"
4277int __ste_email_encryptionKey1 = 0;
4278#line 151 "EmailLib.c"
4279int getEmailEncryptionKey(int handle )
4280{ int retValue_acc ;
4281
4282 {
4283#line 158 "EmailLib.c"
4284 if (handle == 1) {
4285#line 1208
4286 retValue_acc = __ste_email_encryptionKey0;
4287#line 1210
4288 return (retValue_acc);
4289 } else {
4290#line 1212
4291 if (handle == 2) {
4292#line 1217
4293 retValue_acc = __ste_email_encryptionKey1;
4294#line 1219
4295 return (retValue_acc);
4296 } else {
4297#line 1225 "EmailLib.c"
4298 retValue_acc = 0;
4299#line 1227
4300 return (retValue_acc);
4301 }
4302 }
4303#line 1234 "EmailLib.c"
4304 return (retValue_acc);
4305}
4306}
4307#line 161 "EmailLib.c"
4308void setEmailEncryptionKey(int handle , int value )
4309{
4310
4311 {
4312#line 167
4313 if (handle == 1) {
4314#line 163
4315 __ste_email_encryptionKey0 = value;
4316 } else {
4317#line 164
4318 if (handle == 2) {
4319#line 165
4320 __ste_email_encryptionKey1 = value;
4321 } else {
4322
4323 }
4324 }
4325#line 1265 "EmailLib.c"
4326 return;
4327}
4328}
4329#line 169 "EmailLib.c"
4330int __ste_email_isSigned0 = 0;
4331#line 171 "EmailLib.c"
4332int __ste_email_isSigned1 = 0;
4333#line 173 "EmailLib.c"
4334int isSigned(int handle )
4335{ int retValue_acc ;
4336
4337 {
4338#line 180 "EmailLib.c"
4339 if (handle == 1) {
4340#line 1290
4341 retValue_acc = __ste_email_isSigned0;
4342#line 1292
4343 return (retValue_acc);
4344 } else {
4345#line 1294
4346 if (handle == 2) {
4347#line 1299
4348 retValue_acc = __ste_email_isSigned1;
4349#line 1301
4350 return (retValue_acc);
4351 } else {
4352#line 1307 "EmailLib.c"
4353 retValue_acc = 0;
4354#line 1309
4355 return (retValue_acc);
4356 }
4357 }
4358#line 1316 "EmailLib.c"
4359 return (retValue_acc);
4360}
4361}
4362#line 183 "EmailLib.c"
4363void setEmailIsSigned(int handle , int value )
4364{
4365
4366 {
4367#line 189
4368 if (handle == 1) {
4369#line 185
4370 __ste_email_isSigned0 = value;
4371 } else {
4372#line 186
4373 if (handle == 2) {
4374#line 187
4375 __ste_email_isSigned1 = value;
4376 } else {
4377
4378 }
4379 }
4380#line 1347 "EmailLib.c"
4381 return;
4382}
4383}
4384#line 191 "EmailLib.c"
4385int __ste_email_signKey0 = 0;
4386#line 193 "EmailLib.c"
4387int __ste_email_signKey1 = 0;
4388#line 195 "EmailLib.c"
4389int getEmailSignKey(int handle )
4390{ int retValue_acc ;
4391
4392 {
4393#line 202 "EmailLib.c"
4394 if (handle == 1) {
4395#line 1372
4396 retValue_acc = __ste_email_signKey0;
4397#line 1374
4398 return (retValue_acc);
4399 } else {
4400#line 1376
4401 if (handle == 2) {
4402#line 1381
4403 retValue_acc = __ste_email_signKey1;
4404#line 1383
4405 return (retValue_acc);
4406 } else {
4407#line 1389 "EmailLib.c"
4408 retValue_acc = 0;
4409#line 1391
4410 return (retValue_acc);
4411 }
4412 }
4413#line 1398 "EmailLib.c"
4414 return (retValue_acc);
4415}
4416}
4417#line 205 "EmailLib.c"
4418void setEmailSignKey(int handle , int value )
4419{
4420
4421 {
4422#line 211
4423 if (handle == 1) {
4424#line 207
4425 __ste_email_signKey0 = value;
4426 } else {
4427#line 208
4428 if (handle == 2) {
4429#line 209
4430 __ste_email_signKey1 = value;
4431 } else {
4432
4433 }
4434 }
4435#line 1429 "EmailLib.c"
4436 return;
4437}
4438}
4439#line 213 "EmailLib.c"
4440int __ste_email_isSignatureVerified0 ;
4441#line 215 "EmailLib.c"
4442int __ste_email_isSignatureVerified1 ;
4443#line 217 "EmailLib.c"
4444int isVerified(int handle )
4445{ int retValue_acc ;
4446
4447 {
4448#line 224 "EmailLib.c"
4449 if (handle == 1) {
4450#line 1454
4451 retValue_acc = __ste_email_isSignatureVerified0;
4452#line 1456
4453 return (retValue_acc);
4454 } else {
4455#line 1458
4456 if (handle == 2) {
4457#line 1463
4458 retValue_acc = __ste_email_isSignatureVerified1;
4459#line 1465
4460 return (retValue_acc);
4461 } else {
4462#line 1471 "EmailLib.c"
4463 retValue_acc = 0;
4464#line 1473
4465 return (retValue_acc);
4466 }
4467 }
4468#line 1480 "EmailLib.c"
4469 return (retValue_acc);
4470}
4471}
4472#line 227 "EmailLib.c"
4473void setEmailIsSignatureVerified(int handle , int value )
4474{
4475
4476 {
4477#line 233
4478 if (handle == 1) {
4479#line 229
4480 __ste_email_isSignatureVerified0 = value;
4481 } else {
4482#line 230
4483 if (handle == 2) {
4484#line 231
4485 __ste_email_isSignatureVerified1 = value;
4486 } else {
4487
4488 }
4489 }
4490#line 1511 "EmailLib.c"
4491 return;
4492}
4493}