]> git.saurik.com Git - apple/security.git/blobdiff - OSX/libsecurity_pkcs12/lib/pkcs12Decode.cpp
Security-59306.61.1.tar.gz
[apple/security.git] / OSX / libsecurity_pkcs12 / lib / pkcs12Decode.cpp
index 9e426c1a9b296a06311155409b2ddb7cac26a5ea..1ff9e1a54494f53e38cb30e8ba96ce97cf905f34 100644 (file)
@@ -31,6 +31,7 @@
 #include "pkcs12Debug.h"
 #include "pkcs12Crypto.h"
 #include <security_cdsa_utilities/cssmerrors.h>
 #include "pkcs12Debug.h"
 #include "pkcs12Crypto.h"
 #include <security_cdsa_utilities/cssmerrors.h>
+#include <security_utilities/casts.h>
 #include <security_asn1/nssUtils.h>
 
 /* top-level PKCS12 PFX decoder */
 #include <security_asn1/nssUtils.h>
 
 /* top-level PKCS12 PFX decoder */
@@ -42,7 +43,7 @@ void P12Coder::decode(
 
        p12DecodeLog("decode");
        memset(&pfx, 0, sizeof(pfx));
 
        p12DecodeLog("decode");
        memset(&pfx, 0, sizeof(pfx));
-       const CSSM_DATA rawBlob = {CFDataGetLength(cdpfx),
+       const CSSM_DATA rawBlob = {int_cast<CFIndex, CSSM_SIZE>(CFDataGetLength(cdpfx)),
                (uint8 *)CFDataGetBytePtr(cdpfx)};
                
        if(localCdr.decodeItem(rawBlob, NSS_P12_DecodedPFXTemplate, &pfx)) {
                (uint8 *)CFDataGetBytePtr(cdpfx)};
                
        if(localCdr.decodeItem(rawBlob, NSS_P12_DecodedPFXTemplate, &pfx)) {