Coverage Report

Created: 2025-06-24 06:49

/src/nss/lib/freebl/secmpi.c
Line
Count
Source (jump to first uncovered line)
1
#include "blapi.h"
2
3
#include "mpi.h"
4
#include "mpprime.h"
5
6
mp_err
7
mpp_random_secure(mp_int *a)
8
0
{
9
0
    SECStatus rv;
10
0
    rv = RNG_GenerateGlobalRandomBytes((unsigned char *)MP_DIGITS(a), MP_USED(a) * sizeof(mp_digit));
11
0
    if (rv != SECSuccess) {
12
0
        return MP_UNDEF;
13
0
    }
14
0
    MP_SIGN(a) = MP_ZPOS;
15
0
    return MP_OKAY;
16
0
}
17
18
mp_err
19
mpp_pprime_secure(mp_int *a, int nt)
20
0
{
21
0
    return mpp_pprime_ext_random(a, nt, &mpp_random_secure);
22
0
}
23
24
mp_err
25
mpp_make_prime_secure(mp_int *start, mp_size nBits, mp_size strong)
26
0
{
27
0
    return mpp_make_prime_ext_random(start, nBits, strong, &mpp_random_secure);
28
0
}