~ubuntu-branches/ubuntu/natty/gnome-keyring/natty

« back to all changes in this revision

Viewing changes to gp11/gp11.h

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher
  • Date: 2010-02-16 19:00:06 UTC
  • mfrom: (1.1.58 upstream)
  • Revision ID: james.westby@ubuntu.com-20100216190006-cqpnic4zxlkmmi0o
Tags: 2.29.90git20100218-0ubuntu1
Updated to a git snapshot version

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
        gulong n_parameter;
58
58
} GP11Mechanism;
59
59
 
 
60
GP11Mechanism*      gp11_mechanism_new                      (gulong type);
 
61
 
 
62
GP11Mechanism*      gp11_mechanism_new_with_param           (gulong type,
 
63
                                                             gconstpointer parameter,
 
64
                                                             gulong n_parameter);
 
65
 
 
66
GP11Mechanism*      gp11_mechanism_ref                      (GP11Mechanism* mech);
 
67
 
 
68
void                gp11_mechanism_unref                    (GP11Mechanism* mech);
 
69
 
60
70
typedef struct GP11Attribute {
61
71
        gulong type;
62
72
        guchar *value;
80
90
        GP11_AUTHENTICATE_OBJECTS = 4
81
91
};
82
92
 
83
 
/* Used on varargs functions that should end with GP11_INVALID */
84
 
#ifdef NOT_YET_SUPPORTED
85
 
#define GP11_INVALID_TERMINATED __attribute__((__sentinel__(G_MAXULONG)))
86
 
#else
87
 
#define GP11_INVALID_TERMINATED
88
 
#endif
89
 
 
90
93
void                gp11_attribute_init                     (GP11Attribute *attr,
91
94
                                                             gulong attr_type,
92
95
                                                             gconstpointer value,
164
167
GP11Attributes*     gp11_attributes_new                     (void);
165
168
 
166
169
GP11Attributes*     gp11_attributes_new_empty               (gulong attr_type, 
167
 
                                                             ...) GP11_INVALID_TERMINATED;
 
170
                                                             ...);
168
171
 
169
172
GP11Attributes*     gp11_attributes_new_full                (GP11Allocator allocator);
170
173
 
171
174
GP11Attributes*     gp11_attributes_newv                    (gulong attr_type, 
172
 
                                                             ...) GP11_INVALID_TERMINATED;
 
175
                                                             ...);
173
176
 
174
177
GP11Attributes*     gp11_attributes_new_valist              (GP11Allocator allocator, 
175
178
                                                             va_list va);
177
180
GP11Attribute*      gp11_attributes_at                      (GP11Attributes *attrs,
178
181
                                                             guint index);
179
182
 
180
 
void                gp11_attributes_add                     (GP11Attributes *attrs,
 
183
GP11Attribute*      gp11_attributes_add                     (GP11Attributes *attrs,
181
184
                                                             GP11Attribute *attr);
182
185
 
183
 
void                gp11_attributes_add_data                (GP11Attributes *attrs,
 
186
GP11Attribute*      gp11_attributes_add_data                (GP11Attributes *attrs,
184
187
                                                             gulong attr_type,
185
188
                                                             gconstpointer value,
186
189
                                                             gsize length);
187
190
 
188
 
void                gp11_attributes_add_invalid             (GP11Attributes *attrs,
189
 
                                                             gulong attr_type);
190
 
 
191
 
void                gp11_attributes_add_empty               (GP11Attributes *attrs,
192
 
                                                             gulong attr_type);
193
 
 
194
 
void                gp11_attributes_add_boolean             (GP11Attributes *attrs,
 
191
GP11Attribute*      gp11_attributes_add_invalid             (GP11Attributes *attrs,
 
192
                                                             gulong attr_type);
 
193
 
 
194
GP11Attribute*      gp11_attributes_add_empty               (GP11Attributes *attrs,
 
195
                                                             gulong attr_type);
 
196
 
 
197
GP11Attribute*      gp11_attributes_add_boolean             (GP11Attributes *attrs,
195
198
                                                             gulong attr_type,
196
199
                                                             gboolean value);
197
200
 
198
 
void                gp11_attributes_add_string              (GP11Attributes *attrs,
199
 
                                                             gulong attr_type,
200
 
                                                             const gchar *string);
201
 
 
202
 
void                gp11_attributes_add_date                (GP11Attributes *attrs,
203
 
                                                             gulong attr_type,
204
 
                                                             const GDate *date);
205
 
 
206
 
void                gp11_attributes_add_ulong               (GP11Attributes *attrs,
 
201
GP11Attribute*      gp11_attributes_add_string              (GP11Attributes *attrs,
 
202
                                                             gulong attr_type,
 
203
                                                             const gchar *value);
 
204
 
 
205
GP11Attribute*      gp11_attributes_add_date                (GP11Attributes *attrs,
 
206
                                                             gulong attr_type,
 
207
                                                             const GDate *value);
 
208
 
 
209
GP11Attribute*      gp11_attributes_add_ulong               (GP11Attributes *attrs,
207
210
                                                             gulong attr_type,
208
211
                                                             gulong value);
209
212
 
309
312
gboolean              gp11_module_get_pool_sessions           (GP11Module *self);
310
313
 
311
314
void                  gp11_module_set_pool_sessions           (GP11Module *self, 
312
 
                                                               gboolean pool_sessions);
 
315
                                                               gboolean pool);
313
316
 
314
317
gint                  gp11_module_get_auto_authenticate       (GP11Module *self);
315
318
 
319
322
gboolean              gp11_module_enumerate_objects           (GP11Module *self,
320
323
                                                               GP11ObjectForeachFunc func,
321
324
                                                               gpointer user_data,
322
 
                                                               ...) GP11_INVALID_TERMINATED;
 
325
                                                               ...);
323
326
 
324
327
gboolean              gp11_module_enumerate_objects_full      (GP11Module *self,
325
328
                                                               GP11Attributes *attrs,
486
489
 
487
490
GP11Session*        gp11_slot_open_session_full             (GP11Slot *self,
488
491
                                                             gulong flags,
 
492
                                                             gpointer app_data,
 
493
                                                             CK_NOTIFY notify,
489
494
                                                             GCancellable *cancellable,
490
495
                                                             GError **err);
491
496
 
492
497
void                gp11_slot_open_session_async            (GP11Slot *self,
493
498
                                                             gulong flags,
 
499
                                                             gpointer app_data,
 
500
                                                             CK_NOTIFY notify,
494
501
                                                             GCancellable *cancellable,
495
502
                                                             GAsyncReadyCallback callback,
496
503
                                                             gpointer user_data);
546
553
 
547
554
GP11SessionInfo*    gp11_session_get_info                   (GP11Session *self);
548
555
 
549
 
#if UNIMPLEMENTED
550
 
 
551
556
gboolean            gp11_session_init_pin                   (GP11Session *self, 
552
557
                                                             const guchar *pin,
553
558
                                                             gsize n_pin,
554
559
                                                             GError **err);
555
560
 
 
561
gboolean            gp11_session_init_pin_full              (GP11Session *self,
 
562
                                                             const guchar *pin,
 
563
                                                             gsize n_pin,
 
564
                                                             GCancellable *cancellable,
 
565
                                                             GError **err);
 
566
 
556
567
void                gp11_session_init_pin_async             (GP11Session *self, 
557
568
                                                             const guchar *pin,
558
569
                                                             gsize n_pin,
 
570
                                                             GCancellable *cancellable,
559
571
                                                             GAsyncReadyCallback callback,
560
572
                                                             gpointer user_data);
561
573
 
570
582
                                                             gsize n_new_pin,
571
583
                                                             GError **err);
572
584
 
 
585
gboolean            gp11_session_set_pin_full               (GP11Session *self,
 
586
                                                             const guchar *old_pin,
 
587
                                                             gsize n_old_pin,
 
588
                                                             const guchar *new_pin,
 
589
                                                             gsize n_new_pin,
 
590
                                                             GCancellable *cancellable,
 
591
                                                             GError **err);
 
592
 
573
593
void                gp11_session_set_pin_async              (GP11Session *self,
574
594
                                                             const guchar *old_pin,
575
595
                                                             gsize n_old_pin,
576
596
                                                             const guchar *new_pin,
577
597
                                                             gsize n_new_pin,
 
598
                                                             GCancellable *cancellable,
578
599
                                                             GAsyncReadyCallback callback,
579
600
                                                             gpointer user_data);
580
601
 
582
603
                                                             GAsyncResult *result,
583
604
                                                             GError **err);
584
605
 
 
606
#if UNIMPLEMENTED
 
607
 
585
608
guchar*             gp11_session_get_operation_state        (GP11Session *self,
586
609
                                                             gsize *n_result,
587
610
                                                             GError **err);
656
679
 
657
680
GP11Object*         gp11_session_create_object              (GP11Session *self, 
658
681
                                                             GError **err, 
659
 
                                                             ...) GP11_INVALID_TERMINATED; 
 
682
                                                             ...);
660
683
 
661
684
GP11Object*         gp11_session_create_object_full         (GP11Session *self,
662
685
                                                             GP11Attributes *attrs,
675
698
 
676
699
GList*              gp11_session_find_objects               (GP11Session *self,
677
700
                                                             GError **err,
678
 
                                                             ...) GP11_INVALID_TERMINATED; 
 
701
                                                             ...);
679
702
 
680
703
GList*              gp11_session_find_objects_full          (GP11Session *self,
681
704
                                                             GP11Attributes *attrs,
697
720
GP11Object*         gp11_session_generate_key               (GP11Session *self,
698
721
                                                             GP11Mechanism *mechanism,
699
722
                                                             GError **err,
700
 
                                                             ...) GP11_INVALID_TERMINATED;
 
723
                                                             ...);
701
724
 
702
725
void                gp11_session_generate_key_async         (GP11Session *self,
703
726
                                                             GP11Mechanism *mechanism,
704
727
                                                             GAsyncReadyCallback callback,
705
728
                                                             gpointer user_data,
706
 
                                                             ...) GP11_INVALID_TERMINATED;
 
729
                                                             ...);
707
730
 
708
731
GP11Object*         gp11_session_generate_key_finish        (GP11Session *self,
709
732
                                                             GAsyncResult *result,
710
733
                                                             GError **err,
711
 
                                                             ...) GP11_INVALID_TERMINATED;
712
 
 
713
 
gboolean            gp11_session_generate_key_pair          (GP11Session *self,
 
734
                                                             ...);
 
735
 
 
736
#endif /* UNIMPLEMENTED */
 
737
 
 
738
gboolean            gp11_session_generate_key_pair_full     (GP11Session *self,
714
739
                                                             GP11Mechanism *mechanism,
 
740
                                                             GP11Attributes *public_attrs,
 
741
                                                             GP11Attributes *private_attrs,
715
742
                                                             GP11Object **public_key,
716
743
                                                             GP11Object **private_key,
717
 
                                                             GError **err,
718
 
                                                             ...) GP11_INVALID_TERMINATED;
 
744
                                                             GCancellable *cancellable,
 
745
                                                             GError **err);
719
746
 
720
747
void                gp11_session_generate_key_pair_async    (GP11Session *self,
721
748
                                                             GP11Mechanism *mechanism,
 
749
                                                             GP11Attributes *public_attrs,
 
750
                                                             GP11Attributes *private_attrs,
 
751
                                                             GCancellable *cancellable,
722
752
                                                             GAsyncReadyCallback callback,
723
 
                                                             gpointer user_data,
724
 
                                                             ...) GP11_INVALID_TERMINATED;
 
753
                                                             gpointer user_data);
725
754
 
726
755
gboolean            gp11_session_generate_key_pair_finish   (GP11Session *self,
727
756
                                                             GAsyncResult *result,
728
757
                                                             GP11Object **public_key,
729
758
                                                             GP11Object **private_key,
730
 
                                                             GError **err,
731
 
                                                             ...) GP11_INVALID_TERMINATED;
 
759
                                                             GError **err);
 
760
 
 
761
#ifdef UNIMPLEMENTED
732
762
 
733
763
gboolean            gp11_session_seed_random                (GP11Session *self,
734
764
                                                             const guchar *seed,
770
800
 
771
801
guchar*             gp11_session_encrypt_full                (GP11Session *self,
772
802
                                                              GP11Object *key,
773
 
                                                              GP11Mechanism *mech_args,
 
803
                                                              GP11Mechanism *mechanism,
774
804
                                                              const guchar *input,
775
805
                                                              gsize n_input,
776
806
                                                              gsize *n_result,
779
809
 
780
810
void                gp11_session_encrypt_async               (GP11Session *self,
781
811
                                                              GP11Object *key,
782
 
                                                              GP11Mechanism *mech_args,
 
812
                                                              GP11Mechanism *mechanism,
783
813
                                                              const guchar *input,
784
814
                                                              gsize n_input,
785
815
                                                              GCancellable *cancellable,
795
825
 
796
826
GP11Processor*      gp11_session_batch_encrypt               (GP11Session *self,
797
827
                                                              GP11Object *key,
798
 
                                                              GP11Mechanism *mech_args,
 
828
                                                              GP11Mechanism *mechanism,
799
829
                                                              GCancellable *cancellable,
800
830
                                                              GError **err);
801
831
 
802
832
void                gp11_session_batch_encrypt_async         (GP11Session *self,
803
833
                                                              GP11Object *key,
804
 
                                                              GP11Mechanism *mech_args,
 
834
                                                              GP11Mechanism *mechanism,
805
835
                                                              GCancellable *cancellable,
806
836
                                                              GAsyncReadyCallback callback,
807
837
                                                              gpointer user_data);
823
853
 
824
854
guchar*             gp11_session_decrypt_full                (GP11Session *self,
825
855
                                                              GP11Object *key,
826
 
                                                              GP11Mechanism *mech_args,
 
856
                                                              GP11Mechanism *mechanism,
827
857
                                                              const guchar *input,
828
858
                                                              gsize n_input,
829
859
                                                              gsize *n_result,
832
862
 
833
863
void                gp11_session_decrypt_async               (GP11Session *self,
834
864
                                                              GP11Object *key,
835
 
                                                              GP11Mechanism *mech_args,
 
865
                                                              GP11Mechanism *mechanism,
836
866
                                                              const guchar *input,
837
867
                                                              gsize n_input,
838
868
                                                              GCancellable *cancellable,
848
878
 
849
879
GP11Processor*      gp11_session_batch_decrypt               (GP11Session *self,
850
880
                                                              GP11Object *key,
851
 
                                                              GP11Mechanism *mech_args,
 
881
                                                              GP11Mechanism *mechanism,
852
882
                                                              GCancellable *cancellable,
853
883
                                                              GError **err);
854
884
 
855
885
void                gp11_session_batch_decrypt_async         (GP11Session *self,
856
886
                                                              GP11Object *key,
857
 
                                                              GP11Mechanism *mech_args,
 
887
                                                              GP11Mechanism *mechanism,
858
888
                                                              GCancellable *cancellable,
859
889
                                                              GAsyncReadyCallback callback,
860
890
                                                              gpointer user_data);
871
901
                                                              GError **err);
872
902
 
873
903
guchar*             gp11_session_digest_full                 (GP11Session *self,
874
 
                                                              GP11Mechanism *mech_args,
 
904
                                                              GP11Mechanism *mechanism,
875
905
                                                              const guchar *input,
876
906
                                                              gsize n_input,
877
907
                                                              gsize *n_result,
879
909
                                                              GError **err);
880
910
 
881
911
void                gp11_session_digest_async                (GP11Session *self,
882
 
                                                              GP11Mechanism *mech_args,
 
912
                                                              GP11Mechanism *mechanism,
883
913
                                                              const guchar *input,
884
914
                                                              gsize n_input,
885
915
                                                              GCancellable *cancellable,
892
922
                                                              GError **err);
893
923
 
894
924
GP11Processor*      gp11_session_batch_digest                (GP11Session *self,
895
 
                                                              GP11Mechanism *mech_args,
 
925
                                                              GP11Mechanism *mechanism,
896
926
                                                              GCancellable *cancellable,
897
927
                                                              GError **err);
898
928
 
899
929
void                gp11_session_batch_digest_async          (GP11Session *self,
900
 
                                                              GP11Mechanism *mech_args,
 
930
                                                              GP11Mechanism *mechanism,
901
931
                                                              GCancellable *cancellable,
902
932
                                                              GAsyncReadyCallback callback,
903
933
                                                              gpointer user_data);
975
1005
 
976
1006
guchar*             gp11_session_sign_full                   (GP11Session *self,
977
1007
                                                              GP11Object *key,
978
 
                                                              GP11Mechanism *mech_args,
 
1008
                                                              GP11Mechanism *mechanism,
979
1009
                                                              const guchar *input,
980
1010
                                                              gsize n_input,
981
1011
                                                              gsize *n_result,
984
1014
 
985
1015
void                gp11_session_sign_async                  (GP11Session *self,
986
1016
                                                              GP11Object *key,
987
 
                                                              GP11Mechanism *mech_args,
 
1017
                                                              GP11Mechanism *mechanism,
988
1018
                                                              const guchar *input,
989
1019
                                                              gsize n_input,
990
1020
                                                              GCancellable *cancellable,
1000
1030
 
1001
1031
GP11Processor*      gp11_session_batch_sign                  (GP11Session *self,
1002
1032
                                                              GP11Object *key,
1003
 
                                                              GP11Mechanism *mech_args,
 
1033
                                                              GP11Mechanism *mechanism,
1004
1034
                                                              GCancellable *cancellable,
1005
1035
                                                              GError **err);
1006
1036
 
1007
1037
void                gp11_session_batch_sign_async            (GP11Session *self,
1008
1038
                                                              GP11Object *key,
1009
 
                                                              GP11Mechanism *mech_args,
 
1039
                                                              GP11Mechanism *mechanism,
1010
1040
                                                              GCancellable *cancellable,
1011
1041
                                                              GAsyncReadyCallback callback,
1012
1042
                                                              gpointer user_data);
1044
1074
 
1045
1075
guchar*             gp11_session_sign_recover_full           (GP11Session *self,
1046
1076
                                                              GP11Object *key,
1047
 
                                                              GP11Mechanism *mech_args,
 
1077
                                                              GP11Mechanism *mechanism,
1048
1078
                                                              const guchar *input,
1049
1079
                                                              gsize n_input,
1050
1080
                                                              gsize *n_result,
1053
1083
 
1054
1084
void                gp11_session_sign_recover_async          (GP11Session *self,
1055
1085
                                                              GP11Object *key,
1056
 
                                                              GP11Mechanism *mech_args,
 
1086
                                                              GP11Mechanism *mechanism,
1057
1087
                                                              const guchar *input,
1058
1088
                                                              gsize n_input,
1059
1089
                                                              GCancellable *cancellable,
1078
1108
 
1079
1109
gboolean            gp11_session_verify_full                 (GP11Session *self,
1080
1110
                                                              GP11Object *key,
1081
 
                                                              GP11Mechanism *mech_args,
 
1111
                                                              GP11Mechanism *mechanism,
1082
1112
                                                              const guchar *input,
1083
1113
                                                              gsize n_input,
1084
1114
                                                              const guchar *signature,
1114
1144
 
1115
1145
void                gp11_session_batch_verify_async          (GP11Session *self,
1116
1146
                                                              GP11Object *key,
1117
 
                                                              GP11Mechanism *mech_args,
 
1147
                                                              GP11Mechanism *mechanism,
1118
1148
                                                              const guchar *input,
1119
1149
                                                              gsize n_input,
1120
1150
                                                              GCancellable *cancellable,
1135
1165
 
1136
1166
guchar*             gp11_session_verify_recover_full         (GP11Session *self,
1137
1167
                                                              GP11Object *key,
1138
 
                                                              GP11Mechanism *mech_args,
 
1168
                                                              GP11Mechanism *mechanism,
1139
1169
                                                              const guchar *input,
1140
1170
                                                              gsize n_input,
1141
1171
                                                              gsize *n_result,
1144
1174
 
1145
1175
void                gp11_session_verify_recover_async        (GP11Session *self,
1146
1176
                                                              GP11Object *key,
1147
 
                                                              GP11Mechanism *mech_args,
 
1177
                                                              GP11Mechanism *mechanism,
1148
1178
                                                              const guchar *input,
1149
1179
                                                              gsize n_input,
1150
1180
                                                              GCancellable *cancellable,
1156
1186
                                                              gsize *n_result,
1157
1187
                                                              GError **err);
1158
1188
 
1159
 
guchar*             gp11_session_wrap                        (GP11Session *self,
1160
 
                                                              GP11Object *key,
1161
 
                                                              gulong mech_type,
1162
 
                                                              GP11Object *wrapped_key,
1163
 
                                                              gsize *n_result,
1164
 
                                                              GError **err);
1165
 
 
1166
 
guchar*             gp11_session_wrap                        (GP11Session *self,
1167
 
                                                              GP11Object *key,
1168
 
                                                              GP11Mechanism *mech_args,
1169
 
                                                              GP11Object *wrapped_key,
1170
 
                                                              gsize *n_result,
1171
 
                                                              GCancellable *cancellable,
1172
 
                                                              GError **err);
1173
 
 
1174
 
void                gp11_session_wrap_async                  (GP11Session *self,
1175
 
                                                              GP11Object *key,
1176
 
                                                              GP11Mechanism *mech_args,
1177
 
                                                              GP11Object *wrapped_key,
1178
 
                                                              GCancellable *cancellable,
1179
 
                                                              GAsyncReadyCallback callback,
1180
 
                                                              gpointer user_data);
1181
 
 
1182
 
guchar*             gp11_session_wrap_finish                 (GP11Session *self,
1183
 
                                                              GAsyncResult *result,
1184
 
                                                              gsize *n_result,
1185
 
                                                              GError **err);
1186
 
 
1187
 
GP11Object*         gp11_session_unwrap                      (GP11Session *self,
1188
 
                                                              GP11Object *key,
1189
 
                                                              gulong mech_type,
1190
 
                                                              const guchar *input,
1191
 
                                                              gsize n_input,
1192
 
                                                              GError **err,
1193
 
                                                              ...) GP11_INVALID_TERMINATED;
1194
 
 
1195
 
GP11Object*         gp11_session_unwrap                      (GP11Session *self,
1196
 
                                                              GP11Object *key,
1197
 
                                                              GP11Mechanism *mech_args,
1198
 
                                                              const guchar *input,
1199
 
                                                              gsize n_input,
1200
 
                                                              GCancellable *cancellable,
1201
 
                                                              GError **err,
1202
 
                                                              ...) GP11_INVALID_TERMINATED;
1203
 
 
1204
 
void                gp11_session_unwrap_async                (GP11Session *self,
1205
 
                                                              GP11Object *key,
1206
 
                                                              GP11Mechanism *mech_args,
1207
 
                                                              const guchar *input,
1208
 
                                                              gsize n_input,
1209
 
                                                              GCancellable *cancellable,
1210
 
                                                              GAsyncReadyCallback callback,
1211
 
                                                              gpointer user_data);
1212
 
                                                              ...) GP11_INVALID_TERMINATED;
1213
 
 
1214
 
GP11Object*         gp11_session_unwrap_finish               (GP11Session *self,
1215
 
                                                              GAsyncResult *result,
1216
 
                                                              GError **err);
1217
 
 
1218
 
GP11Object*         gp11_session_derive                      (GP11Session *self,
1219
 
                                                              GP11Object *key,
1220
 
                                                              gulong mech_type,
1221
 
                                                              GError **err,
1222
 
                                                              ...) GP11_INVALID_TERMINATED;
1223
 
 
1224
 
GP11Object*         gp11_session_derive_full                 (GP11Session *self,
1225
 
                                                              GP11Object *key,
1226
 
                                                              GP11Mechanism *mech_args,
1227
 
                                                              GCancellable *cancellable,
1228
 
                                                              GError **err,
1229
 
                                                              ...) GP11_INVALID_TERMINATED;
1230
 
 
1231
 
void                gp11_session_derive_async                (GP11Session *self,
1232
 
                                                              GP11Object *key,
1233
 
                                                              GP11Mechanism *mech_args,
1234
 
                                                              GCancellable *cancellable,
1235
 
                                                              GAsyncReadyCallback callback,
1236
 
                                                              gpointer user_data);
1237
 
                                                              ...) GP11_INVALID_TERMINATED;
1238
 
 
1239
 
GP11Object*         gp11_session_derive_finish               (GP11Session *self,
1240
 
                                                              GAsyncResult *result,
1241
 
                                                              GError **err);
1242
 
 
1243
1189
#endif /* UNIMPLEMENTED */
1244
1190
 
 
1191
gpointer            gp11_session_wrap_key                    (GP11Session *self,
 
1192
                                                              GP11Object *wrapper,
 
1193
                                                              gulong mech_type,
 
1194
                                                              GP11Object *wrapped,
 
1195
                                                              gsize *n_result,
 
1196
                                                              GError **err);
 
1197
 
 
1198
gpointer            gp11_session_wrap_key_full               (GP11Session *self,
 
1199
                                                              GP11Object *wrapper,
 
1200
                                                              GP11Mechanism *mechanism,
 
1201
                                                              GP11Object *wrapped,
 
1202
                                                              gsize *n_result,
 
1203
                                                              GCancellable *cancellable,
 
1204
                                                              GError **err);
 
1205
 
 
1206
void                gp11_session_wrap_key_async              (GP11Session *self,
 
1207
                                                              GP11Object *wrapper,
 
1208
                                                              GP11Mechanism *mechanism,
 
1209
                                                              GP11Object *wrapped,
 
1210
                                                              GCancellable *cancellable,
 
1211
                                                              GAsyncReadyCallback callback,
 
1212
                                                              gpointer user_data);
 
1213
 
 
1214
gpointer            gp11_session_wrap_key_finish             (GP11Session *self,
 
1215
                                                              GAsyncResult *result,
 
1216
                                                              gsize *n_result,
 
1217
                                                              GError **err);
 
1218
 
 
1219
GP11Object*         gp11_session_unwrap_key                  (GP11Session *self,
 
1220
                                                              GP11Object *wrapper,
 
1221
                                                              gulong mech_type,
 
1222
                                                              gconstpointer input,
 
1223
                                                              gsize n_input,
 
1224
                                                              GError **err,
 
1225
                                                              ...);
 
1226
 
 
1227
GP11Object*         gp11_session_unwrap_key_full             (GP11Session *self,
 
1228
                                                              GP11Object *wrapper,
 
1229
                                                              GP11Mechanism *mechanism,
 
1230
                                                              gconstpointer input,
 
1231
                                                              gsize n_input,
 
1232
                                                              GP11Attributes *attrs,
 
1233
                                                              GCancellable *cancellable,
 
1234
                                                              GError **err);
 
1235
 
 
1236
void                gp11_session_unwrap_key_async            (GP11Session *self,
 
1237
                                                              GP11Object *wrapper,
 
1238
                                                              GP11Mechanism *mechanism,
 
1239
                                                              gconstpointer input,
 
1240
                                                              gsize n_input,
 
1241
                                                              GP11Attributes *attrs,
 
1242
                                                              GCancellable *cancellable,
 
1243
                                                              GAsyncReadyCallback callback,
 
1244
                                                              gpointer user_data);
 
1245
 
 
1246
GP11Object*         gp11_session_unwrap_key_finish           (GP11Session *self,
 
1247
                                                              GAsyncResult *result,
 
1248
                                                              GError **err);
 
1249
 
 
1250
GP11Object*         gp11_session_derive_key                  (GP11Session *self,
 
1251
                                                              GP11Object *base,
 
1252
                                                              gulong mech_type,
 
1253
                                                              GError **err,
 
1254
                                                              ...);
 
1255
 
 
1256
GP11Object*         gp11_session_derive_key_full             (GP11Session *self,
 
1257
                                                              GP11Object *base,
 
1258
                                                              GP11Mechanism *mechanism,
 
1259
                                                              GP11Attributes *attrs,
 
1260
                                                              GCancellable *cancellable,
 
1261
                                                              GError **err);
 
1262
 
 
1263
void                gp11_session_derive_key_async            (GP11Session *self,
 
1264
                                                              GP11Object *base,
 
1265
                                                              GP11Mechanism *mechanism,
 
1266
                                                              GP11Attributes *attrs,
 
1267
                                                              GCancellable *cancellable,
 
1268
                                                              GAsyncReadyCallback callback,
 
1269
                                                              gpointer user_data);
 
1270
 
 
1271
GP11Object*         gp11_session_derive_key_finish           (GP11Session *self,
 
1272
                                                              GAsyncResult *result,
 
1273
                                                              GError **err);
1245
1274
 
1246
1275
/* ------------------------------------------------------------------------
1247
1276
 * OBJECT
1275
1304
                                                             CK_OBJECT_HANDLE_PTR handles,
1276
1305
                                                             CK_ULONG n_handles);
1277
1306
 
1278
 
gboolean            gp11_object_equal                       (gconstpointer slot1,
1279
 
                                                             gconstpointer slot2);
 
1307
gboolean            gp11_object_equal                       (gconstpointer object1,
 
1308
                                                             gconstpointer object2);
1280
1309
 
1281
 
guint               gp11_object_hash                        (gconstpointer slot);
 
1310
guint               gp11_object_hash                        (gconstpointer object);
1282
1311
 
1283
1312
GP11Module*         gp11_object_get_module                  (GP11Object *self);
1284
1313
 
1350
1379
 
1351
1380
gboolean            gp11_object_set                         (GP11Object *self,
1352
1381
                                                             GError **err,
1353
 
                                                             ...) GP11_INVALID_TERMINATED;
 
1382
                                                             ...);
1354
1383
 
1355
1384
gboolean            gp11_object_set_full                    (GP11Object *self,
1356
1385
                                                             GP11Attributes *attrs,
1369
1398
 
1370
1399
GP11Attributes*     gp11_object_get                         (GP11Object *self,
1371
1400
                                                             GError **err,
1372
 
                                                             ...) GP11_INVALID_TERMINATED;
 
1401
                                                             ...);
1373
1402
 
1374
1403
GP11Attributes*     gp11_object_get_full                    (GP11Object *self,
1375
1404
                                                             GP11Attributes *attrs,
1410
1439
                                                             gsize *n_data,
1411
1440
                                                             GError **err);
1412
1441
 
 
1442
gboolean            gp11_object_set_template                (GP11Object *self,
 
1443
                                                             gulong attr_type,
 
1444
                                                             GP11Attributes *attrs,
 
1445
                                                             GError **err);
 
1446
 
 
1447
gboolean            gp11_object_set_template_full           (GP11Object *self,
 
1448
                                                             gulong attr_type,
 
1449
                                                             GP11Attributes *attrs,
 
1450
                                                             GCancellable *cancellable,
 
1451
                                                             GError **err);
 
1452
 
 
1453
void                gp11_object_set_template_async          (GP11Object *self,
 
1454
                                                             gulong attr_type,
 
1455
                                                             GP11Attributes *attrs,
 
1456
                                                             GCancellable *cancellable,
 
1457
                                                             GAsyncReadyCallback callback,
 
1458
                                                             gpointer user_data);
 
1459
 
 
1460
gboolean            gp11_object_set_template_finish         (GP11Object *self,
 
1461
                                                             GAsyncResult *result,
 
1462
                                                             GError **err);
 
1463
 
 
1464
GP11Attributes*     gp11_object_get_template                (GP11Object *self,
 
1465
                                                             gulong attr_type,
 
1466
                                                             GError **err);
 
1467
 
 
1468
GP11Attributes*     gp11_object_get_template_full           (GP11Object *self,
 
1469
                                                             gulong attr_type,
 
1470
                                                             GCancellable *cancellable,
 
1471
                                                             GError **err);
 
1472
 
 
1473
void                gp11_object_get_template_async          (GP11Object *self,
 
1474
                                                             gulong attr_type,
 
1475
                                                             GCancellable *cancellable,
 
1476
                                                             GAsyncReadyCallback callback,
 
1477
                                                             gpointer user_data);
 
1478
 
 
1479
GP11Attributes*     gp11_object_get_template_finish         (GP11Object *self,
 
1480
                                                             GAsyncResult *result,
 
1481
                                                             GError **err);
1413
1482
 
1414
1483
/* ----------------------------------------------------------------------
1415
1484
 * PROCESSOR