Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
openssl
提交
0a150c5c
O
openssl
项目概览
btwise
/
openssl
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
openssl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
0a150c5c
编写于
3月 04, 2000
作者:
B
Bodo Möller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Generate correct error reasons strings for SYSerr.
上级
c7fecee8
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
112 addition
and
3 deletion
+112
-3
CHANGES
CHANGES
+6
-0
apps/rsa.c
apps/rsa.c
+0
-1
crypto/err/err.c
crypto/err/err.c
+105
-1
crypto/lhash/lhash.c
crypto/lhash/lhash.c
+1
-1
未找到文件。
CHANGES
浏览文件 @
0a150c5c
...
@@ -4,6 +4,12 @@
...
@@ -4,6 +4,12 @@
Changes between 0.9.5 and 0.9.6 [XX XXX 2000]
Changes between 0.9.5 and 0.9.6 [XX XXX 2000]
*) In ERR_load_ERR_strings(), build an ERR_LIB_SYS error reason table
using strerror. Previously, ERR_reason_error_string() returned
library names as reason strings for SYSerr; but SYSerr is a special
case where small numbers are errno values, not library numbers.
[Bodo Moeller]
*) Add '-dsaparam' option to 'openssl dhparam' application. This
*) Add '-dsaparam' option to 'openssl dhparam' application. This
converts DSA parameters into DH parameters. (When creating parameters,
converts DSA parameters into DH parameters. (When creating parameters,
DSA_generate_parameters is used.)
DSA_generate_parameters is used.)
...
...
apps/rsa.c
浏览文件 @
0a150c5c
...
@@ -179,7 +179,6 @@ bad:
...
@@ -179,7 +179,6 @@ bad:
BIO_printf
(
bio_err
,
" -outform arg output format - one of DER NET PEM
\n
"
);
BIO_printf
(
bio_err
,
" -outform arg output format - one of DER NET PEM
\n
"
);
BIO_printf
(
bio_err
,
" -in arg input file
\n
"
);
BIO_printf
(
bio_err
,
" -in arg input file
\n
"
);
BIO_printf
(
bio_err
,
" -passin arg input file pass phrase source
\n
"
);
BIO_printf
(
bio_err
,
" -passin arg input file pass phrase source
\n
"
);
BIO_printf
(
bio_err
,
" -in arg input file
\n
"
);
BIO_printf
(
bio_err
,
" -out arg output file
\n
"
);
BIO_printf
(
bio_err
,
" -out arg output file
\n
"
);
BIO_printf
(
bio_err
,
" -passout arg output file pass phrase source
\n
"
);
BIO_printf
(
bio_err
,
" -passout arg output file pass phrase source
\n
"
);
BIO_printf
(
bio_err
,
" -des encrypt PEM output with cbc des
\n
"
);
BIO_printf
(
bio_err
,
" -des encrypt PEM output with cbc des
\n
"
);
...
...
crypto/err/err.c
浏览文件 @
0a150c5c
...
@@ -55,9 +55,63 @@
...
@@ -55,9 +55,63 @@
* copied and put under another distribution licence
* copied and put under another distribution licence
* [including the GNU Public Licence.]
* [including the GNU Public Licence.]
*/
*/
/* ====================================================================
* Copyright (c) 1998-2000 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. All advertising materials mentioning features or use of this
* software must display the following acknowledgment:
* "This product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
*
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For written permission, please contact
* openssl-core@openssl.org.
*
* 5. Products derived from this software may not be called "OpenSSL"
* nor may "OpenSSL" appear in their names without prior written
* permission of the OpenSSL Project.
*
* 6. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit (http://www.openssl.org/)"
*
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
* ====================================================================
*
* This product includes cryptographic software written by Eric Young
* (eay@cryptsoft.com). This product includes software written by Tim
* Hudson (tjh@cryptsoft.com).
*
*/
#include <stdio.h>
#include <stdio.h>
#include <stdarg.h>
#include <stdarg.h>
#include <string.h>
#include <openssl/lhash.h>
#include <openssl/lhash.h>
#include <openssl/crypto.h>
#include <openssl/crypto.h>
#include "cryptlib.h"
#include "cryptlib.h"
...
@@ -154,6 +208,54 @@ static ERR_STRING_DATA ERR_str_reasons[]=
...
@@ -154,6 +208,54 @@ static ERR_STRING_DATA ERR_str_reasons[]=
{
0
,
NULL
},
{
0
,
NULL
},
};
};
#define NUM_SYS_STR_REASONS 127
#define LEN_SYS_STR_REASON 32
static
ERR_STRING_DATA
SYS_str_reasons
[
NUM_SYS_STR_REASONS
+
1
];
/* SYS_str_reasons is filled with copies of strerror() results at
* initialization.
* 'errno' values up to 127 should cover all usual errors,
* others will be displayed numerically by ERR_error_string.
* It is crucial that we have something for each reason code
* that occurs in ERR_str_reasons, or bogus reason strings
* will be returned for SYSerr(), which always gets an errno
* value and never one of those 'standard' reason codes. */
static
void
build_SYS_str_reasons
()
{
/* Malloc cannot be used here, use static storage instead */
static
char
strerror_tab
[
NUM_SYS_STR_REASONS
][
LEN_SYS_STR_REASON
];
int
i
;
CRYPTO_w_lock
(
CRYPTO_LOCK_ERR_HASH
);
for
(
i
=
1
;
i
<=
NUM_SYS_STR_REASONS
;
i
++
)
{
ERR_STRING_DATA
*
str
=
&
SYS_str_reasons
[
i
-
1
];
str
->
error
=
(
unsigned
long
)
i
;
if
(
str
->
string
==
NULL
)
{
char
(
*
dest
)[
LEN_SYS_STR_REASON
]
=
&
(
strerror_tab
[
i
-
1
]);
char
*
src
=
strerror
(
i
);
if
(
src
!=
NULL
)
{
strncpy
(
*
dest
,
src
,
sizeof
*
dest
);
(
*
dest
)[
sizeof
*
dest
-
1
]
=
'\0'
;
str
->
string
=
*
dest
;
}
}
if
(
str
->
string
==
NULL
)
str
->
string
=
"unknown"
;
}
/* Now we still have SYS_str_reasons[NUM_SYS_STR_REASONS] = {0, NULL},
* as required by ERR_load_strings. */
CRYPTO_w_unlock
(
CRYPTO_LOCK_ERR_HASH
);
}
#endif
#endif
#define err_clear_data(p,i) \
#define err_clear_data(p,i) \
...
@@ -191,14 +293,16 @@ void ERR_load_ERR_strings(void)
...
@@ -191,14 +293,16 @@ void ERR_load_ERR_strings(void)
CRYPTO_w_unlock
(
CRYPTO_LOCK_ERR
);
CRYPTO_w_unlock
(
CRYPTO_LOCK_ERR
);
return
;
return
;
}
}
init
=
0
;
CRYPTO_w_unlock
(
CRYPTO_LOCK_ERR
);
CRYPTO_w_unlock
(
CRYPTO_LOCK_ERR
);
#ifndef NO_ERR
#ifndef NO_ERR
ERR_load_strings
(
0
,
ERR_str_libraries
);
ERR_load_strings
(
0
,
ERR_str_libraries
);
ERR_load_strings
(
0
,
ERR_str_reasons
);
ERR_load_strings
(
0
,
ERR_str_reasons
);
ERR_load_strings
(
ERR_LIB_SYS
,
ERR_str_functs
);
ERR_load_strings
(
ERR_LIB_SYS
,
ERR_str_functs
);
build_SYS_str_reasons
();
ERR_load_strings
(
ERR_LIB_SYS
,
SYS_str_reasons
);
#endif
#endif
init
=
0
;
}
}
}
}
...
...
crypto/lhash/lhash.c
浏览文件 @
0a150c5c
...
@@ -159,7 +159,7 @@ void lh_free(LHASH *lh)
...
@@ -159,7 +159,7 @@ void lh_free(LHASH *lh)
unsigned
int
i
;
unsigned
int
i
;
LHASH_NODE
*
n
,
*
nn
;
LHASH_NODE
*
n
,
*
nn
;
if
(
lh
==
NULL
)
if
(
lh
==
NULL
)
return
;
return
;
for
(
i
=
0
;
i
<
lh
->
num_nodes
;
i
++
)
for
(
i
=
0
;
i
<
lh
->
num_nodes
;
i
++
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录