RLE is a no-op only for testing. Remove it.
Reviewed-by: Richard Levitte <levitte@openssl.org>
LIB=$(TOP)/libcrypto.a
LIBSRC= comp_lib.c comp_err.c \
- c_rle.c c_zlib.c
+ c_zlib.c
LIBOBJ= comp_lib.o comp_err.o \
- c_rle.o c_zlib.o
+ c_zlib.o
SRC= $(LIBSRC)
# DO NOT DELETE THIS LINE -- make depend depends on it.
-c_rle.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
-c_rle.o: ../../include/openssl/comp.h ../../include/openssl/crypto.h
-c_rle.o: ../../include/openssl/e_os2.h ../../include/openssl/obj_mac.h
-c_rle.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
-c_rle.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h
-c_rle.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
-c_rle.o: ../../include/openssl/symhacks.h c_rle.c
c_zlib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
c_zlib.o: ../../include/openssl/comp.h ../../include/openssl/crypto.h
c_zlib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
+++ /dev/null
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <openssl/objects.h>
-#include <openssl/comp.h>
-
-static int rle_compress_block(COMP_CTX *ctx, unsigned char *out,
- unsigned int olen, unsigned char *in,
- unsigned int ilen);
-static int rle_expand_block(COMP_CTX *ctx, unsigned char *out,
- unsigned int olen, unsigned char *in,
- unsigned int ilen);
-
-static COMP_METHOD rle_method = {
- NID_rle_compression,
- LN_rle_compression,
- NULL,
- NULL,
- rle_compress_block,
- rle_expand_block,
- NULL,
- NULL,
-};
-
-COMP_METHOD *COMP_rle(void)
-{
- return (&rle_method);
-}
-
-static int rle_compress_block(COMP_CTX *ctx, unsigned char *out,
- unsigned int olen, unsigned char *in,
- unsigned int ilen)
-{
- /* int i; */
-
- if (olen < (ilen + 1)) {
- /* ZZZZZZZZZZZZZZZZZZZZZZ */
- return (-1);
- }
-
- *(out++) = 0;
- memcpy(out, in, ilen);
- return (ilen + 1);
-}
-
-static int rle_expand_block(COMP_CTX *ctx, unsigned char *out,
- unsigned int olen, unsigned char *in,
- unsigned int ilen)
-{
- int i;
-
- if (ilen == 0 || olen < (ilen - 1)) {
- /* ZZZZZZZZZZZZZZZZZZZZZZ */
- return (-1);
- }
-
- i = *(in++);
- if (i == 0) {
- memcpy(out, in, ilen - 1);
- }
- return (ilen - 1);
-}
"p12_init,p12_key,p12_kiss,p12_mutl,"+ -
"p12_utl,p12_npas,pk12err,p12_p8d,p12_p8e"
$ LIB_COMP = "comp_lib,comp_err,"+ -
- "c_rle,c_zlib"
+ "c_zlib"
$ LIB_OCSP = "ocsp_asn,ocsp_ext,ocsp_ht,ocsp_lib,ocsp_cl,"+ -
"ocsp_srv,ocsp_prn,ocsp_vfy,ocsp_err,v3_ocsp"
$ LIB_UI = "ui_err,ui_lib,ui_openssl,ui_util"
#endif
/*
- * There is really no standard for this, so let's assign some tentative
- * numbers. In any case, these numbers are only for this test
+ * There is really no standard for this, so let's assign something
+ * only for this test
*/
-#define COMP_RLE 255
#define COMP_ZLIB 1
static int verify_callback(int ok, X509_STORE_CTX *ctx);
fprintf(stderr,
" -time - measure processor time used by client and server\n");
fprintf(stderr, " -zlib - use zlib compression\n");
- fprintf(stderr, " -rle - use rle compression\n");
#ifndef OPENSSL_NO_EC
fprintf(stderr,
" -named_curve arg - Elliptic curve name to use for ephemeral ECDH keys.\n"
#ifndef OPENSSL_NO_COMP
else if (strcmp(*argv, "-zlib") == 0) {
comp = COMP_ZLIB;
- } else if (strcmp(*argv, "-rle") == 0) {
- comp = COMP_RLE;
}
#endif
else if (strcmp(*argv, "-named_curve") == 0) {
#ifndef OPENSSL_NO_COMP
if (comp == COMP_ZLIB)
cm = COMP_zlib();
- if (comp == COMP_RLE)
- cm = COMP_rle();
if (cm != NULL) {
if (cm->type != NID_undef) {
if (SSL_COMP_add_compression_method(comp, cm) != 0) {
} else {
fprintf(stderr,
"Warning: %s compression not supported\n",
- (comp == COMP_RLE ? "rle" :
- (comp == COMP_ZLIB ? "zlib" : "unknown")));
+ comp == COMP_ZLIB ? "zlib" : "unknown");
ERR_print_errors_fp(stderr);
}
}