Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: CUPS authentication (not the ShadowHash issue)



-------------- Original message --------------

> email@hidden wrote:
> > > OK, I did some digging around on the Apple developer site and came across
> > > what I think is the best way to handle this: Am I correct in assuming
> > that I can
> > > use the URL Loading System, since IPP uses HTTP transport? If
> > so, I'd like to
> > > get some clarifications before I proceed:
> > >
> > > 1. Would the raw IPP request data be loaded into an NSURL object via a
> > > setResourceData: message (after being converted to an NSData object)?
> >
> > Sorry to be such a bother with all these posts, but to answer my own
> > question (after a bit more research), the data would actually go into an
> > NSMutableURLRequest object via a setHTTPBody: message, with the HTTP
> > headers and method set accordin! gly.
> >
> > > 2. Is the response data that is finalized in the NSURLConnection
> > > connectionDidFinishLoading: delegate method in raw format, i.e.
> > something I
> > > could extract from the NSData object and map directly into the IPP
> > structures?
> >
> > After poring over the CUPS source until my head hurt, it appears that
> > the answer to this question is "yes".
>
> Well, sort-of. You can use the ippReadCB and ippWriteCB methods to
> read from/write to a memory buffer. You can't just cast to ipp_t *
> and go... :)
Yeah, I had that much figured out. :-)

> Ultimately, it would probably be easier to tie into the keychain
> API from a CUPS password callback...
I didn't even know this capability existed.  I'm so used to working with undocumented code at work that I never thought to check the CUPS documentation.  Sure enough, it's right there in the Software Programmer's Manual.  Of course, I wouldn't have known exactly what to look for, so my "thinking out loud" at least accounted for something.  This does indeed sound like the less painful approach.
 
Thanks for helping me avoid rewriting a lot of code (again).
 
Alan
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Printing mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/printing/email@hidden

This email sent to email@hidden



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.