MCPcopy Create free account
hub / github.com/MorDavid/NetworkHound / _extract_public_key_info

Method _extract_public_key_info

validators/http_validator.py:253–269  ·  view source on GitHub ↗

Extract public key information from certificate

(self, cert)

Source from the content-addressed store, hash-verified

251 return analysis
252
253 def _extract_public_key_info(self, cert):
254 """Extract public key information from certificate"""
255 pub_key_info = {}
256
257 try:
258 # This is a simplified extraction - in real implementation,
259 # you might want to use cryptography library for more details
260 pub_key_info['algorithm'] = 'Unknown'
261 pub_key_info['key_size'] = 'Unknown'
262
263 # Try to extract from certificate extensions or other fields
264 # This would require more advanced parsing with cryptography library
265
266 except Exception as e:
267 pub_key_info['error'] = str(e)[:MAX_ERROR_LENGTH]
268
269 return pub_key_info
270
271 def _parse_certificate_extensions(self, cert):
272 """Parse certificate extensions"""

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected