X-Git-Url: https://git.saurik.com/apple/security.git/blobdiff_plain/5c19dc3ae3bd8e40a9c028b0deddd50ff337692c..7e6b461318c8a779d91381531435a68ee4e8b6ed:/OSX/libsecurity_apple_csp/lib/desContext.cpp?ds=inline diff --git a/OSX/libsecurity_apple_csp/lib/desContext.cpp b/OSX/libsecurity_apple_csp/lib/desContext.cpp index 2e93686a..22531e09 100644 --- a/OSX/libsecurity_apple_csp/lib/desContext.cpp +++ b/OSX/libsecurity_apple_csp/lib/desContext.cpp @@ -25,7 +25,7 @@ #include #include -#define DESDebug(args...) secdebug("desContext", ## args) +#define DESDebug(args...) secinfo("desContext", ## args) /* * DES encrypt/decrypt. @@ -65,6 +65,7 @@ void DESContext::init( if (DesInst != NULL) { CCCryptorRelease(DesInst); + DesInst = NULL; } (void) CCCryptorCreateWithMode(0, kCCModeECB, kCCAlgorithmDES, ccDefaultPadding, NULL, keyData, kCCKeySizeDES, NULL, 0, 0, 0, &DesInst); @@ -152,6 +153,7 @@ void DES3Context::init( if (DesInst != NULL) { CCCryptorRelease(DesInst); + DesInst = NULL; } (void) CCCryptorCreateWithMode(0, kCCModeECB, kCCAlgorithm3DES, ccDefaultPadding, NULL, keyData, kCCKeySize3DES, NULL, 0, 0, 0, &DesInst);