expcov report - Generated Sat Oct 15 21:39:18 2016

 Index  Statistics  Last 
Directory./server
Filenameutil_md5.c
ModifiedWed Jul 12 12:38:44 2006

Pass Half Fail Excluded Total
Function
0
0.00%
4
100.00%
0
0.00%
4
100%
Expressions
0
0.00%
74
100.00%
0
0.00%
74
100%
Conditions
0
0.00%
0
0.00%
3
100.00%
0
0.00%
3
100%
MC/DC
0
0.00%
0
0.00%
0
0.00%
0
100%
Branches

if
0
0.00%
0
0.00%
0
0.00%
0
0.00%
0
100%
for
0
0.00%
0
0.00%
2
100.00%
0
0.00%
2
100%
while
0
0.00%
0
0.00%
1
100.00%
0
0.00%
1
100%
case
0
0.00%
0
0.00%
0
0.00%
0
0.00%
0
100%

1/* Licensed to the Apache Software Foundation (ASF) under one or more
2 * contributor license agreements.  See the NOTICE file distributed with
3 * this work for additional information regarding copyright ownership.
4 * The ASF licenses this file to You under the Apache License, Version 2.0
5 * (the "License"); you may not use this file except in compliance with
6 * the License.  You may obtain a copy of the License at
7 *
8 *     http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17/************************************************************************
18 * NCSA HTTPd Server
19 * Software Development Group
20 * National Center for Supercomputing Applications
21 * University of Illinois at Urbana-Champaign
22 * 605 E. Springfield, Champaign, IL 61820
23 * httpd@ncsa.uiuc.edu
24 *
25 * Copyright  (C)  1995, Board of Trustees of the University of Illinois
26 *
27 ************************************************************************
28 *
29 * md5.c: NCSA HTTPd code which uses the md5c.c RSA Code
30 *
31 *  Original Code Copyright (C) 1994, Jeff Hostetler, Spyglass, Inc.
32 *  Portions of Content-MD5 code Copyright (C) 1993, 1994 by Carnegie Mellon
33 *     University (see Copyright below).
34 *  Portions of Content-MD5 code Copyright (C) 1991 Bell Communications
35 *     Research, Inc. (Bellcore) (see Copyright below).
36 *  Portions extracted from mpack, John G. Myers - jgm+@cmu.edu
37 *  Content-MD5 Code contributed by Martin Hamilton (martin@net.lut.ac.uk)
38 *
39 */
40
41
42
43/* md5.c --Module Interface to MD5. */
44/* Jeff Hostetler, Spyglass, Inc., 1994. */
45
46#include "ap_config.h"
47#include "apr_portable.h"
48#include "apr_strings.h"
49#include "httpd.h"
50#include "util_md5.h"
51#include "util_ebcdic.h"
52
53AP_DECLARE(char *) ap_md5_binary : call=0
a
p_md5_binary(apr_pool_t *p, const unsigned char *buf, int length)
54{
55    const char *hex = "0123456789abcdef";
56    apr_md5_ctx_t my_md5;
57    unsigned char hash[APR_MD5_DIGESTSIZE];
58    char *r, result[33]; /* (MD5_DIGESTSIZE * 2) + 1 */
59    int i;
60
61    /*
62     * Take the MD5 hash of the string argument.
63     */
64
65    apr_md5_init : enter=0, leave=0

apr_md5_init : /usr/include/apr-1/apr_md5.h line=91 column=27
a
pr_md5_init(&my_md5 : server/util_md5.c line=56 column=19
m
y_md5);
66#if APR_CHARSET_EBCDIC
67    apr_md5_set_xlate(&my_md5, ap_hdrs_to_ascii);
68#endif
69    apr_md5_update : enter=0, leave=0

apr_md5_update : /usr/include/apr-1/apr_md5.h line=109 column=27
a
pr_md5_update(&my_md5 : server/util_md5.c line=56 column=19
m
y_md5, buf : server/util_md5.c line=53 column=70
b
uf, (unsigned int)length : server/util_md5.c line=53 column=79
l
ength);
70    apr_md5_final : enter=0, leave=0

apr_md5_final : /usr/include/apr-1/apr_md5.h line=119 column=27
a
pr_md5_final(hash : server/util_md5.c line=57 column=19
h
ash, &my_md5 : server/util_md5.c line=56 column=19
m
y_md5);
71
72    for : true=0, false=0
f
or (i : server/util_md5.c line=59 column=9
i
 = : pass=0
=
 0, r : server/util_md5.c line=58 column=11
r
 = : pass=0
=
 result : server/util_md5.c line=58 column=14
r
esult; i : server/util_md5.c line=59 column=9
i
 < : true=0, false=0
<
 APR_MD5_DIGESTSIZE; i : server/util_md5.c line=59 column=9
i
++ : pass=0
+
+) {
73        *r : server/util_md5.c line=58 column=11
r
++ : pass=0
+
= : enter=0, leave=0
=
 hex : server/util_md5.c line=55 column=17
h
ex[] : enter=0, leave=0
[
hash : server/util_md5.c line=57 column=19
h
ash[] : enter=0, leave=0
[
i : server/util_md5.c line=59 column=9
i
>> : pass=0
>
> 4];
74        *r : server/util_md5.c line=58 column=11
r
++ : pass=0
+
= : enter=0, leave=0
=
 hex : server/util_md5.c line=55 column=17
h
ex[] : enter=0, leave=0
[
hash : server/util_md5.c line=57 column=19
h
ash[] : enter=0, leave=0
[
i : server/util_md5.c line=59 column=9
i
& : pass=0
&
 0xF];
75    }
76    *r : server/util_md5.c line=58 column=11
r
 = : enter=0, leave=0
=
 '\0';
77
78    return : pass=0
r
eturn apr_pstrndup : enter=0, leave=0

apr_pstrndup : /usr/include/apr-1/apr_strings.h line=121 column=21
a
pr_pstrndup(p : server/util_md5.c line=53 column=46
p
result : server/util_md5.c line=58 column=14
r
esult, APR_MD5_DIGESTSIZE* : pass=0
*
2);
79}
80
81AP_DECLARE(char *) ap_md5 : call=0
a
p_md5(apr_pool_t *p, const unsigned char *string)
82{
83    return : pass=0
r
eturn ap_md5_binary : enter=0, leave=0

ap_md5_binary : server/util_md5.c line=53 column=20
a
p_md5_binary(p : server/util_md5.c line=81 column=39
p
string : server/util_md5.c line=81 column=63
s
tring, (int) strlen : enter=0, leave=0

strlen : /usr/include/string.h line=399 column=15
s
trlen((char *)string : server/util_md5.c line=81 column=63
s
tring));
84}
85
86/* these portions extracted from mpack, John G. Myers - jgm+@cmu.edu */
87
88/* (C) Copyright 1993,1994 by Carnegie Mellon University
89 * All Rights Reserved.
90 *
91 * Permission to use, copy, modify, distribute, and sell this software
92 * and its documentation for any purpose is hereby granted without
93 * fee, provided that the above copyright notice appear in all copies
94 * and that both that copyright notice and this permission notice
95 * appear in supporting documentation, and that the name of Carnegie
96 * Mellon University not be used in advertising or publicity
97 * pertaining to distribution of the software without specific,
98 * written prior permission.  Carnegie Mellon University makes no
99 * representations about the suitability of this software for any
100 * purpose.  It is provided "as is" without express or implied
101 * warranty.
102 *
103 * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO
104 * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
105 * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE
106 * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
107 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN
108 * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
109 * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
110 * SOFTWARE.
111 */
112
113/*
114 * Copyright (c) 1991 Bell Communications Research, Inc. (Bellcore)
115 *
116 * Permission to use, copy, modify, and distribute this material
117 * for any purpose and without fee is hereby granted, provided
118 * that the above copyright notice and this permission notice
119 * appear in all copies, and that the name of Bellcore not be
120 * used in advertising or publicity pertaining to this
121 * material without the specific, prior written permission
122 * of an authorized representative of Bellcore.  BELLCORE
123 * MAKES NO REPRESENTATIONS ABOUT THE ACCURACY OR SUITABILITY
124 * OF THIS MATERIAL FOR ANY PURPOSE.  IT IS PROVIDED "AS IS",
125 * WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES.
126 */
127
128static char basis_64[] =
129"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
130
131AP_DECLARE(char *) ap_md5contextTo64 : call=0
a
p_md5contextTo64(apr_pool_t *a, apr_md5_ctx_t *context)
132{
133    unsigned char digest[18];
134    char *encodedDigest;
135    int i;
136    char *p;
137
138    encodedDigest : server/util_md5.c line=134 column=11
e
ncodedDigest = : pass=0
=
 (char *) apr_pcalloc(a : server/util_md5.c line=131 column=50
a
, 25 * : pass=0
*
 sizeof(char));
139
140    apr_md5_final : enter=0, leave=0

apr_md5_final : /usr/include/apr-1/apr_md5.h line=119 column=27
a
pr_md5_final(digest : server/util_md5.c line=133 column=19
d
igest, context : server/util_md5.c line=131 column=68
c
ontext);
141    digest : server/util_md5.c line=133 column=19
d
igest[sizeof(digest) - : pass=0
-
 1] = : enter=0, leave=0
=
 digest : server/util_md5.c line=133 column=19
d
igest[sizeof(digest) - : pass=0
-
 2] = : enter=0, leave=0
=
 0;
142
143    p : server/util_md5.c line=136 column=11
p
 = : pass=0
=
 encodedDigest : server/util_md5.c line=134 column=11
e
ncodedDigest;
144    for : true=0, false=0
f
or (i : server/util_md5.c line=135 column=9
i
 = : pass=0
=
 0; i : server/util_md5.c line=135 column=9
i
 < : true=0, false=0
<
 sizeof(digest); i : server/util_md5.c line=135 column=9
i
 += : pass=0
+
= 3) {
145        *p : server/util_md5.c line=136 column=11
p
++ : pass=0
+
= : enter=0, leave=0
=
 basis_64 : server/util_md5.c line=128 column=13
b
asis_64[] : enter=0, leave=0
[
digest : server/util_md5.c line=133 column=19
d
igest[] : enter=0, leave=0
[
i : server/util_md5.c line=135 column=9
i
>> : pass=0
>
> 2];
146        *p : server/util_md5.c line=136 column=11
p
++ : pass=0
+
= : enter=0, leave=0
=
 basis_64 : server/util_md5.c line=128 column=13
b
asis_64[] : enter=0, leave=0
[
((digest : server/util_md5.c line=133 column=19
d
igest[] : enter=0, leave=0
[
i : server/util_md5.c line=135 column=9
i
& : pass=0
&
 0x3) << : pass=0
<
< 4) | : pass=0
|
 ((int) (digest : server/util_md5.c line=133 column=19
d
igest[] : enter=0, leave=0
[
i : server/util_md5.c line=135 column=9
i
 + : pass=0
+
 1] & : pass=0
&
 0xF0) >> : pass=0
>
> 4)];
147        *p : server/util_md5.c line=136 column=11
p
++ : pass=0
+
= : enter=0, leave=0
=
 basis_64 : server/util_md5.c line=128 column=13
b
asis_64[] : enter=0, leave=0
[
((digest : server/util_md5.c line=133 column=19
d
igest[] : enter=0, leave=0
[
i : server/util_md5.c line=135 column=9
i
 + : pass=0
+
 1] & : pass=0
&
 0xF) << : pass=0
<
< 2) | : pass=0
|
 ((int) (digest : server/util_md5.c line=133 column=19
d
igest[] : enter=0, leave=0
[
i : server/util_md5.c line=135 column=9
i
 + : pass=0
+
 2] & : pass=0
&
 0xC0) >> : pass=0
>
> 6)];
148        *p : server/util_md5.c line=136 column=11
p
++ : pass=0
+
= : enter=0, leave=0
=
 basis_64 : server/util_md5.c line=128 column=13
b
asis_64[] : enter=0, leave=0
[
digest : server/util_md5.c line=133 column=19
d
igest[] : enter=0, leave=0
[
i : server/util_md5.c line=135 column=9
i
 + : pass=0
+
 2] & : pass=0
&
 0x3F];
149    }
150    *p : server/util_md5.c line=136 column=11
p
-- : pass=0
-
= : enter=0, leave=0
=
 '\0';
151    *p : server/util_md5.c line=136 column=11
p
-- : pass=0
-
= : enter=0, leave=0
=
 '=';
152    *p : server/util_md5.c line=136 column=11
p
-- : pass=0
-
= : enter=0, leave=0
=
 '=';
153    return : pass=0
r
eturn encodedDigest : server/util_md5.c line=134 column=11
e
ncodedDigest;
154}
155
156AP_DECLARE(char *) ap_md5digest : call=0
a
p_md5digest(apr_pool_t *p, apr_file_t *infile)
157{
158    apr_md5_ctx_t context;
159    unsigned char buf[4096]; /* keep this a multiple of 64 */
160    apr_size_t nbytes;
161    apr_off_t offset = 0L;
162
163    apr_md5_init : enter=0, leave=0

apr_md5_init : /usr/include/apr-1/apr_md5.h line=91 column=27
a
pr_md5_init(&context : server/util_md5.c line=158 column=19
c
ontext);
164    nbytes : server/util_md5.c line=160 column=16
n
bytes = : pass=0
=
 sizeof(buf);
165    while : true=0, false=0
w
hile (apr_file_read : enter=0, leave=0

apr_file_read : /usr/include/apr-1/apr_file_io.h line=407 column=27
a
pr_file_read(infile : server/util_md5.c line=156 column=60
i
nfile, buf : server/util_md5.c line=159 column=19
b
uf, &nbytes : server/util_md5.c line=160 column=16
n
bytes) == : true=0, false=0
=
= APR_SUCCESS) {
166        apr_md5_update : enter=0, leave=0

apr_md5_update : /usr/include/apr-1/apr_md5.h line=109 column=27
a
pr_md5_update(&context : server/util_md5.c line=158 column=19
c
ontext, buf : server/util_md5.c line=159 column=19
b
uf, nbytes : server/util_md5.c line=160 column=16
n
bytes);
167        nbytes : server/util_md5.c line=160 column=16
n
bytes = : pass=0
=
 sizeof(buf);
168    }
169    apr_file_seek : enter=0, leave=0

apr_file_seek : /usr/include/apr-1/apr_file_io.h line=630 column=27
a
pr_file_seek(infile : server/util_md5.c line=156 column=60
i
nfile, APR_SET, &offset : server/util_md5.c line=161 column=15
o
ffset);
170    return : pass=0
r
eturn ap_md5contextTo64 : enter=0, leave=0

ap_md5contextTo64 : server/util_md5.c line=131 column=20
a
p_md5contextTo64(p : server/util_md5.c line=156 column=45
p
, &context : server/util_md5.c line=158 column=19
c
ontext);
171}
172
173[EOF]


Generated by expcov