Home ⌂Doc Index ◂Up ▴

eric6.Plugins.CheckerPlugins.CodeStyleChecker.Security.Checks.weakCryptographicKey

Module implementing checks for weak cryptographic key use.

Global Attributes

None

Classes

None

Functions

_classifyKeySize Function to classify a key and report an error if insufficient.
_weakCryptoKeySizeCryptography Function to check 'cryptography.hazmat' for weak key use.
_weakCryptoKeySizePycrypto Function to check 'pycrypto' for weak key use.
checkWeakCryptographicKey Function to check for weak cryptographic key use.
getChecks Public method to get a dictionary with checks handled by this module.


_classifyKeySize

_classifyKeySize(reportError, config, keyType, keySize, node)

Function to classify a key and report an error if insufficient.

reportError (func)
function to be used to report errors
config (dict)
dictionary with configuration data
keyType (str)
type of key to be classified ('DSA', 'RSA', 'EC')
keySize (int)
size of the key to be classified
node (ast.Call)
node the key was extracted from (needed for reporting)
Returns:
flag indicating an error was reported
Return Type:
bool
Up


_weakCryptoKeySizeCryptography

_weakCryptoKeySizeCryptography(reportError, context, config)

Function to check 'cryptography.hazmat' for weak key use.

reportError (func)
function to be used to report errors
context (SecurityContext)
security context object
config (dict)
dictionary with configuration data
Returns:
flag indicating an error was reported
Return Type:
bool
Up


_weakCryptoKeySizePycrypto

_weakCryptoKeySizePycrypto(reportError, context, config)

Function to check 'pycrypto' for weak key use.

reportError (func)
function to be used to report errors
context (SecurityContext)
security context object
config (dict)
dictionary with configuration data
Returns:
flag indicating an error was reported
Return Type:
bool
Up


checkWeakCryptographicKey

checkWeakCryptographicKey(reportError, context, config)

Function to check for weak cryptographic key use.

reportError (func)
function to be used to report errors
context (SecurityContext)
security context object
config (dict)
dictionary with configuration data
Up


getChecks

getChecks()

Public method to get a dictionary with checks handled by this module.

Returns:
dictionary containing checker lists containing checker function and list of codes
Return Type:
dict
Up



Home ⌂Doc Index ◂Up ▴