Replace the subjectPublicKeyInfo of this certificate with the one from the provided key.
(self, key)
| 1036 | return _get_hash(_get_cert_sig_hashname(self)) |
| 1037 | |
| 1038 | def setSubjectPublicKeyFromPrivateKey(self, key): |
| 1039 | """ |
| 1040 | Replace the subjectPublicKeyInfo of this certificate with the one from |
| 1041 | the provided key. |
| 1042 | """ |
| 1043 | if isinstance(key, (PubKey, PrivKey)): |
| 1044 | if isinstance(key, PrivKey): |
| 1045 | pubkey = key.pubkey |
| 1046 | else: |
| 1047 | pubkey = key |
| 1048 | self.tbsCertificate.subjectPublicKeyInfo = X509_SubjectPublicKeyInfo( |
| 1049 | pubkey.der |
| 1050 | ) |
| 1051 | else: |
| 1052 | raise ValueError("Unknown type 'key', should be PubKey or PrivKey") |
| 1053 | |
| 1054 | def resignWith(self, key): |
| 1055 | """ |
no test coverage detected