pkcs11 0.2.5-x86-mingw32 → 0.2.6-x86-mingw32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.travis.yml +10 -0
- data/Gemfile +16 -0
- data/History.txt +5 -0
- data/README.rdoc +37 -56
- data/Rakefile +23 -8
- data/appveyor.yml +38 -0
- data/ext/include/pkcs11.h +287 -299
- data/ext/include/pkcs11f.h +900 -912
- data/ext/include/pkcs11t.h +1917 -1885
- data/ext/pk11.c +7 -7
- data/ext/pk11_const.c +1 -1
- data/ext/pk11_const_def.inc +538 -451
- data/ext/pk11_struct.doc +163 -43
- data/ext/pk11_struct_def.inc +62 -18
- data/ext/pk11_struct_impl.inc +62 -18
- data/ext/pk11_version.h +1 -1
- data/lib/2.0/pkcs11_ext.so +0 -0
- data/lib/2.1/pkcs11_ext.so +0 -0
- data/lib/2.2/pkcs11_ext.so +0 -0
- data/lib/2.3/pkcs11_ext.so +0 -0
- data/lib/2.4/pkcs11_ext.so +0 -0
- data/lib/pkcs11/helper.rb +2 -1
- data/pkcs11_luna/Manifest.txt +24 -0
- data/pkcs11_luna/README_LUNA.rdoc +103 -0
- data/test/helper.rb +7 -1
- data/test/test_pkcs11_thread.rb +1 -2
- metadata +75 -52
- checksums.yaml.gz.sig +0 -2
- data.tar.gz.sig +0 -1
- data/Manifest.txt +0 -57
- data/lib/1.9/pkcs11_ext.so +0 -0
- metadata.gz.sig +0 -2
data/ext/include/pkcs11t.h
CHANGED
@@ -1,1885 +1,1917 @@
|
|
1
|
-
/*
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
*
|
9
|
-
*
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
#
|
24
|
-
#
|
25
|
-
|
26
|
-
#
|
27
|
-
#define
|
28
|
-
#
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
/* an unsigned
|
44
|
-
typedef unsigned
|
45
|
-
|
46
|
-
/*
|
47
|
-
typedef
|
48
|
-
|
49
|
-
/*
|
50
|
-
typedef
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
typedef
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
typedef
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
typedef
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
/*
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
/*
|
110
|
-
|
111
|
-
/*
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
/*
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
typedef
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
/*
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
*/
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
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
|
-
|
192
|
-
|
193
|
-
*
|
194
|
-
*
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
199
|
-
*
|
200
|
-
|
201
|
-
#define
|
202
|
-
|
203
|
-
/*
|
204
|
-
*
|
205
|
-
*
|
206
|
-
#define
|
207
|
-
|
208
|
-
/*
|
209
|
-
*
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
|
218
|
-
*
|
219
|
-
*
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
*
|
225
|
-
|
226
|
-
#define
|
227
|
-
|
228
|
-
/*
|
229
|
-
* incorrect
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
|
235
|
-
#define
|
236
|
-
|
237
|
-
/*
|
238
|
-
*
|
239
|
-
*
|
240
|
-
|
241
|
-
|
242
|
-
|
243
|
-
|
244
|
-
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
/*
|
249
|
-
*
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
/*
|
258
|
-
|
259
|
-
*/
|
260
|
-
#define
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
265
|
-
|
266
|
-
#define
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
/*
|
279
|
-
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
/*
|
285
|
-
#define
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
/*
|
291
|
-
*
|
292
|
-
typedef CK_ULONG
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
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
|
-
|
327
|
-
|
328
|
-
|
329
|
-
|
330
|
-
|
331
|
-
|
332
|
-
|
333
|
-
|
334
|
-
|
335
|
-
/*
|
336
|
-
|
337
|
-
|
338
|
-
#define
|
339
|
-
#define
|
340
|
-
#define
|
341
|
-
#define
|
342
|
-
#define
|
343
|
-
#define
|
344
|
-
#define
|
345
|
-
#define
|
346
|
-
|
347
|
-
|
348
|
-
|
349
|
-
|
350
|
-
#define
|
351
|
-
|
352
|
-
|
353
|
-
|
354
|
-
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
|
359
|
-
|
360
|
-
|
361
|
-
#define
|
362
|
-
#define
|
363
|
-
#define
|
364
|
-
#define
|
365
|
-
|
366
|
-
/*
|
367
|
-
|
368
|
-
|
369
|
-
|
370
|
-
|
371
|
-
#define
|
372
|
-
#define
|
373
|
-
#define
|
374
|
-
|
375
|
-
|
376
|
-
|
377
|
-
#define
|
378
|
-
|
379
|
-
#define
|
380
|
-
#define
|
381
|
-
|
382
|
-
|
383
|
-
#define
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
|
391
|
-
#define
|
392
|
-
|
393
|
-
#define
|
394
|
-
#define
|
395
|
-
|
396
|
-
|
397
|
-
#define
|
398
|
-
#define
|
399
|
-
#define
|
400
|
-
#define
|
401
|
-
|
402
|
-
|
403
|
-
/*
|
404
|
-
#define
|
405
|
-
#define
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
|
413
|
-
|
414
|
-
/*
|
415
|
-
|
416
|
-
|
417
|
-
|
418
|
-
|
419
|
-
|
420
|
-
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
|
425
|
-
|
426
|
-
|
427
|
-
|
428
|
-
|
429
|
-
/*
|
430
|
-
#define
|
431
|
-
#define
|
432
|
-
#define
|
433
|
-
#define
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
443
|
-
|
444
|
-
#define
|
445
|
-
|
446
|
-
|
447
|
-
|
448
|
-
#define
|
449
|
-
#define
|
450
|
-
#define
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
#define
|
456
|
-
#define
|
457
|
-
#define
|
458
|
-
|
459
|
-
|
460
|
-
#define
|
461
|
-
#define
|
462
|
-
#define
|
463
|
-
#define
|
464
|
-
#define
|
465
|
-
#define
|
466
|
-
|
467
|
-
|
468
|
-
#define
|
469
|
-
|
470
|
-
#define
|
471
|
-
#define
|
472
|
-
#define
|
473
|
-
|
474
|
-
|
475
|
-
|
476
|
-
#define
|
477
|
-
#define
|
478
|
-
#define
|
479
|
-
|
480
|
-
|
481
|
-
#define
|
482
|
-
|
483
|
-
/*
|
484
|
-
|
485
|
-
|
486
|
-
#define
|
487
|
-
#define
|
488
|
-
#define
|
489
|
-
#define
|
490
|
-
#define
|
491
|
-
|
492
|
-
#define
|
493
|
-
|
494
|
-
#define
|
495
|
-
#define
|
496
|
-
|
497
|
-
|
498
|
-
#define
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
#define
|
503
|
-
#define
|
504
|
-
|
505
|
-
#define
|
506
|
-
|
507
|
-
|
508
|
-
|
509
|
-
#define
|
510
|
-
#define
|
511
|
-
|
512
|
-
#define
|
513
|
-
|
514
|
-
#define
|
515
|
-
#define
|
516
|
-
#define
|
517
|
-
|
518
|
-
#define
|
519
|
-
|
520
|
-
|
521
|
-
#define
|
522
|
-
#define
|
523
|
-
#define
|
524
|
-
|
525
|
-
|
526
|
-
#define
|
527
|
-
#define
|
528
|
-
|
529
|
-
|
530
|
-
|
531
|
-
|
532
|
-
|
533
|
-
#define
|
534
|
-
#define
|
535
|
-
#define
|
536
|
-
|
537
|
-
|
538
|
-
#define
|
539
|
-
|
540
|
-
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
#define
|
545
|
-
#define
|
546
|
-
|
547
|
-
#define
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
#define
|
552
|
-
#define
|
553
|
-
|
554
|
-
|
555
|
-
|
556
|
-
|
557
|
-
|
558
|
-
|
559
|
-
|
560
|
-
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
|
579
|
-
|
580
|
-
|
581
|
-
|
582
|
-
|
583
|
-
#define
|
584
|
-
|
585
|
-
|
586
|
-
#define
|
587
|
-
|
588
|
-
#define
|
589
|
-
#define
|
590
|
-
#define
|
591
|
-
|
592
|
-
#define
|
593
|
-
#define
|
594
|
-
#define
|
595
|
-
|
596
|
-
#define
|
597
|
-
#define
|
598
|
-
#define
|
599
|
-
#define
|
600
|
-
#define
|
601
|
-
|
602
|
-
|
603
|
-
|
604
|
-
|
605
|
-
|
606
|
-
|
607
|
-
|
608
|
-
|
609
|
-
|
610
|
-
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
|
625
|
-
|
626
|
-
|
627
|
-
|
628
|
-
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
#define
|
633
|
-
#define
|
634
|
-
#define
|
635
|
-
#define
|
636
|
-
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
#define
|
641
|
-
#define
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
#define
|
646
|
-
#define
|
647
|
-
#define
|
648
|
-
|
649
|
-
|
650
|
-
|
651
|
-
#define
|
652
|
-
|
653
|
-
#define
|
654
|
-
#define
|
655
|
-
#define
|
656
|
-
|
657
|
-
#define
|
658
|
-
#define
|
659
|
-
|
660
|
-
#define
|
661
|
-
#define
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
#define
|
667
|
-
#define
|
668
|
-
|
669
|
-
#define
|
670
|
-
|
671
|
-
|
672
|
-
#define
|
673
|
-
#define
|
674
|
-
#define
|
675
|
-
#define
|
676
|
-
#define
|
677
|
-
#define
|
678
|
-
|
679
|
-
|
680
|
-
#define
|
681
|
-
#define
|
682
|
-
|
683
|
-
#define
|
684
|
-
|
685
|
-
#define
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
#define
|
691
|
-
|
692
|
-
#define
|
693
|
-
#define
|
694
|
-
|
695
|
-
#define
|
696
|
-
|
697
|
-
#define
|
698
|
-
|
699
|
-
|
700
|
-
#define
|
701
|
-
#define
|
702
|
-
|
703
|
-
#define
|
704
|
-
#define
|
705
|
-
#define
|
706
|
-
|
707
|
-
#define
|
708
|
-
|
709
|
-
|
710
|
-
|
711
|
-
|
712
|
-
#define
|
713
|
-
#define
|
714
|
-
#define
|
715
|
-
#define
|
716
|
-
#define
|
717
|
-
#define
|
718
|
-
#define
|
719
|
-
#define
|
720
|
-
|
721
|
-
|
722
|
-
#define
|
723
|
-
#define
|
724
|
-
#define
|
725
|
-
|
726
|
-
|
727
|
-
#define
|
728
|
-
|
729
|
-
|
730
|
-
#define
|
731
|
-
#define
|
732
|
-
|
733
|
-
#define
|
734
|
-
|
735
|
-
|
736
|
-
#define
|
737
|
-
#define
|
738
|
-
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
#define
|
743
|
-
#define
|
744
|
-
|
745
|
-
|
746
|
-
|
747
|
-
|
748
|
-
#define
|
749
|
-
#define
|
750
|
-
#define
|
751
|
-
#define
|
752
|
-
#define
|
753
|
-
#define
|
754
|
-
|
755
|
-
|
756
|
-
#define
|
757
|
-
#define
|
758
|
-
#define
|
759
|
-
|
760
|
-
|
761
|
-
#define
|
762
|
-
#define
|
763
|
-
#define
|
764
|
-
|
765
|
-
#define
|
766
|
-
#define
|
767
|
-
#define
|
768
|
-
#define
|
769
|
-
#define
|
770
|
-
#define
|
771
|
-
|
772
|
-
|
773
|
-
|
774
|
-
#define
|
775
|
-
|
776
|
-
|
777
|
-
#define
|
778
|
-
#define
|
779
|
-
|
780
|
-
|
781
|
-
|
782
|
-
#define
|
783
|
-
|
784
|
-
|
785
|
-
|
786
|
-
#define
|
787
|
-
|
788
|
-
#define
|
789
|
-
#define
|
790
|
-
#define
|
791
|
-
#define
|
792
|
-
|
793
|
-
|
794
|
-
#define
|
795
|
-
#define
|
796
|
-
#define
|
797
|
-
#define
|
798
|
-
#define
|
799
|
-
#define
|
800
|
-
#define
|
801
|
-
#define
|
802
|
-
#define
|
803
|
-
#define
|
804
|
-
#define
|
805
|
-
#define
|
806
|
-
#define
|
807
|
-
#define
|
808
|
-
|
809
|
-
#define
|
810
|
-
|
811
|
-
#define
|
812
|
-
|
813
|
-
#define
|
814
|
-
#define
|
815
|
-
#define
|
816
|
-
#define
|
817
|
-
#define
|
818
|
-
#define
|
819
|
-
|
820
|
-
|
821
|
-
#define
|
822
|
-
#define
|
823
|
-
#define
|
824
|
-
#define
|
825
|
-
#define
|
826
|
-
#define
|
827
|
-
#define
|
828
|
-
#define
|
829
|
-
#define
|
830
|
-
#define
|
831
|
-
|
832
|
-
|
833
|
-
|
834
|
-
|
835
|
-
#define
|
836
|
-
|
837
|
-
#define
|
838
|
-
#define
|
839
|
-
#define
|
840
|
-
|
841
|
-
|
842
|
-
#define
|
843
|
-
|
844
|
-
#define
|
845
|
-
#define
|
846
|
-
#define
|
847
|
-
#define
|
848
|
-
#define
|
849
|
-
|
850
|
-
|
851
|
-
#define
|
852
|
-
#define
|
853
|
-
#define
|
854
|
-
|
855
|
-
|
856
|
-
#define
|
857
|
-
|
858
|
-
#define
|
859
|
-
|
860
|
-
#define
|
861
|
-
#define
|
862
|
-
#define
|
863
|
-
#define
|
864
|
-
#define
|
865
|
-
#define
|
866
|
-
#define
|
867
|
-
#define
|
868
|
-
|
869
|
-
#define
|
870
|
-
#define
|
871
|
-
#define
|
872
|
-
|
873
|
-
|
874
|
-
#define
|
875
|
-
|
876
|
-
#define
|
877
|
-
|
878
|
-
|
879
|
-
#define
|
880
|
-
#define
|
881
|
-
#define
|
882
|
-
#define
|
883
|
-
#define
|
884
|
-
#define
|
885
|
-
|
886
|
-
#define
|
887
|
-
#define
|
888
|
-
|
889
|
-
|
890
|
-
#define
|
891
|
-
|
892
|
-
/*
|
893
|
-
|
894
|
-
#define
|
895
|
-
#define
|
896
|
-
|
897
|
-
|
898
|
-
#define
|
899
|
-
|
900
|
-
#define
|
901
|
-
#define
|
902
|
-
#define
|
903
|
-
|
904
|
-
|
905
|
-
#define
|
906
|
-
#define
|
907
|
-
|
908
|
-
|
909
|
-
#define
|
910
|
-
#define
|
911
|
-
#define
|
912
|
-
#define
|
913
|
-
#define
|
914
|
-
#define
|
915
|
-
|
916
|
-
#define
|
917
|
-
|
918
|
-
|
919
|
-
#define
|
920
|
-
#define
|
921
|
-
#define
|
922
|
-
#define
|
923
|
-
#define
|
924
|
-
#define
|
925
|
-
#define
|
926
|
-
#define
|
927
|
-
#define
|
928
|
-
|
929
|
-
|
930
|
-
#define
|
931
|
-
#define
|
932
|
-
#define
|
933
|
-
|
934
|
-
#define
|
935
|
-
#define
|
936
|
-
#define
|
937
|
-
#define
|
938
|
-
#define
|
939
|
-
#define
|
940
|
-
|
941
|
-
|
942
|
-
|
943
|
-
#define
|
944
|
-
#define
|
945
|
-
|
946
|
-
#define
|
947
|
-
|
948
|
-
|
949
|
-
|
950
|
-
|
951
|
-
#define
|
952
|
-
#define
|
953
|
-
#define
|
954
|
-
|
955
|
-
#define
|
956
|
-
#define
|
957
|
-
#define
|
958
|
-
#define
|
959
|
-
#define
|
960
|
-
|
961
|
-
#define
|
962
|
-
|
963
|
-
|
964
|
-
|
965
|
-
|
966
|
-
|
967
|
-
#define
|
968
|
-
#define
|
969
|
-
#define
|
970
|
-
#define
|
971
|
-
|
972
|
-
|
973
|
-
|
974
|
-
|
975
|
-
#define
|
976
|
-
|
977
|
-
|
978
|
-
#define
|
979
|
-
|
980
|
-
#define
|
981
|
-
|
982
|
-
|
983
|
-
|
984
|
-
|
985
|
-
|
986
|
-
|
987
|
-
|
988
|
-
|
989
|
-
|
990
|
-
|
991
|
-
|
992
|
-
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
typedef
|
999
|
-
|
1000
|
-
|
1001
|
-
|
1002
|
-
|
1003
|
-
|
1004
|
-
|
1005
|
-
|
1006
|
-
|
1007
|
-
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
|
1021
|
-
|
1022
|
-
|
1023
|
-
|
1024
|
-
|
1025
|
-
#define
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
1032
|
-
|
1033
|
-
|
1034
|
-
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
1038
|
-
|
1039
|
-
|
1040
|
-
#define
|
1041
|
-
#define
|
1042
|
-
#define
|
1043
|
-
#define
|
1044
|
-
|
1045
|
-
/*
|
1046
|
-
|
1047
|
-
|
1048
|
-
|
1049
|
-
|
1050
|
-
#define
|
1051
|
-
#define
|
1052
|
-
#define
|
1053
|
-
#define
|
1054
|
-
|
1055
|
-
|
1056
|
-
#define
|
1057
|
-
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
|
1064
|
-
|
1065
|
-
|
1066
|
-
#define
|
1067
|
-
#define
|
1068
|
-
#define
|
1069
|
-
#define
|
1070
|
-
|
1071
|
-
|
1072
|
-
|
1073
|
-
|
1074
|
-
|
1075
|
-
#define
|
1076
|
-
|
1077
|
-
/*
|
1078
|
-
|
1079
|
-
#define
|
1080
|
-
#define
|
1081
|
-
|
1082
|
-
#define
|
1083
|
-
|
1084
|
-
#define
|
1085
|
-
#define
|
1086
|
-
#define
|
1087
|
-
#define
|
1088
|
-
#define
|
1089
|
-
|
1090
|
-
#define
|
1091
|
-
#define
|
1092
|
-
|
1093
|
-
|
1094
|
-
|
1095
|
-
#define
|
1096
|
-
#define
|
1097
|
-
|
1098
|
-
|
1099
|
-
#define
|
1100
|
-
|
1101
|
-
|
1102
|
-
|
1103
|
-
|
1104
|
-
|
1105
|
-
#define
|
1106
|
-
#define
|
1107
|
-
|
1108
|
-
|
1109
|
-
|
1110
|
-
|
1111
|
-
|
1112
|
-
#define
|
1113
|
-
#define
|
1114
|
-
|
1115
|
-
#define
|
1116
|
-
#define
|
1117
|
-
#define
|
1118
|
-
#define
|
1119
|
-
|
1120
|
-
#define
|
1121
|
-
#define
|
1122
|
-
|
1123
|
-
|
1124
|
-
|
1125
|
-
#define
|
1126
|
-
#define
|
1127
|
-
#define
|
1128
|
-
#define
|
1129
|
-
|
1130
|
-
#define
|
1131
|
-
|
1132
|
-
|
1133
|
-
#define
|
1134
|
-
#define
|
1135
|
-
|
1136
|
-
#define
|
1137
|
-
#define
|
1138
|
-
#define
|
1139
|
-
|
1140
|
-
#define
|
1141
|
-
|
1142
|
-
|
1143
|
-
|
1144
|
-
|
1145
|
-
#define
|
1146
|
-
|
1147
|
-
|
1148
|
-
#define
|
1149
|
-
#define
|
1150
|
-
#define
|
1151
|
-
|
1152
|
-
#define
|
1153
|
-
#define
|
1154
|
-
#define
|
1155
|
-
#define
|
1156
|
-
|
1157
|
-
#define
|
1158
|
-
#define
|
1159
|
-
|
1160
|
-
#define
|
1161
|
-
#define
|
1162
|
-
|
1163
|
-
|
1164
|
-
|
1165
|
-
|
1166
|
-
#define
|
1167
|
-
|
1168
|
-
#define
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1175
|
-
/*
|
1176
|
-
|
1177
|
-
|
1178
|
-
|
1179
|
-
|
1180
|
-
|
1181
|
-
|
1182
|
-
|
1183
|
-
|
1184
|
-
|
1185
|
-
|
1186
|
-
|
1187
|
-
|
1188
|
-
|
1189
|
-
|
1190
|
-
|
1191
|
-
|
1192
|
-
|
1193
|
-
|
1194
|
-
|
1195
|
-
|
1196
|
-
|
1197
|
-
|
1198
|
-
|
1199
|
-
|
1200
|
-
|
1201
|
-
|
1202
|
-
|
1203
|
-
/*
|
1204
|
-
typedef CK_CALLBACK_FUNCTION(CK_RV,
|
1205
|
-
|
1206
|
-
|
1207
|
-
|
1208
|
-
|
1209
|
-
|
1210
|
-
|
1211
|
-
|
1212
|
-
|
1213
|
-
|
1214
|
-
|
1215
|
-
|
1216
|
-
|
1217
|
-
|
1218
|
-
|
1219
|
-
|
1220
|
-
|
1221
|
-
|
1222
|
-
|
1223
|
-
|
1224
|
-
|
1225
|
-
|
1226
|
-
|
1227
|
-
|
1228
|
-
|
1229
|
-
|
1230
|
-
|
1231
|
-
|
1232
|
-
|
1233
|
-
|
1234
|
-
|
1235
|
-
|
1236
|
-
/*
|
1237
|
-
|
1238
|
-
|
1239
|
-
|
1240
|
-
|
1241
|
-
|
1242
|
-
|
1243
|
-
*
|
1244
|
-
|
1245
|
-
|
1246
|
-
|
1247
|
-
|
1248
|
-
|
1249
|
-
|
1250
|
-
|
1251
|
-
|
1252
|
-
|
1253
|
-
|
1254
|
-
|
1255
|
-
|
1256
|
-
|
1257
|
-
|
1258
|
-
|
1259
|
-
|
1260
|
-
|
1261
|
-
|
1262
|
-
|
1263
|
-
|
1264
|
-
|
1265
|
-
|
1266
|
-
|
1267
|
-
|
1268
|
-
|
1269
|
-
|
1270
|
-
|
1271
|
-
|
1272
|
-
|
1273
|
-
|
1274
|
-
|
1275
|
-
|
1276
|
-
|
1277
|
-
|
1278
|
-
|
1279
|
-
typedef
|
1280
|
-
|
1281
|
-
|
1282
|
-
|
1283
|
-
|
1284
|
-
|
1285
|
-
|
1286
|
-
|
1287
|
-
|
1288
|
-
|
1289
|
-
|
1290
|
-
|
1291
|
-
|
1292
|
-
|
1293
|
-
|
1294
|
-
|
1295
|
-
|
1296
|
-
|
1297
|
-
|
1298
|
-
|
1299
|
-
|
1300
|
-
|
1301
|
-
|
1302
|
-
#define
|
1303
|
-
|
1304
|
-
|
1305
|
-
|
1306
|
-
|
1307
|
-
|
1308
|
-
|
1309
|
-
|
1310
|
-
|
1311
|
-
|
1312
|
-
|
1313
|
-
|
1314
|
-
|
1315
|
-
|
1316
|
-
|
1317
|
-
|
1318
|
-
|
1319
|
-
|
1320
|
-
typedef
|
1321
|
-
|
1322
|
-
|
1323
|
-
|
1324
|
-
|
1325
|
-
|
1326
|
-
|
1327
|
-
|
1328
|
-
|
1329
|
-
|
1330
|
-
|
1331
|
-
|
1332
|
-
|
1333
|
-
|
1334
|
-
|
1335
|
-
|
1336
|
-
|
1337
|
-
|
1338
|
-
*
|
1339
|
-
|
1340
|
-
typedef
|
1341
|
-
|
1342
|
-
|
1343
|
-
|
1344
|
-
|
1345
|
-
|
1346
|
-
|
1347
|
-
|
1348
|
-
|
1349
|
-
|
1350
|
-
|
1351
|
-
|
1352
|
-
|
1353
|
-
|
1354
|
-
typedef struct
|
1355
|
-
|
1356
|
-
|
1357
|
-
|
1358
|
-
|
1359
|
-
|
1360
|
-
|
1361
|
-
|
1362
|
-
CK_ULONG
|
1363
|
-
CK_BYTE_PTR
|
1364
|
-
|
1365
|
-
|
1366
|
-
|
1367
|
-
|
1368
|
-
|
1369
|
-
|
1370
|
-
|
1371
|
-
|
1372
|
-
|
1373
|
-
|
1374
|
-
|
1375
|
-
|
1376
|
-
CK_ULONG
|
1377
|
-
CK_BYTE_PTR
|
1378
|
-
|
1379
|
-
|
1380
|
-
|
1381
|
-
|
1382
|
-
|
1383
|
-
|
1384
|
-
|
1385
|
-
|
1386
|
-
|
1387
|
-
|
1388
|
-
|
1389
|
-
|
1390
|
-
|
1391
|
-
|
1392
|
-
|
1393
|
-
|
1394
|
-
|
1395
|
-
|
1396
|
-
|
1397
|
-
|
1398
|
-
|
1399
|
-
|
1400
|
-
|
1401
|
-
|
1402
|
-
|
1403
|
-
|
1404
|
-
|
1405
|
-
|
1406
|
-
|
1407
|
-
|
1408
|
-
|
1409
|
-
|
1410
|
-
|
1411
|
-
|
1412
|
-
|
1413
|
-
|
1414
|
-
|
1415
|
-
|
1416
|
-
|
1417
|
-
|
1418
|
-
|
1419
|
-
|
1420
|
-
|
1421
|
-
|
1422
|
-
|
1423
|
-
|
1424
|
-
|
1425
|
-
|
1426
|
-
|
1427
|
-
|
1428
|
-
|
1429
|
-
|
1430
|
-
|
1431
|
-
|
1432
|
-
|
1433
|
-
|
1434
|
-
|
1435
|
-
|
1436
|
-
|
1437
|
-
|
1438
|
-
|
1439
|
-
|
1440
|
-
|
1441
|
-
|
1442
|
-
|
1443
|
-
|
1444
|
-
|
1445
|
-
|
1446
|
-
|
1447
|
-
|
1448
|
-
|
1449
|
-
|
1450
|
-
}
|
1451
|
-
|
1452
|
-
typedef
|
1453
|
-
|
1454
|
-
|
1455
|
-
/*
|
1456
|
-
*
|
1457
|
-
|
1458
|
-
|
1459
|
-
|
1460
|
-
|
1461
|
-
|
1462
|
-
|
1463
|
-
|
1464
|
-
|
1465
|
-
|
1466
|
-
|
1467
|
-
|
1468
|
-
|
1469
|
-
|
1470
|
-
|
1471
|
-
|
1472
|
-
|
1473
|
-
|
1474
|
-
|
1475
|
-
|
1476
|
-
|
1477
|
-
|
1478
|
-
|
1479
|
-
|
1480
|
-
|
1481
|
-
|
1482
|
-
|
1483
|
-
|
1484
|
-
|
1485
|
-
|
1486
|
-
|
1487
|
-
|
1488
|
-
|
1489
|
-
|
1490
|
-
/*
|
1491
|
-
|
1492
|
-
|
1493
|
-
CK_ULONG
|
1494
|
-
|
1495
|
-
|
1496
|
-
|
1497
|
-
|
1498
|
-
|
1499
|
-
|
1500
|
-
|
1501
|
-
|
1502
|
-
|
1503
|
-
|
1504
|
-
|
1505
|
-
|
1506
|
-
|
1507
|
-
|
1508
|
-
|
1509
|
-
|
1510
|
-
|
1511
|
-
|
1512
|
-
|
1513
|
-
|
1514
|
-
|
1515
|
-
|
1516
|
-
|
1517
|
-
CK_ULONG
|
1518
|
-
|
1519
|
-
|
1520
|
-
|
1521
|
-
|
1522
|
-
|
1523
|
-
|
1524
|
-
|
1525
|
-
|
1526
|
-
|
1527
|
-
|
1528
|
-
|
1529
|
-
typedef
|
1530
|
-
|
1531
|
-
|
1532
|
-
|
1533
|
-
|
1534
|
-
|
1535
|
-
|
1536
|
-
|
1537
|
-
|
1538
|
-
|
1539
|
-
|
1540
|
-
|
1541
|
-
|
1542
|
-
typedef
|
1543
|
-
|
1544
|
-
|
1545
|
-
|
1546
|
-
|
1547
|
-
|
1548
|
-
|
1549
|
-
|
1550
|
-
/*
|
1551
|
-
|
1552
|
-
|
1553
|
-
typedef
|
1554
|
-
|
1555
|
-
|
1556
|
-
|
1557
|
-
|
1558
|
-
|
1559
|
-
CK_ULONG
|
1560
|
-
|
1561
|
-
|
1562
|
-
|
1563
|
-
|
1564
|
-
|
1565
|
-
|
1566
|
-
|
1567
|
-
|
1568
|
-
|
1569
|
-
|
1570
|
-
|
1571
|
-
|
1572
|
-
|
1573
|
-
|
1574
|
-
typedef struct
|
1575
|
-
|
1576
|
-
|
1577
|
-
|
1578
|
-
|
1579
|
-
|
1580
|
-
CK_BYTE_PTR
|
1581
|
-
|
1582
|
-
|
1583
|
-
|
1584
|
-
|
1585
|
-
|
1586
|
-
|
1587
|
-
CK_ULONG
|
1588
|
-
|
1589
|
-
|
1590
|
-
|
1591
|
-
|
1592
|
-
|
1593
|
-
|
1594
|
-
|
1595
|
-
typedef
|
1596
|
-
|
1597
|
-
|
1598
|
-
|
1599
|
-
|
1600
|
-
|
1601
|
-
CK_ULONG
|
1602
|
-
}
|
1603
|
-
|
1604
|
-
typedef
|
1605
|
-
|
1606
|
-
|
1607
|
-
|
1608
|
-
|
1609
|
-
|
1610
|
-
|
1611
|
-
|
1612
|
-
|
1613
|
-
|
1614
|
-
|
1615
|
-
|
1616
|
-
|
1617
|
-
|
1618
|
-
|
1619
|
-
|
1620
|
-
|
1621
|
-
CK_BYTE_PTR
|
1622
|
-
|
1623
|
-
|
1624
|
-
|
1625
|
-
|
1626
|
-
|
1627
|
-
|
1628
|
-
|
1629
|
-
|
1630
|
-
|
1631
|
-
}
|
1632
|
-
|
1633
|
-
typedef
|
1634
|
-
|
1635
|
-
|
1636
|
-
|
1637
|
-
|
1638
|
-
|
1639
|
-
|
1640
|
-
|
1641
|
-
|
1642
|
-
|
1643
|
-
|
1644
|
-
}
|
1645
|
-
|
1646
|
-
typedef
|
1647
|
-
|
1648
|
-
|
1649
|
-
|
1650
|
-
|
1651
|
-
|
1652
|
-
|
1653
|
-
|
1654
|
-
|
1655
|
-
|
1656
|
-
|
1657
|
-
|
1658
|
-
|
1659
|
-
|
1660
|
-
|
1661
|
-
typedef struct
|
1662
|
-
CK_BYTE_PTR
|
1663
|
-
CK_ULONG
|
1664
|
-
|
1665
|
-
|
1666
|
-
|
1667
|
-
|
1668
|
-
|
1669
|
-
|
1670
|
-
|
1671
|
-
|
1672
|
-
|
1673
|
-
|
1674
|
-
|
1675
|
-
|
1676
|
-
|
1677
|
-
|
1678
|
-
|
1679
|
-
|
1680
|
-
|
1681
|
-
|
1682
|
-
typedef
|
1683
|
-
|
1684
|
-
|
1685
|
-
|
1686
|
-
|
1687
|
-
|
1688
|
-
|
1689
|
-
|
1690
|
-
|
1691
|
-
|
1692
|
-
|
1693
|
-
|
1694
|
-
|
1695
|
-
|
1696
|
-
|
1697
|
-
|
1698
|
-
|
1699
|
-
|
1700
|
-
|
1701
|
-
|
1702
|
-
|
1703
|
-
|
1704
|
-
|
1705
|
-
|
1706
|
-
|
1707
|
-
|
1708
|
-
|
1709
|
-
|
1710
|
-
|
1711
|
-
typedef struct
|
1712
|
-
|
1713
|
-
|
1714
|
-
|
1715
|
-
|
1716
|
-
|
1717
|
-
|
1718
|
-
|
1719
|
-
|
1720
|
-
|
1721
|
-
|
1722
|
-
|
1723
|
-
|
1724
|
-
|
1725
|
-
typedef
|
1726
|
-
|
1727
|
-
|
1728
|
-
|
1729
|
-
|
1730
|
-
|
1731
|
-
|
1732
|
-
|
1733
|
-
|
1734
|
-
|
1735
|
-
|
1736
|
-
typedef
|
1737
|
-
|
1738
|
-
|
1739
|
-
|
1740
|
-
|
1741
|
-
|
1742
|
-
|
1743
|
-
typedef
|
1744
|
-
|
1745
|
-
|
1746
|
-
|
1747
|
-
|
1748
|
-
|
1749
|
-
|
1750
|
-
|
1751
|
-
|
1752
|
-
|
1753
|
-
|
1754
|
-
|
1755
|
-
|
1756
|
-
|
1757
|
-
|
1758
|
-
|
1759
|
-
|
1760
|
-
|
1761
|
-
|
1762
|
-
|
1763
|
-
|
1764
|
-
|
1765
|
-
|
1766
|
-
|
1767
|
-
|
1768
|
-
|
1769
|
-
|
1770
|
-
|
1771
|
-
|
1772
|
-
|
1773
|
-
|
1774
|
-
|
1775
|
-
|
1776
|
-
|
1777
|
-
|
1778
|
-
|
1779
|
-
|
1780
|
-
|
1781
|
-
|
1782
|
-
typedef struct
|
1783
|
-
|
1784
|
-
|
1785
|
-
|
1786
|
-
|
1787
|
-
|
1788
|
-
|
1789
|
-
|
1790
|
-
|
1791
|
-
|
1792
|
-
|
1793
|
-
|
1794
|
-
|
1795
|
-
|
1796
|
-
|
1797
|
-
|
1798
|
-
|
1799
|
-
|
1800
|
-
|
1801
|
-
|
1802
|
-
|
1803
|
-
|
1804
|
-
|
1805
|
-
|
1806
|
-
|
1807
|
-
|
1808
|
-
|
1809
|
-
|
1810
|
-
|
1811
|
-
|
1812
|
-
|
1813
|
-
|
1814
|
-
|
1815
|
-
|
1816
|
-
|
1817
|
-
|
1818
|
-
|
1819
|
-
|
1820
|
-
|
1821
|
-
typedef
|
1822
|
-
|
1823
|
-
|
1824
|
-
|
1825
|
-
|
1826
|
-
|
1827
|
-
|
1828
|
-
|
1829
|
-
|
1830
|
-
|
1831
|
-
|
1832
|
-
|
1833
|
-
|
1834
|
-
|
1835
|
-
|
1836
|
-
|
1837
|
-
|
1838
|
-
|
1839
|
-
|
1840
|
-
|
1841
|
-
|
1842
|
-
|
1843
|
-
|
1844
|
-
|
1845
|
-
|
1846
|
-
|
1847
|
-
|
1848
|
-
|
1849
|
-
|
1850
|
-
|
1851
|
-
|
1852
|
-
typedef
|
1853
|
-
|
1854
|
-
|
1855
|
-
|
1856
|
-
|
1857
|
-
|
1858
|
-
|
1859
|
-
|
1860
|
-
|
1861
|
-
|
1862
|
-
|
1863
|
-
|
1864
|
-
|
1865
|
-
|
1866
|
-
|
1867
|
-
|
1868
|
-
|
1869
|
-
|
1870
|
-
|
1871
|
-
|
1872
|
-
}
|
1873
|
-
|
1874
|
-
typedef
|
1875
|
-
|
1876
|
-
/*
|
1877
|
-
typedef struct
|
1878
|
-
|
1879
|
-
CK_BYTE_PTR
|
1880
|
-
CK_ULONG
|
1881
|
-
|
1882
|
-
|
1883
|
-
|
1884
|
-
|
1885
|
-
|
1
|
+
/*
|
2
|
+
* Copyright (C) OASIS Open 2014. All rights reserved.
|
3
|
+
* OASIS trademark, IPR and other policies apply.
|
4
|
+
* http://www.oasis-open.org/policies-guidelines/ipr
|
5
|
+
*/
|
6
|
+
|
7
|
+
/* See top of pkcs11.h for information about the macros that
|
8
|
+
* must be defined and the structure-packing conventions that
|
9
|
+
* must be set before including this file. */
|
10
|
+
|
11
|
+
#ifndef _PKCS11T_H_
|
12
|
+
#define _PKCS11T_H_ 1
|
13
|
+
|
14
|
+
#define CRYPTOKI_VERSION_MAJOR 2
|
15
|
+
#define CRYPTOKI_VERSION_MINOR 40
|
16
|
+
#define CRYPTOKI_VERSION_AMENDMENT 0
|
17
|
+
|
18
|
+
#define CK_TRUE 1
|
19
|
+
#define CK_FALSE 0
|
20
|
+
|
21
|
+
#ifndef CK_DISABLE_TRUE_FALSE
|
22
|
+
#ifndef FALSE
|
23
|
+
#define FALSE CK_FALSE
|
24
|
+
#endif
|
25
|
+
|
26
|
+
#ifndef TRUE
|
27
|
+
#define TRUE CK_TRUE
|
28
|
+
#endif
|
29
|
+
#endif
|
30
|
+
|
31
|
+
/* an unsigned 8-bit value */
|
32
|
+
typedef unsigned char CK_BYTE;
|
33
|
+
|
34
|
+
/* an unsigned 8-bit character */
|
35
|
+
typedef CK_BYTE CK_CHAR;
|
36
|
+
|
37
|
+
/* an 8-bit UTF-8 character */
|
38
|
+
typedef CK_BYTE CK_UTF8CHAR;
|
39
|
+
|
40
|
+
/* a BYTE-sized Boolean flag */
|
41
|
+
typedef CK_BYTE CK_BBOOL;
|
42
|
+
|
43
|
+
/* an unsigned value, at least 32 bits long */
|
44
|
+
typedef unsigned long int CK_ULONG;
|
45
|
+
|
46
|
+
/* a signed value, the same size as a CK_ULONG */
|
47
|
+
typedef long int CK_LONG;
|
48
|
+
|
49
|
+
/* at least 32 bits; each bit is a Boolean flag */
|
50
|
+
typedef CK_ULONG CK_FLAGS;
|
51
|
+
|
52
|
+
|
53
|
+
/* some special values for certain CK_ULONG variables */
|
54
|
+
#define CK_UNAVAILABLE_INFORMATION (~0UL)
|
55
|
+
#define CK_EFFECTIVELY_INFINITE 0UL
|
56
|
+
|
57
|
+
|
58
|
+
typedef CK_BYTE CK_PTR CK_BYTE_PTR;
|
59
|
+
typedef CK_CHAR CK_PTR CK_CHAR_PTR;
|
60
|
+
typedef CK_UTF8CHAR CK_PTR CK_UTF8CHAR_PTR;
|
61
|
+
typedef CK_ULONG CK_PTR CK_ULONG_PTR;
|
62
|
+
typedef void CK_PTR CK_VOID_PTR;
|
63
|
+
|
64
|
+
/* Pointer to a CK_VOID_PTR-- i.e., pointer to pointer to void */
|
65
|
+
typedef CK_VOID_PTR CK_PTR CK_VOID_PTR_PTR;
|
66
|
+
|
67
|
+
|
68
|
+
/* The following value is always invalid if used as a session */
|
69
|
+
/* handle or object handle */
|
70
|
+
#define CK_INVALID_HANDLE 0UL
|
71
|
+
|
72
|
+
|
73
|
+
typedef struct CK_VERSION {
|
74
|
+
CK_BYTE major; /* integer portion of version number */
|
75
|
+
CK_BYTE minor; /* 1/100ths portion of version number */
|
76
|
+
} CK_VERSION;
|
77
|
+
|
78
|
+
typedef CK_VERSION CK_PTR CK_VERSION_PTR;
|
79
|
+
|
80
|
+
|
81
|
+
typedef struct CK_INFO {
|
82
|
+
/* manufacturerID and libraryDecription have been changed from
|
83
|
+
* CK_CHAR to CK_UTF8CHAR for v2.10 */
|
84
|
+
CK_VERSION cryptokiVersion; /* Cryptoki interface ver */
|
85
|
+
CK_UTF8CHAR manufacturerID[32]; /* blank padded */
|
86
|
+
CK_FLAGS flags; /* must be zero */
|
87
|
+
|
88
|
+
CK_UTF8CHAR libraryDescription[32]; /* blank padded */
|
89
|
+
CK_VERSION libraryVersion; /* version of library */
|
90
|
+
} CK_INFO;
|
91
|
+
|
92
|
+
typedef CK_INFO CK_PTR CK_INFO_PTR;
|
93
|
+
|
94
|
+
|
95
|
+
/* CK_NOTIFICATION enumerates the types of notifications that
|
96
|
+
* Cryptoki provides to an application */
|
97
|
+
typedef CK_ULONG CK_NOTIFICATION;
|
98
|
+
#define CKN_SURRENDER 0UL
|
99
|
+
#define CKN_OTP_CHANGED 1UL
|
100
|
+
|
101
|
+
|
102
|
+
typedef CK_ULONG CK_SLOT_ID;
|
103
|
+
|
104
|
+
typedef CK_SLOT_ID CK_PTR CK_SLOT_ID_PTR;
|
105
|
+
|
106
|
+
|
107
|
+
/* CK_SLOT_INFO provides information about a slot */
|
108
|
+
typedef struct CK_SLOT_INFO {
|
109
|
+
/* slotDescription and manufacturerID have been changed from
|
110
|
+
* CK_CHAR to CK_UTF8CHAR for v2.10 */
|
111
|
+
CK_UTF8CHAR slotDescription[64]; /* blank padded */
|
112
|
+
CK_UTF8CHAR manufacturerID[32]; /* blank padded */
|
113
|
+
CK_FLAGS flags;
|
114
|
+
|
115
|
+
CK_VERSION hardwareVersion; /* version of hardware */
|
116
|
+
CK_VERSION firmwareVersion; /* version of firmware */
|
117
|
+
} CK_SLOT_INFO;
|
118
|
+
|
119
|
+
/* flags: bit flags that provide capabilities of the slot
|
120
|
+
* Bit Flag Mask Meaning
|
121
|
+
*/
|
122
|
+
#define CKF_TOKEN_PRESENT 0x00000001UL /* a token is there */
|
123
|
+
#define CKF_REMOVABLE_DEVICE 0x00000002UL /* removable devices*/
|
124
|
+
#define CKF_HW_SLOT 0x00000004UL /* hardware slot */
|
125
|
+
|
126
|
+
typedef CK_SLOT_INFO CK_PTR CK_SLOT_INFO_PTR;
|
127
|
+
|
128
|
+
|
129
|
+
/* CK_TOKEN_INFO provides information about a token */
|
130
|
+
typedef struct CK_TOKEN_INFO {
|
131
|
+
/* label, manufacturerID, and model have been changed from
|
132
|
+
* CK_CHAR to CK_UTF8CHAR for v2.10 */
|
133
|
+
CK_UTF8CHAR label[32]; /* blank padded */
|
134
|
+
CK_UTF8CHAR manufacturerID[32]; /* blank padded */
|
135
|
+
CK_UTF8CHAR model[16]; /* blank padded */
|
136
|
+
CK_CHAR serialNumber[16]; /* blank padded */
|
137
|
+
CK_FLAGS flags; /* see below */
|
138
|
+
|
139
|
+
CK_ULONG ulMaxSessionCount; /* max open sessions */
|
140
|
+
CK_ULONG ulSessionCount; /* sess. now open */
|
141
|
+
CK_ULONG ulMaxRwSessionCount; /* max R/W sessions */
|
142
|
+
CK_ULONG ulRwSessionCount; /* R/W sess. now open */
|
143
|
+
CK_ULONG ulMaxPinLen; /* in bytes */
|
144
|
+
CK_ULONG ulMinPinLen; /* in bytes */
|
145
|
+
CK_ULONG ulTotalPublicMemory; /* in bytes */
|
146
|
+
CK_ULONG ulFreePublicMemory; /* in bytes */
|
147
|
+
CK_ULONG ulTotalPrivateMemory; /* in bytes */
|
148
|
+
CK_ULONG ulFreePrivateMemory; /* in bytes */
|
149
|
+
CK_VERSION hardwareVersion; /* version of hardware */
|
150
|
+
CK_VERSION firmwareVersion; /* version of firmware */
|
151
|
+
CK_CHAR utcTime[16]; /* time */
|
152
|
+
} CK_TOKEN_INFO;
|
153
|
+
|
154
|
+
/* The flags parameter is defined as follows:
|
155
|
+
* Bit Flag Mask Meaning
|
156
|
+
*/
|
157
|
+
#define CKF_RNG 0x00000001UL /* has random #
|
158
|
+
* generator */
|
159
|
+
#define CKF_WRITE_PROTECTED 0x00000002UL /* token is
|
160
|
+
* write-
|
161
|
+
* protected */
|
162
|
+
#define CKF_LOGIN_REQUIRED 0x00000004UL /* user must
|
163
|
+
* login */
|
164
|
+
#define CKF_USER_PIN_INITIALIZED 0x00000008UL /* normal user's
|
165
|
+
* PIN is set */
|
166
|
+
|
167
|
+
/* CKF_RESTORE_KEY_NOT_NEEDED. If it is set,
|
168
|
+
* that means that *every* time the state of cryptographic
|
169
|
+
* operations of a session is successfully saved, all keys
|
170
|
+
* needed to continue those operations are stored in the state */
|
171
|
+
#define CKF_RESTORE_KEY_NOT_NEEDED 0x00000020UL
|
172
|
+
|
173
|
+
/* CKF_CLOCK_ON_TOKEN. If it is set, that means
|
174
|
+
* that the token has some sort of clock. The time on that
|
175
|
+
* clock is returned in the token info structure */
|
176
|
+
#define CKF_CLOCK_ON_TOKEN 0x00000040UL
|
177
|
+
|
178
|
+
/* CKF_PROTECTED_AUTHENTICATION_PATH. If it is
|
179
|
+
* set, that means that there is some way for the user to login
|
180
|
+
* without sending a PIN through the Cryptoki library itself */
|
181
|
+
#define CKF_PROTECTED_AUTHENTICATION_PATH 0x00000100UL
|
182
|
+
|
183
|
+
/* CKF_DUAL_CRYPTO_OPERATIONS. If it is true,
|
184
|
+
* that means that a single session with the token can perform
|
185
|
+
* dual simultaneous cryptographic operations (digest and
|
186
|
+
* encrypt; decrypt and digest; sign and encrypt; and decrypt
|
187
|
+
* and sign) */
|
188
|
+
#define CKF_DUAL_CRYPTO_OPERATIONS 0x00000200UL
|
189
|
+
|
190
|
+
/* CKF_TOKEN_INITIALIZED. If it is true, the
|
191
|
+
* token has been initialized using C_InitializeToken or an
|
192
|
+
* equivalent mechanism outside the scope of PKCS #11.
|
193
|
+
* Calling C_InitializeToken when this flag is set will cause
|
194
|
+
* the token to be reinitialized. */
|
195
|
+
#define CKF_TOKEN_INITIALIZED 0x00000400UL
|
196
|
+
|
197
|
+
/* CKF_SECONDARY_AUTHENTICATION. If it is
|
198
|
+
* true, the token supports secondary authentication for
|
199
|
+
* private key objects. This flag is deprecated in v2.11 and
|
200
|
+
onwards. */
|
201
|
+
#define CKF_SECONDARY_AUTHENTICATION 0x00000800UL
|
202
|
+
|
203
|
+
/* CKF_USER_PIN_COUNT_LOW. If it is true, an
|
204
|
+
* incorrect user login PIN has been entered at least once
|
205
|
+
* since the last successful authentication. */
|
206
|
+
#define CKF_USER_PIN_COUNT_LOW 0x00010000UL
|
207
|
+
|
208
|
+
/* CKF_USER_PIN_FINAL_TRY. If it is true,
|
209
|
+
* supplying an incorrect user PIN will it to become locked. */
|
210
|
+
#define CKF_USER_PIN_FINAL_TRY 0x00020000UL
|
211
|
+
|
212
|
+
/* CKF_USER_PIN_LOCKED. If it is true, the
|
213
|
+
* user PIN has been locked. User login to the token is not
|
214
|
+
* possible. */
|
215
|
+
#define CKF_USER_PIN_LOCKED 0x00040000UL
|
216
|
+
|
217
|
+
/* CKF_USER_PIN_TO_BE_CHANGED. If it is true,
|
218
|
+
* the user PIN value is the default value set by token
|
219
|
+
* initialization or manufacturing, or the PIN has been
|
220
|
+
* expired by the card. */
|
221
|
+
#define CKF_USER_PIN_TO_BE_CHANGED 0x00080000UL
|
222
|
+
|
223
|
+
/* CKF_SO_PIN_COUNT_LOW. If it is true, an
|
224
|
+
* incorrect SO login PIN has been entered at least once since
|
225
|
+
* the last successful authentication. */
|
226
|
+
#define CKF_SO_PIN_COUNT_LOW 0x00100000UL
|
227
|
+
|
228
|
+
/* CKF_SO_PIN_FINAL_TRY. If it is true,
|
229
|
+
* supplying an incorrect SO PIN will it to become locked. */
|
230
|
+
#define CKF_SO_PIN_FINAL_TRY 0x00200000UL
|
231
|
+
|
232
|
+
/* CKF_SO_PIN_LOCKED if new for v2.10. If it is true, the SO
|
233
|
+
* PIN has been locked. SO login to the token is not possible.
|
234
|
+
*/
|
235
|
+
#define CKF_SO_PIN_LOCKED 0x00400000UL
|
236
|
+
|
237
|
+
/* CKF_SO_PIN_TO_BE_CHANGED. If it is true,
|
238
|
+
* the SO PIN value is the default value set by token
|
239
|
+
* initialization or manufacturing, or the PIN has been
|
240
|
+
* expired by the card. */
|
241
|
+
#define CKF_SO_PIN_TO_BE_CHANGED 0x00800000UL
|
242
|
+
|
243
|
+
#define CKF_ERROR_STATE 0x01000000UL
|
244
|
+
|
245
|
+
typedef CK_TOKEN_INFO CK_PTR CK_TOKEN_INFO_PTR;
|
246
|
+
|
247
|
+
|
248
|
+
/* CK_SESSION_HANDLE is a Cryptoki-assigned value that
|
249
|
+
* identifies a session */
|
250
|
+
typedef CK_ULONG CK_SESSION_HANDLE;
|
251
|
+
|
252
|
+
typedef CK_SESSION_HANDLE CK_PTR CK_SESSION_HANDLE_PTR;
|
253
|
+
|
254
|
+
|
255
|
+
/* CK_USER_TYPE enumerates the types of Cryptoki users */
|
256
|
+
typedef CK_ULONG CK_USER_TYPE;
|
257
|
+
/* Security Officer */
|
258
|
+
#define CKU_SO 0UL
|
259
|
+
/* Normal user */
|
260
|
+
#define CKU_USER 1UL
|
261
|
+
/* Context specific */
|
262
|
+
#define CKU_CONTEXT_SPECIFIC 2UL
|
263
|
+
|
264
|
+
/* CK_STATE enumerates the session states */
|
265
|
+
typedef CK_ULONG CK_STATE;
|
266
|
+
#define CKS_RO_PUBLIC_SESSION 0UL
|
267
|
+
#define CKS_RO_USER_FUNCTIONS 1UL
|
268
|
+
#define CKS_RW_PUBLIC_SESSION 2UL
|
269
|
+
#define CKS_RW_USER_FUNCTIONS 3UL
|
270
|
+
#define CKS_RW_SO_FUNCTIONS 4UL
|
271
|
+
|
272
|
+
|
273
|
+
/* CK_SESSION_INFO provides information about a session */
|
274
|
+
typedef struct CK_SESSION_INFO {
|
275
|
+
CK_SLOT_ID slotID;
|
276
|
+
CK_STATE state;
|
277
|
+
CK_FLAGS flags; /* see below */
|
278
|
+
CK_ULONG ulDeviceError; /* device-dependent error code */
|
279
|
+
} CK_SESSION_INFO;
|
280
|
+
|
281
|
+
/* The flags are defined in the following table:
|
282
|
+
* Bit Flag Mask Meaning
|
283
|
+
*/
|
284
|
+
#define CKF_RW_SESSION 0x00000002UL /* session is r/w */
|
285
|
+
#define CKF_SERIAL_SESSION 0x00000004UL /* no parallel */
|
286
|
+
|
287
|
+
typedef CK_SESSION_INFO CK_PTR CK_SESSION_INFO_PTR;
|
288
|
+
|
289
|
+
|
290
|
+
/* CK_OBJECT_HANDLE is a token-specific identifier for an
|
291
|
+
* object */
|
292
|
+
typedef CK_ULONG CK_OBJECT_HANDLE;
|
293
|
+
|
294
|
+
typedef CK_OBJECT_HANDLE CK_PTR CK_OBJECT_HANDLE_PTR;
|
295
|
+
|
296
|
+
|
297
|
+
/* CK_OBJECT_CLASS is a value that identifies the classes (or
|
298
|
+
* types) of objects that Cryptoki recognizes. It is defined
|
299
|
+
* as follows: */
|
300
|
+
typedef CK_ULONG CK_OBJECT_CLASS;
|
301
|
+
|
302
|
+
/* The following classes of objects are defined: */
|
303
|
+
#define CKO_DATA 0x00000000UL
|
304
|
+
#define CKO_CERTIFICATE 0x00000001UL
|
305
|
+
#define CKO_PUBLIC_KEY 0x00000002UL
|
306
|
+
#define CKO_PRIVATE_KEY 0x00000003UL
|
307
|
+
#define CKO_SECRET_KEY 0x00000004UL
|
308
|
+
#define CKO_HW_FEATURE 0x00000005UL
|
309
|
+
#define CKO_DOMAIN_PARAMETERS 0x00000006UL
|
310
|
+
#define CKO_MECHANISM 0x00000007UL
|
311
|
+
#define CKO_OTP_KEY 0x00000008UL
|
312
|
+
|
313
|
+
#define CKO_VENDOR_DEFINED 0x80000000UL
|
314
|
+
|
315
|
+
typedef CK_OBJECT_CLASS CK_PTR CK_OBJECT_CLASS_PTR;
|
316
|
+
|
317
|
+
/* CK_HW_FEATURE_TYPE is a
|
318
|
+
* value that identifies the hardware feature type of an object
|
319
|
+
* with CK_OBJECT_CLASS equal to CKO_HW_FEATURE. */
|
320
|
+
typedef CK_ULONG CK_HW_FEATURE_TYPE;
|
321
|
+
|
322
|
+
/* The following hardware feature types are defined */
|
323
|
+
#define CKH_MONOTONIC_COUNTER 0x00000001UL
|
324
|
+
#define CKH_CLOCK 0x00000002UL
|
325
|
+
#define CKH_USER_INTERFACE 0x00000003UL
|
326
|
+
#define CKH_VENDOR_DEFINED 0x80000000UL
|
327
|
+
|
328
|
+
/* CK_KEY_TYPE is a value that identifies a key type */
|
329
|
+
typedef CK_ULONG CK_KEY_TYPE;
|
330
|
+
|
331
|
+
/* the following key types are defined: */
|
332
|
+
#define CKK_RSA 0x00000000UL
|
333
|
+
#define CKK_DSA 0x00000001UL
|
334
|
+
#define CKK_DH 0x00000002UL
|
335
|
+
/* CKK_ECDSA is deprecated in v2.11, CKK_EC is preferred. */
|
336
|
+
#define CKK_ECDSA 0x00000003UL
|
337
|
+
#define CKK_EC 0x00000003UL
|
338
|
+
#define CKK_X9_42_DH 0x00000004UL
|
339
|
+
#define CKK_KEA 0x00000005UL
|
340
|
+
#define CKK_GENERIC_SECRET 0x00000010UL
|
341
|
+
#define CKK_RC2 0x00000011UL
|
342
|
+
#define CKK_RC4 0x00000012UL
|
343
|
+
#define CKK_DES 0x00000013UL
|
344
|
+
#define CKK_DES2 0x00000014UL
|
345
|
+
#define CKK_DES3 0x00000015UL
|
346
|
+
#define CKK_CAST 0x00000016UL
|
347
|
+
#define CKK_CAST3 0x00000017UL
|
348
|
+
/* CKK_CAST5 is deprecated in v2.11, CKK_CAST128 is preferred. */
|
349
|
+
#define CKK_CAST5 0x00000018UL
|
350
|
+
#define CKK_CAST128 0x00000018UL
|
351
|
+
#define CKK_RC5 0x00000019UL
|
352
|
+
#define CKK_IDEA 0x0000001AUL
|
353
|
+
#define CKK_SKIPJACK 0x0000001BUL
|
354
|
+
#define CKK_BATON 0x0000001CUL
|
355
|
+
#define CKK_JUNIPER 0x0000001DUL
|
356
|
+
#define CKK_CDMF 0x0000001EUL
|
357
|
+
#define CKK_AES 0x0000001FUL
|
358
|
+
#define CKK_BLOWFISH 0x00000020UL
|
359
|
+
#define CKK_TWOFISH 0x00000021UL
|
360
|
+
#define CKK_SECURID 0x00000022UL
|
361
|
+
#define CKK_HOTP 0x00000023UL
|
362
|
+
#define CKK_ACTI 0x00000024UL
|
363
|
+
#define CKK_CAMELLIA 0x00000025UL
|
364
|
+
#define CKK_ARIA 0x00000026UL
|
365
|
+
|
366
|
+
/* new for v2.40 */
|
367
|
+
#define CKK_SHA512_224_HMAC 0x00000027UL
|
368
|
+
#define CKK_SHA512_256_HMAC 0x00000028UL
|
369
|
+
#define CKK_SHA512_T_HMAC 0x00000029UL
|
370
|
+
|
371
|
+
#define CKK_SHA_1_HMAC 0x00000040UL
|
372
|
+
#define CKK_SHA224_HMAC 0x00000041UL
|
373
|
+
#define CKK_SHA256_HMAC 0x00000042UL
|
374
|
+
#define CKK_SHA384_HMAC 0x00000043UL
|
375
|
+
#define CKK_SHA512_HMAC 0x00000044UL
|
376
|
+
|
377
|
+
#define CKK_SEED 0x00000050UL
|
378
|
+
|
379
|
+
#define CKK_GOSTR3410 0x00000060UL
|
380
|
+
#define CKK_GOSTR3411 0x00000061UL
|
381
|
+
#define CKK_GOST28147 0x00000062UL
|
382
|
+
|
383
|
+
#define CKK_VENDOR_DEFINED 0x80000000UL
|
384
|
+
|
385
|
+
|
386
|
+
/* CK_CERTIFICATE_TYPE is a value that identifies a certificate
|
387
|
+
* type */
|
388
|
+
typedef CK_ULONG CK_CERTIFICATE_TYPE;
|
389
|
+
|
390
|
+
/* new for v2.40 */
|
391
|
+
#define CK_CERTIFICATE_CATEGORY_UNSPECIFIED 0UL
|
392
|
+
#define CK_CERTIFICATE_CATEGORY_TOKEN_USER 1UL
|
393
|
+
#define CK_CERTIFICATE_CATEGORY_AUTHORITY 2UL
|
394
|
+
#define CK_CERTIFICATE_CATEGORY_OTHER_ENTITY 3UL
|
395
|
+
|
396
|
+
/* new for v2.40 */
|
397
|
+
#define CK_SECURITY_DOMAIN_UNSPECIFIED 0UL
|
398
|
+
#define CK_SECURITY_DOMAIN_MANUFACTURER 1UL
|
399
|
+
#define CK_SECURITY_DOMAIN_OPERATOR 2UL
|
400
|
+
#define CK_SECURITY_DOMAIN_THIRD_PARTY 3UL
|
401
|
+
|
402
|
+
|
403
|
+
/* The following certificate types are defined: */
|
404
|
+
#define CKC_X_509 0x00000000UL
|
405
|
+
#define CKC_X_509_ATTR_CERT 0x00000001UL
|
406
|
+
#define CKC_WTLS 0x00000002UL
|
407
|
+
#define CKC_VENDOR_DEFINED 0x80000000UL
|
408
|
+
|
409
|
+
|
410
|
+
/* CK_ATTRIBUTE_TYPE is a value that identifies an attribute
|
411
|
+
* type */
|
412
|
+
typedef CK_ULONG CK_ATTRIBUTE_TYPE;
|
413
|
+
|
414
|
+
/* The CKF_ARRAY_ATTRIBUTE flag identifies an attribute which
|
415
|
+
consists of an array of values. */
|
416
|
+
#define CKF_ARRAY_ATTRIBUTE 0x40000000UL
|
417
|
+
|
418
|
+
/* The following OTP-related defines relate to the CKA_OTP_FORMAT attribute */
|
419
|
+
#define CK_OTP_FORMAT_DECIMAL 0UL
|
420
|
+
#define CK_OTP_FORMAT_HEXADECIMAL 1UL
|
421
|
+
#define CK_OTP_FORMAT_ALPHANUMERIC 2UL
|
422
|
+
#define CK_OTP_FORMAT_BINARY 3UL
|
423
|
+
|
424
|
+
/* The following OTP-related defines relate to the CKA_OTP_..._REQUIREMENT attributes */
|
425
|
+
#define CK_OTP_PARAM_IGNORED 0UL
|
426
|
+
#define CK_OTP_PARAM_OPTIONAL 1UL
|
427
|
+
#define CK_OTP_PARAM_MANDATORY 2UL
|
428
|
+
|
429
|
+
/* The following attribute types are defined: */
|
430
|
+
#define CKA_CLASS 0x00000000UL
|
431
|
+
#define CKA_TOKEN 0x00000001UL
|
432
|
+
#define CKA_PRIVATE 0x00000002UL
|
433
|
+
#define CKA_LABEL 0x00000003UL
|
434
|
+
#define CKA_APPLICATION 0x00000010UL
|
435
|
+
#define CKA_VALUE 0x00000011UL
|
436
|
+
#define CKA_OBJECT_ID 0x00000012UL
|
437
|
+
#define CKA_CERTIFICATE_TYPE 0x00000080UL
|
438
|
+
#define CKA_ISSUER 0x00000081UL
|
439
|
+
#define CKA_SERIAL_NUMBER 0x00000082UL
|
440
|
+
#define CKA_AC_ISSUER 0x00000083UL
|
441
|
+
#define CKA_OWNER 0x00000084UL
|
442
|
+
#define CKA_ATTR_TYPES 0x00000085UL
|
443
|
+
#define CKA_TRUSTED 0x00000086UL
|
444
|
+
#define CKA_CERTIFICATE_CATEGORY 0x00000087UL
|
445
|
+
#define CKA_JAVA_MIDP_SECURITY_DOMAIN 0x00000088UL
|
446
|
+
#define CKA_URL 0x00000089UL
|
447
|
+
#define CKA_HASH_OF_SUBJECT_PUBLIC_KEY 0x0000008AUL
|
448
|
+
#define CKA_HASH_OF_ISSUER_PUBLIC_KEY 0x0000008BUL
|
449
|
+
#define CKA_NAME_HASH_ALGORITHM 0x0000008CUL
|
450
|
+
#define CKA_CHECK_VALUE 0x00000090UL
|
451
|
+
|
452
|
+
#define CKA_KEY_TYPE 0x00000100UL
|
453
|
+
#define CKA_SUBJECT 0x00000101UL
|
454
|
+
#define CKA_ID 0x00000102UL
|
455
|
+
#define CKA_SENSITIVE 0x00000103UL
|
456
|
+
#define CKA_ENCRYPT 0x00000104UL
|
457
|
+
#define CKA_DECRYPT 0x00000105UL
|
458
|
+
#define CKA_WRAP 0x00000106UL
|
459
|
+
#define CKA_UNWRAP 0x00000107UL
|
460
|
+
#define CKA_SIGN 0x00000108UL
|
461
|
+
#define CKA_SIGN_RECOVER 0x00000109UL
|
462
|
+
#define CKA_VERIFY 0x0000010AUL
|
463
|
+
#define CKA_VERIFY_RECOVER 0x0000010BUL
|
464
|
+
#define CKA_DERIVE 0x0000010CUL
|
465
|
+
#define CKA_START_DATE 0x00000110UL
|
466
|
+
#define CKA_END_DATE 0x00000111UL
|
467
|
+
#define CKA_MODULUS 0x00000120UL
|
468
|
+
#define CKA_MODULUS_BITS 0x00000121UL
|
469
|
+
#define CKA_PUBLIC_EXPONENT 0x00000122UL
|
470
|
+
#define CKA_PRIVATE_EXPONENT 0x00000123UL
|
471
|
+
#define CKA_PRIME_1 0x00000124UL
|
472
|
+
#define CKA_PRIME_2 0x00000125UL
|
473
|
+
#define CKA_EXPONENT_1 0x00000126UL
|
474
|
+
#define CKA_EXPONENT_2 0x00000127UL
|
475
|
+
#define CKA_COEFFICIENT 0x00000128UL
|
476
|
+
#define CKA_PUBLIC_KEY_INFO 0x00000129UL
|
477
|
+
#define CKA_PRIME 0x00000130UL
|
478
|
+
#define CKA_SUBPRIME 0x00000131UL
|
479
|
+
#define CKA_BASE 0x00000132UL
|
480
|
+
|
481
|
+
#define CKA_PRIME_BITS 0x00000133UL
|
482
|
+
#define CKA_SUBPRIME_BITS 0x00000134UL
|
483
|
+
/* (To retain backwards-compatibility) */
|
484
|
+
#define CKA_SUB_PRIME_BITS CKA_SUBPRIME_BITS
|
485
|
+
|
486
|
+
#define CKA_VALUE_BITS 0x00000160UL
|
487
|
+
#define CKA_VALUE_LEN 0x00000161UL
|
488
|
+
#define CKA_EXTRACTABLE 0x00000162UL
|
489
|
+
#define CKA_LOCAL 0x00000163UL
|
490
|
+
#define CKA_NEVER_EXTRACTABLE 0x00000164UL
|
491
|
+
#define CKA_ALWAYS_SENSITIVE 0x00000165UL
|
492
|
+
#define CKA_KEY_GEN_MECHANISM 0x00000166UL
|
493
|
+
|
494
|
+
#define CKA_MODIFIABLE 0x00000170UL
|
495
|
+
#define CKA_COPYABLE 0x00000171UL
|
496
|
+
|
497
|
+
/* new for v2.40 */
|
498
|
+
#define CKA_DESTROYABLE 0x00000172UL
|
499
|
+
|
500
|
+
/* CKA_ECDSA_PARAMS is deprecated in v2.11,
|
501
|
+
* CKA_EC_PARAMS is preferred. */
|
502
|
+
#define CKA_ECDSA_PARAMS 0x00000180UL
|
503
|
+
#define CKA_EC_PARAMS 0x00000180UL
|
504
|
+
|
505
|
+
#define CKA_EC_POINT 0x00000181UL
|
506
|
+
|
507
|
+
/* CKA_SECONDARY_AUTH, CKA_AUTH_PIN_FLAGS,
|
508
|
+
* are new for v2.10. Deprecated in v2.11 and onwards. */
|
509
|
+
#define CKA_SECONDARY_AUTH 0x00000200UL /* Deprecated */
|
510
|
+
#define CKA_AUTH_PIN_FLAGS 0x00000201UL /* Deprecated */
|
511
|
+
|
512
|
+
#define CKA_ALWAYS_AUTHENTICATE 0x00000202UL
|
513
|
+
|
514
|
+
#define CKA_WRAP_WITH_TRUSTED 0x00000210UL
|
515
|
+
#define CKA_WRAP_TEMPLATE (CKF_ARRAY_ATTRIBUTE|0x00000211UL)
|
516
|
+
#define CKA_UNWRAP_TEMPLATE (CKF_ARRAY_ATTRIBUTE|0x00000212UL)
|
517
|
+
|
518
|
+
#define CKA_OTP_FORMAT 0x00000220UL
|
519
|
+
#define CKA_OTP_LENGTH 0x00000221UL
|
520
|
+
#define CKA_OTP_TIME_INTERVAL 0x00000222UL
|
521
|
+
#define CKA_OTP_USER_FRIENDLY_MODE 0x00000223UL
|
522
|
+
#define CKA_OTP_CHALLENGE_REQUIREMENT 0x00000224UL
|
523
|
+
#define CKA_OTP_TIME_REQUIREMENT 0x00000225UL
|
524
|
+
#define CKA_OTP_COUNTER_REQUIREMENT 0x00000226UL
|
525
|
+
#define CKA_OTP_PIN_REQUIREMENT 0x00000227UL
|
526
|
+
#define CKA_OTP_COUNTER 0x0000022EUL
|
527
|
+
#define CKA_OTP_TIME 0x0000022FUL
|
528
|
+
#define CKA_OTP_USER_IDENTIFIER 0x0000022AUL
|
529
|
+
#define CKA_OTP_SERVICE_IDENTIFIER 0x0000022BUL
|
530
|
+
#define CKA_OTP_SERVICE_LOGO 0x0000022CUL
|
531
|
+
#define CKA_OTP_SERVICE_LOGO_TYPE 0x0000022DUL
|
532
|
+
|
533
|
+
#define CKA_GOSTR3410_PARAMS 0x00000250UL
|
534
|
+
#define CKA_GOSTR3411_PARAMS 0x00000251UL
|
535
|
+
#define CKA_GOST28147_PARAMS 0x00000252UL
|
536
|
+
|
537
|
+
#define CKA_HW_FEATURE_TYPE 0x00000300UL
|
538
|
+
#define CKA_RESET_ON_INIT 0x00000301UL
|
539
|
+
#define CKA_HAS_RESET 0x00000302UL
|
540
|
+
|
541
|
+
#define CKA_PIXEL_X 0x00000400UL
|
542
|
+
#define CKA_PIXEL_Y 0x00000401UL
|
543
|
+
#define CKA_RESOLUTION 0x00000402UL
|
544
|
+
#define CKA_CHAR_ROWS 0x00000403UL
|
545
|
+
#define CKA_CHAR_COLUMNS 0x00000404UL
|
546
|
+
#define CKA_COLOR 0x00000405UL
|
547
|
+
#define CKA_BITS_PER_PIXEL 0x00000406UL
|
548
|
+
#define CKA_CHAR_SETS 0x00000480UL
|
549
|
+
#define CKA_ENCODING_METHODS 0x00000481UL
|
550
|
+
#define CKA_MIME_TYPES 0x00000482UL
|
551
|
+
#define CKA_MECHANISM_TYPE 0x00000500UL
|
552
|
+
#define CKA_REQUIRED_CMS_ATTRIBUTES 0x00000501UL
|
553
|
+
#define CKA_DEFAULT_CMS_ATTRIBUTES 0x00000502UL
|
554
|
+
#define CKA_SUPPORTED_CMS_ATTRIBUTES 0x00000503UL
|
555
|
+
#define CKA_ALLOWED_MECHANISMS (CKF_ARRAY_ATTRIBUTE|0x00000600UL)
|
556
|
+
|
557
|
+
#define CKA_VENDOR_DEFINED 0x80000000UL
|
558
|
+
|
559
|
+
/* CK_ATTRIBUTE is a structure that includes the type, length
|
560
|
+
* and value of an attribute */
|
561
|
+
typedef struct CK_ATTRIBUTE {
|
562
|
+
CK_ATTRIBUTE_TYPE type;
|
563
|
+
CK_VOID_PTR pValue;
|
564
|
+
CK_ULONG ulValueLen; /* in bytes */
|
565
|
+
} CK_ATTRIBUTE;
|
566
|
+
|
567
|
+
typedef CK_ATTRIBUTE CK_PTR CK_ATTRIBUTE_PTR;
|
568
|
+
|
569
|
+
|
570
|
+
/* CK_DATE is a structure that defines a date */
|
571
|
+
typedef struct CK_DATE{
|
572
|
+
CK_CHAR year[4]; /* the year ("1900" - "9999") */
|
573
|
+
CK_CHAR month[2]; /* the month ("01" - "12") */
|
574
|
+
CK_CHAR day[2]; /* the day ("01" - "31") */
|
575
|
+
} CK_DATE;
|
576
|
+
|
577
|
+
|
578
|
+
/* CK_MECHANISM_TYPE is a value that identifies a mechanism
|
579
|
+
* type */
|
580
|
+
typedef CK_ULONG CK_MECHANISM_TYPE;
|
581
|
+
|
582
|
+
/* the following mechanism types are defined: */
|
583
|
+
#define CKM_RSA_PKCS_KEY_PAIR_GEN 0x00000000UL
|
584
|
+
#define CKM_RSA_PKCS 0x00000001UL
|
585
|
+
#define CKM_RSA_9796 0x00000002UL
|
586
|
+
#define CKM_RSA_X_509 0x00000003UL
|
587
|
+
|
588
|
+
#define CKM_MD2_RSA_PKCS 0x00000004UL
|
589
|
+
#define CKM_MD5_RSA_PKCS 0x00000005UL
|
590
|
+
#define CKM_SHA1_RSA_PKCS 0x00000006UL
|
591
|
+
|
592
|
+
#define CKM_RIPEMD128_RSA_PKCS 0x00000007UL
|
593
|
+
#define CKM_RIPEMD160_RSA_PKCS 0x00000008UL
|
594
|
+
#define CKM_RSA_PKCS_OAEP 0x00000009UL
|
595
|
+
|
596
|
+
#define CKM_RSA_X9_31_KEY_PAIR_GEN 0x0000000AUL
|
597
|
+
#define CKM_RSA_X9_31 0x0000000BUL
|
598
|
+
#define CKM_SHA1_RSA_X9_31 0x0000000CUL
|
599
|
+
#define CKM_RSA_PKCS_PSS 0x0000000DUL
|
600
|
+
#define CKM_SHA1_RSA_PKCS_PSS 0x0000000EUL
|
601
|
+
|
602
|
+
/* new for v2.40 */
|
603
|
+
#define CKM_DSA_KEY_PAIR_GEN 0x00000010UL
|
604
|
+
#define CKM_DSA 0x00000011UL
|
605
|
+
#define CKM_DSA_SHA1 0x00000012UL
|
606
|
+
#define CKM_DSA_FIPS_G_GEN 0x00000013UL
|
607
|
+
#define CKM_DSA_SHA224 0x00000014UL
|
608
|
+
#define CKM_DSA_SHA256 0x00000015UL
|
609
|
+
#define CKM_DSA_SHA384 0x00000016UL
|
610
|
+
#define CKM_DSA_SHA512 0x00000017UL
|
611
|
+
|
612
|
+
#define CKM_DH_PKCS_KEY_PAIR_GEN 0x00000020UL
|
613
|
+
#define CKM_DH_PKCS_DERIVE 0x00000021UL
|
614
|
+
|
615
|
+
#define CKM_X9_42_DH_KEY_PAIR_GEN 0x00000030UL
|
616
|
+
#define CKM_X9_42_DH_DERIVE 0x00000031UL
|
617
|
+
#define CKM_X9_42_DH_HYBRID_DERIVE 0x00000032UL
|
618
|
+
#define CKM_X9_42_MQV_DERIVE 0x00000033UL
|
619
|
+
|
620
|
+
#define CKM_SHA256_RSA_PKCS 0x00000040UL
|
621
|
+
#define CKM_SHA384_RSA_PKCS 0x00000041UL
|
622
|
+
#define CKM_SHA512_RSA_PKCS 0x00000042UL
|
623
|
+
#define CKM_SHA256_RSA_PKCS_PSS 0x00000043UL
|
624
|
+
#define CKM_SHA384_RSA_PKCS_PSS 0x00000044UL
|
625
|
+
#define CKM_SHA512_RSA_PKCS_PSS 0x00000045UL
|
626
|
+
|
627
|
+
#define CKM_SHA224_RSA_PKCS 0x00000046UL
|
628
|
+
#define CKM_SHA224_RSA_PKCS_PSS 0x00000047UL
|
629
|
+
|
630
|
+
/* new for v2.40 */
|
631
|
+
#define CKM_SHA512_224 0x00000048UL
|
632
|
+
#define CKM_SHA512_224_HMAC 0x00000049UL
|
633
|
+
#define CKM_SHA512_224_HMAC_GENERAL 0x0000004AUL
|
634
|
+
#define CKM_SHA512_224_KEY_DERIVATION 0x0000004BUL
|
635
|
+
#define CKM_SHA512_256 0x0000004CUL
|
636
|
+
#define CKM_SHA512_256_HMAC 0x0000004DUL
|
637
|
+
#define CKM_SHA512_256_HMAC_GENERAL 0x0000004EUL
|
638
|
+
#define CKM_SHA512_256_KEY_DERIVATION 0x0000004FUL
|
639
|
+
|
640
|
+
#define CKM_SHA512_T 0x00000050UL
|
641
|
+
#define CKM_SHA512_T_HMAC 0x00000051UL
|
642
|
+
#define CKM_SHA512_T_HMAC_GENERAL 0x00000052UL
|
643
|
+
#define CKM_SHA512_T_KEY_DERIVATION 0x00000053UL
|
644
|
+
|
645
|
+
#define CKM_RC2_KEY_GEN 0x00000100UL
|
646
|
+
#define CKM_RC2_ECB 0x00000101UL
|
647
|
+
#define CKM_RC2_CBC 0x00000102UL
|
648
|
+
#define CKM_RC2_MAC 0x00000103UL
|
649
|
+
|
650
|
+
#define CKM_RC2_MAC_GENERAL 0x00000104UL
|
651
|
+
#define CKM_RC2_CBC_PAD 0x00000105UL
|
652
|
+
|
653
|
+
#define CKM_RC4_KEY_GEN 0x00000110UL
|
654
|
+
#define CKM_RC4 0x00000111UL
|
655
|
+
#define CKM_DES_KEY_GEN 0x00000120UL
|
656
|
+
#define CKM_DES_ECB 0x00000121UL
|
657
|
+
#define CKM_DES_CBC 0x00000122UL
|
658
|
+
#define CKM_DES_MAC 0x00000123UL
|
659
|
+
|
660
|
+
#define CKM_DES_MAC_GENERAL 0x00000124UL
|
661
|
+
#define CKM_DES_CBC_PAD 0x00000125UL
|
662
|
+
|
663
|
+
#define CKM_DES2_KEY_GEN 0x00000130UL
|
664
|
+
#define CKM_DES3_KEY_GEN 0x00000131UL
|
665
|
+
#define CKM_DES3_ECB 0x00000132UL
|
666
|
+
#define CKM_DES3_CBC 0x00000133UL
|
667
|
+
#define CKM_DES3_MAC 0x00000134UL
|
668
|
+
|
669
|
+
#define CKM_DES3_MAC_GENERAL 0x00000135UL
|
670
|
+
#define CKM_DES3_CBC_PAD 0x00000136UL
|
671
|
+
#define CKM_DES3_CMAC_GENERAL 0x00000137UL
|
672
|
+
#define CKM_DES3_CMAC 0x00000138UL
|
673
|
+
#define CKM_CDMF_KEY_GEN 0x00000140UL
|
674
|
+
#define CKM_CDMF_ECB 0x00000141UL
|
675
|
+
#define CKM_CDMF_CBC 0x00000142UL
|
676
|
+
#define CKM_CDMF_MAC 0x00000143UL
|
677
|
+
#define CKM_CDMF_MAC_GENERAL 0x00000144UL
|
678
|
+
#define CKM_CDMF_CBC_PAD 0x00000145UL
|
679
|
+
|
680
|
+
#define CKM_DES_OFB64 0x00000150UL
|
681
|
+
#define CKM_DES_OFB8 0x00000151UL
|
682
|
+
#define CKM_DES_CFB64 0x00000152UL
|
683
|
+
#define CKM_DES_CFB8 0x00000153UL
|
684
|
+
|
685
|
+
#define CKM_MD2 0x00000200UL
|
686
|
+
|
687
|
+
#define CKM_MD2_HMAC 0x00000201UL
|
688
|
+
#define CKM_MD2_HMAC_GENERAL 0x00000202UL
|
689
|
+
|
690
|
+
#define CKM_MD5 0x00000210UL
|
691
|
+
|
692
|
+
#define CKM_MD5_HMAC 0x00000211UL
|
693
|
+
#define CKM_MD5_HMAC_GENERAL 0x00000212UL
|
694
|
+
|
695
|
+
#define CKM_SHA_1 0x00000220UL
|
696
|
+
|
697
|
+
#define CKM_SHA_1_HMAC 0x00000221UL
|
698
|
+
#define CKM_SHA_1_HMAC_GENERAL 0x00000222UL
|
699
|
+
|
700
|
+
#define CKM_RIPEMD128 0x00000230UL
|
701
|
+
#define CKM_RIPEMD128_HMAC 0x00000231UL
|
702
|
+
#define CKM_RIPEMD128_HMAC_GENERAL 0x00000232UL
|
703
|
+
#define CKM_RIPEMD160 0x00000240UL
|
704
|
+
#define CKM_RIPEMD160_HMAC 0x00000241UL
|
705
|
+
#define CKM_RIPEMD160_HMAC_GENERAL 0x00000242UL
|
706
|
+
|
707
|
+
#define CKM_SHA256 0x00000250UL
|
708
|
+
#define CKM_SHA256_HMAC 0x00000251UL
|
709
|
+
#define CKM_SHA256_HMAC_GENERAL 0x00000252UL
|
710
|
+
#define CKM_SHA224 0x00000255UL
|
711
|
+
#define CKM_SHA224_HMAC 0x00000256UL
|
712
|
+
#define CKM_SHA224_HMAC_GENERAL 0x00000257UL
|
713
|
+
#define CKM_SHA384 0x00000260UL
|
714
|
+
#define CKM_SHA384_HMAC 0x00000261UL
|
715
|
+
#define CKM_SHA384_HMAC_GENERAL 0x00000262UL
|
716
|
+
#define CKM_SHA512 0x00000270UL
|
717
|
+
#define CKM_SHA512_HMAC 0x00000271UL
|
718
|
+
#define CKM_SHA512_HMAC_GENERAL 0x00000272UL
|
719
|
+
#define CKM_SECURID_KEY_GEN 0x00000280UL
|
720
|
+
#define CKM_SECURID 0x00000282UL
|
721
|
+
#define CKM_HOTP_KEY_GEN 0x00000290UL
|
722
|
+
#define CKM_HOTP 0x00000291UL
|
723
|
+
#define CKM_ACTI 0x000002A0UL
|
724
|
+
#define CKM_ACTI_KEY_GEN 0x000002A1UL
|
725
|
+
|
726
|
+
/* new for v2.40 */
|
727
|
+
#define CKM_CAST_KEY_GEN 0x00000300UL
|
728
|
+
#define CKM_CAST_ECB 0x00000301UL
|
729
|
+
#define CKM_CAST_CBC 0x00000302UL
|
730
|
+
#define CKM_CAST_MAC 0x00000303UL
|
731
|
+
#define CKM_CAST_MAC_GENERAL 0x00000304UL
|
732
|
+
#define CKM_CAST_CBC_PAD 0x00000305UL
|
733
|
+
#define CKM_CAST3_KEY_GEN 0x00000310UL
|
734
|
+
#define CKM_CAST3_ECB 0x00000311UL
|
735
|
+
#define CKM_CAST3_CBC 0x00000312UL
|
736
|
+
#define CKM_CAST3_MAC 0x00000313UL
|
737
|
+
#define CKM_CAST3_MAC_GENERAL 0x00000314UL
|
738
|
+
#define CKM_CAST3_CBC_PAD 0x00000315UL
|
739
|
+
/* Note that CAST128 and CAST5 are the same algorithm */
|
740
|
+
#define CKM_CAST5_KEY_GEN 0x00000320UL
|
741
|
+
#define CKM_CAST128_KEY_GEN 0x00000320UL
|
742
|
+
#define CKM_CAST5_ECB 0x00000321UL
|
743
|
+
#define CKM_CAST128_ECB 0x00000321UL
|
744
|
+
#define CKM_CAST5_CBC 0x00000322UL
|
745
|
+
#define CKM_CAST128_CBC 0x00000322UL
|
746
|
+
#define CKM_CAST5_MAC 0x00000323UL
|
747
|
+
#define CKM_CAST128_MAC 0x00000323UL
|
748
|
+
#define CKM_CAST5_MAC_GENERAL 0x00000324UL
|
749
|
+
#define CKM_CAST128_MAC_GENERAL 0x00000324UL
|
750
|
+
#define CKM_CAST5_CBC_PAD 0x00000325UL
|
751
|
+
#define CKM_CAST128_CBC_PAD 0x00000325UL
|
752
|
+
#define CKM_RC5_KEY_GEN 0x00000330UL
|
753
|
+
#define CKM_RC5_ECB 0x00000331UL
|
754
|
+
#define CKM_RC5_CBC 0x00000332UL
|
755
|
+
#define CKM_RC5_MAC 0x00000333UL
|
756
|
+
#define CKM_RC5_MAC_GENERAL 0x00000334UL
|
757
|
+
#define CKM_RC5_CBC_PAD 0x00000335UL
|
758
|
+
#define CKM_IDEA_KEY_GEN 0x00000340UL
|
759
|
+
#define CKM_IDEA_ECB 0x00000341UL
|
760
|
+
#define CKM_IDEA_CBC 0x00000342UL
|
761
|
+
#define CKM_IDEA_MAC 0x00000343UL
|
762
|
+
#define CKM_IDEA_MAC_GENERAL 0x00000344UL
|
763
|
+
#define CKM_IDEA_CBC_PAD 0x00000345UL
|
764
|
+
#define CKM_GENERIC_SECRET_KEY_GEN 0x00000350UL
|
765
|
+
#define CKM_CONCATENATE_BASE_AND_KEY 0x00000360UL
|
766
|
+
#define CKM_CONCATENATE_BASE_AND_DATA 0x00000362UL
|
767
|
+
#define CKM_CONCATENATE_DATA_AND_BASE 0x00000363UL
|
768
|
+
#define CKM_XOR_BASE_AND_DATA 0x00000364UL
|
769
|
+
#define CKM_EXTRACT_KEY_FROM_KEY 0x00000365UL
|
770
|
+
#define CKM_SSL3_PRE_MASTER_KEY_GEN 0x00000370UL
|
771
|
+
#define CKM_SSL3_MASTER_KEY_DERIVE 0x00000371UL
|
772
|
+
#define CKM_SSL3_KEY_AND_MAC_DERIVE 0x00000372UL
|
773
|
+
|
774
|
+
#define CKM_SSL3_MASTER_KEY_DERIVE_DH 0x00000373UL
|
775
|
+
#define CKM_TLS_PRE_MASTER_KEY_GEN 0x00000374UL
|
776
|
+
#define CKM_TLS_MASTER_KEY_DERIVE 0x00000375UL
|
777
|
+
#define CKM_TLS_KEY_AND_MAC_DERIVE 0x00000376UL
|
778
|
+
#define CKM_TLS_MASTER_KEY_DERIVE_DH 0x00000377UL
|
779
|
+
|
780
|
+
#define CKM_TLS_PRF 0x00000378UL
|
781
|
+
|
782
|
+
#define CKM_SSL3_MD5_MAC 0x00000380UL
|
783
|
+
#define CKM_SSL3_SHA1_MAC 0x00000381UL
|
784
|
+
#define CKM_MD5_KEY_DERIVATION 0x00000390UL
|
785
|
+
#define CKM_MD2_KEY_DERIVATION 0x00000391UL
|
786
|
+
#define CKM_SHA1_KEY_DERIVATION 0x00000392UL
|
787
|
+
|
788
|
+
#define CKM_SHA256_KEY_DERIVATION 0x00000393UL
|
789
|
+
#define CKM_SHA384_KEY_DERIVATION 0x00000394UL
|
790
|
+
#define CKM_SHA512_KEY_DERIVATION 0x00000395UL
|
791
|
+
#define CKM_SHA224_KEY_DERIVATION 0x00000396UL
|
792
|
+
|
793
|
+
/* new for v2.40 */
|
794
|
+
#define CKM_PBE_MD2_DES_CBC 0x000003A0UL
|
795
|
+
#define CKM_PBE_MD5_DES_CBC 0x000003A1UL
|
796
|
+
#define CKM_PBE_MD5_CAST_CBC 0x000003A2UL
|
797
|
+
#define CKM_PBE_MD5_CAST3_CBC 0x000003A3UL
|
798
|
+
#define CKM_PBE_MD5_CAST5_CBC 0x000003A4UL
|
799
|
+
#define CKM_PBE_MD5_CAST128_CBC 0x000003A4UL
|
800
|
+
#define CKM_PBE_SHA1_CAST5_CBC 0x000003A5UL
|
801
|
+
#define CKM_PBE_SHA1_CAST128_CBC 0x000003A5UL
|
802
|
+
#define CKM_PBE_SHA1_RC4_128 0x000003A6UL
|
803
|
+
#define CKM_PBE_SHA1_RC4_40 0x000003A7UL
|
804
|
+
#define CKM_PBE_SHA1_DES3_EDE_CBC 0x000003A8UL
|
805
|
+
#define CKM_PBE_SHA1_DES2_EDE_CBC 0x000003A9UL
|
806
|
+
#define CKM_PBE_SHA1_RC2_128_CBC 0x000003AAUL
|
807
|
+
#define CKM_PBE_SHA1_RC2_40_CBC 0x000003ABUL
|
808
|
+
|
809
|
+
#define CKM_PKCS5_PBKD2 0x000003B0UL
|
810
|
+
|
811
|
+
#define CKM_PBA_SHA1_WITH_SHA1_HMAC 0x000003C0UL
|
812
|
+
|
813
|
+
#define CKM_WTLS_PRE_MASTER_KEY_GEN 0x000003D0UL
|
814
|
+
#define CKM_WTLS_MASTER_KEY_DERIVE 0x000003D1UL
|
815
|
+
#define CKM_WTLS_MASTER_KEY_DERIVE_DH_ECC 0x000003D2UL
|
816
|
+
#define CKM_WTLS_PRF 0x000003D3UL
|
817
|
+
#define CKM_WTLS_SERVER_KEY_AND_MAC_DERIVE 0x000003D4UL
|
818
|
+
#define CKM_WTLS_CLIENT_KEY_AND_MAC_DERIVE 0x000003D5UL
|
819
|
+
|
820
|
+
/* new for v2.40 */
|
821
|
+
#define CKM_TLS10_MAC_SERVER 0x000003D6UL
|
822
|
+
#define CKM_TLS10_MAC_CLIENT 0x000003D7UL
|
823
|
+
#define CKM_TLS12_MAC 0x000003D8UL
|
824
|
+
#define CKM_TLS12_KDF 0x000003D9UL
|
825
|
+
#define CKM_TLS12_MASTER_KEY_DERIVE 0x000003E0UL
|
826
|
+
#define CKM_TLS12_KEY_AND_MAC_DERIVE 0x000003E1UL
|
827
|
+
#define CKM_TLS12_MASTER_KEY_DERIVE_DH 0x000003E2UL
|
828
|
+
#define CKM_TLS12_KEY_SAFE_DERIVE 0x000003E3UL
|
829
|
+
#define CKM_TLS_MAC 0x000003E4UL
|
830
|
+
#define CKM_TLS_KDF 0x000003E5UL
|
831
|
+
|
832
|
+
#define CKM_KEY_WRAP_LYNKS 0x00000400UL
|
833
|
+
#define CKM_KEY_WRAP_SET_OAEP 0x00000401UL
|
834
|
+
|
835
|
+
#define CKM_CMS_SIG 0x00000500UL
|
836
|
+
/* new for v2.40 */
|
837
|
+
#define CKM_KIP_DERIVE 0x00000510UL
|
838
|
+
#define CKM_KIP_WRAP 0x00000511UL
|
839
|
+
#define CKM_KIP_MAC 0x00000512UL
|
840
|
+
|
841
|
+
#define CKM_CAMELLIA_KEY_GEN 0x00000550UL
|
842
|
+
#define CKM_CAMELLIA_ECB 0x00000551UL
|
843
|
+
#define CKM_CAMELLIA_CBC 0x00000552UL
|
844
|
+
#define CKM_CAMELLIA_MAC 0x00000553UL
|
845
|
+
#define CKM_CAMELLIA_MAC_GENERAL 0x00000554UL
|
846
|
+
#define CKM_CAMELLIA_CBC_PAD 0x00000555UL
|
847
|
+
#define CKM_CAMELLIA_ECB_ENCRYPT_DATA 0x00000556UL
|
848
|
+
#define CKM_CAMELLIA_CBC_ENCRYPT_DATA 0x00000557UL
|
849
|
+
#define CKM_CAMELLIA_CTR 0x00000558UL
|
850
|
+
|
851
|
+
#define CKM_ARIA_KEY_GEN 0x00000560UL
|
852
|
+
#define CKM_ARIA_ECB 0x00000561UL
|
853
|
+
#define CKM_ARIA_CBC 0x00000562UL
|
854
|
+
#define CKM_ARIA_MAC 0x00000563UL
|
855
|
+
#define CKM_ARIA_MAC_GENERAL 0x00000564UL
|
856
|
+
#define CKM_ARIA_CBC_PAD 0x00000565UL
|
857
|
+
#define CKM_ARIA_ECB_ENCRYPT_DATA 0x00000566UL
|
858
|
+
#define CKM_ARIA_CBC_ENCRYPT_DATA 0x00000567UL
|
859
|
+
|
860
|
+
#define CKM_SEED_KEY_GEN 0x00000650UL
|
861
|
+
#define CKM_SEED_ECB 0x00000651UL
|
862
|
+
#define CKM_SEED_CBC 0x00000652UL
|
863
|
+
#define CKM_SEED_MAC 0x00000653UL
|
864
|
+
#define CKM_SEED_MAC_GENERAL 0x00000654UL
|
865
|
+
#define CKM_SEED_CBC_PAD 0x00000655UL
|
866
|
+
#define CKM_SEED_ECB_ENCRYPT_DATA 0x00000656UL
|
867
|
+
#define CKM_SEED_CBC_ENCRYPT_DATA 0x00000657UL
|
868
|
+
|
869
|
+
#define CKM_SKIPJACK_KEY_GEN 0x00001000UL
|
870
|
+
#define CKM_SKIPJACK_ECB64 0x00001001UL
|
871
|
+
#define CKM_SKIPJACK_CBC64 0x00001002UL
|
872
|
+
#define CKM_SKIPJACK_OFB64 0x00001003UL
|
873
|
+
#define CKM_SKIPJACK_CFB64 0x00001004UL
|
874
|
+
#define CKM_SKIPJACK_CFB32 0x00001005UL
|
875
|
+
#define CKM_SKIPJACK_CFB16 0x00001006UL
|
876
|
+
#define CKM_SKIPJACK_CFB8 0x00001007UL
|
877
|
+
#define CKM_SKIPJACK_WRAP 0x00001008UL
|
878
|
+
#define CKM_SKIPJACK_PRIVATE_WRAP 0x00001009UL
|
879
|
+
#define CKM_SKIPJACK_RELAYX 0x0000100aUL
|
880
|
+
#define CKM_KEA_KEY_PAIR_GEN 0x00001010UL
|
881
|
+
#define CKM_KEA_KEY_DERIVE 0x00001011UL
|
882
|
+
#define CKM_KEA_DERIVE 0x00001012UL
|
883
|
+
#define CKM_FORTEZZA_TIMESTAMP 0x00001020UL
|
884
|
+
#define CKM_BATON_KEY_GEN 0x00001030UL
|
885
|
+
#define CKM_BATON_ECB128 0x00001031UL
|
886
|
+
#define CKM_BATON_ECB96 0x00001032UL
|
887
|
+
#define CKM_BATON_CBC128 0x00001033UL
|
888
|
+
#define CKM_BATON_COUNTER 0x00001034UL
|
889
|
+
#define CKM_BATON_SHUFFLE 0x00001035UL
|
890
|
+
#define CKM_BATON_WRAP 0x00001036UL
|
891
|
+
|
892
|
+
/* CKM_ECDSA_KEY_PAIR_GEN is deprecated in v2.11,
|
893
|
+
* CKM_EC_KEY_PAIR_GEN is preferred */
|
894
|
+
#define CKM_ECDSA_KEY_PAIR_GEN 0x00001040UL
|
895
|
+
#define CKM_EC_KEY_PAIR_GEN 0x00001040UL
|
896
|
+
|
897
|
+
#define CKM_ECDSA 0x00001041UL
|
898
|
+
#define CKM_ECDSA_SHA1 0x00001042UL
|
899
|
+
|
900
|
+
#define CKM_ECDH1_DERIVE 0x00001050UL
|
901
|
+
#define CKM_ECDH1_COFACTOR_DERIVE 0x00001051UL
|
902
|
+
#define CKM_ECMQV_DERIVE 0x00001052UL
|
903
|
+
|
904
|
+
/* new for v2.40 */
|
905
|
+
#define CKM_ECDH_AES_KEY_WRAP 0x00001053UL
|
906
|
+
#define CKM_RSA_AES_KEY_WRAP 0x00001054UL
|
907
|
+
|
908
|
+
#define CKM_JUNIPER_KEY_GEN 0x00001060UL
|
909
|
+
#define CKM_JUNIPER_ECB128 0x00001061UL
|
910
|
+
#define CKM_JUNIPER_CBC128 0x00001062UL
|
911
|
+
#define CKM_JUNIPER_COUNTER 0x00001063UL
|
912
|
+
#define CKM_JUNIPER_SHUFFLE 0x00001064UL
|
913
|
+
#define CKM_JUNIPER_WRAP 0x00001065UL
|
914
|
+
#define CKM_FASTHASH 0x00001070UL
|
915
|
+
|
916
|
+
#define CKM_AES_KEY_GEN 0x00001080UL
|
917
|
+
#define CKM_AES_ECB 0x00001081UL
|
918
|
+
#define CKM_AES_CBC 0x00001082UL
|
919
|
+
#define CKM_AES_MAC 0x00001083UL
|
920
|
+
#define CKM_AES_MAC_GENERAL 0x00001084UL
|
921
|
+
#define CKM_AES_CBC_PAD 0x00001085UL
|
922
|
+
#define CKM_AES_CTR 0x00001086UL
|
923
|
+
#define CKM_AES_GCM 0x00001087UL
|
924
|
+
#define CKM_AES_CCM 0x00001088UL
|
925
|
+
#define CKM_AES_CMAC_GENERAL 0x00001089UL
|
926
|
+
#define CKM_AES_CMAC 0x0000108AUL
|
927
|
+
#define CKM_AES_CTS 0x0000108BUL
|
928
|
+
|
929
|
+
/* new for v2.40 */
|
930
|
+
#define CKM_AES_XCBC_MAC 0x0000108CUL
|
931
|
+
#define CKM_AES_XCBC_MAC_96 0x0000108DUL
|
932
|
+
#define CKM_AES_GMAC 0x0000108EUL
|
933
|
+
|
934
|
+
#define CKM_BLOWFISH_KEY_GEN 0x00001090UL
|
935
|
+
#define CKM_BLOWFISH_CBC 0x00001091UL
|
936
|
+
#define CKM_TWOFISH_KEY_GEN 0x00001092UL
|
937
|
+
#define CKM_TWOFISH_CBC 0x00001093UL
|
938
|
+
#define CKM_BLOWFISH_CBC_PAD 0x00001094UL
|
939
|
+
#define CKM_TWOFISH_CBC_PAD 0x00001095UL
|
940
|
+
|
941
|
+
#define CKM_DES_ECB_ENCRYPT_DATA 0x00001100UL
|
942
|
+
#define CKM_DES_CBC_ENCRYPT_DATA 0x00001101UL
|
943
|
+
#define CKM_DES3_ECB_ENCRYPT_DATA 0x00001102UL
|
944
|
+
#define CKM_DES3_CBC_ENCRYPT_DATA 0x00001103UL
|
945
|
+
#define CKM_AES_ECB_ENCRYPT_DATA 0x00001104UL
|
946
|
+
#define CKM_AES_CBC_ENCRYPT_DATA 0x00001105UL
|
947
|
+
|
948
|
+
#define CKM_GOSTR3410_KEY_PAIR_GEN 0x00001200UL
|
949
|
+
#define CKM_GOSTR3410 0x00001201UL
|
950
|
+
#define CKM_GOSTR3410_WITH_GOSTR3411 0x00001202UL
|
951
|
+
#define CKM_GOSTR3410_KEY_WRAP 0x00001203UL
|
952
|
+
#define CKM_GOSTR3410_DERIVE 0x00001204UL
|
953
|
+
#define CKM_GOSTR3411 0x00001210UL
|
954
|
+
#define CKM_GOSTR3411_HMAC 0x00001211UL
|
955
|
+
#define CKM_GOST28147_KEY_GEN 0x00001220UL
|
956
|
+
#define CKM_GOST28147_ECB 0x00001221UL
|
957
|
+
#define CKM_GOST28147 0x00001222UL
|
958
|
+
#define CKM_GOST28147_MAC 0x00001223UL
|
959
|
+
#define CKM_GOST28147_KEY_WRAP 0x00001224UL
|
960
|
+
|
961
|
+
#define CKM_DSA_PARAMETER_GEN 0x00002000UL
|
962
|
+
#define CKM_DH_PKCS_PARAMETER_GEN 0x00002001UL
|
963
|
+
#define CKM_X9_42_DH_PARAMETER_GEN 0x00002002UL
|
964
|
+
#define CKM_DSA_PROBABLISTIC_PARAMETER_GEN 0x00002003UL
|
965
|
+
#define CKM_DSA_SHAWE_TAYLOR_PARAMETER_GEN 0x00002004UL
|
966
|
+
|
967
|
+
#define CKM_AES_OFB 0x00002104UL
|
968
|
+
#define CKM_AES_CFB64 0x00002105UL
|
969
|
+
#define CKM_AES_CFB8 0x00002106UL
|
970
|
+
#define CKM_AES_CFB128 0x00002107UL
|
971
|
+
|
972
|
+
/* new for v2.40 */
|
973
|
+
#define CKM_AES_CFB1 0x00002108UL
|
974
|
+
#define CKM_AES_KEY_WRAP 0x00002109UL
|
975
|
+
#define CKM_AES_KEY_WRAP_PAD 0x0000210AUL
|
976
|
+
|
977
|
+
#define CKM_RSA_PKCS_TPM_1_1 0x00004001UL
|
978
|
+
#define CKM_RSA_PKCS_OAEP_TPM_1_1 0x00004002UL
|
979
|
+
|
980
|
+
#define CKM_VENDOR_DEFINED 0x80000000UL
|
981
|
+
|
982
|
+
typedef CK_MECHANISM_TYPE CK_PTR CK_MECHANISM_TYPE_PTR;
|
983
|
+
|
984
|
+
|
985
|
+
/* CK_MECHANISM is a structure that specifies a particular
|
986
|
+
* mechanism */
|
987
|
+
typedef struct CK_MECHANISM {
|
988
|
+
CK_MECHANISM_TYPE mechanism;
|
989
|
+
CK_VOID_PTR pParameter;
|
990
|
+
CK_ULONG ulParameterLen; /* in bytes */
|
991
|
+
} CK_MECHANISM;
|
992
|
+
|
993
|
+
typedef CK_MECHANISM CK_PTR CK_MECHANISM_PTR;
|
994
|
+
|
995
|
+
|
996
|
+
/* CK_MECHANISM_INFO provides information about a particular
|
997
|
+
* mechanism */
|
998
|
+
typedef struct CK_MECHANISM_INFO {
|
999
|
+
CK_ULONG ulMinKeySize;
|
1000
|
+
CK_ULONG ulMaxKeySize;
|
1001
|
+
CK_FLAGS flags;
|
1002
|
+
} CK_MECHANISM_INFO;
|
1003
|
+
|
1004
|
+
/* The flags are defined as follows:
|
1005
|
+
* Bit Flag Mask Meaning */
|
1006
|
+
#define CKF_HW 0x00000001UL /* performed by HW */
|
1007
|
+
|
1008
|
+
/* Specify whether or not a mechanism can be used for a particular task */
|
1009
|
+
#define CKF_ENCRYPT 0x00000100UL
|
1010
|
+
#define CKF_DECRYPT 0x00000200UL
|
1011
|
+
#define CKF_DIGEST 0x00000400UL
|
1012
|
+
#define CKF_SIGN 0x00000800UL
|
1013
|
+
#define CKF_SIGN_RECOVER 0x00001000UL
|
1014
|
+
#define CKF_VERIFY 0x00002000UL
|
1015
|
+
#define CKF_VERIFY_RECOVER 0x00004000UL
|
1016
|
+
#define CKF_GENERATE 0x00008000UL
|
1017
|
+
#define CKF_GENERATE_KEY_PAIR 0x00010000UL
|
1018
|
+
#define CKF_WRAP 0x00020000UL
|
1019
|
+
#define CKF_UNWRAP 0x00040000UL
|
1020
|
+
#define CKF_DERIVE 0x00080000UL
|
1021
|
+
|
1022
|
+
/* Describe a token's EC capabilities not available in mechanism
|
1023
|
+
* information. */
|
1024
|
+
#define CKF_EC_F_P 0x00100000UL
|
1025
|
+
#define CKF_EC_F_2M 0x00200000UL
|
1026
|
+
#define CKF_EC_ECPARAMETERS 0x00400000UL
|
1027
|
+
#define CKF_EC_NAMEDCURVE 0x00800000UL
|
1028
|
+
#define CKF_EC_UNCOMPRESS 0x01000000UL
|
1029
|
+
#define CKF_EC_COMPRESS 0x02000000UL
|
1030
|
+
|
1031
|
+
#define CKF_EXTENSION 0x80000000UL /* FALSE for this version */
|
1032
|
+
|
1033
|
+
typedef CK_MECHANISM_INFO CK_PTR CK_MECHANISM_INFO_PTR;
|
1034
|
+
|
1035
|
+
|
1036
|
+
/* CK_RV is a value that identifies the return value of a
|
1037
|
+
* Cryptoki function */
|
1038
|
+
typedef CK_ULONG CK_RV;
|
1039
|
+
|
1040
|
+
#define CKR_OK 0x00000000UL
|
1041
|
+
#define CKR_CANCEL 0x00000001UL
|
1042
|
+
#define CKR_HOST_MEMORY 0x00000002UL
|
1043
|
+
#define CKR_SLOT_ID_INVALID 0x00000003UL
|
1044
|
+
|
1045
|
+
/* CKR_FLAGS_INVALID was removed for v2.0 */
|
1046
|
+
|
1047
|
+
#define CKR_GENERAL_ERROR 0x00000005UL
|
1048
|
+
#define CKR_FUNCTION_FAILED 0x00000006UL
|
1049
|
+
|
1050
|
+
#define CKR_ARGUMENTS_BAD 0x00000007UL
|
1051
|
+
#define CKR_NO_EVENT 0x00000008UL
|
1052
|
+
#define CKR_NEED_TO_CREATE_THREADS 0x00000009UL
|
1053
|
+
#define CKR_CANT_LOCK 0x0000000AUL
|
1054
|
+
|
1055
|
+
#define CKR_ATTRIBUTE_READ_ONLY 0x00000010UL
|
1056
|
+
#define CKR_ATTRIBUTE_SENSITIVE 0x00000011UL
|
1057
|
+
#define CKR_ATTRIBUTE_TYPE_INVALID 0x00000012UL
|
1058
|
+
#define CKR_ATTRIBUTE_VALUE_INVALID 0x00000013UL
|
1059
|
+
|
1060
|
+
/* new for v2.40 */
|
1061
|
+
#define CKR_ACTION_PROHIBITED 0x0000001BUL
|
1062
|
+
|
1063
|
+
#define CKR_DATA_INVALID 0x00000020UL
|
1064
|
+
#define CKR_DATA_LEN_RANGE 0x00000021UL
|
1065
|
+
#define CKR_DEVICE_ERROR 0x00000030UL
|
1066
|
+
#define CKR_DEVICE_MEMORY 0x00000031UL
|
1067
|
+
#define CKR_DEVICE_REMOVED 0x00000032UL
|
1068
|
+
#define CKR_ENCRYPTED_DATA_INVALID 0x00000040UL
|
1069
|
+
#define CKR_ENCRYPTED_DATA_LEN_RANGE 0x00000041UL
|
1070
|
+
#define CKR_FUNCTION_CANCELED 0x00000050UL
|
1071
|
+
#define CKR_FUNCTION_NOT_PARALLEL 0x00000051UL
|
1072
|
+
|
1073
|
+
#define CKR_FUNCTION_NOT_SUPPORTED 0x00000054UL
|
1074
|
+
|
1075
|
+
#define CKR_KEY_HANDLE_INVALID 0x00000060UL
|
1076
|
+
|
1077
|
+
/* CKR_KEY_SENSITIVE was removed for v2.0 */
|
1078
|
+
|
1079
|
+
#define CKR_KEY_SIZE_RANGE 0x00000062UL
|
1080
|
+
#define CKR_KEY_TYPE_INCONSISTENT 0x00000063UL
|
1081
|
+
|
1082
|
+
#define CKR_KEY_NOT_NEEDED 0x00000064UL
|
1083
|
+
#define CKR_KEY_CHANGED 0x00000065UL
|
1084
|
+
#define CKR_KEY_NEEDED 0x00000066UL
|
1085
|
+
#define CKR_KEY_INDIGESTIBLE 0x00000067UL
|
1086
|
+
#define CKR_KEY_FUNCTION_NOT_PERMITTED 0x00000068UL
|
1087
|
+
#define CKR_KEY_NOT_WRAPPABLE 0x00000069UL
|
1088
|
+
#define CKR_KEY_UNEXTRACTABLE 0x0000006AUL
|
1089
|
+
|
1090
|
+
#define CKR_MECHANISM_INVALID 0x00000070UL
|
1091
|
+
#define CKR_MECHANISM_PARAM_INVALID 0x00000071UL
|
1092
|
+
|
1093
|
+
/* CKR_OBJECT_CLASS_INCONSISTENT and CKR_OBJECT_CLASS_INVALID
|
1094
|
+
* were removed for v2.0 */
|
1095
|
+
#define CKR_OBJECT_HANDLE_INVALID 0x00000082UL
|
1096
|
+
#define CKR_OPERATION_ACTIVE 0x00000090UL
|
1097
|
+
#define CKR_OPERATION_NOT_INITIALIZED 0x00000091UL
|
1098
|
+
#define CKR_PIN_INCORRECT 0x000000A0UL
|
1099
|
+
#define CKR_PIN_INVALID 0x000000A1UL
|
1100
|
+
#define CKR_PIN_LEN_RANGE 0x000000A2UL
|
1101
|
+
|
1102
|
+
#define CKR_PIN_EXPIRED 0x000000A3UL
|
1103
|
+
#define CKR_PIN_LOCKED 0x000000A4UL
|
1104
|
+
|
1105
|
+
#define CKR_SESSION_CLOSED 0x000000B0UL
|
1106
|
+
#define CKR_SESSION_COUNT 0x000000B1UL
|
1107
|
+
#define CKR_SESSION_HANDLE_INVALID 0x000000B3UL
|
1108
|
+
#define CKR_SESSION_PARALLEL_NOT_SUPPORTED 0x000000B4UL
|
1109
|
+
#define CKR_SESSION_READ_ONLY 0x000000B5UL
|
1110
|
+
#define CKR_SESSION_EXISTS 0x000000B6UL
|
1111
|
+
|
1112
|
+
#define CKR_SESSION_READ_ONLY_EXISTS 0x000000B7UL
|
1113
|
+
#define CKR_SESSION_READ_WRITE_SO_EXISTS 0x000000B8UL
|
1114
|
+
|
1115
|
+
#define CKR_SIGNATURE_INVALID 0x000000C0UL
|
1116
|
+
#define CKR_SIGNATURE_LEN_RANGE 0x000000C1UL
|
1117
|
+
#define CKR_TEMPLATE_INCOMPLETE 0x000000D0UL
|
1118
|
+
#define CKR_TEMPLATE_INCONSISTENT 0x000000D1UL
|
1119
|
+
#define CKR_TOKEN_NOT_PRESENT 0x000000E0UL
|
1120
|
+
#define CKR_TOKEN_NOT_RECOGNIZED 0x000000E1UL
|
1121
|
+
#define CKR_TOKEN_WRITE_PROTECTED 0x000000E2UL
|
1122
|
+
#define CKR_UNWRAPPING_KEY_HANDLE_INVALID 0x000000F0UL
|
1123
|
+
#define CKR_UNWRAPPING_KEY_SIZE_RANGE 0x000000F1UL
|
1124
|
+
#define CKR_UNWRAPPING_KEY_TYPE_INCONSISTENT 0x000000F2UL
|
1125
|
+
#define CKR_USER_ALREADY_LOGGED_IN 0x00000100UL
|
1126
|
+
#define CKR_USER_NOT_LOGGED_IN 0x00000101UL
|
1127
|
+
#define CKR_USER_PIN_NOT_INITIALIZED 0x00000102UL
|
1128
|
+
#define CKR_USER_TYPE_INVALID 0x00000103UL
|
1129
|
+
|
1130
|
+
#define CKR_USER_ANOTHER_ALREADY_LOGGED_IN 0x00000104UL
|
1131
|
+
#define CKR_USER_TOO_MANY_TYPES 0x00000105UL
|
1132
|
+
|
1133
|
+
#define CKR_WRAPPED_KEY_INVALID 0x00000110UL
|
1134
|
+
#define CKR_WRAPPED_KEY_LEN_RANGE 0x00000112UL
|
1135
|
+
#define CKR_WRAPPING_KEY_HANDLE_INVALID 0x00000113UL
|
1136
|
+
#define CKR_WRAPPING_KEY_SIZE_RANGE 0x00000114UL
|
1137
|
+
#define CKR_WRAPPING_KEY_TYPE_INCONSISTENT 0x00000115UL
|
1138
|
+
#define CKR_RANDOM_SEED_NOT_SUPPORTED 0x00000120UL
|
1139
|
+
|
1140
|
+
#define CKR_RANDOM_NO_RNG 0x00000121UL
|
1141
|
+
|
1142
|
+
#define CKR_DOMAIN_PARAMS_INVALID 0x00000130UL
|
1143
|
+
|
1144
|
+
/* new for v2.40 */
|
1145
|
+
#define CKR_CURVE_NOT_SUPPORTED 0x00000140UL
|
1146
|
+
|
1147
|
+
#define CKR_BUFFER_TOO_SMALL 0x00000150UL
|
1148
|
+
#define CKR_SAVED_STATE_INVALID 0x00000160UL
|
1149
|
+
#define CKR_INFORMATION_SENSITIVE 0x00000170UL
|
1150
|
+
#define CKR_STATE_UNSAVEABLE 0x00000180UL
|
1151
|
+
|
1152
|
+
#define CKR_CRYPTOKI_NOT_INITIALIZED 0x00000190UL
|
1153
|
+
#define CKR_CRYPTOKI_ALREADY_INITIALIZED 0x00000191UL
|
1154
|
+
#define CKR_MUTEX_BAD 0x000001A0UL
|
1155
|
+
#define CKR_MUTEX_NOT_LOCKED 0x000001A1UL
|
1156
|
+
|
1157
|
+
#define CKR_NEW_PIN_MODE 0x000001B0UL
|
1158
|
+
#define CKR_NEXT_OTP 0x000001B1UL
|
1159
|
+
|
1160
|
+
#define CKR_EXCEEDED_MAX_ITERATIONS 0x000001C0UL
|
1161
|
+
#define CKR_FIPS_SELF_TEST_FAILED 0x000001C1UL
|
1162
|
+
#define CKR_LIBRARY_LOAD_FAILED 0x000001C2UL
|
1163
|
+
#define CKR_PIN_TOO_WEAK 0x000001C3UL
|
1164
|
+
#define CKR_PUBLIC_KEY_INVALID 0x000001C4UL
|
1165
|
+
|
1166
|
+
#define CKR_FUNCTION_REJECTED 0x00000200UL
|
1167
|
+
|
1168
|
+
#define CKR_VENDOR_DEFINED 0x80000000UL
|
1169
|
+
|
1170
|
+
|
1171
|
+
/* CK_NOTIFY is an application callback that processes events */
|
1172
|
+
typedef CK_CALLBACK_FUNCTION(CK_RV, CK_NOTIFY)(
|
1173
|
+
CK_SESSION_HANDLE hSession, /* the session's handle */
|
1174
|
+
CK_NOTIFICATION event,
|
1175
|
+
CK_VOID_PTR pApplication /* passed to C_OpenSession */
|
1176
|
+
);
|
1177
|
+
|
1178
|
+
|
1179
|
+
/* CK_FUNCTION_LIST is a structure holding a Cryptoki spec
|
1180
|
+
* version and pointers of appropriate types to all the
|
1181
|
+
* Cryptoki functions */
|
1182
|
+
typedef struct CK_FUNCTION_LIST CK_FUNCTION_LIST;
|
1183
|
+
|
1184
|
+
typedef CK_FUNCTION_LIST CK_PTR CK_FUNCTION_LIST_PTR;
|
1185
|
+
|
1186
|
+
typedef CK_FUNCTION_LIST_PTR CK_PTR CK_FUNCTION_LIST_PTR_PTR;
|
1187
|
+
|
1188
|
+
|
1189
|
+
/* CK_CREATEMUTEX is an application callback for creating a
|
1190
|
+
* mutex object */
|
1191
|
+
typedef CK_CALLBACK_FUNCTION(CK_RV, CK_CREATEMUTEX)(
|
1192
|
+
CK_VOID_PTR_PTR ppMutex /* location to receive ptr to mutex */
|
1193
|
+
);
|
1194
|
+
|
1195
|
+
|
1196
|
+
/* CK_DESTROYMUTEX is an application callback for destroying a
|
1197
|
+
* mutex object */
|
1198
|
+
typedef CK_CALLBACK_FUNCTION(CK_RV, CK_DESTROYMUTEX)(
|
1199
|
+
CK_VOID_PTR pMutex /* pointer to mutex */
|
1200
|
+
);
|
1201
|
+
|
1202
|
+
|
1203
|
+
/* CK_LOCKMUTEX is an application callback for locking a mutex */
|
1204
|
+
typedef CK_CALLBACK_FUNCTION(CK_RV, CK_LOCKMUTEX)(
|
1205
|
+
CK_VOID_PTR pMutex /* pointer to mutex */
|
1206
|
+
);
|
1207
|
+
|
1208
|
+
|
1209
|
+
/* CK_UNLOCKMUTEX is an application callback for unlocking a
|
1210
|
+
* mutex */
|
1211
|
+
typedef CK_CALLBACK_FUNCTION(CK_RV, CK_UNLOCKMUTEX)(
|
1212
|
+
CK_VOID_PTR pMutex /* pointer to mutex */
|
1213
|
+
);
|
1214
|
+
|
1215
|
+
|
1216
|
+
/* CK_C_INITIALIZE_ARGS provides the optional arguments to
|
1217
|
+
* C_Initialize */
|
1218
|
+
typedef struct CK_C_INITIALIZE_ARGS {
|
1219
|
+
CK_CREATEMUTEX CreateMutex;
|
1220
|
+
CK_DESTROYMUTEX DestroyMutex;
|
1221
|
+
CK_LOCKMUTEX LockMutex;
|
1222
|
+
CK_UNLOCKMUTEX UnlockMutex;
|
1223
|
+
CK_FLAGS flags;
|
1224
|
+
CK_VOID_PTR pReserved;
|
1225
|
+
} CK_C_INITIALIZE_ARGS;
|
1226
|
+
|
1227
|
+
/* flags: bit flags that provide capabilities of the slot
|
1228
|
+
* Bit Flag Mask Meaning
|
1229
|
+
*/
|
1230
|
+
#define CKF_LIBRARY_CANT_CREATE_OS_THREADS 0x00000001UL
|
1231
|
+
#define CKF_OS_LOCKING_OK 0x00000002UL
|
1232
|
+
|
1233
|
+
typedef CK_C_INITIALIZE_ARGS CK_PTR CK_C_INITIALIZE_ARGS_PTR;
|
1234
|
+
|
1235
|
+
|
1236
|
+
/* additional flags for parameters to functions */
|
1237
|
+
|
1238
|
+
/* CKF_DONT_BLOCK is for the function C_WaitForSlotEvent */
|
1239
|
+
#define CKF_DONT_BLOCK 1
|
1240
|
+
|
1241
|
+
/*
|
1242
|
+
* CK_RSA_PKCS_MGF_TYPE is used to indicate the Message
|
1243
|
+
* Generation Function (MGF) applied to a message block when
|
1244
|
+
* formatting a message block for the PKCS #1 OAEP encryption
|
1245
|
+
* scheme. */
|
1246
|
+
typedef CK_ULONG CK_RSA_PKCS_MGF_TYPE;
|
1247
|
+
|
1248
|
+
typedef CK_RSA_PKCS_MGF_TYPE CK_PTR CK_RSA_PKCS_MGF_TYPE_PTR;
|
1249
|
+
|
1250
|
+
/* The following MGFs are defined */
|
1251
|
+
#define CKG_MGF1_SHA1 0x00000001UL
|
1252
|
+
#define CKG_MGF1_SHA256 0x00000002UL
|
1253
|
+
#define CKG_MGF1_SHA384 0x00000003UL
|
1254
|
+
#define CKG_MGF1_SHA512 0x00000004UL
|
1255
|
+
#define CKG_MGF1_SHA224 0x00000005UL
|
1256
|
+
|
1257
|
+
/*
|
1258
|
+
* CK_RSA_PKCS_OAEP_SOURCE_TYPE is used to indicate the source
|
1259
|
+
* of the encoding parameter when formatting a message block
|
1260
|
+
* for the PKCS #1 OAEP encryption scheme. */
|
1261
|
+
typedef CK_ULONG CK_RSA_PKCS_OAEP_SOURCE_TYPE;
|
1262
|
+
|
1263
|
+
typedef CK_RSA_PKCS_OAEP_SOURCE_TYPE CK_PTR CK_RSA_PKCS_OAEP_SOURCE_TYPE_PTR;
|
1264
|
+
|
1265
|
+
/* The following encoding parameter sources are defined */
|
1266
|
+
#define CKZ_DATA_SPECIFIED 0x00000001UL
|
1267
|
+
|
1268
|
+
/*
|
1269
|
+
* CK_RSA_PKCS_OAEP_PARAMS provides the parameters to the
|
1270
|
+
* CKM_RSA_PKCS_OAEP mechanism. */
|
1271
|
+
typedef struct CK_RSA_PKCS_OAEP_PARAMS {
|
1272
|
+
CK_MECHANISM_TYPE hashAlg;
|
1273
|
+
CK_RSA_PKCS_MGF_TYPE mgf;
|
1274
|
+
CK_RSA_PKCS_OAEP_SOURCE_TYPE source;
|
1275
|
+
CK_VOID_PTR pSourceData;
|
1276
|
+
CK_ULONG ulSourceDataLen;
|
1277
|
+
} CK_RSA_PKCS_OAEP_PARAMS;
|
1278
|
+
|
1279
|
+
typedef CK_RSA_PKCS_OAEP_PARAMS CK_PTR CK_RSA_PKCS_OAEP_PARAMS_PTR;
|
1280
|
+
|
1281
|
+
/*
|
1282
|
+
* CK_RSA_PKCS_PSS_PARAMS provides the parameters to the
|
1283
|
+
* CKM_RSA_PKCS_PSS mechanism(s). */
|
1284
|
+
typedef struct CK_RSA_PKCS_PSS_PARAMS {
|
1285
|
+
CK_MECHANISM_TYPE hashAlg;
|
1286
|
+
CK_RSA_PKCS_MGF_TYPE mgf;
|
1287
|
+
CK_ULONG sLen;
|
1288
|
+
} CK_RSA_PKCS_PSS_PARAMS;
|
1289
|
+
|
1290
|
+
typedef CK_RSA_PKCS_PSS_PARAMS CK_PTR CK_RSA_PKCS_PSS_PARAMS_PTR;
|
1291
|
+
|
1292
|
+
typedef CK_ULONG CK_EC_KDF_TYPE;
|
1293
|
+
|
1294
|
+
/* The following EC Key Derivation Functions are defined */
|
1295
|
+
#define CKD_NULL 0x00000001UL
|
1296
|
+
#define CKD_SHA1_KDF 0x00000002UL
|
1297
|
+
/* The following X9.42 DH key derivation functions are defined */
|
1298
|
+
#define CKD_SHA1_KDF_ASN1 0x00000003UL
|
1299
|
+
#define CKD_SHA1_KDF_CONCATENATE 0x00000004UL
|
1300
|
+
#define CKD_SHA224_KDF 0x00000005UL
|
1301
|
+
#define CKD_SHA256_KDF 0x00000006UL
|
1302
|
+
#define CKD_SHA384_KDF 0x00000007UL
|
1303
|
+
#define CKD_SHA512_KDF 0x00000008UL
|
1304
|
+
#define CKD_CPDIVERSIFY_KDF 0x00000009UL
|
1305
|
+
|
1306
|
+
|
1307
|
+
/*
|
1308
|
+
* CK_ECDH1_DERIVE_PARAMS provides the parameters to the
|
1309
|
+
* CKM_ECDH1_DERIVE and CKM_ECDH1_COFACTOR_DERIVE mechanisms,
|
1310
|
+
* where each party contributes one key pair.
|
1311
|
+
*/
|
1312
|
+
typedef struct CK_ECDH1_DERIVE_PARAMS {
|
1313
|
+
CK_EC_KDF_TYPE kdf;
|
1314
|
+
CK_ULONG ulSharedDataLen;
|
1315
|
+
CK_BYTE_PTR pSharedData;
|
1316
|
+
CK_ULONG ulPublicDataLen;
|
1317
|
+
CK_BYTE_PTR pPublicData;
|
1318
|
+
} CK_ECDH1_DERIVE_PARAMS;
|
1319
|
+
|
1320
|
+
typedef CK_ECDH1_DERIVE_PARAMS CK_PTR CK_ECDH1_DERIVE_PARAMS_PTR;
|
1321
|
+
|
1322
|
+
typedef struct CK_ECMQV_DERIVE_PARAMS {
|
1323
|
+
CK_EC_KDF_TYPE kdf;
|
1324
|
+
CK_ULONG ulSharedDataLen;
|
1325
|
+
CK_BYTE_PTR pSharedData;
|
1326
|
+
CK_ULONG ulPublicDataLen;
|
1327
|
+
CK_BYTE_PTR pPublicData;
|
1328
|
+
CK_ULONG ulPrivateDataLen;
|
1329
|
+
CK_OBJECT_HANDLE hPrivateData;
|
1330
|
+
CK_ULONG ulPublicDataLen2;
|
1331
|
+
CK_BYTE_PTR pPublicData2;
|
1332
|
+
CK_OBJECT_HANDLE publicKey;
|
1333
|
+
} CK_ECMQV_DERIVE_PARAMS;
|
1334
|
+
|
1335
|
+
typedef CK_ECMQV_DERIVE_PARAMS CK_PTR CK_ECMQV_DERIVE_PARAMS_PTR;
|
1336
|
+
|
1337
|
+
/* Typedefs and defines for the CKM_X9_42_DH_KEY_PAIR_GEN and the
|
1338
|
+
* CKM_X9_42_DH_PARAMETER_GEN mechanisms */
|
1339
|
+
typedef CK_ULONG CK_X9_42_DH_KDF_TYPE;
|
1340
|
+
typedef CK_X9_42_DH_KDF_TYPE CK_PTR CK_X9_42_DH_KDF_TYPE_PTR;
|
1341
|
+
|
1342
|
+
/*
|
1343
|
+
* CK_X9_42_DH1_DERIVE_PARAMS provides the parameters to the
|
1344
|
+
* CKM_X9_42_DH_DERIVE key derivation mechanism, where each party
|
1345
|
+
* contributes one key pair */
|
1346
|
+
typedef struct CK_X9_42_DH1_DERIVE_PARAMS {
|
1347
|
+
CK_X9_42_DH_KDF_TYPE kdf;
|
1348
|
+
CK_ULONG ulOtherInfoLen;
|
1349
|
+
CK_BYTE_PTR pOtherInfo;
|
1350
|
+
CK_ULONG ulPublicDataLen;
|
1351
|
+
CK_BYTE_PTR pPublicData;
|
1352
|
+
} CK_X9_42_DH1_DERIVE_PARAMS;
|
1353
|
+
|
1354
|
+
typedef struct CK_X9_42_DH1_DERIVE_PARAMS CK_PTR CK_X9_42_DH1_DERIVE_PARAMS_PTR;
|
1355
|
+
|
1356
|
+
/*
|
1357
|
+
* CK_X9_42_DH2_DERIVE_PARAMS provides the parameters to the
|
1358
|
+
* CKM_X9_42_DH_HYBRID_DERIVE and CKM_X9_42_MQV_DERIVE key derivation
|
1359
|
+
* mechanisms, where each party contributes two key pairs */
|
1360
|
+
typedef struct CK_X9_42_DH2_DERIVE_PARAMS {
|
1361
|
+
CK_X9_42_DH_KDF_TYPE kdf;
|
1362
|
+
CK_ULONG ulOtherInfoLen;
|
1363
|
+
CK_BYTE_PTR pOtherInfo;
|
1364
|
+
CK_ULONG ulPublicDataLen;
|
1365
|
+
CK_BYTE_PTR pPublicData;
|
1366
|
+
CK_ULONG ulPrivateDataLen;
|
1367
|
+
CK_OBJECT_HANDLE hPrivateData;
|
1368
|
+
CK_ULONG ulPublicDataLen2;
|
1369
|
+
CK_BYTE_PTR pPublicData2;
|
1370
|
+
} CK_X9_42_DH2_DERIVE_PARAMS;
|
1371
|
+
|
1372
|
+
typedef CK_X9_42_DH2_DERIVE_PARAMS CK_PTR CK_X9_42_DH2_DERIVE_PARAMS_PTR;
|
1373
|
+
|
1374
|
+
typedef struct CK_X9_42_MQV_DERIVE_PARAMS {
|
1375
|
+
CK_X9_42_DH_KDF_TYPE kdf;
|
1376
|
+
CK_ULONG ulOtherInfoLen;
|
1377
|
+
CK_BYTE_PTR pOtherInfo;
|
1378
|
+
CK_ULONG ulPublicDataLen;
|
1379
|
+
CK_BYTE_PTR pPublicData;
|
1380
|
+
CK_ULONG ulPrivateDataLen;
|
1381
|
+
CK_OBJECT_HANDLE hPrivateData;
|
1382
|
+
CK_ULONG ulPublicDataLen2;
|
1383
|
+
CK_BYTE_PTR pPublicData2;
|
1384
|
+
CK_OBJECT_HANDLE publicKey;
|
1385
|
+
} CK_X9_42_MQV_DERIVE_PARAMS;
|
1386
|
+
|
1387
|
+
typedef CK_X9_42_MQV_DERIVE_PARAMS CK_PTR CK_X9_42_MQV_DERIVE_PARAMS_PTR;
|
1388
|
+
|
1389
|
+
/* CK_KEA_DERIVE_PARAMS provides the parameters to the
|
1390
|
+
* CKM_KEA_DERIVE mechanism */
|
1391
|
+
typedef struct CK_KEA_DERIVE_PARAMS {
|
1392
|
+
CK_BBOOL isSender;
|
1393
|
+
CK_ULONG ulRandomLen;
|
1394
|
+
CK_BYTE_PTR pRandomA;
|
1395
|
+
CK_BYTE_PTR pRandomB;
|
1396
|
+
CK_ULONG ulPublicDataLen;
|
1397
|
+
CK_BYTE_PTR pPublicData;
|
1398
|
+
} CK_KEA_DERIVE_PARAMS;
|
1399
|
+
|
1400
|
+
typedef CK_KEA_DERIVE_PARAMS CK_PTR CK_KEA_DERIVE_PARAMS_PTR;
|
1401
|
+
|
1402
|
+
|
1403
|
+
/* CK_RC2_PARAMS provides the parameters to the CKM_RC2_ECB and
|
1404
|
+
* CKM_RC2_MAC mechanisms. An instance of CK_RC2_PARAMS just
|
1405
|
+
* holds the effective keysize */
|
1406
|
+
typedef CK_ULONG CK_RC2_PARAMS;
|
1407
|
+
|
1408
|
+
typedef CK_RC2_PARAMS CK_PTR CK_RC2_PARAMS_PTR;
|
1409
|
+
|
1410
|
+
|
1411
|
+
/* CK_RC2_CBC_PARAMS provides the parameters to the CKM_RC2_CBC
|
1412
|
+
* mechanism */
|
1413
|
+
typedef struct CK_RC2_CBC_PARAMS {
|
1414
|
+
CK_ULONG ulEffectiveBits; /* effective bits (1-1024) */
|
1415
|
+
|
1416
|
+
CK_BYTE iv[8]; /* IV for CBC mode */
|
1417
|
+
} CK_RC2_CBC_PARAMS;
|
1418
|
+
|
1419
|
+
typedef CK_RC2_CBC_PARAMS CK_PTR CK_RC2_CBC_PARAMS_PTR;
|
1420
|
+
|
1421
|
+
|
1422
|
+
/* CK_RC2_MAC_GENERAL_PARAMS provides the parameters for the
|
1423
|
+
* CKM_RC2_MAC_GENERAL mechanism */
|
1424
|
+
typedef struct CK_RC2_MAC_GENERAL_PARAMS {
|
1425
|
+
CK_ULONG ulEffectiveBits; /* effective bits (1-1024) */
|
1426
|
+
CK_ULONG ulMacLength; /* Length of MAC in bytes */
|
1427
|
+
} CK_RC2_MAC_GENERAL_PARAMS;
|
1428
|
+
|
1429
|
+
typedef CK_RC2_MAC_GENERAL_PARAMS CK_PTR \
|
1430
|
+
CK_RC2_MAC_GENERAL_PARAMS_PTR;
|
1431
|
+
|
1432
|
+
|
1433
|
+
/* CK_RC5_PARAMS provides the parameters to the CKM_RC5_ECB and
|
1434
|
+
* CKM_RC5_MAC mechanisms */
|
1435
|
+
typedef struct CK_RC5_PARAMS {
|
1436
|
+
CK_ULONG ulWordsize; /* wordsize in bits */
|
1437
|
+
CK_ULONG ulRounds; /* number of rounds */
|
1438
|
+
} CK_RC5_PARAMS;
|
1439
|
+
|
1440
|
+
typedef CK_RC5_PARAMS CK_PTR CK_RC5_PARAMS_PTR;
|
1441
|
+
|
1442
|
+
|
1443
|
+
/* CK_RC5_CBC_PARAMS provides the parameters to the CKM_RC5_CBC
|
1444
|
+
* mechanism */
|
1445
|
+
typedef struct CK_RC5_CBC_PARAMS {
|
1446
|
+
CK_ULONG ulWordsize; /* wordsize in bits */
|
1447
|
+
CK_ULONG ulRounds; /* number of rounds */
|
1448
|
+
CK_BYTE_PTR pIv; /* pointer to IV */
|
1449
|
+
CK_ULONG ulIvLen; /* length of IV in bytes */
|
1450
|
+
} CK_RC5_CBC_PARAMS;
|
1451
|
+
|
1452
|
+
typedef CK_RC5_CBC_PARAMS CK_PTR CK_RC5_CBC_PARAMS_PTR;
|
1453
|
+
|
1454
|
+
|
1455
|
+
/* CK_RC5_MAC_GENERAL_PARAMS provides the parameters for the
|
1456
|
+
* CKM_RC5_MAC_GENERAL mechanism */
|
1457
|
+
typedef struct CK_RC5_MAC_GENERAL_PARAMS {
|
1458
|
+
CK_ULONG ulWordsize; /* wordsize in bits */
|
1459
|
+
CK_ULONG ulRounds; /* number of rounds */
|
1460
|
+
CK_ULONG ulMacLength; /* Length of MAC in bytes */
|
1461
|
+
} CK_RC5_MAC_GENERAL_PARAMS;
|
1462
|
+
|
1463
|
+
typedef CK_RC5_MAC_GENERAL_PARAMS CK_PTR \
|
1464
|
+
CK_RC5_MAC_GENERAL_PARAMS_PTR;
|
1465
|
+
|
1466
|
+
|
1467
|
+
/* CK_MAC_GENERAL_PARAMS provides the parameters to most block
|
1468
|
+
* ciphers' MAC_GENERAL mechanisms. Its value is the length of
|
1469
|
+
* the MAC */
|
1470
|
+
typedef CK_ULONG CK_MAC_GENERAL_PARAMS;
|
1471
|
+
|
1472
|
+
typedef CK_MAC_GENERAL_PARAMS CK_PTR CK_MAC_GENERAL_PARAMS_PTR;
|
1473
|
+
|
1474
|
+
typedef struct CK_DES_CBC_ENCRYPT_DATA_PARAMS {
|
1475
|
+
CK_BYTE iv[8];
|
1476
|
+
CK_BYTE_PTR pData;
|
1477
|
+
CK_ULONG length;
|
1478
|
+
} CK_DES_CBC_ENCRYPT_DATA_PARAMS;
|
1479
|
+
|
1480
|
+
typedef CK_DES_CBC_ENCRYPT_DATA_PARAMS CK_PTR CK_DES_CBC_ENCRYPT_DATA_PARAMS_PTR;
|
1481
|
+
|
1482
|
+
typedef struct CK_AES_CBC_ENCRYPT_DATA_PARAMS {
|
1483
|
+
CK_BYTE iv[16];
|
1484
|
+
CK_BYTE_PTR pData;
|
1485
|
+
CK_ULONG length;
|
1486
|
+
} CK_AES_CBC_ENCRYPT_DATA_PARAMS;
|
1487
|
+
|
1488
|
+
typedef CK_AES_CBC_ENCRYPT_DATA_PARAMS CK_PTR CK_AES_CBC_ENCRYPT_DATA_PARAMS_PTR;
|
1489
|
+
|
1490
|
+
/* CK_SKIPJACK_PRIVATE_WRAP_PARAMS provides the parameters to the
|
1491
|
+
* CKM_SKIPJACK_PRIVATE_WRAP mechanism */
|
1492
|
+
typedef struct CK_SKIPJACK_PRIVATE_WRAP_PARAMS {
|
1493
|
+
CK_ULONG ulPasswordLen;
|
1494
|
+
CK_BYTE_PTR pPassword;
|
1495
|
+
CK_ULONG ulPublicDataLen;
|
1496
|
+
CK_BYTE_PTR pPublicData;
|
1497
|
+
CK_ULONG ulPAndGLen;
|
1498
|
+
CK_ULONG ulQLen;
|
1499
|
+
CK_ULONG ulRandomLen;
|
1500
|
+
CK_BYTE_PTR pRandomA;
|
1501
|
+
CK_BYTE_PTR pPrimeP;
|
1502
|
+
CK_BYTE_PTR pBaseG;
|
1503
|
+
CK_BYTE_PTR pSubprimeQ;
|
1504
|
+
} CK_SKIPJACK_PRIVATE_WRAP_PARAMS;
|
1505
|
+
|
1506
|
+
typedef CK_SKIPJACK_PRIVATE_WRAP_PARAMS CK_PTR \
|
1507
|
+
CK_SKIPJACK_PRIVATE_WRAP_PARAMS_PTR;
|
1508
|
+
|
1509
|
+
|
1510
|
+
/* CK_SKIPJACK_RELAYX_PARAMS provides the parameters to the
|
1511
|
+
* CKM_SKIPJACK_RELAYX mechanism */
|
1512
|
+
typedef struct CK_SKIPJACK_RELAYX_PARAMS {
|
1513
|
+
CK_ULONG ulOldWrappedXLen;
|
1514
|
+
CK_BYTE_PTR pOldWrappedX;
|
1515
|
+
CK_ULONG ulOldPasswordLen;
|
1516
|
+
CK_BYTE_PTR pOldPassword;
|
1517
|
+
CK_ULONG ulOldPublicDataLen;
|
1518
|
+
CK_BYTE_PTR pOldPublicData;
|
1519
|
+
CK_ULONG ulOldRandomLen;
|
1520
|
+
CK_BYTE_PTR pOldRandomA;
|
1521
|
+
CK_ULONG ulNewPasswordLen;
|
1522
|
+
CK_BYTE_PTR pNewPassword;
|
1523
|
+
CK_ULONG ulNewPublicDataLen;
|
1524
|
+
CK_BYTE_PTR pNewPublicData;
|
1525
|
+
CK_ULONG ulNewRandomLen;
|
1526
|
+
CK_BYTE_PTR pNewRandomA;
|
1527
|
+
} CK_SKIPJACK_RELAYX_PARAMS;
|
1528
|
+
|
1529
|
+
typedef CK_SKIPJACK_RELAYX_PARAMS CK_PTR \
|
1530
|
+
CK_SKIPJACK_RELAYX_PARAMS_PTR;
|
1531
|
+
|
1532
|
+
|
1533
|
+
typedef struct CK_PBE_PARAMS {
|
1534
|
+
CK_BYTE_PTR pInitVector;
|
1535
|
+
CK_UTF8CHAR_PTR pPassword;
|
1536
|
+
CK_ULONG ulPasswordLen;
|
1537
|
+
CK_BYTE_PTR pSalt;
|
1538
|
+
CK_ULONG ulSaltLen;
|
1539
|
+
CK_ULONG ulIteration;
|
1540
|
+
} CK_PBE_PARAMS;
|
1541
|
+
|
1542
|
+
typedef CK_PBE_PARAMS CK_PTR CK_PBE_PARAMS_PTR;
|
1543
|
+
|
1544
|
+
|
1545
|
+
/* CK_KEY_WRAP_SET_OAEP_PARAMS provides the parameters to the
|
1546
|
+
* CKM_KEY_WRAP_SET_OAEP mechanism */
|
1547
|
+
typedef struct CK_KEY_WRAP_SET_OAEP_PARAMS {
|
1548
|
+
CK_BYTE bBC; /* block contents byte */
|
1549
|
+
CK_BYTE_PTR pX; /* extra data */
|
1550
|
+
CK_ULONG ulXLen; /* length of extra data in bytes */
|
1551
|
+
} CK_KEY_WRAP_SET_OAEP_PARAMS;
|
1552
|
+
|
1553
|
+
typedef CK_KEY_WRAP_SET_OAEP_PARAMS CK_PTR \
|
1554
|
+
CK_KEY_WRAP_SET_OAEP_PARAMS_PTR;
|
1555
|
+
|
1556
|
+
|
1557
|
+
typedef struct CK_SSL3_RANDOM_DATA {
|
1558
|
+
CK_BYTE_PTR pClientRandom;
|
1559
|
+
CK_ULONG ulClientRandomLen;
|
1560
|
+
CK_BYTE_PTR pServerRandom;
|
1561
|
+
CK_ULONG ulServerRandomLen;
|
1562
|
+
} CK_SSL3_RANDOM_DATA;
|
1563
|
+
|
1564
|
+
|
1565
|
+
typedef struct CK_SSL3_MASTER_KEY_DERIVE_PARAMS {
|
1566
|
+
CK_SSL3_RANDOM_DATA RandomInfo;
|
1567
|
+
CK_VERSION_PTR pVersion;
|
1568
|
+
} CK_SSL3_MASTER_KEY_DERIVE_PARAMS;
|
1569
|
+
|
1570
|
+
typedef struct CK_SSL3_MASTER_KEY_DERIVE_PARAMS CK_PTR \
|
1571
|
+
CK_SSL3_MASTER_KEY_DERIVE_PARAMS_PTR;
|
1572
|
+
|
1573
|
+
|
1574
|
+
typedef struct CK_SSL3_KEY_MAT_OUT {
|
1575
|
+
CK_OBJECT_HANDLE hClientMacSecret;
|
1576
|
+
CK_OBJECT_HANDLE hServerMacSecret;
|
1577
|
+
CK_OBJECT_HANDLE hClientKey;
|
1578
|
+
CK_OBJECT_HANDLE hServerKey;
|
1579
|
+
CK_BYTE_PTR pIVClient;
|
1580
|
+
CK_BYTE_PTR pIVServer;
|
1581
|
+
} CK_SSL3_KEY_MAT_OUT;
|
1582
|
+
|
1583
|
+
typedef CK_SSL3_KEY_MAT_OUT CK_PTR CK_SSL3_KEY_MAT_OUT_PTR;
|
1584
|
+
|
1585
|
+
|
1586
|
+
typedef struct CK_SSL3_KEY_MAT_PARAMS {
|
1587
|
+
CK_ULONG ulMacSizeInBits;
|
1588
|
+
CK_ULONG ulKeySizeInBits;
|
1589
|
+
CK_ULONG ulIVSizeInBits;
|
1590
|
+
CK_BBOOL bIsExport;
|
1591
|
+
CK_SSL3_RANDOM_DATA RandomInfo;
|
1592
|
+
CK_SSL3_KEY_MAT_OUT_PTR pReturnedKeyMaterial;
|
1593
|
+
} CK_SSL3_KEY_MAT_PARAMS;
|
1594
|
+
|
1595
|
+
typedef CK_SSL3_KEY_MAT_PARAMS CK_PTR CK_SSL3_KEY_MAT_PARAMS_PTR;
|
1596
|
+
|
1597
|
+
typedef struct CK_WTLS_RANDOM_DATA {
|
1598
|
+
CK_BYTE_PTR pClientRandom;
|
1599
|
+
CK_ULONG ulClientRandomLen;
|
1600
|
+
CK_BYTE_PTR pServerRandom;
|
1601
|
+
CK_ULONG ulServerRandomLen;
|
1602
|
+
} CK_WTLS_RANDOM_DATA;
|
1603
|
+
|
1604
|
+
typedef CK_WTLS_RANDOM_DATA CK_PTR CK_WTLS_RANDOM_DATA_PTR;
|
1605
|
+
|
1606
|
+
typedef struct CK_WTLS_MASTER_KEY_DERIVE_PARAMS {
|
1607
|
+
CK_MECHANISM_TYPE DigestMechanism;
|
1608
|
+
CK_WTLS_RANDOM_DATA RandomInfo;
|
1609
|
+
CK_BYTE_PTR pVersion;
|
1610
|
+
} CK_WTLS_MASTER_KEY_DERIVE_PARAMS;
|
1611
|
+
|
1612
|
+
typedef CK_WTLS_MASTER_KEY_DERIVE_PARAMS CK_PTR \
|
1613
|
+
CK_WTLS_MASTER_KEY_DERIVE_PARAMS_PTR;
|
1614
|
+
|
1615
|
+
typedef struct CK_WTLS_PRF_PARAMS {
|
1616
|
+
CK_MECHANISM_TYPE DigestMechanism;
|
1617
|
+
CK_BYTE_PTR pSeed;
|
1618
|
+
CK_ULONG ulSeedLen;
|
1619
|
+
CK_BYTE_PTR pLabel;
|
1620
|
+
CK_ULONG ulLabelLen;
|
1621
|
+
CK_BYTE_PTR pOutput;
|
1622
|
+
CK_ULONG_PTR pulOutputLen;
|
1623
|
+
} CK_WTLS_PRF_PARAMS;
|
1624
|
+
|
1625
|
+
typedef CK_WTLS_PRF_PARAMS CK_PTR CK_WTLS_PRF_PARAMS_PTR;
|
1626
|
+
|
1627
|
+
typedef struct CK_WTLS_KEY_MAT_OUT {
|
1628
|
+
CK_OBJECT_HANDLE hMacSecret;
|
1629
|
+
CK_OBJECT_HANDLE hKey;
|
1630
|
+
CK_BYTE_PTR pIV;
|
1631
|
+
} CK_WTLS_KEY_MAT_OUT;
|
1632
|
+
|
1633
|
+
typedef CK_WTLS_KEY_MAT_OUT CK_PTR CK_WTLS_KEY_MAT_OUT_PTR;
|
1634
|
+
|
1635
|
+
typedef struct CK_WTLS_KEY_MAT_PARAMS {
|
1636
|
+
CK_MECHANISM_TYPE DigestMechanism;
|
1637
|
+
CK_ULONG ulMacSizeInBits;
|
1638
|
+
CK_ULONG ulKeySizeInBits;
|
1639
|
+
CK_ULONG ulIVSizeInBits;
|
1640
|
+
CK_ULONG ulSequenceNumber;
|
1641
|
+
CK_BBOOL bIsExport;
|
1642
|
+
CK_WTLS_RANDOM_DATA RandomInfo;
|
1643
|
+
CK_WTLS_KEY_MAT_OUT_PTR pReturnedKeyMaterial;
|
1644
|
+
} CK_WTLS_KEY_MAT_PARAMS;
|
1645
|
+
|
1646
|
+
typedef CK_WTLS_KEY_MAT_PARAMS CK_PTR CK_WTLS_KEY_MAT_PARAMS_PTR;
|
1647
|
+
|
1648
|
+
typedef struct CK_CMS_SIG_PARAMS {
|
1649
|
+
CK_OBJECT_HANDLE certificateHandle;
|
1650
|
+
CK_MECHANISM_PTR pSigningMechanism;
|
1651
|
+
CK_MECHANISM_PTR pDigestMechanism;
|
1652
|
+
CK_UTF8CHAR_PTR pContentType;
|
1653
|
+
CK_BYTE_PTR pRequestedAttributes;
|
1654
|
+
CK_ULONG ulRequestedAttributesLen;
|
1655
|
+
CK_BYTE_PTR pRequiredAttributes;
|
1656
|
+
CK_ULONG ulRequiredAttributesLen;
|
1657
|
+
} CK_CMS_SIG_PARAMS;
|
1658
|
+
|
1659
|
+
typedef CK_CMS_SIG_PARAMS CK_PTR CK_CMS_SIG_PARAMS_PTR;
|
1660
|
+
|
1661
|
+
typedef struct CK_KEY_DERIVATION_STRING_DATA {
|
1662
|
+
CK_BYTE_PTR pData;
|
1663
|
+
CK_ULONG ulLen;
|
1664
|
+
} CK_KEY_DERIVATION_STRING_DATA;
|
1665
|
+
|
1666
|
+
typedef CK_KEY_DERIVATION_STRING_DATA CK_PTR \
|
1667
|
+
CK_KEY_DERIVATION_STRING_DATA_PTR;
|
1668
|
+
|
1669
|
+
|
1670
|
+
/* The CK_EXTRACT_PARAMS is used for the
|
1671
|
+
* CKM_EXTRACT_KEY_FROM_KEY mechanism. It specifies which bit
|
1672
|
+
* of the base key should be used as the first bit of the
|
1673
|
+
* derived key */
|
1674
|
+
typedef CK_ULONG CK_EXTRACT_PARAMS;
|
1675
|
+
|
1676
|
+
typedef CK_EXTRACT_PARAMS CK_PTR CK_EXTRACT_PARAMS_PTR;
|
1677
|
+
|
1678
|
+
/*
|
1679
|
+
* CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE is used to
|
1680
|
+
* indicate the Pseudo-Random Function (PRF) used to generate
|
1681
|
+
* key bits using PKCS #5 PBKDF2. */
|
1682
|
+
typedef CK_ULONG CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE;
|
1683
|
+
|
1684
|
+
typedef CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE CK_PTR CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE_PTR;
|
1685
|
+
|
1686
|
+
#define CKP_PKCS5_PBKD2_HMAC_SHA1 0x00000001UL
|
1687
|
+
/* new for v2.40 */
|
1688
|
+
#define CKP_PKCS5_PBKD2_HMAC_GOSTR3411 0x00000002UL
|
1689
|
+
#define CKP_PKCS5_PBKD2_HMAC_SHA224 0x00000003UL
|
1690
|
+
#define CKP_PKCS5_PBKD2_HMAC_SHA256 0x00000004UL
|
1691
|
+
#define CKP_PKCS5_PBKD2_HMAC_SHA384 0x00000005UL
|
1692
|
+
#define CKP_PKCS5_PBKD2_HMAC_SHA512 0x00000006UL
|
1693
|
+
#define CKP_PKCS5_PBKD2_HMAC_SHA512_224 0x00000007UL
|
1694
|
+
#define CKP_PKCS5_PBKD2_HMAC_SHA512_256 0x00000008UL
|
1695
|
+
|
1696
|
+
/*
|
1697
|
+
* CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE is used to indicate the
|
1698
|
+
* source of the salt value when deriving a key using PKCS #5
|
1699
|
+
* PBKDF2. */
|
1700
|
+
typedef CK_ULONG CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE;
|
1701
|
+
|
1702
|
+
typedef CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE CK_PTR CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE_PTR;
|
1703
|
+
|
1704
|
+
/* The following salt value sources are defined in PKCS #5 v2.0. */
|
1705
|
+
#define CKZ_SALT_SPECIFIED 0x00000001UL
|
1706
|
+
|
1707
|
+
/*
|
1708
|
+
* CK_PKCS5_PBKD2_PARAMS is a structure that provides the
|
1709
|
+
* parameters to the CKM_PKCS5_PBKD2 mechanism.
|
1710
|
+
*/
|
1711
|
+
typedef struct CK_PKCS5_PBKD2_PARAMS {
|
1712
|
+
CK_PKCS5_PBKDF2_SALT_SOURCE_TYPE saltSource;
|
1713
|
+
CK_VOID_PTR pSaltSourceData;
|
1714
|
+
CK_ULONG ulSaltSourceDataLen;
|
1715
|
+
CK_ULONG iterations;
|
1716
|
+
CK_PKCS5_PBKD2_PSEUDO_RANDOM_FUNCTION_TYPE prf;
|
1717
|
+
CK_VOID_PTR pPrfData;
|
1718
|
+
CK_ULONG ulPrfDataLen;
|
1719
|
+
CK_UTF8CHAR_PTR pPassword;
|
1720
|
+
CK_ULONG_PTR ulPasswordLen;
|
1721
|
+
} CK_PKCS5_PBKD2_PARAMS;
|
1722
|
+
|
1723
|
+
typedef CK_PKCS5_PBKD2_PARAMS CK_PTR CK_PKCS5_PBKD2_PARAMS_PTR;
|
1724
|
+
|
1725
|
+
typedef CK_ULONG CK_OTP_PARAM_TYPE;
|
1726
|
+
typedef CK_OTP_PARAM_TYPE CK_PARAM_TYPE; /* B/w compatibility */
|
1727
|
+
|
1728
|
+
typedef struct CK_OTP_PARAM {
|
1729
|
+
CK_OTP_PARAM_TYPE type;
|
1730
|
+
CK_VOID_PTR pValue;
|
1731
|
+
CK_ULONG ulValueLen;
|
1732
|
+
} CK_OTP_PARAM;
|
1733
|
+
|
1734
|
+
typedef CK_OTP_PARAM CK_PTR CK_OTP_PARAM_PTR;
|
1735
|
+
|
1736
|
+
typedef struct CK_OTP_PARAMS {
|
1737
|
+
CK_OTP_PARAM_PTR pParams;
|
1738
|
+
CK_ULONG ulCount;
|
1739
|
+
} CK_OTP_PARAMS;
|
1740
|
+
|
1741
|
+
typedef CK_OTP_PARAMS CK_PTR CK_OTP_PARAMS_PTR;
|
1742
|
+
|
1743
|
+
typedef struct CK_OTP_SIGNATURE_INFO {
|
1744
|
+
CK_OTP_PARAM_PTR pParams;
|
1745
|
+
CK_ULONG ulCount;
|
1746
|
+
} CK_OTP_SIGNATURE_INFO;
|
1747
|
+
|
1748
|
+
typedef CK_OTP_SIGNATURE_INFO CK_PTR CK_OTP_SIGNATURE_INFO_PTR;
|
1749
|
+
|
1750
|
+
#define CK_OTP_VALUE 0UL
|
1751
|
+
#define CK_OTP_PIN 1UL
|
1752
|
+
#define CK_OTP_CHALLENGE 2UL
|
1753
|
+
#define CK_OTP_TIME 3UL
|
1754
|
+
#define CK_OTP_COUNTER 4UL
|
1755
|
+
#define CK_OTP_FLAGS 5UL
|
1756
|
+
#define CK_OTP_OUTPUT_LENGTH 6UL
|
1757
|
+
#define CK_OTP_OUTPUT_FORMAT 7UL
|
1758
|
+
|
1759
|
+
#define CKF_NEXT_OTP 0x00000001UL
|
1760
|
+
#define CKF_EXCLUDE_TIME 0x00000002UL
|
1761
|
+
#define CKF_EXCLUDE_COUNTER 0x00000004UL
|
1762
|
+
#define CKF_EXCLUDE_CHALLENGE 0x00000008UL
|
1763
|
+
#define CKF_EXCLUDE_PIN 0x00000010UL
|
1764
|
+
#define CKF_USER_FRIENDLY_OTP 0x00000020UL
|
1765
|
+
|
1766
|
+
typedef struct CK_KIP_PARAMS {
|
1767
|
+
CK_MECHANISM_PTR pMechanism;
|
1768
|
+
CK_OBJECT_HANDLE hKey;
|
1769
|
+
CK_BYTE_PTR pSeed;
|
1770
|
+
CK_ULONG ulSeedLen;
|
1771
|
+
} CK_KIP_PARAMS;
|
1772
|
+
|
1773
|
+
typedef CK_KIP_PARAMS CK_PTR CK_KIP_PARAMS_PTR;
|
1774
|
+
|
1775
|
+
typedef struct CK_AES_CTR_PARAMS {
|
1776
|
+
CK_ULONG ulCounterBits;
|
1777
|
+
CK_BYTE cb[16];
|
1778
|
+
} CK_AES_CTR_PARAMS;
|
1779
|
+
|
1780
|
+
typedef CK_AES_CTR_PARAMS CK_PTR CK_AES_CTR_PARAMS_PTR;
|
1781
|
+
|
1782
|
+
typedef struct CK_GCM_PARAMS {
|
1783
|
+
CK_BYTE_PTR pIv;
|
1784
|
+
CK_ULONG ulIvLen;
|
1785
|
+
CK_ULONG ulIvBits;
|
1786
|
+
CK_BYTE_PTR pAAD;
|
1787
|
+
CK_ULONG ulAADLen;
|
1788
|
+
CK_ULONG ulTagBits;
|
1789
|
+
} CK_GCM_PARAMS;
|
1790
|
+
|
1791
|
+
typedef CK_GCM_PARAMS CK_PTR CK_GCM_PARAMS_PTR;
|
1792
|
+
|
1793
|
+
typedef struct CK_CCM_PARAMS {
|
1794
|
+
CK_ULONG ulDataLen; /*plaintext or ciphertext*/
|
1795
|
+
CK_BYTE_PTR pNonce;
|
1796
|
+
CK_ULONG ulNonceLen;
|
1797
|
+
CK_BYTE_PTR pAAD;
|
1798
|
+
CK_ULONG ulAADLen;
|
1799
|
+
CK_ULONG ulMACLen;
|
1800
|
+
} CK_CCM_PARAMS;
|
1801
|
+
|
1802
|
+
typedef CK_CCM_PARAMS CK_PTR CK_CCM_PARAMS_PTR;
|
1803
|
+
|
1804
|
+
typedef struct CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS {
|
1805
|
+
CK_BYTE iv[16];
|
1806
|
+
CK_BYTE_PTR pData;
|
1807
|
+
CK_ULONG length;
|
1808
|
+
} CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS;
|
1809
|
+
|
1810
|
+
typedef CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS CK_PTR CK_CAMELLIA_CBC_ENCRYPT_DATA_PARAMS_PTR;
|
1811
|
+
|
1812
|
+
typedef struct CK_ARIA_CBC_ENCRYPT_DATA_PARAMS {
|
1813
|
+
CK_BYTE iv[16];
|
1814
|
+
CK_BYTE_PTR pData;
|
1815
|
+
CK_ULONG length;
|
1816
|
+
} CK_ARIA_CBC_ENCRYPT_DATA_PARAMS;
|
1817
|
+
|
1818
|
+
typedef CK_ARIA_CBC_ENCRYPT_DATA_PARAMS CK_PTR CK_ARIA_CBC_ENCRYPT_DATA_PARAMS_PTR;
|
1819
|
+
|
1820
|
+
/* new for v2.40 */
|
1821
|
+
typedef struct CK_DSA_PARAMETER_GEN_PARAM {
|
1822
|
+
CK_MECHANISM_TYPE hash;
|
1823
|
+
CK_BYTE_PTR pSeed;
|
1824
|
+
CK_ULONG ulSeedLen;
|
1825
|
+
CK_ULONG ulIndex;
|
1826
|
+
} CK_DSA_PARAMETER_GEN_PARAM;
|
1827
|
+
|
1828
|
+
typedef CK_DSA_PARAMETER_GEN_PARAM CK_PTR CK_DSA_PARAMETER_GEN_PARAM_PTR;
|
1829
|
+
|
1830
|
+
/* new for v2.40 */
|
1831
|
+
typedef struct CK_ECDH_AES_KEY_WRAP_PARAMS {
|
1832
|
+
CK_ULONG ulAESKeyBits;
|
1833
|
+
CK_EC_KDF_TYPE kdf;
|
1834
|
+
CK_ULONG ulSharedDataLen;
|
1835
|
+
CK_BYTE_PTR pSharedData;
|
1836
|
+
} CK_ECDH_AES_KEY_WRAP_PARAMS;
|
1837
|
+
|
1838
|
+
typedef CK_ECDH_AES_KEY_WRAP_PARAMS CK_PTR CK_ECDH_AES_KEY_WRAP_PARAMS_PTR;
|
1839
|
+
|
1840
|
+
/* new for v2.40 */
|
1841
|
+
typedef CK_ULONG CK_JAVA_MIDP_SECURITY_DOMAIN;
|
1842
|
+
|
1843
|
+
/* new for v2.40 */
|
1844
|
+
typedef CK_ULONG CK_CERTIFICATE_CATEGORY;
|
1845
|
+
|
1846
|
+
/* new for v2.40 */
|
1847
|
+
typedef struct CK_RSA_AES_KEY_WRAP_PARAMS {
|
1848
|
+
CK_ULONG ulAESKeyBits;
|
1849
|
+
CK_RSA_PKCS_OAEP_PARAMS_PTR pOAEPParams;
|
1850
|
+
} CK_RSA_AES_KEY_WRAP_PARAMS;
|
1851
|
+
|
1852
|
+
typedef CK_RSA_AES_KEY_WRAP_PARAMS CK_PTR CK_RSA_AES_KEY_WRAP_PARAMS_PTR;
|
1853
|
+
|
1854
|
+
/* new for v2.40 */
|
1855
|
+
typedef struct CK_TLS12_MASTER_KEY_DERIVE_PARAMS {
|
1856
|
+
CK_SSL3_RANDOM_DATA RandomInfo;
|
1857
|
+
CK_VERSION_PTR pVersion;
|
1858
|
+
CK_MECHANISM_TYPE prfHashMechanism;
|
1859
|
+
} CK_TLS12_MASTER_KEY_DERIVE_PARAMS;
|
1860
|
+
|
1861
|
+
typedef CK_TLS12_MASTER_KEY_DERIVE_PARAMS CK_PTR CK_TLS12_MASTER_KEY_DERIVE_PARAMS_PTR;
|
1862
|
+
|
1863
|
+
/* new for v2.40 */
|
1864
|
+
typedef struct CK_TLS12_KEY_MAT_PARAMS {
|
1865
|
+
CK_ULONG ulMacSizeInBits;
|
1866
|
+
CK_ULONG ulKeySizeInBits;
|
1867
|
+
CK_ULONG ulIVSizeInBits;
|
1868
|
+
CK_BBOOL bIsExport;
|
1869
|
+
CK_SSL3_RANDOM_DATA RandomInfo;
|
1870
|
+
CK_SSL3_KEY_MAT_OUT_PTR pReturnedKeyMaterial;
|
1871
|
+
CK_MECHANISM_TYPE prfHashMechanism;
|
1872
|
+
} CK_TLS12_KEY_MAT_PARAMS;
|
1873
|
+
|
1874
|
+
typedef CK_TLS12_KEY_MAT_PARAMS CK_PTR CK_TLS12_KEY_MAT_PARAMS_PTR;
|
1875
|
+
|
1876
|
+
/* new for v2.40 */
|
1877
|
+
typedef struct CK_TLS_KDF_PARAMS {
|
1878
|
+
CK_MECHANISM_TYPE prfMechanism;
|
1879
|
+
CK_BYTE_PTR pLabel;
|
1880
|
+
CK_ULONG ulLabelLength;
|
1881
|
+
CK_SSL3_RANDOM_DATA RandomInfo;
|
1882
|
+
CK_BYTE_PTR pContextData;
|
1883
|
+
CK_ULONG ulContextDataLength;
|
1884
|
+
} CK_TLS_KDF_PARAMS;
|
1885
|
+
|
1886
|
+
typedef CK_TLS_KDF_PARAMS CK_PTR CK_TLS_KDF_PARAMS_PTR;
|
1887
|
+
|
1888
|
+
/* new for v2.40 */
|
1889
|
+
typedef struct CK_TLS_MAC_PARAMS {
|
1890
|
+
CK_MECHANISM_TYPE prfHashMechanism;
|
1891
|
+
CK_ULONG ulMacLength;
|
1892
|
+
CK_ULONG ulServerOrClient;
|
1893
|
+
} CK_TLS_MAC_PARAMS;
|
1894
|
+
|
1895
|
+
typedef CK_TLS_MAC_PARAMS CK_PTR CK_TLS_MAC_PARAMS_PTR;
|
1896
|
+
|
1897
|
+
typedef struct CK_GOSTR3410_DERIVE_PARAMS {
|
1898
|
+
CK_EC_KDF_TYPE kdf;
|
1899
|
+
CK_BYTE_PTR pPublicData;
|
1900
|
+
CK_ULONG ulPublicDataLen;
|
1901
|
+
CK_BYTE_PTR pUKM;
|
1902
|
+
CK_ULONG ulUKMLen;
|
1903
|
+
} CK_GOSTR3410_DERIVE_PARAMS;
|
1904
|
+
|
1905
|
+
typedef CK_GOSTR3410_DERIVE_PARAMS CK_PTR CK_GOSTR3410_DERIVE_PARAMS_PTR;
|
1906
|
+
|
1907
|
+
typedef struct CK_GOSTR3410_KEY_WRAP_PARAMS {
|
1908
|
+
CK_BYTE_PTR pWrapOID;
|
1909
|
+
CK_ULONG ulWrapOIDLen;
|
1910
|
+
CK_BYTE_PTR pUKM;
|
1911
|
+
CK_ULONG ulUKMLen;
|
1912
|
+
CK_OBJECT_HANDLE hKey;
|
1913
|
+
} CK_GOSTR3410_KEY_WRAP_PARAMS;
|
1914
|
+
|
1915
|
+
typedef CK_GOSTR3410_KEY_WRAP_PARAMS CK_PTR CK_GOSTR3410_KEY_WRAP_PARAMS_PTR;
|
1916
|
+
|
1917
|
+
#endif
|