Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
TLMSP OpenSSL
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
CYBER - Cyber Security
TS 103 523 MSP
TLMSP
TLMSP OpenSSL
Commits
62178961
Commit
62178961
authored
17 years ago
by
Dr. Stephen Henson
Browse files
Options
Downloads
Patches
Plain Diff
Improve error detection when streaming S/MIME.
Only use streaming when appropriate for detached data in smime utility.
parent
ee7ca094
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
apps/smime.c
+10
-3
10 additions, 3 deletions
apps/smime.c
crypto/pkcs7/bio_pk7.c
+13
-1
13 additions, 1 deletion
crypto/pkcs7/bio_pk7.c
crypto/pkcs7/pk7_lib.c
+0
-5
0 additions, 5 deletions
crypto/pkcs7/pk7_lib.c
with
23 additions
and
9 deletions
apps/smime.c
+
10
−
3
View file @
62178961
...
...
@@ -688,15 +688,22 @@ int MAIN(int argc, char **argv)
else
if
(
operation
&
SMIME_SIGNERS
)
{
int
i
;
/* If detached data
and SMIME output enable partial
*
signing
.
/* If detached data
content we only enable streaming if
*
S/MIME output format
.
*/
if
(
operation
==
SMIME_SIGN
)
{
if
(
indef
||
(
flags
&
PKCS7_DETACHED
))
if
(
flags
&
PKCS7_DETACHED
)
{
if
(
outformat
==
FORMAT_SMIME
)
flags
|=
PKCS7_STREAM
;
}
else
if
(
indef
)
flags
|=
PKCS7_STREAM
;
flags
|=
PKCS7_PARTIAL
;
p7
=
PKCS7_sign
(
NULL
,
NULL
,
other
,
in
,
flags
);
if
(
!
p7
)
goto
end
;
}
else
flags
|=
PKCS7_REUSE_DIGEST
;
...
...
This diff is collapsed.
Click to expand it.
crypto/pkcs7/bio_pk7.c
+
13
−
1
View file @
62178961
...
...
@@ -114,13 +114,17 @@ BIO *BIO_new_PKCS7(BIO *out, PKCS7 *p7)
out
=
BIO_push
(
asn_bio
,
out
);
if
(
!
p7aux
||
!
asn_bio
||
!
out
)
goto
err
;
BIO_asn1_set_prefix
(
asn_bio
,
pkcs7_prefix
,
pkcs7_prefix_free
);
BIO_asn1_set_suffix
(
asn_bio
,
pkcs7_suffix
,
pkcs7_suffix_free
);
/* Now initialize BIO for PKCS#7 output */
p7bio
=
PKCS7_dataInit
(
p7
,
out
);
PKCS7_stream
(
&
boundary
,
p7
);
if
(
!
p7bio
||
!
PKCS7_stream
(
&
boundary
,
p7
))
goto
err
;
p7aux
->
p7
=
p7
;
p7aux
->
p7bio
=
p7bio
;
...
...
@@ -131,6 +135,14 @@ BIO *BIO_new_PKCS7(BIO *out, PKCS7 *p7)
return
p7bio
;
err:
if
(
p7bio
)
BIO_free
(
p7bio
);
if
(
asn_bio
)
BIO_free
(
asn_bio
);
if
(
p7aux
)
OPENSSL_free
(
p7aux
);
return
NULL
;
}
static
int
pkcs7_prefix
(
BIO
*
b
,
unsigned
char
**
pbuf
,
int
*
plen
,
void
*
parg
)
...
...
This diff is collapsed.
Click to expand it.
crypto/pkcs7/pk7_lib.c
+
0
−
5
View file @
62178961
...
...
@@ -665,8 +665,3 @@ int PKCS7_stream(unsigned char ***boundary, PKCS7 *p7)
return
1
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment