Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
41e68ef2
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
1 年多 前同步成功
通知
10
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看板
提交
41e68ef2
编写于
2月 23, 2000
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Add PBE algorithms with ciphers, not digests.
上级
3142c86d
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
81 addition
and
6 deletion
+81
-6
crypto/evp/c_allc.c
crypto/evp/c_allc.c
+3
-1
crypto/evp/c_alld.c
crypto/evp/c_alld.c
+1
-3
doc/crypto/EVP_EncryptInit.pod
doc/crypto/EVP_EncryptInit.pod
+12
-2
doc/crypto/OpenSSL_add_all_algorithms.pod
doc/crypto/OpenSSL_add_all_algorithms.pod
+65
-0
未找到文件。
crypto/evp/c_allc.c
浏览文件 @
41e68ef2
/* crypto/evp/c_all.c */
/* crypto/evp/c_all
c
.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
...
...
@@ -144,4 +144,6 @@ void OpenSSL_add_all_ciphers(void)
EVP_add_cipher_alias
(
SN_rc5_cbc
,
"rc5"
);
EVP_add_cipher_alias
(
SN_rc5_cbc
,
"RC5"
);
#endif
PKCS12_PBE_add
();
PKCS5_PBE_add
();
}
crypto/evp/c_alld.c
浏览文件 @
41e68ef2
/* crypto/evp/c_all.c */
/* crypto/evp/c_all
d
.c */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
...
...
@@ -97,6 +97,4 @@ void OpenSSL_add_all_digests(void)
EVP_add_digest_alias
(
SN_ripemd160
,
"ripemd"
);
EVP_add_digest_alias
(
SN_ripemd160
,
"rmd160"
);
#endif
PKCS12_PBE_add
();
PKCS5_PBE_add
();
}
doc/crypto/EVP_EncryptInit.pod
浏览文件 @
41e68ef2
...
...
@@ -67,7 +67,7 @@ to (inl + cipher_block_size - 1) so B<outl> should contain sufficient
room. The actual number of bytes written is placed in B<outl>.
EVP_EncryptFinal() encrypts the "final" data, that is any data that
remains in a partial block. It uses
standard block padding
(aka PKCS
remains in a partial block. It uses
L<standard block padding|/NOTES>
(aka PKCS
padding). The encrypted final data is written to B<out> which should
have sufficient space for one cipher block. The number of bytes written
is placed in B<outl>. After this function is called the encryption operation
...
...
@@ -117,7 +117,9 @@ length for all ciphers.
EVP_CIPHER_type() and EVP_CIPHER_CTX_type() return the type of the passed
cipher or context. This "type" is the actual NID of the cipher OBJECT
IDENTIFIER as such it ignores the cipher parameters and 40 bit RC2 and
128 bit RC2 have the same NID.
128 bit RC2 have the same NID. If the cipher does not have an object
identifier or does not have ASN1 support this function will return
B<NID_undef>.
EVP_CIPHER_CTX_cipher() returns the B<EVP_CIPHER> structure when passed
an B<EVP_CIPHER_CTX> structure.
...
...
@@ -168,6 +170,14 @@ length.
EVP_CIPHER_iv_length() and EVP_CIPHER_CTX_iv_length() return the IV
length or zero if the cipher does not use an IV.
EVP_CIPHER_type() and EVP_CIPHER_CTX_type() return the NID of the cipher's
OBJECT IDENTIFIER or NID_undef if it has no defined OBJECT IDENTIFIER.
EVP_CIPHER_CTX_cipher() returns an B<EVP_CIPHER> structure.
EVP_CIPHER_param_to_asn1() and EVP_CIPHER_asn1_to_param() return 1 for
success or zero for failure.
=head1 NOTES
Where possible the B<EVP> interface to symmetric ciphers should be used in
...
...
doc/crypto/OpenSSL_add_all_algorithms.pod
0 → 100644
浏览文件 @
41e68ef2
=pod
=head1 NAME
OpenSSL_add_all_algorithms() - add algorithms to internal table
=head1 SYNOPSIS
#include <openssl/evp.h>
void OpenSSL_add_all_algorithms(void);
void OpenSSL_add_all_ciphers(void);
void OpenSSL_add_all_digests(void);
void EVP_cleanup(void);
=head1 DESCRIPTION
OpenSSL keeps an internal table of digest algorithms and ciphers. It uses
this table to lookup ciphers via functions such as EVP_get_cipher_byname().
OpenSSL_add_all_digests() adds all digest algorithms to the table.
OpenSSL_add_all_algorithms() adds all algorithms to the table (digests and
ciphers).
OpenSSL_add_all_ciphers() adds all encryption algorithms to the table including
password based encryption algorithms.
EVP_cleanup() removes all ciphers and digests from the table.
=head1 RETURN VALUES
None of the functions return a value.
=head1 NOTES
A typical application will will call OpenSSL_add_all_algorithms() initially and
EVP_cleanup() before exiting.
An application does not need to add algorithms to use them explicitly, for example
by EVP_sha1(). It just needs to add them if it (or any of the functions it calls)
needs to lookup algorithms.
The cipher and digest lookup functions are used in many parts of the library. If
the table is not initialised several functions will misbehave and complain they
cannot find algorithms. This includes the PEM, PKCS#12, SSL and S/MIME libraries.
This is a common query in the OpenSSL mailing lists.
Calling OpenSSL_add_all_algorithms() links in all algorithms: as a result a
statically linked executable can be quite large. If this is important it is possible
to just add the required ciphers and digests.
=head1 BUGS
Although the functions do not return error codes it is possible for them to fail.
This will only happen as a result of a memory allocation failure so this is not
too much of a problem in practice.
=head1 SEE ALSO
L<evp(3)|evp(3)>, L<EVP_DigestInit(3)|EVP_DigestInit(3)>,
L<EVP_EncryptInit(3)|EVP_EncryptInit(3)>
=cut
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录