Hi Chris,

There is an osgDB::AuthentificationMap class for passing in usernames
and password for when accessing http.  Would it be possible to
leverage this for the zip plugin rather than come up with a Options
based solution?

Robert.

On Thu, Dec 3, 2009 at 5:31 PM, Chris Denham <[email protected]> wrote:
> This submission is small change to the zip plugin that allows a password to 
> be passed via osgDB::Options to the zip decompressor.
> The change allows password protected zip files to be loaded.
>
> This is the changed section of ReaderWriterZIP.cpp relative to revision 
> [10850], complete file attached.
>
>
> Code:
> ...
> std::string password = "";
> if (options)
> {
> password = options->getPluginStringData("password");
> }
>
> fin.read(pMemBuffer, ulzipFileLength);
> if ((unsigned int)fin.gcount() == ulzipFileLength)
> {
> HZIP hz = OpenZip(pMemBuffer, ulzipFileLength, password.c_str());
> ...
>
>
>
>
> Chris Denham.
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=20829#20829
>
>
>
>
> Attachments:
> http://forum.openscenegraph.org//files/readerwriterzip_234.cpp
>
>
> _______________________________________________
> osg-submissions mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
>
_______________________________________________
osg-submissions mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org

Reply via email to