Project

General

Profile

Actions

Bug #1563

closed

Need to check for null return value from SecTpmOsx::Impl::getKey

Added by Anonymous over 10 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Normal
Category:
Security
Target version:
Start date:
04/30/2014
Due date:
% Done:

100%

Estimated time:

Description

If SecTpmOsx::Impl::getKey does not find the key, it returns null. But other functions in SecTpmOsx don't check this. For example, signInTpmInternal will seg fault if the keyName is not found because it passes the result of getKey to SecSignTransformCreate without checking for null.

https://github.com/named-data/ndn-cxx/blob/f56c68f66b19444e82397db6f1c10604ecb1e6dd/src/security/sec-tpm-osx.cpp#L611

To be consistent with SecTpmFile::signInTpm, maybe signInTpmInternal (and others) should throw an exception if getKey returns null.

Actions #1

Updated by Alex Afanasyev over 10 years ago

  • Category set to Security
  • Status changed from New to Closed
  • Assignee set to Alex Afanasyev
  • Target version set to v0.1
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF