Fix segfault when calling SSL.getCiphers() / SSL.getPeerCertChain() and ...

...no ciphers/certs are used.

Motivation:

Because of incorrect usage of unsigned we fail to detect if no ciphers/certs are used and so cause a segfault.

Modifications:

- Use int when call sk_num(...) to store the result

Result:

No more segfault