Extract public key information from certificate
(self, cert)
| 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""" |
no outgoing calls
no test coverage detected