reolinkapipy icon indicating copy to clipboard operation
reolinkapipy copied to clipboard

missing https certificate throws exception

Open GsDublin opened this issue 3 years ago • 6 comments

With https function throws: SSLError("bad handshake: Error([('SSL routines', 'tls_process_server_certificate',...

GsDublin avatar Mar 15 '22 19:03 GsDublin

Hi @GsDublin Thank you for your contribution :)

I think we need to have the default set to True and allow people to pass down the value when opening a stream.

Benehiko avatar Mar 23 '22 00:03 Benehiko

Hello @Benehiko, Iam a new git member and iam trying to use this tool in both directions ;-)

I think it should be a global parameter. Im sure the problem would be at each call, of each .get function. Should i try to do the changes, and you check my modifications like this?

Some people deactivated the https, some people use only https, and someone uses own certificates?

Iam using following cams: E1 Zoom, RLC-810A, RLC-511, RLC-410-5MP, RLC-810A (IPC_523128M8MP) and RLC-820A (IPC_523128M8MP)

For the "new" one (e.g. RLC-810A, RLC-820A) we need to add a new API command: GetRecV20, GetFtpV20, GetPushV20.

GsDublin avatar Mar 30 '22 11:03 GsDublin

HI @GsDublin no worries :)

You can use the kwargs param from here https://github.com/ReolinkCameraAPI/reolinkapipy/blob/master/reolinkapi/camera.py#L6-L12

and pass along an expected value for verifying ssl and if it is true check for passed down ssl certificates like we do here https://github.com/ReolinkCameraAPI/reolinkapipy/blob/8b6049bb2617e0efdc74e72a1f39789de1aaa48d/reolinkapi/handlers/api_handler.py#L58

then you can call it through the classself. property like we do here https://github.com/ReolinkCameraAPI/reolinkapipy/blob/8b6049bb2617e0efdc74e72a1f39789de1aaa48d/reolinkapi/mixins/stream.py#L26

For the other API functions I would recommend opening separate PRs so it is easier to keep track of changes :)

Benehiko avatar Mar 30 '22 21:03 Benehiko

Hi @GsDublin any update on this?

Benehiko avatar Apr 17 '22 11:04 Benehiko

I'm expecting I'll pick this up just to clean up my log files while I'm using this (with the changes to pass it down).

Vaelatern avatar Nov 08 '22 23:11 Vaelatern

@Benehiko have a look at this commit? https://github.com/Vaelatern/reolinkapipy/commit/8cf5f7f49c7cfeb00ffbbb00bcb197d85a0550b0 I decided not to proceed with it, but it might be useful

Vaelatern avatar Nov 11 '22 06:11 Vaelatern