pinning

Pinned memory OpenCL, has anybody successfully used it?

南笙酒味 提交于 2019-12-14 01:28:49
问题 I used the CL_MEM_ALLOC_HOST_PTR flag with my clCreateBuffer calls, but the Compute Profiler shows all my "host mem transfer type" as being Pageable. I tried it in two different kernel setups, but the profiler wouldn't show that I was using pinned memory. Is it just really random when a kernel gets to use pinned memory? Is it constrained by something? I am guessing the size of the buffer matters. I tried one buffer of a size of 10,000 floats and I still got Pageable memory. Let me know what

OkHttp PublicKey pinning on Android

一个人想着一个人 提交于 2019-12-14 01:04:13
问题 Does anyone know how we could implement Public Key pinning with OkHttp3 Have been reading about SSL pinning and I see that we could do it with either Certificate Pinning or Public Key pinning (the latter seems more flexible). But I was only able to find example of Certificate pinning with OkHttp and none of Key Pinning. Does anyone know how easy this is to implement with OkHttp (and/or an example of how to go about doing so)? TIA 回答1: Been looking through the source of the CertificatePinner

swift afnetworking ssl pinning

◇◆丶佛笑我妖孽 提交于 2019-12-13 19:42:14
问题 var manager: AFHTTPSessionManager init() { manager = AFHTTPSessionManager() manager.requestSerializer = AFJSONRequestSerializer() manager.responseSerializer = AFJSONResponseSerializer() let securityPolicy = AFSecurityPolicy(pinningMode: AFSSLPinningMode.Certificate) let certificatePath = NSBundle.mainBundle().pathForResource("c38acbe05a6328ee", ofType: "crt")! let certificateData = NSData(contentsOfFile: certificatePath)! securityPolicy.pinnedCertificates = [certificateData] securityPolicy

Windows 7, VB6, Launcher App and Pinning to the Taskbar

ぐ巨炮叔叔 提交于 2019-12-13 01:26:10
问题 We have an application that has a "launcher" app that sits there with a pretty UI while the main app loads in the background. Both of these apps are written in VB6 (sigh). In Windows 7, if user's pin the launcher program, we get two different icons on the taskbar (one for the main app, and then the pinned icon for the launcher program). This looks very odd. I've tried using the following function: http://msdn.microsoft.com/en-us/library/dd378422%28VS.85%29.aspx to no avail so far. I gave both

Lack of Certificate Pinning in IBM Mobile First Platform 7.1

旧巷老猫 提交于 2019-12-12 01:18:13
问题 The IBM Mobile First Platform 7.1 is not Supporting Certificate Pinning. We tested the apt with IBM Blue-mix Security Scan. Lack of Certificate Pinning Severity: Causes: Certificate pinning is not implemented/disabled for this connection. X-Force: None OWASP: M3 Fix: Enable certificate pinning for this connection. 回答1: In MobileFirst Platform Foundation 7.1 the support for certificate pinning is as follows: Hybrid apps: supported Native apps: supported MobileFirst Cordova apps: not

What to pass for pinned string in P/Invoke?

℡╲_俬逩灬. 提交于 2019-12-10 15:07:30
问题 Assume this C function: void do_something(const char* str) It stores the string somewhere for later reference . Furthermore, I have this signature in C# to call this function: [DllImport("NativeLib")] static extern void do_something(string str); Now, what do I need to do when passing a string to this method: Do I need to pin the string (with GCHandle.Alloc() ) (or is the marshaller creating a copy)? If I do need to pin it, do I pass the "original" string (i.e. the string I passed to GCHandle

Pinning public key in my app

a 夏天 提交于 2019-12-10 08:01:00
问题 I am pinning public key in my app as part of security measures, for that I have extracted public key from my PEM certificate which looks like -----BEGIN PUBLIC KEY----- MIIBIj....IDAQAB -----END PUBLIC KEY----- However in sample code of OWASP, we do see code to compare DER encoded public key, // DER encoded public key private static String PUB_KEY = "30820122300d06092a864886f70d0101" + "0105000382010f003082010a0282010100b35ea8adaf4cb6db86068a836f3c85" +

Certificate pinning in Alamofire

99封情书 提交于 2019-12-09 12:33:25
问题 I am creating an iPad app that accesses HTTPS web services. I want to implement pinning, but am having issues. This class creates the Alamofire Manager (mostly taken from documentation): class NetworkManager { var manager: Manager? init() { let serverTrustPolicies: [String: ServerTrustPolicy] = [ "www.google.co.uk": .PinCertificates( certificates: ServerTrustPolicy.certificatesInBundle(), validateCertificateChain: true, validateHost: true ), "insecure.expired-apis.com": .DisableEvaluation ]

Windows 8 prepare site for pinning

落花浮王杯 提交于 2019-12-09 04:06:38
问题 I would like to prepare my site for windows 8 pinning and have been reading some documentation on how to add the various images and could figure out that it could be done by using metadata and according to instructions and help on this site I could actually build the following meta tags but i couldn't figure out where I can call the browserdetect.xml file assuming I have the file located at mysitee.com/upload/win8/browserdetetct.xml and the images in the same folder <meta name="application

Indexing into arrays of arbitrary rank in C#

风格不统一 提交于 2019-12-05 10:45:43
I need to iterate over an array of arbitrary rank. This is for both reading and writing, so GetEnumerator will not work. Array.SetValue(object, int) doesn't work on multidimensional arrays. Array.SetValue(object, params int[]) would require excessive arithmetic for iterating through the multidimensional space. It would also require dynamic invocation to get around the params part of the signature. I'm tempted to pin the array and iterate over it with a pointer, but I can't find any documentation that says that multidimensional arrays are guaranteed to be contiguous. If they have padding at the