Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
openssl
提交
9194296d
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,发现更多精彩内容 >>
提交
9194296d
编写于
9月 01, 2005
作者:
D
Dr. Stephen Henson
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update ASN1 printing code and add a -print option to 'pkcs7' utility for
initial testing.
上级
6273a91c
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
32 addition
and
1 deletion
+32
-1
apps/pkcs7.c
apps/pkcs7.c
+6
-1
crypto/asn1/asn1.h
crypto/asn1/asn1.h
+9
-0
crypto/asn1/asn1t.h
crypto/asn1/asn1t.h
+11
-0
crypto/asn1/tasn_prn.c
crypto/asn1/tasn_prn.c
+3
-0
crypto/pkcs7/pk7_asn1.c
crypto/pkcs7/pk7_asn1.c
+2
-0
crypto/pkcs7/pkcs7.h
crypto/pkcs7/pkcs7.h
+1
-0
未找到文件。
apps/pkcs7.c
浏览文件 @
9194296d
...
@@ -90,7 +90,7 @@ int MAIN(int argc, char **argv)
...
@@ -90,7 +90,7 @@ int MAIN(int argc, char **argv)
BIO
*
in
=
NULL
,
*
out
=
NULL
;
BIO
*
in
=
NULL
,
*
out
=
NULL
;
int
informat
,
outformat
;
int
informat
,
outformat
;
char
*
infile
,
*
outfile
,
*
prog
;
char
*
infile
,
*
outfile
,
*
prog
;
int
print_certs
=
0
,
text
=
0
,
noout
=
0
;
int
print_certs
=
0
,
text
=
0
,
noout
=
0
,
p7_print
=
0
;
int
ret
=
1
;
int
ret
=
1
;
#ifndef OPENSSL_NO_ENGINE
#ifndef OPENSSL_NO_ENGINE
char
*
engine
=
NULL
;
char
*
engine
=
NULL
;
...
@@ -139,6 +139,8 @@ int MAIN(int argc, char **argv)
...
@@ -139,6 +139,8 @@ int MAIN(int argc, char **argv)
noout
=
1
;
noout
=
1
;
else
if
(
strcmp
(
*
argv
,
"-text"
)
==
0
)
else
if
(
strcmp
(
*
argv
,
"-text"
)
==
0
)
text
=
1
;
text
=
1
;
else
if
(
strcmp
(
*
argv
,
"-print"
)
==
0
)
p7_print
=
1
;
else
if
(
strcmp
(
*
argv
,
"-print_certs"
)
==
0
)
else
if
(
strcmp
(
*
argv
,
"-print_certs"
)
==
0
)
print_certs
=
1
;
print_certs
=
1
;
#ifndef OPENSSL_NO_ENGINE
#ifndef OPENSSL_NO_ENGINE
...
@@ -238,6 +240,9 @@ bad:
...
@@ -238,6 +240,9 @@ bad:
}
}
}
}
if
(
p7_print
)
PKCS7_print
(
out
,
p7
,
0
,
NULL
);
if
(
print_certs
)
if
(
print_certs
)
{
{
STACK_OF
(
X509
)
*
certs
=
NULL
;
STACK_OF
(
X509
)
*
certs
=
NULL
;
...
...
crypto/asn1/asn1.h
浏览文件 @
9194296d
...
@@ -317,6 +317,13 @@ typedef struct ASN1_VALUE_st ASN1_VALUE;
...
@@ -317,6 +317,13 @@ typedef struct ASN1_VALUE_st ASN1_VALUE;
type *name##_new(void); \
type *name##_new(void); \
void name##_free(type *a);
void name##_free(type *a);
#define DECLARE_ASN1_PRINT_FUNCTION(stname) \
DECLARE_ASN1_PRINT_FUNCTION_fname(stname, stname)
#define DECLARE_ASN1_PRINT_FUNCTION_fname(stname, fname) \
int fname##_print(BIO *out, stname *x, int indent, \
const ASN1_PCTX *pctx);
#define D2I_OF(type) type *(*)(type **,const unsigned char **,long)
#define D2I_OF(type) type *(*)(type **,const unsigned char **,long)
#define I2D_OF(type) int (*)(type *,unsigned char **)
#define I2D_OF(type) int (*)(type *,unsigned char **)
#define I2D_OF_const(type) int (*)(const type *,unsigned char **)
#define I2D_OF_const(type) int (*)(const type *,unsigned char **)
...
@@ -1011,6 +1018,8 @@ ASN1_TYPE *ASN1_generate_v3(char *str, X509V3_CTX *cnf);
...
@@ -1011,6 +1018,8 @@ ASN1_TYPE *ASN1_generate_v3(char *str, X509V3_CTX *cnf);
/* Don't show structure name even at top level */
/* Don't show structure name even at top level */
#define ASN1_PCTX_FLAGS_NO_STRUCT_NAME 0x100
#define ASN1_PCTX_FLAGS_NO_STRUCT_NAME 0x100
int
ASN1_item_print
(
BIO
*
out
,
ASN1_VALUE
*
ifld
,
int
indent
,
const
ASN1_ITEM
*
it
,
const
ASN1_PCTX
*
pctx
);
ASN1_PCTX
*
ASN1_PCTX_new
(
void
);
ASN1_PCTX
*
ASN1_PCTX_new
(
void
);
void
ASN1_PCTX_free
(
ASN1_PCTX
*
p
);
void
ASN1_PCTX_free
(
ASN1_PCTX
*
p
);
unsigned
long
ASN1_PCTX_get_flags
(
ASN1_PCTX
*
p
);
unsigned
long
ASN1_PCTX_get_flags
(
ASN1_PCTX
*
p
);
...
...
crypto/asn1/asn1t.h
浏览文件 @
9194296d
...
@@ -832,6 +832,17 @@ typedef struct ASN1_AUX_st {
...
@@ -832,6 +832,17 @@ typedef struct ASN1_AUX_st {
return ASN1_item_dup(ASN1_ITEM_rptr(stname), x); \
return ASN1_item_dup(ASN1_ITEM_rptr(stname), x); \
}
}
#define IMPLEMENT_ASN1_PRINT_FUNCTION(stname) \
IMPLEMENT_ASN1_PRINT_FUNCTION_fname(stname, stname, stname)
#define IMPLEMENT_ASN1_PRINT_FUNCTION_fname(stname, itname, fname) \
int fname##_print(BIO *out, stname *x, int indent, \
const ASN1_PCTX *pctx) \
{ \
return ASN1_item_print(out, (ASN1_VALUE *)x, indent, \
ASN1_ITEM_rptr(itname), pctx); \
}
#define IMPLEMENT_ASN1_FUNCTIONS_const(name) \
#define IMPLEMENT_ASN1_FUNCTIONS_const(name) \
IMPLEMENT_ASN1_FUNCTIONS_const_fname(name, name, name)
IMPLEMENT_ASN1_FUNCTIONS_const_fname(name, name, name)
...
...
crypto/asn1/tasn_prn.c
浏览文件 @
9194296d
...
@@ -161,12 +161,15 @@ static int asn1_item_print_ctx(BIO *out, ASN1_VALUE **fld, int indent,
...
@@ -161,12 +161,15 @@ static int asn1_item_print_ctx(BIO *out, ASN1_VALUE **fld, int indent,
const
ASN1_ITEM
*
it
,
const
ASN1_ITEM
*
it
,
const
char
*
fname
,
const
char
*
sname
,
const
char
*
fname
,
const
char
*
sname
,
int
nohdr
,
const
ASN1_PCTX
*
pctx
);
int
nohdr
,
const
ASN1_PCTX
*
pctx
);
int
asn1_template_print_ctx
(
BIO
*
out
,
ASN1_VALUE
**
fld
,
int
indent
,
int
asn1_template_print_ctx
(
BIO
*
out
,
ASN1_VALUE
**
fld
,
int
indent
,
const
ASN1_TEMPLATE
*
tt
,
const
ASN1_PCTX
*
pctx
);
const
ASN1_TEMPLATE
*
tt
,
const
ASN1_PCTX
*
pctx
);
static
int
asn1_primitive_print
(
BIO
*
out
,
ASN1_VALUE
**
fld
,
static
int
asn1_primitive_print
(
BIO
*
out
,
ASN1_VALUE
**
fld
,
const
ASN1_ITEM
*
it
,
int
indent
,
const
ASN1_ITEM
*
it
,
int
indent
,
const
char
*
fname
,
const
char
*
sname
,
const
char
*
fname
,
const
char
*
sname
,
const
ASN1_PCTX
*
pctx
);
const
ASN1_PCTX
*
pctx
);
static
int
asn1_print_fsname
(
BIO
*
out
,
int
indent
,
static
int
asn1_print_fsname
(
BIO
*
out
,
int
indent
,
const
char
*
fname
,
const
char
*
sname
,
const
char
*
fname
,
const
char
*
sname
,
const
ASN1_PCTX
*
pctx
);
const
ASN1_PCTX
*
pctx
);
...
...
crypto/pkcs7/pk7_asn1.c
浏览文件 @
9194296d
...
@@ -212,3 +212,5 @@ ASN1_ITEM_TEMPLATE(PKCS7_ATTR_VERIFY) =
...
@@ -212,3 +212,5 @@ ASN1_ITEM_TEMPLATE(PKCS7_ATTR_VERIFY) =
ASN1_EX_TEMPLATE_TYPE
(
ASN1_TFLG_SEQUENCE_OF
|
ASN1_TFLG_IMPTAG
|
ASN1_TFLG_UNIVERSAL
,
ASN1_EX_TEMPLATE_TYPE
(
ASN1_TFLG_SEQUENCE_OF
|
ASN1_TFLG_IMPTAG
|
ASN1_TFLG_UNIVERSAL
,
V_ASN1_SET
,
PKCS7_ATTRIBUTES
,
X509_ATTRIBUTE
)
V_ASN1_SET
,
PKCS7_ATTRIBUTES
,
X509_ATTRIBUTE
)
ASN1_ITEM_TEMPLATE_END
(
PKCS7_ATTR_VERIFY
)
ASN1_ITEM_TEMPLATE_END
(
PKCS7_ATTR_VERIFY
)
IMPLEMENT_ASN1_PRINT_FUNCTION
(
PKCS7
)
crypto/pkcs7/pkcs7.h
浏览文件 @
9194296d
...
@@ -307,6 +307,7 @@ DECLARE_ASN1_ITEM(PKCS7_ATTR_SIGN)
...
@@ -307,6 +307,7 @@ DECLARE_ASN1_ITEM(PKCS7_ATTR_SIGN)
DECLARE_ASN1_ITEM
(
PKCS7_ATTR_VERIFY
)
DECLARE_ASN1_ITEM
(
PKCS7_ATTR_VERIFY
)
DECLARE_ASN1_NDEF_FUNCTION
(
PKCS7
)
DECLARE_ASN1_NDEF_FUNCTION
(
PKCS7
)
DECLARE_ASN1_PRINT_FUNCTION
(
PKCS7
)
long
PKCS7_ctrl
(
PKCS7
*
p7
,
int
cmd
,
long
larg
,
char
*
parg
);
long
PKCS7_ctrl
(
PKCS7
*
p7
,
int
cmd
,
long
larg
,
char
*
parg
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录