4.4BSD snapshot (revision 8.1); add 1993 to copyright
[unix-history] / usr / src / lib / libtelnet / encrypt.c
index 12841a1..bd7a23e 100644 (file)
@@ -1,12 +1,12 @@
 /*-
 /*-
- * Copyright (c) 1991 The Regents of the University of California.
- * All rights reserved.
+ * Copyright (c) 1991, 1993
+ *     The Regents of the University of California.  All rights reserved.
  *
  * %sccs.include.redist.c%
  */
 
 #ifndef lint
  *
  * %sccs.include.redist.c%
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)encrypt.c  5.2 (Berkeley) %G%";
+static char sccsid[] = "@(#)encrypt.c  8.1 (Berkeley) %G%";
 #endif /* not lint */
 
 /*
 #endif /* not lint */
 
 /*
@@ -29,7 +29,7 @@ static char sccsid[] = "@(#)encrypt.c 5.2 (Berkeley) %G%";
  * or implied warranty.
  */
 
  * or implied warranty.
  */
 
-#if    defined(ENCRYPT)
+#ifdef ENCRYPTION
 
 #define        ENCRYPT_NAMES
 #include <arpa/telnet.h>
 
 #define        ENCRYPT_NAMES
 #include <arpa/telnet.h>
@@ -78,7 +78,7 @@ static long remote_supports_encrypt = 0;
 static long remote_supports_decrypt = 0;
 
 static Encryptions encryptions[] = {
 static long remote_supports_decrypt = 0;
 
 static Encryptions encryptions[] = {
-#if    defined(DES_ENCRYPT)
+#ifdef DES_ENCRYPTION
     { "DES_CFB64",     ENCTYPE_DES_CFB64,
                        cfb64_encrypt,  
                        cfb64_decrypt,
     { "DES_CFB64",     ENCTYPE_DES_CFB64,
                        cfb64_encrypt,  
                        cfb64_decrypt,
@@ -99,7 +99,7 @@ static Encryptions encryptions[] = {
                        ofb64_session,
                        ofb64_keyid,
                        ofb64_printsub },
                        ofb64_session,
                        ofb64_keyid,
                        ofb64_printsub },
-#endif
+#endif /* DES_ENCRYPTION */
     { 0, },
 };
 
     { 0, },
 };
 
@@ -646,6 +646,12 @@ encrypt_session_key(key, server)
        while (ep->type) {
                if (ep->session)
                        (*ep->session)(key, server);
        while (ep->type) {
                if (ep->session)
                        (*ep->session)(key, server);
+#ifdef notdef
+               if (!encrypt_output && autoencrypt && !server)
+                       encrypt_start_output(ep->type);
+               if (!decrypt_input && autodecrypt && !server)
+                       encrypt_send_request_start();
+#endif
                ++ep;
        }
 }
                ++ep;
        }
 }
@@ -964,4 +970,4 @@ encrypt_printsub(data, cnt, buf, buflen)
        else
                encrypt_gen_printsub(data, cnt, buf, buflen);
 }
        else
                encrypt_gen_printsub(data, cnt, buf, buflen);
 }
-#endif
+#endif /* ENCRYPTION */