[Ttssh2-commit] [7777] OpenBSD から arc4random.c Rev 1.26, 1.31 の差分を適用

Back to archive index
scmno****@osdn***** scmno****@osdn*****
2019年 6月 17日 (月) 01:40:18 JST


Revision: 7777
          https://osdn.net/projects/ttssh2/scm/svn/commits/7777
Author:   maya
Date:     2019-06-17 01:40:17 +0900 (Mon, 17 Jun 2019)
Log Message:
-----------
OpenBSD から arc4random.c Rev 1.26, 1.31 の差分を適用

Revision Links:
--------------
    https://osdn.net/projects/ttssh2/scm/svn/commits/1

Modified Paths:
--------------
    trunk/ttssh2/ttxssh/arc4random.c
    trunk/ttssh2/ttxssh/ttxssh.c

-------------- next part --------------
Modified: trunk/ttssh2/ttxssh/arc4random.c
===================================================================
--- trunk/ttssh2/ttxssh/arc4random.c	2019-06-16 15:58:18 UTC (rev 7776)
+++ trunk/ttssh2/ttxssh/arc4random.c	2019-06-16 16:40:17 UTC (rev 7777)
@@ -1,6 +1,6 @@
 /* OPENBSD ORIGINAL: lib/libc/crypto/arc4random.c */
 
-/*	$OpenBSD: arc4random.c,v 1.25 2013/10/01 18:34:57 markus Exp $	*/
+/*	$OpenBSD: arc4random.c,v 1.31 2014/05/31 10:32:12 jca Exp $	*/
 
 /*
  * Copyright (c) 1996, David Mazieres <dm****@uun*****>
@@ -151,34 +151,8 @@
 	memcpy(val, rs_buf + RSBUFSZ - rs_have, sizeof(*val));
 	memset(rs_buf + RSBUFSZ - rs_have, 0, sizeof(*val));
 	rs_have -= sizeof(*val);
-	return;
 }
 
-void
-arc4random_stir(void)
-{
-	_ARC4_LOCK();
-	_rs_stir();
-	_ARC4_UNLOCK();
-}
-
-void
-arc4random_addrandom(u_char *dat, int datlen)
-{
-	int m;
-
-	_ARC4_LOCK();
-	if (!rs_initialized)
-		_rs_stir();
-	while (datlen > 0) {
-		m = MIN(datlen, KEYSZ + IVSZ);
-		_rs_rekey(dat, m);
-		dat += m;
-		datlen -= m;
-	}
-	_ARC4_UNLOCK();
-}
-
 uint32
 arc4random(void)
 {

Modified: trunk/ttssh2/ttxssh/ttxssh.c
===================================================================
--- trunk/ttssh2/ttxssh/ttxssh.c	2019-06-16 15:58:18 UTC (rev 7776)
+++ trunk/ttssh2/ttxssh/ttxssh.c	2019-06-16 16:40:17 UTC (rev 7777)
@@ -4501,8 +4501,6 @@
 			FILE *fp;
 			char comment[1024]; // comment string in private key
 
-			arc4random_stir();
-
 			// saving file dialog
 			ZeroMemory(&ofn, sizeof(ofn));
 			ofn.lStructSize = get_OPENFILENAME_SIZE();


Ttssh2-commit メーリングリストの案内
Back to archive index