X-Git-Url: https://git.saurik.com/apple/security.git/blobdiff_plain/fa7225c82381bac4432a6edf16f53b5370238d85..0d4552ce43ff8bf2e8666a9c5c44c3590eb117a8:/OSX/libsecurity_keychain/lib/Access.cpp diff --git a/OSX/libsecurity_keychain/lib/Access.cpp b/OSX/libsecurity_keychain/lib/Access.cpp index 64da867e..032bbb6e 100644 --- a/OSX/libsecurity_keychain/lib/Access.cpp +++ b/OSX/libsecurity_keychain/lib/Access.cpp @@ -27,11 +27,10 @@ #include #include #include "SecBridge.h" -#include -#include +#include #include #include -#include +#include using namespace KeychainCore; using namespace CssmClient; @@ -364,8 +363,9 @@ Access::Maker::Maker(Allocator &alloc, MakerType makerType) { // generate random key mKey.malloc(keySize); - UniformRandomBlobs().random(mKey.get()); - + CssmData data = mKey.get(); + MacOSError::check(SecRandomCopyBytes(kSecRandomDefault, data.length(), data.data())); + // create entry info for resource creation mInput = AclEntryPrototype(TypedList(allocator, CSSM_ACL_SUBJECT_TYPE_PASSWORD, new(allocator) ListElement(mKey.get())));