line |
true |
false |
branch |
43
|
0 |
3125 |
if (!key) |
72
|
0 |
100944 |
if (!key) |
100
|
0 |
0 |
if ((*key = psMalloc(pool, sizeof(psPubKey_t))) == NULL) |
105
|
0 |
0 |
if ((rc = psInitPubKey(pool, *key, type)) < 0) |
141
|
0 |
0 |
if (keyBuf == NULL || keyBufLen <= 0) |
|
0 |
0 |
if (keyBuf == NULL || keyBufLen <= 0) |
154
|
0 |
0 |
notRsaKey = keyBufLen < 257 || keyBuf[0] != 0x30 || keyBuf[1] < 0x82; |
|
0 |
0 |
notRsaKey = keyBufLen < 257 || keyBuf[0] != 0x30 || keyBuf[1] < 0x82; |
|
0 |
0 |
notRsaKey = keyBufLen < 257 || keyBuf[0] != 0x30 || keyBuf[1] < 0x82; |
162
|
0 |
0 |
if (psEccParsePrivKey(pool, keyBuf, keyBufLen, ecckey, NULL) |
167
|
0 |
0 |
if (psPkcs8ParsePrivBin(pool, keyBuf, keyBufLen, |
178
|
0 |
0 |
if (privkey->type == PS_RSA) |
182
|
0 |
0 |
else if (privkey->type == PS_ECC) |
195
|
0 |
0 |
if (keytype == 1) |
233
|
0 |
0 |
if (pemOrDer == 1) |
236
|
0 |
0 |
if (psPkcs1ParsePrivFile(pool, keyfile, password, rsakey) |
240
|
0 |
0 |
if (psEccParsePrivFile(pool, keyfile, password, ecckey) |
257
|
0 |
0 |
if (psGetFileBuf(pool, keyfile, &keyBuf, &keyBufLen) < PS_SUCCESS) |
267
|
0 |
0 |
if (rc < 0) |
276
|
0 |
0 |
if (keytype == 1) |
318
|
0 |
0 |
if (pemOrDer == 1) |
321
|
0 |
0 |
if (psPkcs1ParsePubFile(pool, keyfile, rsakey) |
334
|
0 |
0 |
if (psGetFileBuf(pool, keyfile, &keyBuf, &keyBufLen) < PS_SUCCESS) |
356
|
0 |
1057 |
psAssert(key_type == PS_RSA || key_type == PS_ECC); |
|
0 |
0 |
psAssert(key_type == PS_RSA || key_type == PS_ECC); |
362
|
0 |
0 |
if (key_type == PS_RSA) |
377
|
0 |
0 |
if (key_type == PS_RSA) |
399
|
1057 |
0 |
if (key_type == PS_RSA) |
409
|
0 |
0 |
if (key_type == PS_RSA) |
419
|
0 |
0 |
if (key_type == PS_RSA) |
445
|
0 |
0 |
if (hashOut == NULL || hashOutLen == NULL) |
|
0 |
0 |
if (hashOut == NULL || hashOutLen == NULL) |
450
|
0 |
0 |
if (dataLen < 1) |
564
|
0 |
0 |
if (pubRsaDecryptSignedElementExt(pool, &key->key.rsa, |
572
|
0 |
0 |
if (memcmpct(hashIn, out, hashInLen) != 0) |
582
|
0 |
0 |
if (psEccDsaVerify(pool, &key->key.ecc, hashIn, |
589
|
0 |
0 |
if (eccRet != 1) |
629
|
0 |
0 |
if (rc != PS_SUCCESS) |