SecKeyRawSign prompts user twice to access the same key

Originator:realvnc
Number:rdar://30442446 Date Originated:9-Feb-2017 03:21 PM
Status:Open Resolved:
Product:macOS + SDK Product Version:Sierra
Classification: Reproducible:Always
 
Area:
Something not on this list

Summary:
When signing a piece of data, Keychain Services shows *two* identical prompts, requesting the user to authorize the application to access the keychain item. Within the same blocking call to SecKeyRawSign(), two modal UI prompts are displayed.

Steps to Reproduce:
Attempt to sign a piece of data using an application. Two prompts are displayed for the same operation (I can confirm that the prompts are *not* displayed by two different calls to the Keychain Services Framework).

Clicking 'Allow' (not 'Always Allow') causes a second prompt to be shown.

Screenshot of the prompt attached.

Expected Results:
Only a single prompt is shown for the operation.

Actual Results:


Version:
macOS Sierra, on Mac Pro and Macbook. Version 10.12.3 (16D32)

Notes:
The workaround is to use the good old CSSM API - which is what we used to do before Apple deprecated it and tried to get us to use the buggier SecKeyRawSign API :)

Configuration:


Attachments:
'Screen Shot 2017-02-09 at 15.20.16.png' was successfully uploaded.

Comments


Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!