projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Return 2 from X509_NAME printing routine to add newline.
[oweals/openssl.git]
/
crypto
/
pkcs7
/
sign.c
diff --git
a/crypto/pkcs7/sign.c
b/crypto/pkcs7/sign.c
index 4a1d99860645063356801465ad3722c05045a883..8b59885f7ea1ccae12d3cba05b54cc296febba38 100644
(file)
--- a/
crypto/pkcs7/sign.c
+++ b/
crypto/pkcs7/sign.c
@@
-56,29
+56,38
@@
* [including the GNU Public Licence.]
*/
#include <stdio.h>
* [including the GNU Public Licence.]
*/
#include <stdio.h>
+#include <string.h>
#include <openssl/bio.h>
#include <openssl/x509.h>
#include <openssl/pem.h>
#include <openssl/bio.h>
#include <openssl/x509.h>
#include <openssl/pem.h>
+#include <openssl/err.h>
-main(argc,argv)
+
int
main(argc,argv)
int argc;
char *argv[];
{
X509 *x509;
EVP_PKEY *pkey;
PKCS7 *p7;
int argc;
char *argv[];
{
X509 *x509;
EVP_PKEY *pkey;
PKCS7 *p7;
- PKCS7 *p7_data;
PKCS7_SIGNER_INFO *si;
BIO *in;
BIO *data,*p7bio;
char buf[1024*4];
PKCS7_SIGNER_INFO *si;
BIO *in;
BIO *data,*p7bio;
char buf[1024*4];
- int i
,j
;
+ int i;
int nodetach=0;
int nodetach=0;
+#ifndef OPENSSL_NO_MD2
EVP_add_digest(EVP_md2());
EVP_add_digest(EVP_md2());
+#endif
+#ifndef OPENSSL_NO_MD5
EVP_add_digest(EVP_md5());
EVP_add_digest(EVP_md5());
+#endif
+#ifndef OPENSSL_NO_SHA1
EVP_add_digest(EVP_sha1());
EVP_add_digest(EVP_sha1());
+#endif
+#ifndef OPENSSL_NO_MDC2
EVP_add_digest(EVP_mdc2());
EVP_add_digest(EVP_mdc2());
+#endif
data=BIO_new(BIO_s_file());
again:
data=BIO_new(BIO_s_file());
again:
@@
-97,9
+106,9
@@
again:
BIO_set_fp(data,stdin,BIO_NOCLOSE);
if ((in=BIO_new_file("server.pem","r")) == NULL) goto err;
BIO_set_fp(data,stdin,BIO_NOCLOSE);
if ((in=BIO_new_file("server.pem","r")) == NULL) goto err;
- if ((x509=PEM_read_bio_X509(in,NULL,NULL)) == NULL) goto err;
+ if ((x509=PEM_read_bio_X509(in,NULL,NULL
,NULL
)) == NULL) goto err;
BIO_reset(in);
BIO_reset(in);
- if ((pkey=PEM_read_bio_PrivateKey(in,NULL,NULL)) == NULL) goto err;
+ if ((pkey=PEM_read_bio_PrivateKey(in,NULL,NULL
,NULL
)) == NULL) goto err;
BIO_free(in);
p7=PKCS7_new();
BIO_free(in);
p7=PKCS7_new();