Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
3d7c4a5a
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
接近 2 年 前同步成功
通知
12
Star
18
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Openssl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
3d7c4a5a
编写于
9月 27, 2003
作者:
R
Richard Levitte
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Selected changes for MSDOS, contributed by Gisle Vanem <giva@bgnett.no>.
PR: 669
上级
11171f3c
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
19 addition
and
19 deletion
+19
-19
apps/s_apps.h
apps/s_apps.h
+8
-0
apps/s_client.c
apps/s_client.c
+7
-11
apps/s_server.c
apps/s_server.c
+4
-8
未找到文件。
apps/s_apps.h
浏览文件 @
3d7c4a5a
...
...
@@ -112,6 +112,14 @@
#include <sys/types.h>
#include <openssl/opensslconf.h>
#if defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
#include <conio.h>
#endif
#ifdef OPENSSL_SYS_MSDOS
#define _kbhit kbhit
#endif
#if defined(OPENSSL_SYS_VMS) && !defined(FD_SET)
/* VAX C does not defined fd_set and friends, but it's actually quite simple */
/* These definitions are borrowed from SOCKETSHR. /Richard Levitte */
...
...
apps/s_client.c
浏览文件 @
3d7c4a5a
...
...
@@ -136,10 +136,6 @@ typedef unsigned int u_int;
#include <openssl/rand.h>
#include "s_apps.h"
#ifdef OPENSSL_SYS_WINDOWS
#include <conio.h>
#endif
#ifdef OPENSSL_SYS_WINCE
/* Windows CE incorrectly defines fileno as returning void*, so to avoid problems below... */
#ifdef fileno
...
...
@@ -260,7 +256,7 @@ int MAIN(int argc, char **argv)
char
*
engine_id
=
NULL
;
ENGINE
*
e
=
NULL
;
#endif
#if
def OPENSSL_SYS_WINDOWS
#if
defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
struct
timeval
tv
;
#endif
...
...
@@ -644,7 +640,7 @@ re_start:
if
(
!
ssl_pending
)
{
#if
ndef OPENSSL_SYS_WINDOWS
#if
!defined(OPENSSL_SYS_WINDOWS) && !defined(OPENSSL_SYS_MSDOS)
if
(
tty_on
)
{
if
(
read_tty
)
FD_SET
(
fileno
(
stdin
),
&
readfds
);
...
...
@@ -671,8 +667,8 @@ re_start:
* will choke the compiler: if you do have a cast then
* you can either go for (int *) or (void *).
*/
#if
def OPENSSL_SYS_WINDOWS
/* Under Windows
we make the assumption that we can
#if
defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
/* Under Windows/DOS
we make the assumption that we can
* always write to the tty: therefore if we need to
* write to the tty we just fall through. Otherwise
* we timeout the select every second and see if there
...
...
@@ -686,7 +682,7 @@ re_start:
tv
.
tv_usec
=
0
;
i
=
select
(
width
,(
void
*
)
&
readfds
,(
void
*
)
&
writefds
,
NULL
,
&
tv
);
#if
def OPENSSL_SYS_WINCE
#if
defined(OPENSSL_SYS_WINCE) || defined(OPENSSL_SYS_MSDOS)
if
(
!
i
&&
(
!
_kbhit
()
||
!
read_tty
)
)
continue
;
#else
if
(
!
i
&&
(
!
((
_kbhit
())
||
(
WAIT_OBJECT_0
==
WaitForSingleObject
(
GetStdHandle
(
STD_INPUT_HANDLE
),
0
)))
||
!
read_tty
)
)
continue
;
...
...
@@ -855,8 +851,8 @@ printf("read=%d pending=%d peek=%d\n",k,SSL_pending(con),SSL_peek(con,zbuf,10240
}
}
#if
def OPENSSL_SYS_WINDOWS
#if
def OPENSSL_SYS_WINCE
#if
defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
#if
defined(OPENSSL_SYS_WINCE) || defined(OPENSSL_SYS_MSDOS)
else
if
(
_kbhit
())
#else
else
if
((
_kbhit
())
||
(
WAIT_OBJECT_0
==
WaitForSingleObject
(
GetStdHandle
(
STD_INPUT_HANDLE
),
0
)))
...
...
apps/s_server.c
浏览文件 @
3d7c4a5a
...
...
@@ -151,10 +151,6 @@ typedef unsigned int u_int;
#include <openssl/rand.h>
#include "s_apps.h"
#ifdef OPENSSL_SYS_WINDOWS
#include <conio.h>
#endif
#ifdef OPENSSL_SYS_WINCE
/* Windows CE incorrectly defines fileno as returning void*, so to avoid problems below... */
#ifdef fileno
...
...
@@ -1001,7 +997,7 @@ static int sv_body(char *hostname, int s, unsigned char *context)
unsigned
long
l
;
SSL
*
con
=
NULL
;
BIO
*
sbio
;
#if
def OPENSSL_SYS_WINDOWS
#if
defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
struct
timeval
tv
;
#endif
...
...
@@ -1075,7 +1071,7 @@ static int sv_body(char *hostname, int s, unsigned char *context)
if
(
!
read_from_sslcon
)
{
FD_ZERO
(
&
readfds
);
#if
ndef OPENSSL_SYS_WINDOWS
#if
!defined(OPENSSL_SYS_WINDOWS) && !defined(OPENSSL_SYS_MSDOS)
FD_SET
(
fileno
(
stdin
),
&
readfds
);
#endif
FD_SET
(
s
,
&
readfds
);
...
...
@@ -1085,8 +1081,8 @@ static int sv_body(char *hostname, int s, unsigned char *context)
* the compiler: if you do have a cast then you can either
* go for (int *) or (void *).
*/
#if
def OPENSSL_SYS_WINDOWS
/* Under
Windows we can't select on stdin: only
#if
defined(OPENSSL_SYS_WINDOWS) || defined(OPENSSL_SYS_MSDOS)
/* Under DOS (non-djgpp) and
Windows we can't select on stdin: only
* on sockets. As a workaround we timeout the select every
* second and check for any keypress. In a proper Windows
* application we wouldn't do this because it is inefficient.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录