Yubico Forum

...visit our web-store at store.yubico.com
It is currently Tue Jan 30, 2018 10:07 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Wed Jan 24, 2018 11:30 am 
Offline

Joined: Tue Jan 23, 2018 11:03 am
Posts: 1
Hi,

I am trying to sign some data with the certificate PrivateKey ( Certificate was loaded into slot 9c(Digital signature) on My YubiKey4 using Yubikey PIV Manager v1.4.2) on Mac High Sierra.

Below OSX APIs were used to sign the data using the certificate,

Code:
    SecTransformRef signingTransform = NULL;
    signingTransform = SecSignTransformCreate(privateKeyRef, NULL);
    NSString *stingSign = @"Some string";
    CFDataRef sourceData = CFDataCreate(
                                        kCFAllocatorDefault,
                                        (const unsigned char *)[stingSign UTF8String],
                                        stingSign.length
                                        );
    CFErrorRef error = NULL;
    SecTransformSetAttribute(
                             signingTransform,
                             kSecTransformInputAttributeName,
                             sourceData,
                             &error);
    if (error)
      {
        NSLog(@"Error : %@",[((__bridge NSError*)error) description]);
      }
   ..... Remaining execution code goes here

but i am getting
Quote:
Error : Error Domain=com.apple.security.transforms.error Code=20 "ABORT has been sent to the transform (Error Domain=Internal CSSM error Code=-25304 "Internal error #ffff9d28 at SignTransform_block_invoke /BuildRoot/Library/Caches/com.apple.xbs/Sources/Security/Security-58286.31.2/OSX/libsecurity_transform/lib/SecSignVerifyTransform.c:411" UserInfo={NSDescription=Internal error #ffff9d28 at SignTransform_block_invoke /BuildRoot/Library/Caches/com.apple.xbs/Sources/Security/Security-58286.31.2/OSX/libsecurity_transform/lib/SecSignVerifyTransform.c:411, Originating Transform=CoreFoundationObject})" UserInfo={NSDescription=ABORT has been sent to the transform (Error Domain=Internal CSSM error Code=-25304 "Internal error #ffff9d28 at SignTransform_block_invoke /BuildRoot/Library/Caches/com.apple.xbs/Sources/Security/Security-58286.31.2/OSX/libsecurity_transform/lib/SecSignVerifyTransform.c:411" UserInfo={NSDescription=Internal error #ffff9d28 at SignTransform_block_invoke /BuildRoot/Library/Caches/com.apple.xbs/Sources/Security/Security-58286.31.2/OSX/libsecurity_transform/lib/SecSignVerifyTransform.c:411, Originating Transform=CoreFoundationObject})}


Do I need to do any extra configuration to execute this code? or am I missing something while setup? same code is working fine if I sign with the same certificate on eToken smartcard.

Please help us.


Top
 Profile  
Reply with quote  

Share On:

Share on Facebook FacebookShare on Twitter TwitterShare on Tumblr TumblrShare on Google+ Google+

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group