Re: [Pyobjc-dev] NSCredential credentialWithIdentity:certificates:persistence:
Brought to you by:
ronaldoussoren
From: Ronald O. <ron...@me...> - 2020-07-25 15:21:58
|
> On 25 Jul 2020, at 12:16, Eric Falconnier <er...@ze...> wrote: > > Hi, > > I am trying to use the following class method: > > NSCredential credentialWithIdentity:certificates:persistence: > https://developer.apple.com/documentation/foundation/nsurlcredential/1428192-credentialwithidentity > > (Python3.6 in a virtualenv on macos 10.15 with PyObjc v6.2.2) > > Metadata: > > {'arguments': ({'_template': True, 'type': b'@'}, > {'_template': True, 'type': b':'}, > {'null_accepted': True, 'type': b'^{__SecIdentity=}'}, > {'_template': True, 'type': b'@'}, > {'_template': True, 'type': b'Q'}), > 'classmethod': True, > 'hidden': False, > 'retval': {'_template': True, 'type': b'@'}} > > I get a SecIdentity object from a previous SecItemCopyMatching call. > > When I pass it to this method, i get the following error: > > depythonifying 'pointer', got 'SecIdentityRef' > > How could I fix this issue? Do I need to pass the SecIdentity as a different kind of argument? Is it possible to change the metadata with registerMetaDataForSelector ? I need to look into this, I seem to have missed something when creating the bindings. The security bindings are currently created by hand, my tooling for generating the metadata has problems with processing the security headers. What should work as a workaround: use registerMetaDataFor to change the type for argument 2 to “@“. Ronald — Twitter / micro.blog: @ronaldoussoren Blog: https://blog.ronaldoussoren.net/ <https://blog.ronaldoussoren.net/> > > Thanks, > > -- > Éric > > > > _______________________________________________ > Pyobjc-dev mailing list > Pyo...@li... > https://lists.sourceforge.net/lists/listinfo/pyobjc-dev |