Bug #48380
Fix traceback when signing CSR
Seen in:
Severity:
Medium
Reason for Closing:
Reason for Blocked:
Needs QA:
No
Needs Doc:
No
Needs Merging:
No
Needs Automation:
No
Support Suite Ticket:
n/a
Hardware Configuration:
ChangeLog Required:
No
Description
TypeError: '>' not supported between instances of 'NoneType' and 'NoneType' File "middlewared/main.py", line 155, in call_method result = await self.middleware.call_method(self, message) File "middlewared/main.py", line 1033, in call_method return await self._call(message['method'], serviceobj, methodobj, params, app=app, io_thread=False) File "middlewared/main.py", line 987, in _call return await run_method(methodobj, *args) File "middlewared/main.py", line 925, in _run_in_conn_threadpool return await self.run_in_executor(self.__threadpool, method, *args, **kwargs) File "middlewared/main.py", line 913, in run_in_executor return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs)) File "concurrent/futures/thread.py", line 56, in run result = self.fn(*self.args, **self.kwargs) File "middlewared/schema.py", line 668, in nf return f(*args, **kwargs) File "plugins/crypto.py", line 930, in ca_sign_csr return self.__ca_sign_csr(data) File "middlewared/schema.py", line 668, in nf return f(*args, **kwargs) File "plugins/crypto.py", line 987, in __ca_sign_csr ca_data['id'] File "middlewared/main.py", line 1063, in call_sync return fut.result() File "concurrent/futures/_base.py", line 425, in result return self.__get_result() File "concurrent/futures/_base.py", line 384, in __get_result raise self._exception File "middlewared/main.py", line 973, in _call return await methodobj(*args) File "plugins/crypto.py", line 845, in get_serial_for_certificate return max(ca_signed_certs) + 1
ca_id 2 ca_signed_certs [ None, None, None, None, None, None, None, None, None, None, 7 ]
{ 'id': '05191dfe-491b-2b9e-64ee-229f02b8b156', 'method': 'certificateauthority.ca_sign_csr', 'msg': 'method', 'params': [ { 'ca_id': 2, 'csr_cert_id': 8, 'name': 'ctrl.secure.lan' } ] }
https://sentry.ixsystems.com/ixsystems/freenas-middleware/issues/15843/
Related issues
Associated revisions
Handle a None value case for serials in certs
This commit handles a case where if a certificate wwas imported whose serial value was None, it causes a traceback when the ca/cert is used in a chain for finding out a serial of next potential ca/cert.
Ticket: #48380
Handle a None value case for serials in certs
This commit handles a case where old certs may not have serial values set in their respective db entries.
Ticket: #48380
Handle a None value case for serials in certs
This commit handles a case where old certs may not have serial values set in their respective db entries.
Ticket: #48380
Handle a None value case for serials in certs
This commit handles a case where old certs may not have serial values set in their respective db entries.
Ticket: #48380
History
#1
Updated by Waqar Ahmed over 2 years ago
- Status changed from Unscreened to In Progress
#2
Updated by Bug Clerk over 2 years ago
- Status changed from In Progress to Ready for Testing
#3
Updated by Dru Lavigne over 2 years ago
- Subject changed from Traceback signing CSR to Fix traceback when signing CSR
- Needs Doc changed from Yes to No
- Needs Merging changed from Yes to No
#4
Updated by Bonnie Follweiler over 2 years ago
- Status changed from Ready for Testing to Passed Testing
- Needs QA changed from Yes to No
#6
Updated by Dru Lavigne over 2 years ago
- Status changed from Passed Testing to Done
#7
Updated by William Grzybowski over 2 years ago
- Has duplicate Bug #48922: Error when signing a certificate request with an self-signed CA added