MYKey.m
changeset 14 3af1d1c0ceb5
parent 13 6fd9177eb6da
child 21 2c300b15b381
     1.1 --- a/MYKey.m	Sun Apr 19 00:01:41 2009 -0700
     1.2 +++ b/MYKey.m	Sun Apr 19 21:19:35 2009 -0700
     1.3 @@ -131,7 +131,7 @@
     1.4                      SecExternalItemType type,
     1.5                      SecKeychainRef keychain,
     1.6                      SecKeyImportExportParameters *params) {
     1.7 -    SecExternalFormat inputFormat = (type==kSecItemTypeSessionKey) ?kSecFormatRawKey :kSecFormatOpenSSL;
     1.8 +    SecExternalFormat inputFormat = (type==kSecItemTypeSessionKey) ?kSecFormatRawKey :kSecFormatUnknown;
     1.9      CFArrayRef items = NULL;
    1.10      
    1.11      params->version = SEC_KEY_IMPORT_EXPORT_PARAMS_VERSION;
    1.12 @@ -142,7 +142,7 @@
    1.13          if (type==kSecItemTypeSessionKey)
    1.14              params->keyUsage = CSSM_KEYUSE_ENCRYPT | CSSM_KEYUSE_DECRYPT;
    1.15          else if (type==kSecItemTypePublicKey)
    1.16 -            params->keyUsage = CSSM_KEYUSE_ENCRYPT | CSSM_KEYUSE_VERIFY;
    1.17 +            params->keyUsage = CSSM_KEYUSE_ENCRYPT | CSSM_KEYUSE_VERIFY | CSSM_KEYUSE_WRAP;
    1.18          else if (type==kSecItemTypePrivateKey)
    1.19              params->keyUsage = CSSM_KEYUSE_DECRYPT | CSSM_KEYUSE_SIGN;
    1.20      }