keyserv.c (06e1a7147edd272b7296f208141627a5b1191731) keyserv.c (36e852a172cba914383d7341c988128b2c667fbd)
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 6 unchanged lines hidden (view full) ---

15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22/*
1/*
2 * CDDL HEADER START
3 *
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 6 unchanged lines hidden (view full) ---

15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 *
19 * CDDL HEADER END
20 */
21
22/*
23 * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
23 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
24 * Use is subject to license terms.
25 */
26
27/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
28/* All Rights Reserved */
29
30/*
31 * University Copyright- Copyright (c) 1982, 1986, 1988
32 * The Regents of the University of California
33 * All Rights Reserved
34 *
35 * University Acknowledgment- Portions of this document are derived from
36 * software developed by the University of California, Berkeley, and its
37 * contributors.
38 */
39
24 * Use is subject to license terms.
25 */
26
27/* Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T */
28/* All Rights Reserved */
29
30/*
31 * University Copyright- Copyright (c) 1982, 1986, 1988
32 * The Regents of the University of California
33 * All Rights Reserved
34 *
35 * University Acknowledgment- Portions of this document are derived from
36 * software developed by the University of California, Berkeley, and its
37 * contributors.
38 */
39
40#pragma ident "%Z%%M% %I% %E% SMI"
41
42/*
43 * keyserv - server for storing private encryption keys
44 * keyserv(1M) performs multiple functions: it stores secret keys per uid; it
45 * performs public key encryption and decryption operations; and it generates
46 * "random" keys. keyserv(1M) will talk to no one but a local root process on
47 * the local transport only.
48 */
49

--- 68 unchanged lines hidden (view full) ---

118static des_block masterkey;
119char *getenv();
120static char ROOTKEY[] = "/etc/.rootkey";
121
122static char *defaults_file = "/etc/default/keyserv";
123static int use_nobody_keys = TRUE;
124
125/*
40/*
41 * keyserv - server for storing private encryption keys
42 * keyserv(1M) performs multiple functions: it stores secret keys per uid; it
43 * performs public key encryption and decryption operations; and it generates
44 * "random" keys. keyserv(1M) will talk to no one but a local root process on
45 * the local transport only.
46 */
47

--- 68 unchanged lines hidden (view full) ---

116static des_block masterkey;
117char *getenv();
118static char ROOTKEY[] = "/etc/.rootkey";
119
120static char *defaults_file = "/etc/default/keyserv";
121static int use_nobody_keys = TRUE;
122
123/*
126 * Hack to allow the keyserver to use AUTH_DES (for authenticated
127 * NIS+ calls, for example). The only functions that get called
128 * are key_encryptsession_pk, key_decryptsession_pk, and key_gendes.
124 * Hack to allow the keyserver to use AUTH_DES. The only functions
125 * that get called are key_encryptsession_pk, key_decryptsession_pk,
126 * and key_gendes.
129 *
130 * The approach is to have the keyserver fill in pointers to local
131 * implementations of these functions, and to call those in key_call().
132 */
133
134bool_t __key_encrypt_pk_2_svc();
135bool_t __key_decrypt_pk_2_svc();
136bool_t __key_gen_1_svc();

--- 68 unchanged lines hidden (view full) ---

205 setmodulus(HEXMODULUS);
206 openlog("keyserv", LOG_PID, LOG_DAEMON);
207
208 /*
209 * keyserv will not work with a null domainname.
210 */
211 if (getdomainname(domainname, MAXNETNAMELEN+1) ||
212 (domainname[0] == '\0')) {
127 *
128 * The approach is to have the keyserver fill in pointers to local
129 * implementations of these functions, and to call those in key_call().
130 */
131
132bool_t __key_encrypt_pk_2_svc();
133bool_t __key_decrypt_pk_2_svc();
134bool_t __key_gen_1_svc();

--- 68 unchanged lines hidden (view full) ---

203 setmodulus(HEXMODULUS);
204 openlog("keyserv", LOG_PID, LOG_DAEMON);
205
206 /*
207 * keyserv will not work with a null domainname.
208 */
209 if (getdomainname(domainname, MAXNETNAMELEN+1) ||
210 (domainname[0] == '\0')) {
213 syslog(LOG_ERR, "could not get a valid domainname.\n");
214 exit(SMF_EXIT_ERR_CONFIG);
211 syslog(LOG_ERR, "could not get a valid domainname.\n");
212 exit(SMF_EXIT_ERR_CONFIG);
215 }
216
217 /*
218 * Initialise security mechanisms
219 */
220 cache_size = NULL;
221 cache_options = NULL;
222 if (init_mechs() == -1) {

--- 34 unchanged lines hidden (view full) ---

257 /*
258 * Which version of [-s] do we have...?
259 */
260 if (strchr((const char *) optarg, '=') == NULL) {
261 /*
262 * -s <size>
263 */
264 if (s1flag) {
213 }
214
215 /*
216 * Initialise security mechanisms
217 */
218 cache_size = NULL;
219 cache_options = NULL;
220 if (init_mechs() == -1) {

--- 34 unchanged lines hidden (view full) ---

255 /*
256 * Which version of [-s] do we have...?
257 */
258 if (strchr((const char *) optarg, '=') == NULL) {
259 /*
260 * -s <size>
261 */
262 if (s1flag) {
265 fprintf(stderr, "duplicate [-s <size>]\n");
263 fprintf(stderr, "duplicate"
264 " [-s <size>]\n");
266 usage();
267 }
268 s1flag++;
269 default_cache = get_cache_size(optarg);
270 break;
271 }
272 /*
273 * -s <mechtype>=<size>[,...]
274 */
275 s2flag++;
276 options = optarg;
277 while (*options != '\0') {
278 d = getsubopt(&options, cache_options, &value);
279 if (d == -1) {
280 /* Ignore unknown mechtype */
281 continue;
282 }
283 if (value == NULL) {
284 fprintf(stderr,
265 usage();
266 }
267 s1flag++;
268 default_cache = get_cache_size(optarg);
269 break;
270 }
271 /*
272 * -s <mechtype>=<size>[,...]
273 */
274 s2flag++;
275 options = optarg;
276 while (*options != '\0') {
277 d = getsubopt(&options, cache_options, &value);
278 if (d == -1) {
279 /* Ignore unknown mechtype */
280 continue;
281 }
282 if (value == NULL) {
283 fprintf(stderr,
285 "missing cache size for mechtype %s\n",
286 cache_options[d]);
284 "missing cache size for "
285 "mechtype %s\n", cache_options[d]);
287 usage();
288 }
289 cache_size[d] = get_cache_size(value);
290 }
291 break;
292 default:
293 usage();
294 break;

--- 21 unchanged lines hidden (view full) ---

316
317 if (debugging) {
318 if (disk_caching) {
319 char **cpp = cache_options;
320 int *ip = cache_size;
321 (void) fprintf(stderr, "default disk cache size: ");
322 if (default_cache < 0) {
323 (void) fprintf(stderr, "%d entries\n",
286 usage();
287 }
288 cache_size[d] = get_cache_size(value);
289 }
290 break;
291 default:
292 usage();
293 break;

--- 21 unchanged lines hidden (view full) ---

315
316 if (debugging) {
317 if (disk_caching) {
318 char **cpp = cache_options;
319 int *ip = cache_size;
320 (void) fprintf(stderr, "default disk cache size: ");
321 if (default_cache < 0) {
322 (void) fprintf(stderr, "%d entries\n",
324 abs(default_cache));
323 abs(default_cache));
325 } else {
326 (void) fprintf(stderr, "%dMB\n", default_cache);
327 }
328
329 (void) fprintf(stderr, "supported mechanisms:\n");
330 (void) fprintf(stderr, "\talias\t\tdisk cache size\n");
331 (void) fprintf(stderr, "\t=====\t\t===============\n");
332 while (*cpp != NULL) {
333 (void) fprintf(stderr, "\t%s\t\t", *cpp++);
334 if (*ip < 0) {
335 (void) fprintf(stderr, "%d entries\n",
324 } else {
325 (void) fprintf(stderr, "%dMB\n", default_cache);
326 }
327
328 (void) fprintf(stderr, "supported mechanisms:\n");
329 (void) fprintf(stderr, "\talias\t\tdisk cache size\n");
330 (void) fprintf(stderr, "\t=====\t\t===============\n");
331 while (*cpp != NULL) {
332 (void) fprintf(stderr, "\t%s\t\t", *cpp++);
333 if (*ip < 0) {
334 (void) fprintf(stderr, "%d entries\n",
336 abs(*ip));
335 abs(*ip));
337 } else {
338 (void) fprintf(stderr, "%dMB\n", *ip);
339 }
340 ip++;
341 }
342 } else {
343 (void) fprintf(stderr,
336 } else {
337 (void) fprintf(stderr, "%dMB\n", *ip);
338 }
339 ip++;
340 }
341 } else {
342 (void) fprintf(stderr,
344 "common key disk caching disabled\n");
343 "common key disk caching disabled\n");
345 }
346 }
347 /*
348 * Post-option initialisation
349 */
350 if (disk_caching) {
351 int i;
352 for (i = 0; mechs[i]; i++) {
353 if ((AUTH_DES_COMPAT_CHK(mechs[i])) ||
354 (mechs[i]->keylen < 0) || (mechs[i]->algtype < 0))
355 continue;
356 create_cache_file(mechs[i]->keylen, mechs[i]->algtype,
344 }
345 }
346 /*
347 * Post-option initialisation
348 */
349 if (disk_caching) {
350 int i;
351 for (i = 0; mechs[i]; i++) {
352 if ((AUTH_DES_COMPAT_CHK(mechs[i])) ||
353 (mechs[i]->keylen < 0) || (mechs[i]->algtype < 0))
354 continue;
355 create_cache_file(mechs[i]->keylen, mechs[i]->algtype,
357 cache_size[i] ? cache_size[i] : default_cache);
356 cache_size[i] ? cache_size[i] : default_cache);
358 }
359 }
360 getrootkey(&masterkey, nflag);
361
362 /*
363 * Set MT mode
364 */
365 if (nthreads > 0) {

--- 5 unchanged lines hidden (view full) ---

371 * Enable non-blocking mode and maximum record size checks for
372 * connection oriented transports.
373 */
374 if (!rpc_control(RPC_SVC_CONNMAXREC_SET, &maxrecsz)) {
375 syslog(LOG_INFO, "unable to set max RPC record size");
376 }
377
378 if (svc_create_local_service(keyprogram, KEY_PROG, KEY_VERS,
357 }
358 }
359 getrootkey(&masterkey, nflag);
360
361 /*
362 * Set MT mode
363 */
364 if (nthreads > 0) {

--- 5 unchanged lines hidden (view full) ---

370 * Enable non-blocking mode and maximum record size checks for
371 * connection oriented transports.
372 */
373 if (!rpc_control(RPC_SVC_CONNMAXREC_SET, &maxrecsz)) {
374 syslog(LOG_INFO, "unable to set max RPC record size");
375 }
376
377 if (svc_create_local_service(keyprogram, KEY_PROG, KEY_VERS,
379 "netpath", "keyserv") == 0) {
378 "netpath", "keyserv") == 0) {
380 syslog(LOG_ERR,
379 syslog(LOG_ERR,
381 "%s: unable to create service for version %d\n",
382 argv[0], KEY_VERS);
380 "%s: unable to create service for version %d\n",
381 argv[0], KEY_VERS);
383 exit(1);
384 }
385
386 if (svc_create_local_service(keyprogram, KEY_PROG, KEY_VERS2,
382 exit(1);
383 }
384
385 if (svc_create_local_service(keyprogram, KEY_PROG, KEY_VERS2,
387 "netpath", "keyserv") == 0) {
386 "netpath", "keyserv") == 0) {
388 syslog(LOG_ERR,
387 syslog(LOG_ERR,
389 "%s: unable to create service for version %d\n",
390 argv[0], KEY_VERS2);
388 "%s: unable to create service for version %d\n",
389 argv[0], KEY_VERS2);
391 exit(1);
392 }
393
394 if (svc_create_local_service(keyprogram, KEY_PROG, KEY_VERS3,
390 exit(1);
391 }
392
393 if (svc_create_local_service(keyprogram, KEY_PROG, KEY_VERS3,
395 "netpath", "keyserv") == 0) {
394 "netpath", "keyserv") == 0) {
396 syslog(LOG_ERR,
395 syslog(LOG_ERR,
397 "%s: unable to create service for version %d\n",
398 argv[0], KEY_VERS3);
396 "%s: unable to create service for version %d\n",
397 argv[0], KEY_VERS3);
399 exit(1);
400 }
401
402 if (!debugging) {
403 detachfromtty();
404 }
405
406 if (svc_create(keyprogram, KEY_PROG, KEY_VERS, "door") == 0) {
407 syslog(LOG_ERR,
398 exit(1);
399 }
400
401 if (!debugging) {
402 detachfromtty();
403 }
404
405 if (svc_create(keyprogram, KEY_PROG, KEY_VERS, "door") == 0) {
406 syslog(LOG_ERR,
408 "%s: unable to create service over doors for version %d\n",
409 argv[0], KEY_VERS);
407 "%s: unable to create service over doors for version %d\n",
408 argv[0], KEY_VERS);
410 exit(1);
411 }
412
413 if (svc_create(keyprogram, KEY_PROG, KEY_VERS2, "door") == 0) {
414 syslog(LOG_ERR,
409 exit(1);
410 }
411
412 if (svc_create(keyprogram, KEY_PROG, KEY_VERS2, "door") == 0) {
413 syslog(LOG_ERR,
415 "%s: unable to create service over doors for version %d\n",
416 argv[0], KEY_VERS2);
414 "%s: unable to create service over doors for version %d\n",
415 argv[0], KEY_VERS2);
417 exit(1);
418 }
419
420 if (svc_create(keyprogram, KEY_PROG, KEY_VERS3, "door") == 0) {
421 syslog(LOG_ERR,
416 exit(1);
417 }
418
419 if (svc_create(keyprogram, KEY_PROG, KEY_VERS3, "door") == 0) {
420 syslog(LOG_ERR,
422 "%s: unable to create service over doors for version %d\n",
423 argv[0], KEY_VERS3);
421 "%s: unable to create service over doors for version %d\n",
422 argv[0], KEY_VERS3);
424 exit(1);
425 }
426
427 svc_run();
428 abort();
429 /* NOTREACHED */
430 return (0);
431}

--- 464 unchanged lines hidden (view full) ---

896/*
897 * Version 3 procedures follow...
898 */
899
900static bool_t
901__key_set_3_svc(uid_t uid, setkeyarg3 *arg, keystatus *status)
902{
903 debug(KEYSERV_DEBUG, ("__key_set_3_svc(%d, %d, %d)",
423 exit(1);
424 }
425
426 svc_run();
427 abort();
428 /* NOTREACHED */
429 return (0);
430}

--- 464 unchanged lines hidden (view full) ---

895/*
896 * Version 3 procedures follow...
897 */
898
899static bool_t
900__key_set_3_svc(uid_t uid, setkeyarg3 *arg, keystatus *status)
901{
902 debug(KEYSERV_DEBUG, ("__key_set_3_svc(%d, %d, %d)",
904 uid, arg->algtype, arg->keylen));
903 uid, arg->algtype, arg->keylen));
905 *status = pk_setkey3(uid, arg);
906 debug(KEYSERV_DEBUG, ("__key_set_3_svc %s", strstatus(*status)));
907 return (TRUE);
908}
909
910static bool_t
911__key_encrypt_3_svc(uid_t uid, cryptkeyarg3 *arg, cryptkeyres3 *res)
912{
913 int len, i;
914 des_block *dp;
915
916 debug(KEYSERV_DEBUG, ("encrypt_3(%d %d %s)", uid,
904 *status = pk_setkey3(uid, arg);
905 debug(KEYSERV_DEBUG, ("__key_set_3_svc %s", strstatus(*status)));
906 return (TRUE);
907}
908
909static bool_t
910__key_encrypt_3_svc(uid_t uid, cryptkeyarg3 *arg, cryptkeyres3 *res)
911{
912 int len, i;
913 des_block *dp;
914
915 debug(KEYSERV_DEBUG, ("encrypt_3(%d %d %s)", uid,
917 arg->deskey.deskeyarray_len, arg->remotename));
916 arg->deskey.deskeyarray_len, arg->remotename));
918 res->status = pk_encrypt3(uid, arg, &res->cryptkeyres3_u.deskey);
919 len = res->cryptkeyres3_u.deskey.deskeyarray_len;
920 dp = res->cryptkeyres3_u.deskey.deskeyarray_val;
921 for (i = 0; i < len; i++) {
922 debug(KEYSERV_DEBUG0, ("encrypt_3 retval[%d] == (%x,%x)",
917 res->status = pk_encrypt3(uid, arg, &res->cryptkeyres3_u.deskey);
918 len = res->cryptkeyres3_u.deskey.deskeyarray_len;
919 dp = res->cryptkeyres3_u.deskey.deskeyarray_val;
920 for (i = 0; i < len; i++) {
921 debug(KEYSERV_DEBUG0, ("encrypt_3 retval[%d] == (%x,%x)",
923 i, dp->key.high, dp->key.low));
922 i, dp->key.high, dp->key.low));
924 dp++;
925 }
926 debug(KEYSERV_DEBUG, ("encrypt_3 returned %s", strstatus(res->status)));
927 return (TRUE);
928}
929
930static bool_t
931__key_decrypt_3_svc(uid_t uid, cryptkeyarg3 *arg, cryptkeyres3 *res)
932{
933 int len, i;
934 des_block *dp;
935
936 debug(KEYSERV_DEBUG, ("decrypt_3(%d, %d, %s)", uid,
923 dp++;
924 }
925 debug(KEYSERV_DEBUG, ("encrypt_3 returned %s", strstatus(res->status)));
926 return (TRUE);
927}
928
929static bool_t
930__key_decrypt_3_svc(uid_t uid, cryptkeyarg3 *arg, cryptkeyres3 *res)
931{
932 int len, i;
933 des_block *dp;
934
935 debug(KEYSERV_DEBUG, ("decrypt_3(%d, %d, %s)", uid,
937 arg->deskey.deskeyarray_len, arg->remotename));
936 arg->deskey.deskeyarray_len, arg->remotename));
938 res->status = pk_decrypt3(uid, arg, &res->cryptkeyres3_u.deskey);
939 len = res->cryptkeyres3_u.deskey.deskeyarray_len;
940 dp = res->cryptkeyres3_u.deskey.deskeyarray_val;
941 for (i = 0; i < len; i++) {
942 debug(KEYSERV_DEBUG0, ("decrypt_3 retval[%d] == (%x,%x)",
937 res->status = pk_decrypt3(uid, arg, &res->cryptkeyres3_u.deskey);
938 len = res->cryptkeyres3_u.deskey.deskeyarray_len;
939 dp = res->cryptkeyres3_u.deskey.deskeyarray_val;
940 for (i = 0; i < len; i++) {
941 debug(KEYSERV_DEBUG0, ("decrypt_3 retval[%d] == (%x,%x)",
943 i, dp->key.high, dp->key.low));
942 i, dp->key.high, dp->key.low));
944 dp++;
945 }
946 debug(KEYSERV_DEBUG, ("decrypt_3 returned %s", strstatus(res->status)));
947 return (TRUE);
948}
949
950/* ARGSUSED */
951static bool_t

--- 4 unchanged lines hidden (view full) ---

956
957 debug(KEYSERV_DEBUG, ("gen_3(%d %x)", keynum, res));
958 res->deskeyarray_val = 0;
959 if (!setdeskeyarray(res, keynum)) {
960 return (FALSE);
961 }
962 for (i = 0; i < keynum; i++) {
963 debug(KEYSERV_DEBUG, ("gen_3 calling gen_1 %x",
943 dp++;
944 }
945 debug(KEYSERV_DEBUG, ("decrypt_3 returned %s", strstatus(res->status)));
946 return (TRUE);
947}
948
949/* ARGSUSED */
950static bool_t

--- 4 unchanged lines hidden (view full) ---

955
956 debug(KEYSERV_DEBUG, ("gen_3(%d %x)", keynum, res));
957 res->deskeyarray_val = 0;
958 if (!setdeskeyarray(res, keynum)) {
959 return (FALSE);
960 }
961 for (i = 0; i < keynum; i++) {
962 debug(KEYSERV_DEBUG, ("gen_3 calling gen_1 %x",
964 res->deskeyarray_val+i));
963 res->deskeyarray_val+i));
965 __key_gen_1_svc((void *) NULL, (struct svc_req *)NULL,
964 __key_gen_1_svc((void *) NULL, (struct svc_req *)NULL,
966 res->deskeyarray_val+i);
965 res->deskeyarray_val+i);
967 debug(KEYSERV_DEBUG, ("gen_3 val %d %x",
966 debug(KEYSERV_DEBUG, ("gen_3 val %d %x",
968 i, *(int *)(res->deskeyarray_val+i)));
967 i, *(int *)(res->deskeyarray_val+i)));
969 }
970 return (TRUE);
971}
972
973static void
974__key_gen_3_svc_free(deskeyarray *dp)
975{
976 free(dp->deskeyarray_val);

--- 48 unchanged lines hidden (view full) ---

1025 return (TRUE);
1026}
1027
1028static bool_t
1029__key_net_get_3_svc(uid_t uid, mechtype *arg, key_netstres3 *keynetname)
1030{
1031 debug(KEYSERV_DEBUG, ("net_get_3 (%d, %x)", uid, arg));
1032 keynetname->status = pk_netget3(uid,
968 }
969 return (TRUE);
970}
971
972static void
973__key_gen_3_svc_free(deskeyarray *dp)
974{
975 free(dp->deskeyarray_val);

--- 48 unchanged lines hidden (view full) ---

1024 return (TRUE);
1025}
1026
1027static bool_t
1028__key_net_get_3_svc(uid_t uid, mechtype *arg, key_netstres3 *keynetname)
1029{
1030 debug(KEYSERV_DEBUG, ("net_get_3 (%d, %x)", uid, arg));
1031 keynetname->status = pk_netget3(uid,
1033 arg, &keynetname->key_netstres3_u.knet);
1032 arg, &keynetname->key_netstres3_u.knet);
1034 debug(KEYSERV_DEBUG,
1033 debug(KEYSERV_DEBUG,
1035 ("net_get_3 ret %s", strstatus(keynetname->status)));
1034 ("net_get_3 ret %s", strstatus(keynetname->status)));
1036 return (TRUE);
1037}
1038
1039static void
1040__key_net_get_3_svc_free(key_netstres3 *keynetname)
1041{
1042 if (keynetname->status == KEY_SUCCESS) {
1043 free(keynetname->key_netstres3_u.knet.st_priv_key.keybuf3_val);
1044 free(keynetname->key_netstres3_u.knet.st_pub_key.keybuf3_val);
1045 free(keynetname->key_netstres3_u.knet.st_netname);
1046 }
1047}
1048
1049static bool_t
1050__key_get_conv_3_svc(uid_t uid, deskeyarg3 *arg, cryptkeyres3 *res)
1051{
1052 debug(KEYSERV_DEBUG, ("get_conv_3(%d %x %x)", uid, arg, res));
1053 res->status = pk_get_conv_key3(uid, arg, res);
1054 debug(KEYSERV_DEBUG,
1035 return (TRUE);
1036}
1037
1038static void
1039__key_net_get_3_svc_free(key_netstres3 *keynetname)
1040{
1041 if (keynetname->status == KEY_SUCCESS) {
1042 free(keynetname->key_netstres3_u.knet.st_priv_key.keybuf3_val);
1043 free(keynetname->key_netstres3_u.knet.st_pub_key.keybuf3_val);
1044 free(keynetname->key_netstres3_u.knet.st_netname);
1045 }
1046}
1047
1048static bool_t
1049__key_get_conv_3_svc(uid_t uid, deskeyarg3 *arg, cryptkeyres3 *res)
1050{
1051 debug(KEYSERV_DEBUG, ("get_conv_3(%d %x %x)", uid, arg, res));
1052 res->status = pk_get_conv_key3(uid, arg, res);
1053 debug(KEYSERV_DEBUG,
1055 ("get_conv_3 ret %s", strstatus(res->status)));
1054 ("get_conv_3 ret %s", strstatus(res->status)));
1056 return (TRUE);
1057}
1058
1059/* ARGSUSED */
1060static bool_t
1061__key_clear_3_svc(uid_t uid, void *arg, keystatus *status)
1062{
1063 debug(KEYSERV_DEBUG, ("clear_3(%d)", uid));

--- 352 unchanged lines hidden ---
1055 return (TRUE);
1056}
1057
1058/* ARGSUSED */
1059static bool_t
1060__key_clear_3_svc(uid_t uid, void *arg, keystatus *status)
1061{
1062 debug(KEYSERV_DEBUG, ("clear_3(%d)", uid));

--- 352 unchanged lines hidden ---