146806Sdab /*-
2*61388Sbostic * Copyright (c) 1991, 1993
3*61388Sbostic * The Regents of the University of California. All rights reserved.
446806Sdab *
546806Sdab * %sccs.include.redist.c%
646806Sdab */
746806Sdab
846806Sdab #ifndef lint
9*61388Sbostic static char sccsid[] = "@(#)misc.c 8.1 (Berkeley) 06/04/93";
1046806Sdab #endif /* not lint */
1146806Sdab
1246806Sdab #include "misc.h"
1346806Sdab
1446806Sdab char *RemoteHostName;
1546806Sdab char *LocalHostName;
1646806Sdab char *UserNameRequested = 0;
1746806Sdab int ConnectedCount = 0;
1846806Sdab
1946806Sdab void
auth_encrypt_init(local,remote,name,server)2046806Sdab auth_encrypt_init(local, remote, name, server)
2146806Sdab char *local;
2246806Sdab char *remote;
2346806Sdab char *name;
2446806Sdab int server;
2546806Sdab {
2646806Sdab RemoteHostName = remote;
2746806Sdab LocalHostName = local;
2857214Sdab #if defined(AUTHENTICATION)
2946806Sdab auth_init(name, server);
3046806Sdab #endif
3160150Sdab #ifdef ENCRYPTION
3246806Sdab encrypt_init(name, server);
3360150Sdab #endif /* ENCRYPTION */
3446806Sdab if (UserNameRequested) {
3546806Sdab free(UserNameRequested);
3646806Sdab UserNameRequested = 0;
3746806Sdab }
3846806Sdab }
3946806Sdab
4046806Sdab void
auth_encrypt_user(name)4146806Sdab auth_encrypt_user(name)
4246806Sdab char *name;
4346806Sdab {
4446806Sdab extern char *strdup();
4546806Sdab
4646806Sdab if (UserNameRequested)
4746806Sdab free(UserNameRequested);
4846806Sdab UserNameRequested = name ? strdup(name) : 0;
4946806Sdab }
5046806Sdab
5146806Sdab void
auth_encrypt_connect(cnt)5246806Sdab auth_encrypt_connect(cnt)
5346806Sdab int cnt;
5446806Sdab {
5546806Sdab }
5646806Sdab
5746806Sdab void
printd(data,cnt)5846806Sdab printd(data, cnt)
5946806Sdab unsigned char *data;
6046806Sdab int cnt;
6146806Sdab {
6246806Sdab if (cnt > 16)
6346806Sdab cnt = 16;
6446806Sdab while (cnt-- > 0) {
6546806Sdab printf(" %02x", *data);
6646806Sdab ++data;
6746806Sdab }
6846806Sdab }
69