-
Notifications
You must be signed in to change notification settings - Fork 0
/
ckoath.h
1318 lines (1162 loc) · 47.6 KB
/
ckoath.h
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
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
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
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
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
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
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
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
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
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
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
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
C K O A T H . H -- Authentication for Kermit 95
Copyright (C) 1998, 2004, Trustees of Columbia University in the City of New
York.
Author: Jeffrey E Altman ([email protected])
Secure Endpoints Inc., New York City
Specify the function mappings you need to have applied by #define's
set before including this file:
MAP_DES
MAP_SRP
MAP_KRYPTO
MAP_KRB4
MAP_KRB5
MAP_NTLM
MAP_GSSAPI
MAP_CRYPT
*/
#ifdef OS2
#ifdef MAP_DES
#define des_new_random_key ck_des_new_random_key
#define des_set_random_generator_seed ck_des_set_random_generator_seed
#ifdef FTP_KRB4
#define des_key_sched ck_k4_des_key_sched
#else /* FTP_KRB4 */
#define des_key_sched ck_des_key_sched
#endif /* FTP_KRB4 */
#define des_ecb_encrypt ck_des_ecb_encrypt
#define des_string_to_key ck_des_string_to_key
#ifdef des_fixup_key_parity
#undef des_fixup_key_parity
#endif
#define des_fixup_key_parity ck_des_fixup_key_parity
#define des_pcbc_encrypt ck_des_pcbc_encrypt
int ck_des_new_random_key(Block B);
void ck_des_set_random_generator_seed(Block B);
int ck_des_key_sched(Block B, Schedule S);
int ck_k4_des_key_sched(Block B, Schedule S);
void ck_des_ecb_encrypt(Block B1, Block B2, Schedule S, int I);
int ck_des_string_to_key(char * p, Block B);
void ck_des_fixup_key_parity(Block B);
void ck_des_pcbc_encrypt(Block input, Block output, long length,
Schedule schedule, Block ivec, int enc);
#endif /* MAP_DES */
#ifdef MAP_SRP
#define t_clientresponse ck_t_clientresponse
#define t_clientgetkey ck_t_clientgetkey
#define t_clientpasswd ck_t_clientpasswd
#define t_clientgenexp ck_t_clientgenexp
#define t_clientopen ck_t_clientopen
#define t_clientverify ck_t_clientverify
unsigned char * ck_t_clientresponse(struct t_client *);
unsigned char * ck_t_clientgetkey(struct t_client *, struct t_num *);
void ck_t_clientpasswd(struct t_client *, char *);
struct t_num * ck_t_clientgenexp(struct t_client *);
struct t_client * ck_t_clientopen(const char *, struct t_num *, struct t_num *, struct t_num *);
int ck_t_clientverify(struct t_client *, unsigned char *);
#endif /* MAP_SRP */
#ifdef MAP_KRYPTO
#define cipher_getdescbyid (struct _cipher_desc *)ck_cipher_getdescbyid
#define cipher_getlist (unsigned char *)ck_cipher_getlist
#define cipher_getdescbyname (struct _cipher_desc *)ck_cipher_getdescbyname
#define hash_getdescbyid (struct _hash_desc *)ck_hash_getdescbyid
#define hash_getlist (unsigned char *)ck_hash_getlist
#define hash_getdescbyname (struct _hash_desc *)ck_hash_getdescbyname
#define krypto_delete ck_krypto_delete
#define krypto_new (struct _krypto_context *)ck_krypto_new
#define hash_supported ck_hash_supported
#define cipher_supported ck_cipher_supported
#define krypto_msg_safe ck_krypto_msg_safe
#define krypto_msg_priv ck_krypto_msg_priv
#endif /* MAP_KRYPTO */
#ifdef MAP_KRB4
#ifndef ADDR_SZ
#define ADDR_SZ 40 /* From Leash krb.h */
#endif /* ADDR_SZ */
/* The Leash implementation of Kerberos 4 used by Kermit 95 */
/* has an extended Credentials structure that includes the */
/* ip address of the ticket in readable form. */
struct leash_credentials {
char service[ANAME_SZ]; /* Service name */
char instance[INST_SZ]; /* Instance */
char realm[REALM_SZ]; /* Auth domain */
C_Block session; /* Session key */
int lifetime; /* Lifetime */
int kvno; /* Key version number */
KTEXT_ST ticket_st; /* The ticket itself */
long issue_date; /* The issue time */
char pname[ANAME_SZ]; /* Principal's name */
char pinst[INST_SZ]; /* Principal's instance */
char address[ADDR_SZ]; /* IP Address in ticket */
};
typedef struct leash_credentials LEASH_CREDENTIALS;
#define krb_get_err_text_entry ck_krb_get_err_text_entry
#define krb_get_cred ck_krb_get_cred
#define krb_mk_req ck_krb_mk_req
#define krb_realmofhost ck_krb_realmofhost
#define krb_get_phost ck_krb_get_phost
#define krb_get_pw_in_tkt ck_krb_get_pw_in_tkt
#define krb_get_pw_in_tkt_preauth ck_krb_get_pw_in_tkt_preauth
#define krb_get_lrealm ck_krb_get_lrealm
#define krb_get_err_text ck_krb_get_err_text
#define kname_parse ck_kname_parse
#define dest_tkt ck_dest_tkt
#define krb_get_tf_realm ck_krb_get_tf_realm
#define krb_get_tf_fullname ck_krb_get_tf_fullname
#define tf_get_pname ck_tf_get_pname
#define tf_get_pinst ck_tf_get_pinst
#define tf_get_cred ck_tf_get_cred
#define tf_close ck_tf_close
#define tf_init ck_tf_init
#define tkt_string ck_tkt_string
#define krb_check_serv ck_krb_check_serv
#define kuserok ck_kuserok
#define krb_kntoln ck_krb_kntoln
#define krb_rd_req ck_krb_rd_req
#define krb_sendauth ck_krb_sendauth
#define set_krb_debug ck_set_krb_debug
#define set_krb_ap_req_debug ck_set_krb_ap_req_debug
#define krb_mk_safe ck_krb_mk_safe
#define krb_mk_priv ck_krb_mk_priv
#define krb_rd_priv ck_krb_rd_priv
#define krb_rd_safe ck_krb_rd_safe
#define krb_in_tkt ck_krb_in_tkt
#define krb_save_credentials ck_krb_save_credentials
const char * ck_krb_get_err_text_entry(int _errno);
int ck_krb_get_cred(char *service, char *instance,
char *realm, LEASH_CREDENTIALS *c);
int ck_krb_mk_req(KTEXT authent, char *service,
char *instance, char *realm,
KRB4_32 checksum);
char * ck_krb_realmofhost(char *host);
char * ck_krb_get_phost(char *alias);
int ck_krb_get_pw_in_tkt(char *user, char *instance, char *realm,
char *service, char *sinstance,
int life, char *password);
int ck_krb_get_pw_in_tkt_preauth
(char *user, char *instance, char *realm,
char *service, char *sinstance,
int life, char *password);
int ck_krb_get_lrealm(char *realm, int index);
const char * ck_krb_get_err_text(int _errno);
int ck_krb_in_tkt(char *, char *, char *);
int ck_krb_save_credentials(char *, char *, char *, C_Block, int, int, KTEXT, long);
int ck_kname_parse(char *name, char *inst,
char *realm,char *fullname);
int ck_dest_tkt(void);
int ck_tf_get_pname(char*);
int ck_tf_get_pinst(char*);
int ck_tf_get_cred(LEASH_CREDENTIALS*);
void ck_tf_close(void);
int ck_tf_init(char *,int);
char * ck_tkt_string(void);
int ck_krb_get_tf_realm(char *ticket_file,
char *realm);
int ck_krb_get_tf_fullname(char *ticket_file,
char *name, char *inst,
char *realm);
int ck_krb_check_serv(char * service);
int ck_kuserok(AUTH_DAT *kdata, char *luser);
int ck_k95_k4_userok( const char * princ_name,
const char * princ_inst,
const char * princ_realm,
const char * local_realm,
const char *luser);
int ck_krb_kntoln(AUTH_DAT *kdata, char *luser);
int ck_k95_k4_princ_to_userid( const char * princ_name,
const char * princ_inst,
const char * princ_realm,
const char * local_realm,
char *luser, int len);
int ck_krb_rd_req(KTEXT, char *service, char *inst,
unsigned int from_addr, AUTH_DAT *,
char *srvtab);
int ck_krb_sendauth(long,int,KTEXT,CHAR *,CHAR *,CHAR *,
unsigned long,MSG_DAT *,LEASH_CREDENTIALS *, Key_schedule *,
struct sockaddr_in *,struct sockaddr_in *, CHAR *);
int ck_set_krb_debug(int);
int ck_set_krb_ap_req_debug(int);
long ck_krb_mk_safe(char * in, char * out,
unsigned long length,
C_Block block,
struct sockaddr_in * sender,
struct sockaddr_in * receiver);
long ck_krb_mk_priv(char * in, char * out,
unsigned long length,
Schedule sched,
C_Block block,
struct sockaddr_in * sender,
struct sockaddr_in * receiver);
long ck_krb_rd_priv(char * in, unsigned long in_length,
Schedule sched,
C_Block block,
struct sockaddr_in * sender,
struct sockaddr_in * receiver,
MSG_DAT * m_data);
long ck_krb_rd_safe(char * in, unsigned long in_length,
C_Block block,
struct sockaddr_in * sender,
struct sockaddr_in * receiver,
MSG_DAT * m_data);
#endif /* MAP_KRB4 */
#ifdef MAP_KRB5
#ifndef krb5_const
#define krb5_const const
#endif
#define com_err ck_com_err
#define error_message ck_error_message
#define krb5_free_creds ck_krb5_free_creds
#define krb5_free_data ck_krb5_free_data
#define krb5_free_data_contents ck_krb5_free_data_contents
#define krb5_copy_keyblock ck_krb5_copy_keyblock
#define krb5_free_keyblock ck_krb5_free_keyblock
#define krb5_auth_con_getlocalsubkey ck_krb5_auth_con_getlocalsubkey
#define krb5_mk_req_extended ck_krb5_mk_req_extended
#define krb5_mk_req ck_krb5_mk_req
#define krb5_auth_con_setflags ck_krb5_auth_con_setflags
#define krb5_auth_con_init ck_krb5_auth_con_init
#define krb5_auth_con_free ck_krb5_auth_con_free
#define krb5_get_credentials ck_krb5_get_credentials
#define krb5_free_cred_contents ck_krb5_free_cred_contents
#define krb5_sname_to_principal ck_krb5_sname_to_principal
#define krb5_cc_default ck_krb5_cc_default
#define krb5_free_ap_rep_enc_part ck_krb5_free_ap_rep_enc_part
#define krb5_rd_rep ck_krb5_rd_rep
#define krb5_init_context ck_krb5_init_context
#define krb5_init_ets ck_krb5_init_ets
#define krb5_free_context ck_krb5_free_context
#define krb5_free_unparsed_name ck_krb5_free_unparsed_name
#define krb5_free_principal ck_krb5_free_principal
#define krb5_fwd_tgt_creds ck_krb5_fwd_tgt_creds
#define krb5_auth_con_genaddrs ck_krb5_auth_con_genaddrs
#define krb5_get_host_realm ck_krb5_get_host_realm
#define krb5_free_host_realm ck_krb5_free_host_realm
#define krb5_get_in_tkt_with_keytab ck_krb5_get_in_tkt_with_keytab
#define krb5_get_in_tkt_with_password ck_krb5_get_in_tkt_with_password
#define krb5_read_password ck_krb5_read_password
#define krb5_build_principal_ext ck_krb5_build_principal_ext
#define krb5_unparse_name ck_krb5_unparse_name
#define krb5_parse_name ck_krb5_parse_name
#define krb5_cc_resolve ck_krb5_cc_resolve
#define krb5_cc_default_name ck_krb5_cc_default_name
#define krb5_string_to_timestamp ck_krb5_string_to_timestamp
#define krb5_kt_resolve ck_krb5_kt_resolve
#define krb5_string_to_deltat ck_krb5_string_to_deltat
#define krb5_timeofday ck_krb5_timeofday
#define krb5_get_credentials_renew ck_krb5_get_credentials_renew
#define krb5_get_credentials_validate ck_krb5_get_credentials_validate
#define krb5_copy_principal ck_krb5_copy_principal
#define krb5_timestamp_to_sfstring ck_krb5_timestamp_to_sfstring
#define krb5_kt_default ck_krb5_kt_default
#define krb5_free_ticket ck_krb5_free_ticket
#define decode_krb5_ticket ck_decode_krb5_ticket
#ifdef CHECKADDRS
#define krb5_os_localaddr ck_krb5_os_localaddr
#define krb5_address_search ck_krb5_address_search
#define krb5_free_addresses ck_krb5_free_addresses
#endif /* CHECKADDRS */
#define krb5_auth_con_getremotesubkey ck_krb5_auth_con_getremotesubkey
#define krb5_mk_rep ck_krb5_mk_rep
#define krb5_free_authenticator ck_krb5_free_authenticator
#define krb5_verify_checksum ck_krb5_verify_checksum
#define krb5_auth_con_getkey ck_krb5_auth_con_getkey
#define krb5_auth_con_getauthenticator ck_krb5_auth_con_getauthenticator
#define krb5_rd_req ck_krb5_rd_req
#define krb5_auth_con_setrcache ck_krb5_auth_con_setrcache
#define krb5_get_server_rcache ck_krb5_get_server_rcache
#define krb5_auth_con_getrcache ck_krb5_auth_con_getrcache
#define krb5_free_tgt_creds ck_krb5_free_tgt_creds
#define krb5_rd_cred ck_krb5_rd_cred
#define krb5_c_enctype_compare ck_krb5_c_enctype_compare
#define krb5_c_encrypt_length ck_krb5_c_encrypt_length
#define krb5_write_message ck_krb5_write_message
#define krb5_free_error ck_krb5_free_error
#define krb5_sendauth ck_krb5_sendauth
#define krb5_process_key ck_krb5_process_key
#define krb5_use_enctype ck_krb5_use_enctype
#define krb5_encrypt ck_krb5_encrypt
#define krb5_decrypt ck_krb5_decrypt
#define krb5_encrypt_size ck_krb5_encrypt_size
#define krb5_kuserok ck_krb5_kuserok
#define krb5_aname_to_localname ck_krb5_aname_to_localname
#define krb5_appdefault_boolean ck_krb5_appdefault_boolean
#define krb5_appdefault_string ck_krb5_appdefault_string
#define krb5_get_init_creds_password ck_krb5_get_init_creds_password
#define krb5_get_init_creds_opt_set_address_list ck_krb5_get_init_creds_opt_set_address_list
#define krb5_get_renewed_creds ck_krb5_get_renewed_creds
#define krb5_get_validated_creds ck_krb5_get_validated_creds
#define krb5_get_init_creds_opt_set_tkt_life ck_krb5_get_init_creds_opt_set_tkt_life
#define krb5_get_init_creds_opt_set_forwardable ck_krb5_get_init_creds_opt_set_forwardable
#define krb5_get_init_creds_opt_set_proxiable ck_krb5_get_init_creds_opt_set_proxiable
#define krb5_get_init_creds_opt_set_renew_life ck_krb5_get_init_creds_opt_set_renew_life
#define krb5_get_init_creds_opt_init ck_krb5_get_init_creds_opt_init
#define krb5_get_init_creds_opt_set_etype_list ck_krb5_get_init_creds_opt_set_etype_list
#define krb5_get_init_creds_opt_set_preauth_list ck_krb5_get_init_creds_opt_set_preauth_list
#define krb5_get_init_creds_opt_set_salt ck_krb5_get_init_creds_opt_set_salt
#define krb5_rd_safe ck_krb5_rd_safe
#define krb5_mk_safe ck_krb5_mk_safe
#define krb5_rd_priv ck_krb5_rd_priv
#define krb5_mk_priv ck_krb5_mk_priv
#define krb5_auth_con_setuseruserkey ck_krb5_auth_con_setuseruserkey
#define krb5_read_message ck_krb5_read_message
#define krb5_get_profile ck_krb5_get_profile
#define profile_get_relation_names ck_profile_get_relation_names
#define profile_get_subsection_names ck_profile_get_subsection_names
#define krb5_free_keyblock_contents ck_krb5_free_keyblock_contents
#define krb5_c_encrypt ck_krb5_c_encrypt
#define krb5_c_decrypt ck_krb5_c_decrypt
#define krb5_c_make_random_key ck_krb5_c_make_random_key
#define krb5_c_random_seed ck_krb5_c_random_seed
#define krb5_c_block_size ck_krb5_c_block_size
#define krb5_kt_default_name ck_krb5_kt_default_name
#ifdef krb5_cc_get_principal
#define NO_DEF_KRB5_CCACHE
#undef krb5_cc_get_principal
#endif
#define krb5_cc_get_principal ck_krb5_cc_get_principal
#ifdef krb5_cc_store_cred
#undef krb5_cc_store_cred
#endif
#define krb5_cc_store_cred ck_krb5_cc_store_cred
#ifdef krb5_cc_initialize
#undef krb5_cc_initialize
#endif
#define krb5_cc_initialize ck_krb5_cc_initialize
#ifdef krb5_cc_destroy
#undef krb5_cc_destroy
#endif
#define krb5_cc_destroy ck_krb5_cc_destroy
#ifdef krb5_cc_end_seq_get
#undef krb5_cc_end_seq_get
#endif
#define krb5_cc_end_seq_get ck_krb5_cc_end_seq_get
#ifdef krb5_cc_next_cred
#undef krb5_cc_next_cred
#endif
#define krb5_cc_next_cred ck_krb5_cc_next_cred
#ifdef krb5_cc_start_seq_get
#undef krb5_cc_start_seq_get
#endif
#define krb5_cc_start_seq_get ck_krb5_cc_start_seq_get
#ifdef krb5_cc_get_type
#undef krb5_cc_get_type
#endif
#define krb5_cc_get_type ck_krb5_cc_get_type
#ifdef krb5_cc_get_name
#undef krb5_cc_get_name
#endif
#define krb5_cc_get_name ck_krb5_cc_get_name
#ifdef krb5_cc_set_flags
#undef krb5_cc_set_flags
#endif
#define krb5_cc_set_flags ck_krb5_cc_set_flags
#ifdef krb5_cc_close
#undef krb5_cc_close
#endif
#define krb5_cc_close ck_krb5_cc_close
#ifdef krb5_kt_get_type
#define NO_DEF_KRB5_KT
#undef krb5_kt_get_type
#endif
#define krb5_kt_get_type ck_krb5_kt_get_type
#ifdef krb5_kt_get_name
#undef krb5_kt_get_name
#endif
#define krb5_kt_get_name ck_krb5_kt_get_name
#ifdef krb5_kt_close
#undef krb5_kt_close
#endif
#define krb5_kt_close ck_krb5_kt_close
#ifdef krb5_kt_get_entry
#undef krb5_kt_get_entry
#endif
#define krb5_kt_get_entry ck_krb5_kt_get_entry
#ifdef krb5_kt_start_seq_get
#undef krb5_kt_start_seq_get
#endif
#define krb5_kt_start_seq_get ck_krb5_kt_start_seq_get
#ifdef krb5_kt_next_entry
#undef krb5_kt_next_entry
#endif
#define krb5_kt_next_entry ck_krb5_kt_next_entry
#ifdef krb5_kt_end_seq_get
#undef krb5_kt_end_seq_get
#endif
#define krb5_kt_end_seq_get ck_krb5_kt_end_seq_get
#define krb5_build_principal ck_krb5_build_principal
#define krb524_init_ets ck_krb524_init_ets
#define krb524_convert_creds_kdc ck_krb524_convert_creds_kdc
void
ck_com_err(const char *, errcode_t, const char *, ...);
void ck_com_err_va(const char *, errcode_t, const char *, va_list);
const char * ck_error_message(errcode_t);
void ck_krb5_free_creds(krb5_context, krb5_creds*);
void ck_krb5_free_data(krb5_context, krb5_data *);
void ck_krb5_free_data_contents(krb5_context, krb5_data *);
krb5_error_code ck_krb5_copy_keyblock(krb5_context,
krb5_const krb5_keyblock *,
krb5_keyblock * *);
void ck_krb5_free_keyblock(krb5_context, krb5_keyblock *);
krb5_error_code ck_krb5_auth_con_getlocalsubkey(krb5_context,
krb5_auth_context,
krb5_keyblock * *);
krb5_error_code ck_krb5_mk_req_extended (krb5_context,
krb5_auth_context *,
krb5_const krb5_flags,
krb5_data *,
krb5_creds *,
krb5_data * );
krb5_error_code ck_krb5_mk_req(krb5_context,
krb5_auth_context *,
krb5_const krb5_flags,
char *,
char *,
krb5_data *,
krb5_ccache,
krb5_data * );
krb5_error_code
ck_krb5_auth_con_setflags(krb5_context,
krb5_auth_context,
krb5_int32);
krb5_error_code
ck_krb5_auth_con_init(krb5_context,
krb5_auth_context *);
krb5_error_code
ck_krb5_auth_con_free(krb5_context,
krb5_auth_context);
krb5_error_code
ck_krb5_get_credentials(krb5_context,
krb5_const krb5_flags,
krb5_ccache,
krb5_creds *,
krb5_creds * *);
void
ck_krb5_free_cred_contents(krb5_context, krb5_creds *);
krb5_error_code
ck_krb5_sname_to_principal(krb5_context,
krb5_const char *,
krb5_const char *,
krb5_int32,
krb5_principal *);
krb5_error_code
ck_krb5_cc_default(krb5_context,
krb5_ccache *);
void
ck_krb5_free_ap_rep_enc_part(krb5_context,
krb5_ap_rep_enc_part *);
krb5_error_code
ck_krb5_rd_rep(krb5_context,
krb5_auth_context,
krb5_const krb5_data *,
krb5_ap_rep_enc_part * *);
krb5_error_code ck_krb5_init_context(krb5_context *);
void ck_krb5_free_context(krb5_context);
krb5_error_code ck_krb5_init_ets(krb5_context);
void ck_krb5_free_principal(krb5_context, krb5_principal );
void ck_krb5_free_unparsed_name(krb5_context, char *);
krb5_error_code ck_krb5_fwd_tgt_creds(krb5_context,
krb5_auth_context,
char *,
krb5_principal,
krb5_principal,
krb5_ccache,
int forwardable,
krb5_data *);
krb5_error_code
ck_krb5_auth_con_genaddrs(krb5_context,
krb5_auth_context,
int, int);
krb5_error_code
ck_krb5_get_host_realm(krb5_context,
const char *,
char ***);
krb5_error_code
ck_krb5_free_host_realm(krb5_context,
char **);
krb5_error_code
ck_krb5_get_in_tkt_with_keytab(krb5_context,
krb5_const krb5_flags,
krb5_address * krb5_const *,
krb5_enctype *,
krb5_preauthtype *,
krb5_const krb5_keytab,
krb5_ccache,
krb5_creds *,
krb5_kdc_rep ** );
krb5_error_code
ck_krb5_get_in_tkt_with_password(krb5_context,
krb5_const krb5_flags,
krb5_address * krb5_const *,
krb5_enctype *,
krb5_preauthtype *,
krb5_const char *,
krb5_ccache,
krb5_creds *,
krb5_kdc_rep **);
krb5_error_code
ck_krb5_read_password(krb5_context,
const char *,
const char *,
char *,
int * );
krb5_error_code
ck_krb5_build_principal_ext(krb5_context,
krb5_principal *,
int,
krb5_const char *,
int n2,
krb5_const char * sz2,
int n3,
krb5_const char * sz3,
...);
krb5_error_code
ck_krb5_unparse_name(krb5_context,
krb5_const_principal,
char ** );
krb5_error_code
ck_krb5_parse_name(krb5_context,
krb5_const char *,
krb5_principal *);
krb5_error_code
ck_krb5_cc_resolve(krb5_context,
char *,
krb5_ccache *);
const char *
ck_krb5_cc_default_name(krb5_context);
krb5_error_code
ck_krb5_string_to_timestamp(char *,
krb5_timestamp *);
krb5_error_code
ck_krb5_kt_resolve(krb5_context,
krb5_const char *,
krb5_keytab *);
krb5_error_code
ck_krb5_string_to_deltat(char *, krb5_deltat *);
krb5_error_code
ck_krb5_timeofday(krb5_context,
krb5_int32 *);
krb5_error_code
ck_krb5_get_credentials_renew(krb5_context,
krb5_const krb5_flags,
krb5_ccache,
krb5_creds *,
krb5_creds **);
krb5_error_code
ck_krb5_get_credentials_validate(krb5_context,
krb5_const krb5_flags,
krb5_ccache,
krb5_creds *,
krb5_creds **);
krb5_error_code
ck_krb5_copy_principal(krb5_context,
krb5_const_principal,
krb5_principal *);
krb5_error_code
ck_krb5_timestamp_to_sfstring(krb5_timestamp,
char *,
size_t,
char *);
krb5_error_code
ck_krb5_kt_default(krb5_context,
krb5_keytab *);
krb5_error_code
ck_krb5_free_ticket(krb5_context, krb5_ticket *);
krb5_error_code
ck_decode_krb5_ticket(const krb5_data *code,
krb5_ticket **rep);
krb5_error_code
ck_cygnus_decode_krb5_ticket(const krb5_data *code,
krb5_ticket **rep);
#ifdef CHECKADDRS
krb5_error_code
ck_krb5_os_localaddr(krb5_context con,
krb5_address *** ppp);
krb5_boolean
ck_krb5_address_search(krb5_context con,
krb5_const krb5_address * p,
krb5_address * krb5_const * pp);
void
ck_krb5_free_addresses(krb5_context con,
krb5_address ** pp);
#endif /* CHECKADDRS */
krb5_error_code
ck_krb5_auth_con_getremotesubkey(krb5_context,
krb5_auth_context,
krb5_keyblock **);
krb5_error_code
ck_krb5_mk_rep(krb5_context, krb5_auth_context,
krb5_data *);
krb5_error_code
ck_krb5_free_authenticator(krb5_context,
krb5_authenticator *);
krb5_error_code
ck_krb5_verify_checksum(krb5_context context,
krb5_const krb5_cksumtype ctype,
krb5_const krb5_checksum * cksum,
krb5_const krb5_pointer in, krb5_const size_t in_length,
krb5_const krb5_pointer seed, krb5_const size_t seed_length);
krb5_error_code
ck_krb5_auth_con_getkey(krb5_context, krb5_auth_context, krb5_keyblock **);
krb5_error_code
ck_krb5_auth_con_getauthenticator
(krb5_context, krb5_auth_context, krb5_authenticator **);
krb5_error_code
ck_krb5_rd_req
(krb5_context, krb5_auth_context *, krb5_const krb5_data *,
krb5_const_principal, krb5_keytab, krb5_flags *,
krb5_ticket **);
krb5_error_code
ck_krb5_auth_con_setrcache
(krb5_context, krb5_auth_context, krb5_rcache);
krb5_error_code
ck_krb5_get_server_rcache
(krb5_context, krb5_const krb5_data *, krb5_rcache *);
krb5_error_code
ck_krb5_auth_con_getrcache
(krb5_context, krb5_auth_context, krb5_rcache *);
krb5_error_code
ck_krb5_free_tgt_creds
(krb5_context, krb5_creds ** );
krb5_error_code
ck_krb5_rd_cred
(krb5_context,krb5_auth_context,krb5_data *, krb5_creds ***,
krb5_replay_data *);
krb5_error_code
ck_krb5_c_enctype_compare
(krb5_context, krb5_enctype, krb5_enctype, krb5_boolean *);
krb5_error_code
ck_krb5_write_message
(krb5_context, krb5_pointer, krb5_data *);
krb5_error_code
ck_krb5_free_error
(krb5_context, krb5_error *);
krb5_error_code
ck_krb5_sendauth
(krb5_context,
krb5_auth_context *,
krb5_pointer,
char *,
krb5_principal,
krb5_principal,
krb5_flags,
krb5_data *,
krb5_creds *,
krb5_ccache,
krb5_error **,
krb5_ap_rep_enc_part **,
krb5_creds **);
krb5_error_code
ck_krb5_process_key
(krb5_context, krb5_encrypt_block *, const krb5_keyblock *);
krb5_error_code
ck_krb5_use_enctype
(krb5_context, krb5_encrypt_block *, const krb5_enctype);
krb5_error_code
ck_krb5_encrypt
(krb5_context context,
krb5_const krb5_pointer inptr,
krb5_pointer outptr,
krb5_const size_t size,
krb5_encrypt_block * eblock,
krb5_pointer ivec);
size_t
ck_krb5_encrypt_size
(krb5_const size_t length,
krb5_enctype crypto);
krb5_error_code
ck_krb5_decrypt
(krb5_context context,
krb5_const krb5_pointer inptr,
krb5_pointer outptr,
krb5_const size_t size,
krb5_encrypt_block * eblock,
krb5_pointer ivec);
krb5_boolean
ck_krb5_kuserok
(krb5_context context,krb5_principal princ, const char * p);
krb5_error_code
ck_krb5_aname_to_localname
(krb5_context context, krb5_const_principal aname, const int lnsize, char *lname);
int
ck_k95_k5_userok
(const char * princ_name, const char * princ_inst, const char * princ_realm,
const char * local_realm, const char * userid);
int
ck_k95_k5_principal_to_localname
(const char * princ_name, const char * local_realm, char * userid, int len);
void
ck_krb5_appdefault_boolean
(krb5_context,const char *,const krb5_data *,const char *,
int,int * );
void
ck_krb5_appdefault_string
(krb5_context,const char *,const krb5_data *,const char *,
char ** );
void ck_krb5_get_init_creds_opt_init
(krb5_get_init_creds_opt *opt);
void ck_krb5_get_init_creds_opt_set_tkt_life
(krb5_get_init_creds_opt *opt,
krb5_deltat tkt_life);
void ck_krb5_get_init_creds_opt_set_renew_life
(krb5_get_init_creds_opt *opt,
krb5_deltat renew_life);
void ck_krb5_get_init_creds_opt_set_forwardable
(krb5_get_init_creds_opt *opt,
int forwardable);
void ck_krb5_get_init_creds_opt_set_proxiable
(krb5_get_init_creds_opt *opt,
int proxiable);
void ck_krb5_get_init_creds_opt_set_etype_list
(krb5_get_init_creds_opt *opt,
krb5_enctype *etype_list,
int etype_list_length);
void ck_krb5_get_init_creds_opt_set_address_list
(krb5_get_init_creds_opt *opt, krb5_address **addresses);
void ck_krb5_get_init_creds_opt_set_preauth_list
(krb5_get_init_creds_opt *opt,
krb5_preauthtype *preauth_list,
int preauth_list_length);
void ck_krb5_get_init_creds_opt_set_salt
(krb5_get_init_creds_opt *opt, krb5_data *salt);
krb5_error_code ck_krb5_get_init_creds_password
(krb5_context context,
krb5_creds *creds,
krb5_principal client,
char *password,
krb5_prompter_fct prompter,
void *data,
krb5_deltat start_time,
char *in_tkt_service,
krb5_get_init_creds_opt *options);
krb5_error_code ck_krb5_get_init_creds_keytab
(krb5_context context,
krb5_creds *creds,
krb5_principal client,
krb5_keytab arg_keytab,
krb5_deltat start_time,
char *in_tkt_service,
krb5_get_init_creds_opt *options);
krb5_error_code ck_krb5_get_validated_creds
(krb5_context context,
krb5_creds *creds,
krb5_principal client,
krb5_ccache ccache,
char *in_tkt_service);
krb5_error_code ck_krb5_get_renewed_creds
(krb5_context context,
krb5_creds *creds,
krb5_principal client,
krb5_ccache ccache,
char *in_tkt_service);
krb5_error_code ck_krb5_rd_safe
(krb5_context,
krb5_auth_context,
krb5_const krb5_data *,
krb5_data *,
krb5_replay_data *);
krb5_error_code ck_krb5_mk_safe
(krb5_context,
krb5_auth_context,
krb5_const krb5_data *,
krb5_data *,
krb5_replay_data *);
krb5_error_code ck_krb5_rd_priv
(krb5_context,
krb5_auth_context,
krb5_const krb5_data *,
krb5_data *,
krb5_replay_data *);
krb5_error_code ck_krb5_mk_priv
(krb5_context,
krb5_auth_context,
krb5_const krb5_data *,
krb5_data *,
krb5_replay_data *);
krb5_error_code ck_krb5_auth_con_setuseruserkey
(krb5_context,
krb5_auth_context,
krb5_keyblock *);
krb5_error_code ck_krb5_read_message
(krb5_context,
krb5_pointer,
krb5_data *);
krb5_error_code ck_krb5_get_profile
(krb5_context, profile_t *);
long ck_profile_get_relation_names
(profile_t profile, const char **names, char ***ret_names);
long ck_profile_get_subsection_names
(profile_t profile, const char **names, char ***ret_names);
void ck_krb5_free_keyblock_contents
(krb5_context, krb5_keyblock FAR *);
krb5_error_code ck_krb5_c_encrypt
(krb5_context context, krb5_const krb5_keyblock *key,
krb5_keyusage usage, krb5_const krb5_data *ivec,
krb5_const krb5_data *input, krb5_enc_data *output);
krb5_error_code ck_krb5_c_decrypt
(krb5_context context, krb5_const krb5_keyblock *key,
krb5_keyusage usage, krb5_const krb5_data *ivec,
krb5_const krb5_enc_data *input, krb5_data *output);
krb5_error_code ck_krb5_c_block_size
(krb5_context context, krb5_enctype enctype,
size_t *blocksize);
krb5_error_code ck_krb5_c_make_random_key
(krb5_context context, krb5_enctype enctype,
krb5_keyblock *random_key);
krb5_error_code ck_krb5_c_random_seed
(krb5_context context, krb5_data *data);
krb5_error_code ck_krb5_c_encrypt_length
(krb5_context context, krb5_enctype enctype,
size_t inputlen, size_t *length);
krb5_error_code ck_krb5_kt_default_name
(krb5_context context, char *, int);
char * ck_krb5_cc_get_name
(krb5_context context, krb5_ccache cache);
krb5_error_code ck_krb5_cc_gen_new
(krb5_context context, krb5_ccache *cache);
krb5_error_code ck_krb5_cc_initialize
(krb5_context context, krb5_ccache cache,
krb5_principal principal);
krb5_error_code ck_krb5_cc_destroy
(krb5_context context, krb5_ccache cache);
krb5_error_code ck_krb5_cc_close
(krb5_context context, krb5_ccache cache);
krb5_error_code ck_krb5_cc_store_cred
(krb5_context context, krb5_ccache cache,
krb5_creds *creds);
krb5_error_code ck_krb5_cc_retrieve_cred
(krb5_context context, krb5_ccache cache,
krb5_flags flags, krb5_creds *mcreds,
krb5_creds *creds);
krb5_error_code ck_krb5_cc_get_principal
(krb5_context context, krb5_ccache cache,
krb5_principal *principal);
krb5_error_code ck_krb5_cc_start_seq_get
(krb5_context context, krb5_ccache cache,
krb5_cc_cursor *cursor);
krb5_error_code ck_krb5_cc_next_cred
(krb5_context context, krb5_ccache cache,
krb5_cc_cursor *cursor, krb5_creds *creds);
krb5_error_code ck_krb5_cc_end_seq_get
(krb5_context context, krb5_ccache cache,
krb5_cc_cursor *cursor);
krb5_error_code ck_krb5_cc_remove_cred
(krb5_context context, krb5_ccache cache, krb5_flags flags,
krb5_creds *creds);
krb5_error_code ck_krb5_cc_set_flags
(krb5_context context, krb5_ccache cache, krb5_flags flags);
const char * ck_krb5_cc_get_type
(krb5_context context, krb5_ccache cache);
const char * ck_krb5_kt_get_type
(krb5_context, krb5_keytab);
krb5_error_code ck_krb5_kt_get_name
(krb5_context, krb5_keytab, char *, unsigned int);
krb5_error_code ck_krb5_kt_close
(krb5_context, krb5_keytab);
krb5_error_code ck_krb5_kt_get_entry
(krb5_context, krb5_keytab,
krb5_principal,
krb5_kvno,
krb5_enctype,
krb5_keytab_entry *);
krb5_error_code ck_krb5_kt_start_seq_get
(krb5_context,
krb5_keytab,
krb5_kt_cursor *);
krb5_error_code ck_krb5_kt_next_entry
(krb5_context,
krb5_keytab,
krb5_keytab_entry *,
krb5_kt_cursor *);
krb5_error_code ck_krb5_kt_end_seq_get
(krb5_context,
krb5_keytab,
krb5_kt_cursor *);
krb5_error_code ck_krb5_build_principal
(krb5_context, krb5_principal *, unsigned int, krb5_const char *,
krb5_const char *,krb5_const char *,krb5_const char *);