projects
/
oweals
/
openssl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
As with RSA, which was modified recently, this change makes it possible to
[oweals/openssl.git]
/
crypto
/
comp
/
comp_lib.c
diff --git
a/crypto/comp/comp_lib.c
b/crypto/comp/comp_lib.c
index 8ce06951af1b4db34674571283ce426967158f91..b60ae371e8d133da1fb3af17df26b68dd205ccdb 100644
(file)
--- a/
crypto/comp/comp_lib.c
+++ b/
crypto/comp/comp_lib.c
@@
-1,15
+1,14
@@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include
"objects.h"
-#include
"comp.h"
+#include
<openssl/objects.h>
+#include
<openssl/comp.h>
-COMP_CTX *COMP_CTX_new(meth)
-COMP_METHOD *meth;
+COMP_CTX *COMP_CTX_new(COMP_METHOD *meth)
{
COMP_CTX *ret;
{
COMP_CTX *ret;
- if ((ret=(COMP_CTX *)
M
alloc(sizeof(COMP_CTX))) == NULL)
+ if ((ret=(COMP_CTX *)
OPENSSL_m
alloc(sizeof(COMP_CTX))) == NULL)
{
/* ZZZZZZZZZZZZZZZZ */
return(NULL);
{
/* ZZZZZZZZZZZZZZZZ */
return(NULL);
@@
-18,33
+17,25
@@
COMP_METHOD *meth;
ret->meth=meth;
if ((ret->meth->init != NULL) && !ret->meth->init(ret))
{
ret->meth=meth;
if ((ret->meth->init != NULL) && !ret->meth->init(ret))
{
-
F
ree(ret);
+
OPENSSL_f
ree(ret);
ret=NULL;
}
ret=NULL;
}
-#if 0
- else
- CRYPTO_new_ex_data(rsa_meth,(char *)ret,&ret->ex_data);
-#endif
return(ret);
}
return(ret);
}
-void COMP_CTX_free(ctx)
-COMP_CTX *ctx;
+void COMP_CTX_free(COMP_CTX *ctx)
{
{
- /* CRYPTO_free_ex_data(rsa_meth,(char *)ctx,&ctx->ex_data); */
+ if(ctx == NULL)
+ return;
if (ctx->meth->finish != NULL)
ctx->meth->finish(ctx);
if (ctx->meth->finish != NULL)
ctx->meth->finish(ctx);
-
F
ree(ctx);
+
OPENSSL_f
ree(ctx);
}
}
-int COMP_compress_block(ctx,out,olen,in,ilen)
-COMP_CTX *ctx;
-unsigned char *out;
-int olen;
-unsigned char *in;
-int ilen;
+int COMP_compress_block(COMP_CTX *ctx, unsigned char *out, int olen,
+ unsigned char *in, int ilen)
{
int ret;
if (ctx->meth->compress == NULL)
{
int ret;
if (ctx->meth->compress == NULL)
@@
-61,12
+52,8
@@
int ilen;
return(ret);
}
return(ret);
}
-int COMP_expand_block(ctx,out,olen,in,ilen)
-COMP_CTX *ctx;
-unsigned char *out;
-int olen;
-unsigned char *in;
-int ilen;
+int COMP_expand_block(COMP_CTX *ctx, unsigned char *out, int olen,
+ unsigned char *in, int ilen)
{
int ret;
{
int ret;