Ensure key/cert pointer validity before accessing the DER 57/145657/2
authorKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Wed, 23 Aug 2017 07:45:21 +0000 (09:45 +0200)
committerKrzysztof Jackiewicz <k.jackiewicz@samsung.com>
Wed, 23 Aug 2017 09:46:38 +0000 (11:46 +0200)
commitbc24105b814b1747bc582433f6036e1ffe128fc8
tree16932382e5b0e42f326af5a1a0cccc7dc1577a03
parent75ebd56f472760551fe27443d7c2779291acdc76
Ensure key/cert pointer validity before accessing the DER

In many cases the getDER() function is called on a shared_ptr to a key or
certficiate without checking the pointer validity which may lead to segfaults.
Add proper checks before calling the getDER() function.

Change-Id: Ifb209737f14a13f6e7946e21c9d7c1cf5791973e
src/manager/client-async/client-manager-async-impl.cpp
src/manager/client-async/client-manager-async-impl.h
src/manager/client-async/client-manager-async.cpp
src/manager/client-capi/ckmc-manager.cpp
src/manager/client/client-common.cpp
src/manager/client/client-manager-impl.cpp
src/manager/common/exception.h
src/manager/common/protocols.cpp