freertos / corePKCS11
Conditional Complexity

The distribution of complexity of units (measured with McCabe index).

Intro
  • Conditional complexity (also called cyclomatic complexity) is a term used to measure the complexity of software. The term refers to the number of possible paths through a program function. A higher value ofter means higher maintenance and testing costs (infosecinstitute.com).
  • Conditional complexity is calculated by counting all conditions in the program that can affect the execution path (e.g. if statement, loops, switches, and/or operators, try and catch blocks...).
  • Conditional complexity is measured at the unit level (methods, functions...).
  • Units are classified in four categories based on the measured McCabe index: 1-5 (simple units), 6-10 (medium complex units), 11-25 (complex units), 26+ (very complex units).
Learn more...
Conditional Complexity Overall
  • There are 72 units with 2,488 lines of code in units (49.0% of code).
    • 0 very complex units (0 lines of code)
    • 0 complex units (0 lines of code)
    • 14 medium complex units (859 lines of code)
    • 19 simple units (954 lines of code)
    • 39 very simple units (675 lines of code)
0% | 0% | 34% | 38% | 27%
Legend:
51+
26-50
11-25
6-10
1-5
Alternative Visuals
Conditional Complexity per Extension
51+
26-50
11-25
6-10
1-5
c0% | 0% | 34% | 38% | 27%
Conditional Complexity per Logical Component
primary logical decomposition
51+
26-50
11-25
6-10
1-5
source/portable/mbedtls0% | 0% | 31% | 39% | 28%
source0% | 0% | 56% | 29% | 13%
source/portable/os0% | 0% | 58% | 41% | 0%
source/portable/os/freertos_winsim0% | 0% | 36% | 24% | 38%
source/portable/os/posix0% | 0% | 0% | 52% | 47%
Most Complex Units
Top 20 most complex units
Unit# linesMcCabe index# params
static CK_RV prvRsaKeyAttParse()
in source/portable/mbedtls/core_pkcs11_mbedtls.c
58 19 3
CK_RV xInitializePkcs11Token()
in source/core_pkcs11.c
56 16 1
static CK_RV prvEcKeyAttParse()
in source/portable/mbedtls/core_pkcs11_mbedtls.c
74 16 3
static CK_RV prvSaveDerKeyToPal()
in source/portable/mbedtls/core_pkcs11_mbedtls.c
91 15 5
static CK_RV prvCheckGenerateKeyPairPrivateTemplate()
in source/portable/mbedtls/core_pkcs11_mbedtls.c
74 14 3
static CK_RV prvCheckGenerateKeyPairPublicTemplate()
in source/portable/mbedtls/core_pkcs11_mbedtls.c
70 14 3
CK_RV xGetSlotList()
in source/core_pkcs11.c
61 12 2
50 12 5
static CK_RV prvCertAttParse()
in source/portable/mbedtls/core_pkcs11_mbedtls.c
62 12 5
static CK_RV prvHMACKeyAttParse()
in source/portable/mbedtls/core_pkcs11_mbedtls.c
44 12 3
static CK_RV prvCMACKeyAttParse()
in source/portable/mbedtls/core_pkcs11_mbedtls.c
44 12 3
void PAL_UTILS_LabelToFilenameHandle()
in source/portable/os/core_pkcs11_pal_utils.c
74 12 3
CK_RV xInitializePkcs11Session()
in source/core_pkcs11.c
37 11 1
CK_RV PKCS11_PAL_GetObjectValue()
in source/portable/os/freertos_winsim/core_pkcs11_pal.c
64 11 4
static CK_RV prvRsaContextParse()
in source/portable/mbedtls/core_pkcs11_mbedtls.c
69 10 2
static CK_RV prvVerifyInitEC_RSAKeys()
in source/portable/mbedtls/core_pkcs11_mbedtls.c
56 10 5
CK_RV PAL_UTILS_HandleToFilename()
in source/portable/os/core_pkcs11_pal_utils.c
52 10 3
53 9 2
static CK_RV prvAddObjectToList()
in source/portable/mbedtls/core_pkcs11_mbedtls.c
46 9 4
static CK_RV prvCreateCertificate()
in source/portable/mbedtls/core_pkcs11_mbedtls.c
43 9 3