projects
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Reformat and "modernise" the sign.c demo.
[openssl.git]
/
demos
/
maurice
/
example3.c
diff --git
a/demos/maurice/example3.c
b/demos/maurice/example3.c
index fcaff00c370b0f1ffe8f3eca9ea05e2da48b61ce..c8462a47c3716d6fdb15d98e9591c661089f4744 100644
(file)
--- a/
demos/maurice/example3.c
+++ b/
demos/maurice/example3.c
@@
-8,9
+8,10
@@
*/
#include <stdio.h>
*/
#include <stdio.h>
+#include <unistd.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <sys/stat.h>
-#include <evp.h>
+#include <
openssl/
evp.h>
#define STDIN 0
#define STDOUT 1
#define STDIN 0
#define STDOUT 1
@@
-47,9
+48,9
@@
void do_cipher(char *pw, int operation)
{
char buf[BUFLEN];
char ebuf[BUFLEN + 8];
{
char buf[BUFLEN];
char ebuf[BUFLEN + 8];
- unsigned int ebuflen
, rc;
+ unsigned int ebuflen
; /* rc; */
unsigned char iv[EVP_MAX_IV_LENGTH], key[EVP_MAX_KEY_LENGTH];
unsigned char iv[EVP_MAX_IV_LENGTH], key[EVP_MAX_KEY_LENGTH];
- unsigned int ekeylen, net_ekeylen;
+ /* unsigned int ekeylen, net_ekeylen; */
EVP_CIPHER_CTX ectx;
memcpy(iv, INIT_VECTOR, sizeof(iv));
EVP_CIPHER_CTX ectx;
memcpy(iv, INIT_VECTOR, sizeof(iv));
@@
-82,5
+83,3
@@
void do_cipher(char *pw, int operation)
write(STDOUT, ebuf, ebuflen);
}
write(STDOUT, ebuf, ebuflen);
}
-
-