Posts

Post not yet marked as solved
12 Replies
2.7k Views
I'm trying to interact with a remote server that requires a client certificate. I have obtained the required info from a separate login tool from the same vendor. However, I am having no end of trouble connecting the dots. Specifically I can't manage to get the needed SecIdentity from the raw PEM data. Here is the code (with actual data copy/pasted from vendor, but truncated here): let pemString = """----BEGIN PRIVATE KEY MIGHAg(key contents truncated)QS1osPzBH8----END PRIVATE KEY ----BEGIN CERTIFICATE MIIDkT(cert contents trucated)1yIMCYx2E=----END CERTIFICATE ----BEGIN CERTIFICATE MIIDWD(cert contents trucated)e19Jv799c=----END CERTIFICATE """ let pemData = pemString.data(using: .utf8)! var inputFormat :SecExternalFormat = .formatUnknown var itemType :SecExternalItemType = .itemTypeUnknown var itemsCFArray :CFArray? = nil let error = SecItemImport(pemData as CFData, nil, &inputFormat, &itemType, [], nil, nil, &itemsCFArray) let errorString = SecCopyErrorMessageString(error, nil) The error is always "Unknown format in import." Any ideas why this is returning "Unknown format"?
Posted
by StevoGTA.
Last updated
.
Post not yet marked as solved
1 Replies
853 Views
I am porting over some video decoding code from Intel to M1 and I'm seeing a very strange pixelFormat. The setup is pretty basic, basically just setting kCVPixelBufferMetalCompatibilityKey to true. But I am at a complete loss as to how to interpret this pixelFormat. In looking through CVPixelBuffer.h, I don't see any constant even close. (Using Xcode 12.5.1). This is the beginning of the debug description of the imageBuffer: CVPixelBuffer 0x6000eea7bf60 width=320 height=480 pixelFormat=&8v0 iosurface=0x6000e4c87ff0 planes=2 poolName=decode
Posted
by StevoGTA.
Last updated
.