projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Synchronise with Unix
[oweals/openssl.git]
/
demos
/
b64.c
diff --git
a/demos/b64.c
b/demos/b64.c
index 42abc42d33eb8f761a10e05735266ee8ab844e5d..efdd44457da6b7ce6abc4423cea572202990d310 100644
(file)
--- a/
demos/b64.c
+++ b/
demos/b64.c
@@
-59,13
+59,13
@@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "apps.h"
-#include
"buffer.h"
-#include
"err.h"
-#include
"evp.h"
-#include
"objects.h"
-#include
"x509.h"
-#include
"pem.h"
+#include "
../apps/
apps.h"
+#include
<openssl/buffer.h>
+#include
<openssl/err.h>
+#include
<openssl/evp.h>
+#include
<openssl/objects.h>
+#include
<openssl/x509.h>
+#include
<openssl/pem.h>
#undef SIZE
#undef BSIZE
#undef SIZE
#undef BSIZE
@@
-83,7
+83,6
@@
char **argv;
unsigned char *buff=NULL,*bufsize=NULL;
int bsize=BSIZE,verbose=0;
int ret=1,inl;
unsigned char *buff=NULL,*bufsize=NULL;
int bsize=BSIZE,verbose=0;
int ret=1,inl;
- unsigned char key[24],iv[MD5_DIGEST_LENGTH];
char *str=NULL;
char *hkey=NULL,*hiv=NULL;
int enc=1,printkey=0,i,base64=0;
char *str=NULL;
char *hkey=NULL,*hiv=NULL;
int enc=1,printkey=0,i,base64=0;
@@
-91,8
+90,7
@@
char **argv;
EVP_CIPHER *cipher=NULL,*c;
char *inf=NULL,*outf=NULL;
BIO *in=NULL,*out=NULL,*b64=NULL,*benc=NULL,*rbio=NULL,*wbio=NULL;
EVP_CIPHER *cipher=NULL,*c;
char *inf=NULL,*outf=NULL;
BIO *in=NULL,*out=NULL,*b64=NULL,*benc=NULL,*rbio=NULL,*wbio=NULL;
-#define PROG_NAME_SIZE 16
- char pname[PROG_NAME_SIZE];
+#define PROG_NAME_SIZE 39
apps_startup();
apps_startup();
@@
-177,11
+175,11
@@
bad:
if (verbose) BIO_printf(bio_err,"bufsize=%d\n",bsize);
}
if (verbose) BIO_printf(bio_err,"bufsize=%d\n",bsize);
}
- strbuf=
M
alloc(SIZE);
- buff=(unsigned char *)
M
alloc(EVP_ENCODE_LENGTH(bsize));
+ strbuf=
OPENSSL_m
alloc(SIZE);
+ buff=(unsigned char *)
OPENSSL_m
alloc(EVP_ENCODE_LENGTH(bsize));
if ((buff == NULL) || (strbuf == NULL))
{
if ((buff == NULL) || (strbuf == NULL))
{
- BIO_printf(bio_err,"
M
alloc failure\n");
+ BIO_printf(bio_err,"
OPENSSL_m
alloc failure\n");
goto end;
}
goto end;
}
@@
-259,8
+257,8
@@
bad:
BIO_printf(bio_err,"bytes written:%8ld\n",BIO_number_written(out));
}
end:
BIO_printf(bio_err,"bytes written:%8ld\n",BIO_number_written(out));
}
end:
- if (strbuf != NULL)
F
ree(strbuf);
- if (buff != NULL)
F
ree(buff);
+ if (strbuf != NULL)
OPENSSL_f
ree(strbuf);
+ if (buff != NULL)
OPENSSL_f
ree(buff);
if (in != NULL) BIO_free(in);
if (out != NULL) BIO_free(out);
if (benc != NULL) BIO_free(benc);
if (in != NULL) BIO_free(in);
if (out != NULL) BIO_free(out);
if (benc != NULL) BIO_free(benc);