mpeylo / cmpossl

An OpenSSL-based implementation of the Certificate Management Protocol (CMP), defined in IETF RFCs 4210, 4211, and 6712. It is being extended according to the emerging RFCs 'CMP Updates' (CMPv3), 'CMP Algorithms', and 'Lightweight CMP Profile'.
https://github.com/mpeylo/cmpossl/wiki
Other
35 stars 13 forks source link

Ignore negative value configured to totaltimeout #191

Closed raja-ashok closed 5 years ago

raja-ashok commented 5 years ago

Better to consider negative value configured to totaltimeout as 0 similar to msgtimeout.

raja-ashok commented 5 years ago

Requesting @mpeylo and @DDvO to review and provide comments on this.

mpeylo commented 5 years ago

Looks sensible to me. I speculate that @DDvO will have a look at this as soon as he is available, while you might need to be patient as there might be summer vacation time at his location.

raja-ashok commented 5 years ago

Ok Sure. Thanks for your response.

DDvO commented 5 years ago

Thanks for the suggestion. Good idea to be defensive on negative ctx->totaltimeout values potentially given. Yet in your PR the new comparisons should not read ctx->totaltimeout >= 0 but ctx->totaltimeout > 0.

raja-ashok commented 5 years ago

Yaa, you are correct. I will fix it.

DDvO commented 5 years ago

I can see that you force-pushed on the branch, but I cannot see the necessary change from >= to >. BTW, for the assignment to ctx->end_time the value does not matter in case totaltimeout <= 0 because then the variable is not used.

raja-ashok commented 5 years ago

Done. Please check now.

DDvO commented 5 years ago

merged; thanks!