line |
true |
false |
branch |
22
|
10 |
3 |
if (idx + 1 <= items) prng_name = SvPVX(ST(idx)); |
23
|
0 |
13 |
if (idx + 2 <= items) entropy = ST(idx + 1); |
26
|
0 |
13 |
if (!RETVAL) croak("FATAL: Newz failed"); |
29
|
0 |
13 |
if (id == -1) { |
37
|
0 |
13 |
if (rv != CRYPT_OK) { |
42
|
13 |
0 |
if (SvOK(entropy)) { |
|
13 |
0 |
if (SvOK(entropy)) { |
|
0 |
13 |
if (SvOK(entropy)) { |
43
|
0 |
0 |
ent = (unsigned char *) SvPVbyte(entropy, ent_len); |
45
|
0 |
0 |
if (rv != CRYPT_OK) { |
51
|
0 |
13 |
if (rng_get_bytes(entropy_buf, 40, NULL) != 40) { |
56
|
0 |
13 |
if (rv != CRYPT_OK) { |
62
|
0 |
13 |
if (rv != CRYPT_OK) { |
83
|
0 |
0 |
if (SvOK(entropy)) { |
|
0 |
0 |
if (SvOK(entropy)) { |
|
0 |
0 |
if (SvOK(entropy)) { |
84
|
0 |
0 |
in_buffer = (unsigned char *) SvPVbyte(entropy, in_len); |
86
|
0 |
0 |
if (rv != CRYPT_OK) croak("FATAL: PRNG_add_entropy failed: %s", error_to_string(rv)); |
89
|
0 |
0 |
if (rng_get_bytes(entropy_buf, 40, NULL) != 40) croak("FATAL: rng_get_bytes failed"); |
91
|
0 |
0 |
if (rv != CRYPT_OK) croak("FATAL: PRNG_add_entropy failed: %s", error_to_string(rv)); |
94
|
0 |
0 |
if (rv != CRYPT_OK) croak("FATAL: PRNG_ready failed: %s", error_to_string(rv)); |
112
|
0 |
73 |
if (output_len == 0) { |
116
|
0 |
73 |
if (self->last_pid != curpid) { |
117
|
0 |
0 |
if (rng_get_bytes(entropy_buf, 40, NULL) != 40) croak("FATAL: rng_get_bytes failed"); |
122
|
12 |
61 |
if (ix == 1) { |
125
|
0 |
12 |
if (tmp == NULL) croak("FATAL: Newz failed"); |
127
|
0 |
12 |
if ((UV)rv_len != output_len) croak("FATAL: PRNG_read failed"); |
136
|
0 |
12 |
if (rv != CRYPT_OK) { |
141
|
49 |
12 |
else if (ix == 2 || ix == 3) { |
|
12 |
37 |
else if (ix == 2 || ix == 3) { |
144
|
0 |
24 |
if (tmp == NULL) croak("FATAL: Newz failed"); |
146
|
0 |
24 |
if ((UV)rv_len != output_len) croak("FATAL: PRNG_read failed"); |
152
|
12 |
12 |
rv = ix == 3 ? base64url_encode(tmp, output_len, rdata, &len) : |
156
|
0 |
24 |
if (rv != CRYPT_OK) { |
158
|
0 |
0 |
croak(ix == 3 ? "FATAL: base64url_encode failed" : "FATAL: base64_encode failed"); |
168
|
0 |
37 |
if ((UV)rv_len != output_len) { |
187
|
0 |
12000 |
if (self->last_pid != curpid) { |
188
|
0 |
0 |
if (rng_get_bytes(entropy_buf, 40, NULL) != 40) croak("FATAL: rng_get_bytes failed"); |
195
|
0 |
12000 |
if (i != 4) croak("FATAL: PRNG_read failed"); |
211
|
0 |
24000 |
if (self->last_pid != curpid) { |
212
|
0 |
0 |
if (rng_get_bytes(entropy_buf, 40, NULL) != 40) croak("FATAL: rng_get_bytes failed"); |
219
|
0 |
24000 |
if (i != 7) croak("FATAL: PRNG_read failed"); |
223
|
18000 |
6000 |
if (limit_sv && SvOK(limit_sv)) { |
|
0 |
18000 |
if (limit_sv && SvOK(limit_sv)) { |
|
0 |
0 |
if (limit_sv && SvOK(limit_sv)) { |
|
0 |
0 |
if (limit_sv && SvOK(limit_sv)) { |
224
|
5994 |
12006 |
NV limit = SvNV(limit_sv); |
225
|
12000 |
6000 |
if (limit > 0 || limit < 0) RETVAL = RETVAL * limit; |
|
12000 |
0 |
if (limit > 0 || limit < 0) RETVAL = RETVAL * limit; |