1/*
2 * Deprecated.c
3 *
4 * $Header$
5 *
6 * Copyright 2003-2008 Massachusetts Institute of Technology.
7 * All Rights Reserved.
8 *
9 * Export of this software from the United States of America may
10 * require a specific license from the United States Government.
11 * It is the responsibility of any person or organization contemplating
12 * export to obtain such a license before exporting.
13 *
14 * WITHIN THAT CONSTRAINT, permission to use, copy, modify, and
15 * distribute this software and its documentation for any purpose and
16 * without fee is hereby granted, provided that the above copyright
17 * notice appear in all copies and that both that copyright notice and
18 * this permission notice appear in supporting documentation, and that
19 * the name of M.I.T. not be used in advertising or publicity pertaining
20 * to distribution of the software without specific, written prior
21 * permission.  Furthermore if you modify this software you must label
22 * your software as modified software and not distribute it in such a
23 * fashion that it might be confused with the original M.I.T. software.
24 * M.I.T. makes no representations about the suitability of
25 * this software for any purpose.  It is provided "as is" without express
26 * or implied warranty.
27 */
28
29#include <TargetConditionals.h>
30#include <sys/socket.h>
31
32// ---------------------------------------------------------------------------
33
34/* Header files for types: */
35#include <CoreServices/CoreServices.h>
36#include <CoreFoundation/CoreFoundation.h>
37#include "mit-com_err.h"
38#include "mit-profile.h"
39
40// ---------------------------------------------------------------------------
41
42/*
43 * The following functions are part of the KfM ABI.
44 * They are deprecated, so they only appear here, not in krb.h.
45 */
46int KRB5_CALLCONV krb_get_num_cred(void);
47int KRB5_CALLCONV krb_get_nth_cred(char *, char *, char *, int);
48int KRB5_CALLCONV krb_delete_cred(char *, char *,char *);
49int KRB5_CALLCONV dest_all_tkts(void);
50
51// ---------------------------------------------------------------------------
52
53typedef struct KClientSession *KClientSession;
54typedef KClientSession KClientSessionInfo;
55
56struct KClientPrincipalOpaque;
57typedef struct KClientPrincipalOpaque* KClientPrincipal;
58
59struct KClientAddress {
60        UInt32                          address;
61        UInt16                          port;
62};
63typedef struct KClientAddress KClientAddress;
64typedef FSSpec KClientFile;
65typedef void *cc_ccache_t;
66
67
68struct KClientKey {
69        unsigned char key[8];
70};
71typedef struct KClientKey KClientKey;
72
73struct key_schedule {
74	struct {
75		UInt32 _[2];
76	} keys[16];
77};
78
79/*
80 * Internet address (a structure for historical reasons)
81 */
82struct in_addr {
83	in_addr_t s_addr;
84};
85
86
87/*
88 * Socket address, internet style.
89 */
90struct sockaddr_in {
91	__uint8_t       sin_len;
92	sa_family_t     sin_family;
93	in_port_t       sin_port;
94	struct  in_addr sin_addr;
95	char            sin_zero[8];
96};
97
98#define		MAX_KTXT_LEN	1250
99
100struct ktext {
101    int     length;		/* Length of the text */
102    unsigned char dat[MAX_KTXT_LEN];	/* The data itself */
103    unsigned long mbz;		/* zero to catch runaway strings */
104};
105
106// ---------------------------------------------------------------------------
107
108static inline int _DeprecatedFunctionErrorReturn (const char *functionName);
109static inline char *_DeprecatedFunctionStringReturn (const char *functionName);
110
111#define DeprecatedFunctionErrorReturn  _DeprecatedFunctionErrorReturn(__FUNCTION__)
112#define DeprecatedFunctionStringReturn _DeprecatedFunctionStringReturn(__FUNCTION__)
113
114static inline int _DeprecatedFunctionErrorReturn (const char *functionName)
115{
116    return -1;
117}
118
119static inline char *_DeprecatedFunctionStringReturn (const char *functionName)
120{
121    static char string[BUFSIZ];
122
123    _DeprecatedFunctionErrorReturn (functionName);
124
125    snprintf (string, sizeof(string), "%s() is no longer supported.", functionName);
126    return string;
127}
128
129// ---------------------------------------------------------------------------
130
131#pragma mark -- KerberosPreferences --
132
133OSErr KPInitializeWithDefaultKerberosLibraryPreferences (const FSSpec *prefLocation)
134{
135    return DeprecatedFunctionErrorReturn;
136}
137
138OSErr KPGetListOfPreferencesFiles (UInt32     userSystemFlags,
139                                   FSSpecPtr *thePrefFiles,
140                                   UInt32    *outNumberOfFiles)
141{
142    return DeprecatedFunctionErrorReturn;
143}
144
145void KPFreeListOfPreferencesFiles (FSSpecPtr thePrefFiles)
146{
147    DeprecatedFunctionErrorReturn;
148}
149
150OSErr KPPreferencesFileIsReadable (const FSSpec *inPrefsFile)
151{
152    return DeprecatedFunctionErrorReturn;
153}
154
155OSErr KPPreferencesFileIsWritable (const FSSpec *inPrefsFile)
156{
157    return DeprecatedFunctionErrorReturn;
158}
159
160OSErr KPCreatePreferencesFile (const FSSpec *inPrefsFile)
161{
162    return DeprecatedFunctionErrorReturn;
163}
164
165// ---------------------------------------------------------------------------
166
167#pragma mark -- Profile --
168
169int krb_change_password(char *principal, char *instance, char *realm,
170                        char *oldPassword, char *newPassword)
171{
172    return DeprecatedFunctionErrorReturn;
173}
174
175int decomp_ticket(struct ktext tkt, unsigned char *flags, char *pname, char *pinstance,
176                  char *prealm, UInt32 *paddress, unsigned char session[8],
177                  int *life, UInt32 *time_sec, char *sname, char *sinstance,
178                  unsigned char key[8], struct key_schedule key_s)
179{
180    return DeprecatedFunctionErrorReturn;
181}
182
183const char * const _krb_err_txt[] = {
184    "krb_err_txt is no longer supported",
185    NULL
186};
187const char * const * const krb_err_txt = _krb_err_txt;
188
189const char * krb_get_err_text(int code)
190{
191    return DeprecatedFunctionStringReturn;
192}
193
194int get_ad_tkt (char *service, char *sinstance, char *realm, int lifetime)
195{
196    return DeprecatedFunctionErrorReturn;
197}
198
199int krb_get_in_tkt (char *user, char *instance, char *realm,
200                    char *service, char *sinstance, int life,
201                    void *key_proc, void *decrypt_proc,
202                    char *arg)
203{
204    return DeprecatedFunctionErrorReturn;
205}
206
207int krb_get_in_tkt_creds(char *user, char *instance, char *realm,
208                         char *service, char *sinstance, int life,
209                         void *key_proc, void *decrypt_proc,
210                         char *arg, void *creds)
211{
212    return DeprecatedFunctionErrorReturn;
213}
214
215char * krb_get_phost(char *alias)
216{
217    return DeprecatedFunctionStringReturn;
218}
219
220int krb_get_pw_in_tkt(char *user, char *instance, char *realm,
221                      char *service, char *sinstance,
222                      int life, char *password)
223{
224    return DeprecatedFunctionErrorReturn;
225}
226
227int krb_get_pw_in_tkt_creds(char *user, char *instance, char *realm,
228                            char *service, char *sinstance,
229                            int life, char *password, void *creds)
230{
231    return DeprecatedFunctionErrorReturn;
232}
233
234int get_pw_tkt(char *user, char *instance, char *realm, char *cpw)
235{
236    return DeprecatedFunctionErrorReturn;
237}
238
239int krb_get_svc_in_tkt(char *user, char *instance, char *realm,
240                       char *service, char *sinstance, int life, char *srvtab)
241{
242    return DeprecatedFunctionErrorReturn;
243}
244
245int KRB5_CALLCONV
246krb_get_ticket_for_service (char *serviceName, char *buf, UInt32 *buflen,
247                            int checksum, unsigned char sessionKey[8], struct key_schedule schedule,
248                            char *version, int includeVersion)
249{
250    return DeprecatedFunctionErrorReturn;
251}
252
253int k_isrealm(char *s)
254{
255    DeprecatedFunctionErrorReturn;
256    return 0;
257}
258
259int k_isinst(char *s)
260{
261    DeprecatedFunctionErrorReturn;
262    return 0;
263}
264
265int k_isname(char *s)
266{
267    DeprecatedFunctionErrorReturn;
268    return 0;
269}
270
271int kname_parse(char *np, char *ip, char *rp, char *fullname)
272{
273    return DeprecatedFunctionErrorReturn;
274}
275
276int kname_unparse(char *fullname, const char *np, const char *ip, const char *rp)
277{
278    return DeprecatedFunctionErrorReturn;
279}
280
281int kuserok(void *kdata, char *luser)
282{
283    DeprecatedFunctionErrorReturn;
284    return 0;
285}
286
287int krb_check_auth (struct ktext buf,  UInt32 checksum, void *msg_data,
288                    unsigned char session[8], struct key_schedule schedule,
289                    struct sockaddr_in *laddr, struct sockaddr_in *faddr)
290{
291    return DeprecatedFunctionErrorReturn;
292}
293
294int krb_mk_auth(long options, struct ktext ticket,
295                char *service, char *inst, char *realm,
296                UInt32 checksum, char *version, struct ktext buf)
297{
298    return DeprecatedFunctionErrorReturn;
299}
300
301long krb_mk_err(u_char *p, UInt32 e, char *e_string)
302{
303    DeprecatedFunctionErrorReturn;
304    return 0;
305}
306
307long krb_mk_priv(u_char *in, u_char *out,  UInt32 length,
308                 struct key_schedule schedule,void *key,
309                 struct sockaddr_in *sender, struct sockaddr_in *receiver)
310{
311    DeprecatedFunctionErrorReturn;
312    return 0;
313}
314
315int krb_mk_req(struct ktext authent,
316               char *service, char *instance, char *realm,
317               UInt32 checksum)
318{
319    return DeprecatedFunctionErrorReturn;
320}
321
322int krb_mk_req_creds(struct ktext authent, void *creds,
323                     UInt32 checksum)
324{
325    return DeprecatedFunctionErrorReturn;
326}
327
328int krb_set_lifetime(int newval)
329{
330    DeprecatedFunctionErrorReturn;
331    return 0;
332}
333
334long krb_mk_safe(u_char *in, u_char *out, UInt32 length,
335                 void *key, struct sockaddr_in *sender,
336                 struct sockaddr_in *receiver)
337{
338    DeprecatedFunctionErrorReturn;
339    return 0;
340}
341
342int put_svc_key(char *sfile, char *name, char *inst, char *realm,
343                int newvno, char *key)
344{
345    return DeprecatedFunctionErrorReturn;
346}
347
348int krb_rd_err(u_char *in, u_long in_length, long *code, void *m_data)
349{
350    return DeprecatedFunctionErrorReturn;
351}
352
353long krb_rd_priv(u_char *in, UInt32 in_length,
354				 struct key_schedule schedule, void *key,
355                 struct sockaddr_in *sender, struct sockaddr_in *receiver,
356                 void *m_data)
357{
358    DeprecatedFunctionErrorReturn;
359    return 0;
360}
361
362int krb_rd_req(struct ktext authent,
363               char *service, char *instance,
364               UInt32 from_addr, void *ad, char *fn)
365{
366    return DeprecatedFunctionErrorReturn;
367}
368
369int krb_rd_req_int(struct ktext authent, char *service, char *instance,
370                   UInt32 from_addr, void *ad, unsigned char key[8])
371{
372    return DeprecatedFunctionErrorReturn;
373}
374
375long krb_rd_safe(u_char *in, UInt32 in_length, void *key,
376                 struct sockaddr_in *sender, struct sockaddr_in *receiver,
377                 void *m_data)
378{
379    DeprecatedFunctionErrorReturn;
380    return 0;
381}
382
383int read_service_key(char *service, char *instance, char *realm,
384                     int kvno, char *file, char *key)
385{
386    return DeprecatedFunctionErrorReturn;
387}
388
389int krb_recvauth(long options, int fd, struct ktext ticket,
390                 char *service, char *instance,
391                 struct sockaddr_in *faddr, struct sockaddr_in *laddr,
392                 void *kdata, char *filename, struct key_schedule schedule,
393                 char *version)
394{
395    return DeprecatedFunctionErrorReturn;
396}
397
398int krb_sendauth(long options, int fd, struct ktext ticket,
399                 char *service, char *inst, char *realm,
400                 UInt32 checksum, void *msg_data,
401                 void *cred, struct key_schedule schedule,
402                 struct sockaddr_in *laddr, struct sockaddr_in *faddr,
403                 char *version)
404{
405    return DeprecatedFunctionErrorReturn;
406}
407
408int krb_get_tf_realm (const char *ticket_file, char *realm)
409{
410    return DeprecatedFunctionErrorReturn;
411}
412
413int krb_get_tf_fullname (const char *ticket_file,
414                         char *name, char *instance, char *realm)
415{
416    return DeprecatedFunctionErrorReturn;
417}
418
419int krb_get_cred(char *service, char *instance, char *realm, void *c)
420{
421    return DeprecatedFunctionErrorReturn;
422}
423
424const char *tkt_string (void)
425{
426    return DeprecatedFunctionStringReturn;
427}
428
429void krb_set_tkt_string (const char *val)
430{
431    DeprecatedFunctionErrorReturn;
432}
433
434int dest_tkt (void)
435{
436    return DeprecatedFunctionErrorReturn;
437}
438
439int krb_get_num_cred (void)
440{
441    DeprecatedFunctionErrorReturn;
442    return 0;
443}
444
445int krb_get_nth_cred (char *sname, char *sinstance, char *srealm, int n)
446{
447    return DeprecatedFunctionErrorReturn;
448}
449
450int krb_delete_cred (char *sname, char *sinstance, char *srealm)
451{
452    return DeprecatedFunctionErrorReturn;
453}
454
455int dest_all_tkts (void)
456{
457    return DeprecatedFunctionErrorReturn;
458}
459
460int krb_get_profile (profile_t* profile)
461{
462    return DeprecatedFunctionErrorReturn;
463}
464
465int krb_get_lrealm (char *realm, int n)
466{
467    return DeprecatedFunctionErrorReturn;
468}
469
470int krb_get_admhst (char *host, char *realm, int n)
471{
472    return DeprecatedFunctionErrorReturn;
473}
474
475int krb_get_krbhst(char *host, const char *realm, int n)
476{
477    return DeprecatedFunctionErrorReturn;
478}
479
480char *krb_realmofhost(char *host)
481{
482    return DeprecatedFunctionStringReturn;
483}
484
485int krb_time_to_life(UInt32 start, UInt32 end)
486{
487    DeprecatedFunctionErrorReturn;
488    return 0;
489}
490
491UInt32 krb_life_to_time(UInt32 start, int life)
492{
493    DeprecatedFunctionErrorReturn;
494    return 0;
495}
496
497char *krb__get_srvtabname(const char *default_srvtabname)
498{
499    return DeprecatedFunctionStringReturn;
500}
501
502// ---------------------------------------------------------------------------
503
504#pragma mark -- Kerberos4 --
505
506int FSp_krb_get_svc_in_tkt (char *user, char *instance, char *realm, char *service,
507                            char *sinstance, int life, const FSSpec *srvtab)
508{
509    return DeprecatedFunctionErrorReturn;
510}
511
512int FSp_put_svc_key (const FSSpec *sfilespec, char *name, char *inst, char *realm,
513                     int newvno, char *key)
514{
515    return DeprecatedFunctionErrorReturn;
516}
517
518int FSp_read_service_key (char *service, char *instance, char *realm,
519                          int kvno, const FSSpec *filespec, char *key)
520{
521    return DeprecatedFunctionErrorReturn;
522}
523
524// ---------------------------------------------------------------------------
525
526#pragma mark -- KClient Deprecated --
527
528OSStatus KClientCacheInitialTicketDeprecated (KClientSession *inSession, char *inService)
529{
530    return DeprecatedFunctionErrorReturn;
531}
532
533OSStatus KClientGetLocalRealmDeprecated (char *outRealm)
534{
535    return DeprecatedFunctionErrorReturn;
536}
537
538OSStatus KClientSetLocalRealmDeprecated (const char *inRealm)
539{
540    return DeprecatedFunctionErrorReturn;
541}
542
543OSStatus KClientGetRealmDeprecated (const char *inHost, char *outRealm)
544{
545    return DeprecatedFunctionErrorReturn;
546}
547
548OSStatus KClientAddRealmMapDeprecated (char *inHost, char *inRealm)
549{
550    return DeprecatedFunctionErrorReturn;
551}
552
553OSStatus KClientDeleteRealmMapDeprecated (char *inHost)
554{
555    return DeprecatedFunctionErrorReturn;
556}
557
558OSStatus KClientGetNthRealmMapDeprecated (SInt32 inIndex, char *outHost, char *outRealm)
559{
560    return DeprecatedFunctionErrorReturn;
561}
562
563OSStatus KClientGetNthServerDeprecated (SInt32 inIndex, char *outHost, char *inRealm, Boolean inAdmin)
564{
565    return DeprecatedFunctionErrorReturn;
566}
567
568OSStatus KClientAddServerMapDeprecated (char *inHost, char *inRealm, Boolean inAdmin)
569{
570    return DeprecatedFunctionErrorReturn;
571}
572
573OSStatus KClientDeleteServerMapDeprecated (char *inHost, char *inRealm)
574{
575    return DeprecatedFunctionErrorReturn;
576}
577
578OSStatus KClientGetNthServerMapDeprecated (SInt32 inIndex, char *outHost, char *outRealm, Boolean *outAdmin)
579{
580    return DeprecatedFunctionErrorReturn;
581}
582
583OSStatus KClientGetNthServerPortDeprecated (SInt32 inIndex, UInt16 *outPort)
584{
585    return DeprecatedFunctionErrorReturn;
586}
587
588OSStatus KClientSetNthServerPortDeprecated (SInt32 inIndex, UInt16 inPort)
589{
590    return DeprecatedFunctionErrorReturn;
591}
592
593OSStatus KClientGetNumSessionsDeprecated (SInt32 *outSessions)
594{
595    return DeprecatedFunctionErrorReturn;
596}
597
598OSStatus KClientGetNthSessionDeprecated (SInt32 inIndex, char *outName, char *outInstance, char *outRealm)
599{
600    return DeprecatedFunctionErrorReturn;
601}
602
603OSStatus KClientDeleteSessionDeprecated (char *inName, char *inInstance, char *inRealm)
604{
605    return DeprecatedFunctionErrorReturn;
606}
607
608OSStatus KClientGetCredentialsDeprecated (char *inName, char *inInstance, char *inRealm,
609                                          void *outCred)
610{
611    return DeprecatedFunctionErrorReturn;
612}
613
614OSStatus KClientAddCredentialsDeprecated (char *inName, char *inInstance, char *inRealm, void *inCred)
615{
616    return DeprecatedFunctionErrorReturn;
617}
618
619OSStatus KClientDeleteCredentialsDeprecated (char *inName, char *inInstance, char *inRealm,
620                                             char *inSname, char *inSinstance, char *inSrealm)
621{
622    return DeprecatedFunctionErrorReturn;
623}
624
625OSStatus KClientGetNumCredentialsDeprecated (SInt32 *outNumCredentials,
626                                             char *inName, char *inInstance, char *inRealm)
627{
628    return DeprecatedFunctionErrorReturn;
629}
630
631OSStatus KClientGetNthCredentialDeprecated (SInt32 inIndex,
632                                            char *inName, char *inInstance, char *inRealm,
633                                            char *inSname, char *inSinstance, char *inSrealm)
634{
635    return DeprecatedFunctionErrorReturn;
636}
637
638OSStatus KClientGetUserNameDeprecated (char *outUserName)
639{
640    return DeprecatedFunctionErrorReturn;
641}
642
643void KClientGetErrorTextDeprecated (OSErr inError, char *outBuffer)
644{
645    char *p = DeprecatedFunctionStringReturn;
646    memcpy(outBuffer, p, strlen(p) + 1); /* avoid strcpy warning, api is broken */
647}
648
649OSStatus K5ClientGetTicketForServiceDeprecated (char *inService, void *outBuffer, UInt32 *outBufferLength)
650{
651    return DeprecatedFunctionErrorReturn;
652}
653
654OSStatus K5ClientGetAuthenticatorForServiceDeprecated (char *inService, char *inApplicationVersion,
655                                                       void *outBuffer, UInt32 *outBufferLength)
656{
657    return DeprecatedFunctionErrorReturn;
658}
659
660// ---------------------------------------------------------------------------
661
662#pragma mark -- KClient 1.9 Compat --
663
664OSErr KClientVersionCompat (SInt16 *outMajorVersion, SInt16 *outMinorVersion, char *outVersionString)
665{
666    return DeprecatedFunctionErrorReturn;
667}
668
669
670OSErr KClientNewSessionCompat (KClientSessionInfo *inSession,
671                               UInt32 inLocalAddress, UInt16 inLocalPort,
672                               UInt32 inRemoteAddress, UInt16 inRemotePort)
673{
674    return DeprecatedFunctionErrorReturn;
675}
676
677
678OSErr KClientDisposeSessionCompat (KClientSessionInfo *inSession)
679{
680    return DeprecatedFunctionErrorReturn;
681}
682
683
684OSErr KClientGetTicketForServiceCompat (KClientSessionInfo *inSession, char *inService,
685                                        void *inBuffer, UInt32 *outBufferLength)
686{
687    return DeprecatedFunctionErrorReturn;
688}
689
690
691OSErr KClientGetTicketForServiceWithChecksumCompat (KClientSessionInfo *inSession, UInt32 inChecksum,
692                                                    char *inService, void *inBuffer, UInt32 *outBufferLength)
693{
694    return DeprecatedFunctionErrorReturn;
695}
696
697
698OSErr KClientLoginCompat (KClientSessionInfo *inSession, KClientKey *outPrivateKey)
699{
700    return DeprecatedFunctionErrorReturn;
701}
702
703
704OSErr KClientPasswordLoginCompat (KClientSessionInfo *inSession, char *inPassword, KClientKey *outPrivateKey)
705{
706    return DeprecatedFunctionErrorReturn;
707}
708
709
710OSErr KClientLogoutCompat (void)
711{
712    return DeprecatedFunctionErrorReturn;
713}
714
715
716SInt16 KClientStatusCompat (void)
717{
718    return DeprecatedFunctionErrorReturn;
719}
720
721
722OSErr KClientGetSessionKeyCompat (KClientSessionInfo *inSession, KClientKey *outSessionKey)
723{
724    return DeprecatedFunctionErrorReturn;
725}
726
727
728OSErr KClientEncryptCompat (KClientSessionInfo *inSession,
729                            void *inPlainBuffer, UInt32 inPlainBufferLength,
730                            void *outEncryptedBuffer, UInt32 *ioEncryptedBufferLength)
731{
732    return DeprecatedFunctionErrorReturn;
733}
734
735
736OSErr KClientDecryptCompat (KClientSessionInfo *inSession,
737                            void *inEncryptedBuffer, UInt32 inEncryptedBufferLength,
738                            UInt32 *outPlainBufferOffset, UInt32 *outPlainBufferLength)
739{
740    return DeprecatedFunctionErrorReturn;
741}
742
743
744OSErr KClientProtectIntegrityCompat (KClientSessionInfo *inSession,
745                                     void *inPlainBuffer, UInt32 inPlainBufferLength,
746                                     void *outProtectedBuffer, UInt32 *ioProtectedBufferLength)
747{
748    return DeprecatedFunctionErrorReturn;
749}
750
751
752OSErr KClientVerifyIntegrityCompat (KClientSessionInfo *inSession,
753                                    void *inProtectedBuffer, UInt32 inProtectedBufferLength,
754                                    UInt32 *outPlainBufferOffset, UInt32 *outPlainBufferLength)
755{
756    return DeprecatedFunctionErrorReturn;
757}
758
759
760OSErr KServerNewSessionCompat (KClientSessionInfo *inSession, char *inService,
761                               UInt32 inLocalAddress, UInt16 inLocalPort,
762                               UInt32 inRemoteAddress, UInt16 inRemotePort)
763{
764    return DeprecatedFunctionErrorReturn;
765}
766
767
768OSErr KServerVerifyTicketCompat (KClientSessionInfo *inSession, void *inBuffer, char *inFilename)
769{
770    return DeprecatedFunctionErrorReturn;
771}
772
773
774OSErr KServerGetReplyTicketCompat (KClientSessionInfo *inSession, void *outBuffer, UInt32 *ioBufferLength)
775{
776    return DeprecatedFunctionErrorReturn;
777}
778
779
780OSErr KServerAddKeyCompat (KClientSessionInfo *inSession, KClientKey *inPrivateKey,
781                           char *inService, SInt32 inVersion, char *inFilename)
782{
783    return DeprecatedFunctionErrorReturn;
784}
785
786
787OSErr KServerGetKeyCompat (KClientSessionInfo *inSession, KClientKey *outPrivateKey,
788                           char *inService, SInt32 inVersion, char *inFilename)
789{
790    return DeprecatedFunctionErrorReturn;
791}
792
793
794OSErr KServerGetSessionTimeRemainingCompat (KClientSessionInfo *inSession, SInt32 *outSeconds)
795{
796    return DeprecatedFunctionErrorReturn;
797}
798
799
800OSErr KClientGetSessionUserNameCompat (KClientSessionInfo *inSession, char *outUserName, SInt16 inNameType)
801{
802    return DeprecatedFunctionErrorReturn;
803}
804
805
806OSErr KClientMakeSendAuthCompat (KClientSessionInfo *inSession, char *inService,
807                                 void *outBuffer, UInt32 *ioBufferLength,
808                                 SInt32 inChecksum, char *inApplicationVersion)
809{
810    return DeprecatedFunctionErrorReturn;
811}
812
813
814OSErr KClientVerifyReplyTicketCompat (KClientSessionInfo *inSession,
815                                      void *inBuffer, UInt32 *ioBufferLength)
816{
817    return DeprecatedFunctionErrorReturn;
818}
819
820
821OSErr KClientVerifyUnencryptedReplyTicketCompat (KClientSessionInfo *inSession,
822                                                 void *inBuffer, UInt32 *ioBufferLength)
823{
824    return DeprecatedFunctionErrorReturn;
825}
826
827// ---------------------------------------------------------------------------
828
829#pragma mark -- KClient 3.0 --
830
831OSStatus KClientGetVersion (UInt16 *outMajorVersion, UInt16 *outMinorVersion, const char **outVersionString)
832{
833    return DeprecatedFunctionErrorReturn;
834}
835
836OSStatus KClientNewClientSession (KClientSession *outSession)
837{
838    return DeprecatedFunctionErrorReturn;
839}
840
841OSStatus KClientNewServerSession (KClientSession *inSession, KClientPrincipal inService)
842{
843    return DeprecatedFunctionErrorReturn;
844}
845
846OSStatus KClientDisposeSession (KClientSession inSession)
847{
848    return DeprecatedFunctionErrorReturn;
849}
850
851OSStatus KClientGetClientPrincipal (KClientSession inSession, KClientPrincipal *outPrincipal)
852{
853    return DeprecatedFunctionErrorReturn;
854}
855
856OSStatus KClientSetClientPrincipal (KClientSession inSession, KClientPrincipal inPrincipal)
857{
858    return DeprecatedFunctionErrorReturn;
859}
860
861OSStatus KClientGetServerPrincipal (KClientSession inSession, KClientPrincipal *outPrincipal)
862{
863    return DeprecatedFunctionErrorReturn;
864}
865
866OSStatus KClientSetServerPrincipal (KClientSession inSession, KClientPrincipal inPrincipal)
867{
868    return DeprecatedFunctionErrorReturn;
869}
870
871OSStatus KClientGetLocalAddress (KClientSession inSession, KClientAddress *outLocalAddress)
872{
873    return DeprecatedFunctionErrorReturn;
874}
875
876OSStatus KClientSetLocalAddress (KClientSession inSession, const KClientAddress *inLocalAddress)
877{
878    return DeprecatedFunctionErrorReturn;
879}
880
881OSStatus KClientGetRemoteAddress (KClientSession inSession, KClientAddress *outRemoteAddress)
882{
883    return DeprecatedFunctionErrorReturn;
884}
885
886OSStatus KClientSetRemoteAddress (KClientSession inSession, const KClientAddress *inRemoteAddress)
887{
888    return DeprecatedFunctionErrorReturn;
889}
890
891OSStatus KClientGetSessionKey (KClientSession inSession, KClientKey *outKey)
892{
893    return DeprecatedFunctionErrorReturn;
894}
895
896OSStatus KClientGetExpirationTime (KClientSession inSession, UInt32 *outExpiration)
897{
898    return DeprecatedFunctionErrorReturn;
899}
900
901OSStatus KClientSetKeyFile (KClientSession inSession, const KClientFile *inKeyFile)
902{
903    return DeprecatedFunctionErrorReturn;
904}
905
906OSStatus KClientLogin (KClientSession inSession)
907{
908    return DeprecatedFunctionErrorReturn;
909}
910
911OSStatus KClientPasswordLogin (KClientSession inSession, const char *inPassword)
912{
913    return DeprecatedFunctionErrorReturn;
914}
915
916OSStatus KClientKeyFileLogin (KClientSession inSession)
917{
918    return DeprecatedFunctionErrorReturn;
919}
920
921OSStatus KClientLogout (KClientSession inSession)
922{
923    return DeprecatedFunctionErrorReturn;
924}
925
926OSStatus KClientGetServiceKey (KClientSession inSession, UInt32 inVersion, KClientKey *outKey)
927{
928    return DeprecatedFunctionErrorReturn;
929}
930
931OSStatus KClientAddServiceKey (KClientSession inSession, UInt32 inVersion, const KClientKey *inKey)
932{
933    return DeprecatedFunctionErrorReturn;
934}
935
936OSStatus KClientGetTicketForService (KClientSession inSession, UInt32 inChecksum,
937                                     void*outBuffer, UInt32*ioBufferLength)
938{
939    return DeprecatedFunctionErrorReturn;
940}
941
942OSStatus KClientGetAuthenticatorForService (KClientSession inSession, UInt32 inChecksum,
943                                            const char *inApplicationVersion,
944                                            void *outBuffer, UInt32 *ioBufferLength)
945{
946    return DeprecatedFunctionErrorReturn;
947}
948
949OSStatus KClientVerifyEncryptedServiceReply (KClientSession inSession, const void *inBuffer, UInt32 inBufferLength)
950{
951    return DeprecatedFunctionErrorReturn;
952}
953
954OSStatus KClientVerifyProtectedServiceReply (KClientSession inSession, const void *inBuffer, UInt32 inBufferLength)
955{
956    return DeprecatedFunctionErrorReturn;
957}
958
959OSStatus KClientVerifyAuthenticator (KClientSession inSession, const void *inBuffer, UInt32 inBufferLength)
960{
961    return DeprecatedFunctionErrorReturn;
962}
963
964OSStatus KClientGetEncryptedServiceReply (KClientSession inSession, void *outBuffer, UInt32 *ioBufferSize)
965{
966    return DeprecatedFunctionErrorReturn;
967}
968
969OSStatus KClientGetProtectedServiceReply (KClientSession inSession, void * outBuffer, UInt32 *ioBufferSize)
970{
971    return DeprecatedFunctionErrorReturn;
972}
973
974OSStatus KClientEncrypt (KClientSession inSession,
975                         const void *inPlainBuffer, UInt32 inPlainBufferLength,
976                         void *outEncryptedBuffer, UInt32 *ioEncryptedBufferLength)
977{
978    return DeprecatedFunctionErrorReturn;
979}
980
981OSStatus KClientDecrypt (KClientSession inSession,
982                         void *inEncryptedBuffer, UInt32 inDecryptedBufferLength,
983                         UInt32 *outPlainOffset, UInt32 *outPlainLength)
984{
985    return DeprecatedFunctionErrorReturn;
986}
987
988OSStatus KClientProtectIntegrity (KClientSession inSession,
989                                  const void *inPlainBuffer, UInt32 inPlainBufferLength,
990                                  void *outProtectedBuffer, UInt32 *ioProtectedBufferLength)
991{
992    return DeprecatedFunctionErrorReturn;
993}
994
995OSStatus KClientVerifyIntegrity (KClientSession inSession,
996                                 void *inProtectedBuffer, UInt32 inProtectedBufferLength,
997                                 UInt32 *outPlainOffset, UInt32 *outPlainLength)
998{
999    return DeprecatedFunctionErrorReturn;
1000}
1001
1002/* Miscellaneous */
1003
1004OSStatus KClientPasswordToKey (KClientSession inSession, const char *inPassword, KClientKey *outKey)
1005{
1006    return DeprecatedFunctionErrorReturn;
1007}
1008
1009/* Getting to other APIs */
1010
1011OSStatus KClientGetCCacheReference (KClientSession inSession, cc_ccache_t *outCCacheReference)
1012{
1013    return DeprecatedFunctionErrorReturn;
1014}
1015
1016OSStatus KClientGetProfileHandle (KClientSession inSession, profile_t *outProfileHandle)
1017{
1018    return DeprecatedFunctionErrorReturn;
1019}
1020
1021OSStatus KClientV4StringToPrincipal (const char *inPrincipalString, KClientPrincipal *outPrincipal)
1022{
1023    return DeprecatedFunctionErrorReturn;
1024}
1025
1026OSStatus KClientPrincipalToV4String (KClientPrincipal inPrincipal, char *outPrincipalString)
1027{
1028    return DeprecatedFunctionErrorReturn;
1029}
1030
1031OSStatus KClientPrincipalToV4Triplet (KClientPrincipal inPrincipal,
1032                                      char *outName, char *outInstance, char *outRealm)
1033{
1034    return DeprecatedFunctionErrorReturn;
1035}
1036
1037OSStatus KClientDisposePrincipal (KClientPrincipal inPrincipal)
1038{
1039    return DeprecatedFunctionErrorReturn;
1040}
1041