- 72A4C1F55A1EF9D853F44A93F1F5396E63739DC4C1C70017DD3F3D2EA6C7E1B843CE0CA60E5D06DDCC742ECDE6F17CDABDDBE833F83AD7BEA2CEBC40B80E332A
+ C2C0CAF7B1DF0AA3811A718F544A8E2B5AA1909F97876E4F4070D6B01DC55F444A71837E746D58DC9211FCC4E4033E01582EE4B14C9DCA898BB9B838CC022347
eucrypt/smg_rsa/truerandom.c
(16 . 27)(16 . 19)
384 return -1;
385 }
386
387 //input and output speeds
388 /* input and output speeds */
389 cfsetospeed(&tty, (speed_t)speed);
390 cfsetispeed(&tty, (speed_t)speed);
391
392 tty.c_cflag |= (CLOCAL | CREAD); //ignore modem controls
393 tty.c_cflag &= ~CSIZE;
394 tty.c_cflag |= CS8; //8 bit characters
395 tty.c_cflag &= ~PARENB; //no parity bit
396 tty.c_cflag &= ~CSTOPB; //only need 1 stop bit
397 tty.c_cflag &= ~CRTSCTS; //no hardware flow control
398 /* raw */
399 tty.c_lflag &= ~(ECHO | ECHOE | ECHOK);
400 tty.c_oflag &= ~OPOST;
401
402 //non-canonical mode
403 tty.c_cflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR | IGNCR | ICRNL | IXON);
404 tty.c_cflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);
405 tty.c_cflag &= ~OPOST;
406
407 //read at least one octet at a time; timeout 1 tenth of second between octets read
408 /* read at least one octet at a time; BLOCK until at least VMIN octets read */
409 tty.c_cc[VMIN] = 1;
410 tty.c_cc[VTIME] = 1;
411 tty.c_cc[VTIME] = 0;
412
413 if (tcsetattr(fd, TCSANOW, &tty) != 0)
414 if (tcsetattr(fd, TCSAFLUSH, &tty) != 0)
415 return -1;
416
417 return 0;