diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2014-05-24 20:06:54 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2014-05-29 19:00:01 +0200 |
commit | 3fca2cf35c6ddc4c44818e87a10506b505316f51 (patch) | |
tree | f5310184c3b692226bc14e83d291465b5add9411 /lib/opencdk | |
parent | e62d7cbda315a68bf1a137c97c1527f160b29baf (diff) | |
download | gnutls-3fca2cf35c6ddc4c44818e87a10506b505316f51.tar.gz |
Removed unused function.
Diffstat (limited to 'lib/opencdk')
-rw-r--r-- | lib/opencdk/armor.c | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/lib/opencdk/armor.c b/lib/opencdk/armor.c index be56b871e2..725bbe3a7c 100644 --- a/lib/opencdk/armor.c +++ b/lib/opencdk/armor.c @@ -146,48 +146,6 @@ static const char *valid_headers[] = { static char b64chars[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; -/* Return the compression algorithm in @r_zipalgo. - If the parameter is not set after execution, - the stream is not compressed. */ -static int compress_get_algo(cdk_stream_t inp, int *r_zipalgo) -{ - byte plain[512]; - char buf[128]; - int nread, pkttype; - size_t plain_size; - - if (r_zipalgo) - *r_zipalgo = 0; - - cdk_stream_seek(inp, 0); - while (!cdk_stream_eof(inp)) { - nread = _cdk_stream_gets(inp, buf, DIM(buf) - 1); - if (!nread || nread == -1) - break; - if (nread == 1 && !cdk_stream_eof(inp) - && (nread = - _cdk_stream_gets(inp, buf, DIM(buf) - 1)) > 0) { - plain_size = sizeof(plain); - base64_decode(buf, nread, (char *) plain, - &plain_size); - if (!(*plain & 0x80)) - break; - pkttype = - *plain & 0x40 ? (*plain & 0x3f) - : ((*plain >> 2) & 0xf); - if (pkttype == CDK_PKT_COMPRESSED && r_zipalgo) { - _gnutls_buffers_log - ("armor compressed (algo=%d)\n", - *(plain + 1)); - *r_zipalgo = *(plain + 1); - } - break; - } - } - return 0; -} - - static u32 update_crc(u32 crc, const byte * buf, size_t buflen) { unsigned int j; |