[SOLVED]Anyway to ignore certification warning!?

Hi
I’m working on a html5 app with some 3d parts in panda3d. since i have to redesign all html ui in panda3d i decided to use panda browser plugin and a portable firefox or chrome plus some python scripts which run a local http server to serve the contents(i’m using cherrypy).
So by dbl-clicking on my app it will initiate a server like 127.0.0.1:9009 and automatically browser will open this address(could be portable or installed browser) and so … .
But the problem is panda3d content at first run warns user about certification(i have self-assigned cert.). so i want to know is it possible to ignore or remove certification warning? it should be somewhere in the source, right?
I need this because as i said i have bunch of well-designed html forms + javascripts which is hard to redesign them all in panda3d, then make a standalone app with pdeploy or… .
Why we can not have a p3d file in html like a flash swf file? swf file doesn’t ask for a certification.
Ignoring certification part would be a solution for me Although i’m open to your suggestion about changing my way of presenting html and 3d contents. by the way i’ve tried webgl, but it has some blacklist vga list and … .
Thanks

The certification warning exists because your application is able to run arbitrary code on the user’s computer. The user needs to indicate that he trusts you in order to allow this. Not doing this would open up a huge security hole, because arbitrary applications embedded in a web page can then execute arbitrary code on the user’s computer.

However, he only needs to do this once for a given certificate. Once he has clicked Yes to your certificate once, assuming it is valid and has not expired, the pop-up should not appear again.

Some companies offer quite cheap HTTPS certificates that you can use instead of a self-signed certificate. You can also get a certificate that’s associated with your e-mail address, an S/MIME certificate. I believe there are services offering those for free.

If you want, you could compile a version of the Panda3D runtime that pre-approves your certificate. The user would have to download and install your custom version of the Panda3D runtime, though.

You are speaking of p3d_plugin.dll/.so right? where is the source of this?
And one more thing if i run my app in my pc and approve certification once, then copy whole \AppData\Panda3d from my pc into target pc, will my app run there without asking about certification? should i copy browser settings/profile too?
I guess i’ll test that tomorrow. :bulb:

But there is cefpython and some example for panda3d which maybe solve my problem of showing some html ui in panda3d. i’m trying to figure out which way is more proper.

No, I’m talking about nppanda3d.dll. The source code is together with the rest of the Panda3D source code. Most of the plugin specific code resides in direct/src/plugin* directories.

You should be able to copy the “certs” directory inside the mentioned directory, which holds the approved certificates.

OK, I’ve tested my sample on an old pc with intel vga with no success, because i had no network access on that pc. so it brings me few questions:
1- What is this “p3d_plugin.dll” and why “nppanda3d.dll” isn’t enough?
2- Even if i copy “p3d_plugin.dll” into user(app-data) Panda3D\coreapi\win32 folder, it still needs to connect to runtime.panda3d.org. so is there anyway to use plugin totally offline?
3- Does a standalone panda3d app need internet too?(by using pdeploy and other pack system).
Here is some log:

Downloading https://runtime.panda3d.org/contents.xml?1427231507: 0M, 05137CC8
Downloaded https://runtime.panda3d.org/contents.xml?1427231507: 0M, 05137CC8, success = 0
Couldn't read C:\DOCUME~1\Majdab\LOCALS~1\Temp\p3d_d03f70.xml
...
C:\DOCUME~1\Majdab\LOCALS~1\APPLIC~1/Panda3D/hosts/runtime.panda3d.org_0f5faf88846080ae/panda3d/cmu_1.8/panda3d.cmu_1.8.win32.xml is stale.
Downloading http://runtime.panda3d.org/panda3d/cmu_1.8/win32/panda3d.cmu_1.8.win32.xml: 0M, 05137CC8
Downloaded http://runtime.panda3d.org/panda3d/cmu_1.8/win32/panda3d.cmu_1.8.win32.xml: 0M, 05137CC8, success = 0
make_temp_filename: C:\DOCUME~1\Majdab\LOCALS~1\Temp\p3d_1962b0.xml
Downloading https://runtime.panda3d.org/contents.xml?1427231507: 0M, 01C0CF58
Downloaded https://runtime.panda3d.org/contents.xml?1427231507: 0M, 01C0CF58, success = 0
release_temp_filename: C:\DOCUME~1\Majdab\LOCALS~1\Temp\p3d_1962b0.xml
Redownloading contents.xml didn't help.
...

Or in p3dplugin.log:

...
start_download: https://runtime.panda3d.org/contents.xml?1427231507
URLNotify: https://runtime.panda3d.org/contents.xml?1427231507, notifyData = 051422A8, reason = 1
Failure starting stream
SetWindow 0, 0, 640, 480
destroy instance 01B05A90, 01C06668
save = 0013F87C
shutdown
  1. p3d_plugin.dll is what is downloaded from runtime.panda3d.org. This allows us to roll out important updates to the plug-in.

  2. In theory you could make a build of Panda similar to what’s on runtime.panda3d.org/ and put that in a directory on the computer, and then build the runtime to use a file:/// URL as host.

  3. If you use pdeploy with “installer” mode and specify the -s option (“standalone”) then it will not require an internet connection.

This is exactly i was thinking of, since i’m serving my html files from a local server(127.0.0.1:9009). i’ll try it.
Thanks.

If you wanted to make such a build, you would have to run makepanda like so:

python2.7 makepanda/makepanda.py --everything --rtdist --distributor mese79 --host http://127.0.0.1:9009/rtdist/

You can also use a file:/// url.

Then, place the contents of “built_mese79/stage” on the web server in the given host URL.

After running this command:

python makepanda/makepanda.py --everything --no-opencv --no-ode --rtdist --distributor mese79 --host http://127.0.0.1:9009/runtime/ --threads 2

I’ve got error:

WARNING: Could not locate thirdparty package artoolkit, excluding from build
WARNING: Could not locate thirdparty package fcollada, excluding from build
WARNING: Could not locate thirdparty package fftw, excluding from build
WARNING: Could not locate thirdparty package fmodex, excluding from build
WARNING: Could not locate thirdparty package squish, excluding from build
WARNING: Could not locate thirdparty package vrpn, excluding from build
WARNING: Could not locate thirdparty package fltk, excluding from build
Generating dependencies...
...
built_mese79/tmp/p3dpython_p3dpython_composite1.o: In function `P3DPythonRun::run_python()':
p3dpython_composite1.cxx:(.text+0x1c3e): undefined reference to `PythonTask::_type_handle'
p3dpython_composite1.cxx:(.text+0x1c83): undefined reference to `PythonTask::PythonTask(_object*, std::string const&)'
built_mese79/tmp/p3dpython_p3dpython_composite1.o: In function `P3DPythonRun::setup_window(P3DCInstance*, TiXmlElement*)':
p3dpython_composite1.cxx:(.text+0x4315): undefined reference to `Dtool_WindowHandle'
collect2: error: ld returned 1 exit status
The following command returned a non-zero value: g++ -o built_mese79/bin/p3dpython -Lbuilt_mese79/lib -Lbuilt_mese79/tmp built_mese79/tmp/p3dpython_p3dpython_composite1.o built_mese79/tmp/p3dpython_p3dPythonMain.o built_mese79/lib/libpanda.so built_mese79i/lib/libpandaexpress.so built_mese79/lib/libp3dtool.so built_mese79/lib/libp3dtoolconfig.so built_mese79/tmp/libp3tinyxml.a -pthread -L/usr/X11R6/lib -lpthread -ldl -lutil -lm -lpython2.7 -ldl

?

I thought I’d fixed that a while ago - are you sure you have the latest GitHub version?

Based on this: [SOLVED]Build runtime on linux I’ve run git pull back then, but i’ve done it now again and bunch of changes applied. so i’ve run the command again to see what would happen.

I’ve got errors about plugin which needs fltk or wx which i have installed both.

direct/src/plugin/p3dCert.h:18:19: fatal error: Fl/Fl.H: No such file or directory

So i’ve changed all “Fl/" into "FL/” and then this error happened:

Linking executable built_mese79/bin/p3dcert
built_mese79/tmp/plugin_p3dCert.o: In function `AuthDialog::~AuthDialog()':
p3dCert.cxx:(.text+0x11c): undefined reference to `Fl_Window::~Fl_Window()'
built_mese79/tmp/plugin_p3dCert.o: In function `AuthDialog::layout()':
p3dCert.cxx:(.text+0x9a4): undefined reference to `Fl_Box::Fl_Box(int, int, int, int, char const*)'
p3dCert.cxx:(.text+0xa0a): undefined reference to `Fl_Button::Fl_Button(int, int, int, int, char const*)'
p3dCert.cxx:(.text+0xa48): undefined reference to `Fl_Button::Fl_Button(int, int, int, int, char const*)'
p3dCert.cxx:(.text+0xa79): undefined reference to `Fl_Group::end()'
p3dCert.cxx:(.text+0xacc): undefined reference to `Fl_Return_Button::Fl_Return_Button(int, int, int, int, char const*)'
p3dCert.cxx:(.text+0xb34): undefined reference to `Fl_Box::Fl_Box(int, int, int, int, char const*)'
built_mese79/tmp/plugin_p3dCert.o: In function `AuthDialog::AuthDialog(std::string const&, std::string const&)':
p3dCert.cxx:(.text+0xbaf): undefined reference to `Fl_Window::Fl_Window(int, int, char const*)'
built_mese79/tmp/plugin_p3dCert.o: In function `ViewCertDialog::layout()':
p3dCert.cxx:(.text+0xcba): undefined reference to `Fl_Text_Buffer::Fl_Text_Buffer(int, int)'
p3dCert.cxx:(.text+0xcca): undefined reference to `Fl_Text_Buffer::insert(int, char const*)'
p3dCert.cxx:(.text+0xcf7): undefined reference to `Fl_Text_Display::Fl_Text_Display(int, int, int, int, char const*)'
p3dCert.cxx:(.text+0xd02): undefined reference to `Fl_Text_Display::buffer(Fl_Text_Buffer*)'
p3dCert.cxx:(.text+0xd47): undefined reference to `Fl_Return_Button::Fl_Return_Button(int, int, int, int, char const*)'
p3dCert.cxx:(.text+0xd87): undefined reference to `Fl_Button::Fl_Button(int, int, int, int, char const*)'
p3dCert.cxx:(.text+0xda0): undefined reference to `Fl_Group::end()'
built_mese79/tmp/plugin_p3dCert.o: In function `ViewCertDialog::ViewCertDialog(AuthDialog*, x509_st*)':
p3dCert.cxx:(.text+0xe1f): undefined reference to `Fl_Window::Fl_Window(int, int, char const*)'
built_mese79/tmp/plugin_p3dCert.o: In function `ViewCertDialog::~ViewCertDialog()':
p3dCert.cxx:(.text+0x66): undefined reference to `Fl_Window::~Fl_Window()'
built_mese79/tmp/plugin_p3dCert.o: In function `main':
p3dCert.cxx:(.text.startup+0x94): undefined reference to `Fl_Window::show(int, char**)'
p3dCert.cxx:(.text.startup+0x99): undefined reference to `Fl::run()'
built_mese79/tmp/plugin_p3dCert.o:(.data.rel.ro._ZTV10AuthDialog[_ZTV10AuthDialog]+0x20): undefined reference to `Fl_Window::draw()'
built_mese79/tmp/plugin_p3dCert.o:(.data.rel.ro._ZTV10AuthDialog[_ZTV10AuthDialog]+0x28): undefined reference to `Fl_Window::handle(int)'
built_mese79/tmp/plugin_p3dCert.o:(.data.rel.ro._ZTV10AuthDialog[_ZTV10AuthDialog]+0x30): undefined reference to `Fl_Window::resize(int, int, int, int)'
built_mese79/tmp/plugin_p3dCert.o:(.data.rel.ro._ZTV10AuthDialog[_ZTV10AuthDialog]+0x38): undefined reference to `Fl_Window::show()'
built_mese79/tmp/plugin_p3dCert.o:(.data.rel.ro._ZTV10AuthDialog[_ZTV10AuthDialog]+0x40): undefined reference to `Fl_Window::hide()'
built_mese79/tmp/plugin_p3dCert.o:(.data.rel.ro._ZTV10AuthDialog[_ZTV10AuthDialog]+0x60): undefined reference to `Fl_Window::flush()'
built_mese79/tmp/plugin_p3dCert.o:(.data.rel.ro._ZTV14ViewCertDialog[_ZTV14ViewCertDialog]+0x20): undefined reference to `Fl_Window::draw()'
built_mese79/tmp/plugin_p3dCert.o:(.data.rel.ro._ZTV14ViewCertDialog[_ZTV14ViewCertDialog]+0x28): undefined reference to `Fl_Window::handle(int)'
built_mese79/tmp/plugin_p3dCert.o:(.data.rel.ro._ZTV14ViewCertDialog[_ZTV14ViewCertDialog]+0x30): undefined reference to `Fl_Window::resize(int, int, int, int)'
built_mese79/tmp/plugin_p3dCert.o:(.data.rel.ro._ZTV14ViewCertDialog[_ZTV14ViewCertDialog]+0x38): undefined reference to `Fl_Window::show()'
built_mese79/tmp/plugin_p3dCert.o:(.data.rel.ro._ZTV14ViewCertDialog[_ZTV14ViewCertDialog]+0x40): undefined reference to `Fl_Window::hide()'
built_mese79/tmp/plugin_p3dCert.o:(.data.rel.ro._ZTV14ViewCertDialog[_ZTV14ViewCertDialog]+0x60): undefined reference to `Fl_Window::flush()'
collect2: error: ld returned 1 exit status
The following command returned a non-zero value: g++ -o built_mese79/bin/p3dcert -Lbuilt_mese79/lib -Lbuilt_mese79/tmp built_mese79/tmp/plugin_mkdir_complete.o built_mese79/tmp/plugin_wstring_encode.o built_mese79/tmp/plugin_p3dCert.o -pthread -L/usr/lib64/ -L/usr/X11R6/lib -lssl -lcrypto -ldl

After i’ve googled it i made this change in makepanda.py:

SmartPkgEnable("FLTK", "", ("fltk"), ("Fl/Fl.H"), tool = "fltk-config")

to

SmartPkgEnable("FLTK", "", ("fltk"), ("Fl/Fl.H"), tool = "fltk-config --ldflags")

For wx it seems more complicated. my wx headers is in /usr/include/wx-2.8/wx and setup.h is in /usr/lib64/wx/include/gtk2-unicode-release-2.8/wx/setup.h .
So i’m not sure it’s a bug or an issue for my linux distro.

Hmm, maybe Fltk changed their API from one version to the next.

You don’t need wx if you have fltk. Fltk is preferred because it’s smaller. They are actually only used for the certification approval dialog.

Another issue:

File ".../built_mese79/direct/p3d/Packager.py", line 839, in addFile
    if file.filename in self.sourceFilenames:
TypeError: expected string or Unicode object, panda3d.core.Filename found

So it should be what? file.filename.getFullPath() maybe?

Whoops, a regression in our binding generator. Changing it to this would be a workaround:

if str(file.filename) in self.sourceFilenames:

Also in Filespec.py:

self.filename = filename.cStr()

must change into

self.filename = str(filename)

Since i’m on linux x64 the stage folder only contains stuff for current OS only. Is it ok if i dowload all stuff in https://runtime.panda3d.org/ and put them on my server? Does this way work or the --distributor flag is important?

I don’t know if it’ll work. It might. You could try.

OK, it seems it’s not possible to work totally offline.
After i built panda and the plugin with --rtdist and --host 127.0.0.1:9009/runtime, i removed my ~/.panda3d directory, then i’ve tried to make a p3d package:

./runtime/packp3d1.9.p3d -h
:downloader: [0xe29580] begin GET [ https://runtime.panda3d.org/contents.xml?1427296673 ]
:downloader: [0xe29580] begin GET [ http://runtime.panda3d.org/coreapi/linux_amd64/p3d_plugin.so ]
:downloader: [0xe35910] begin GET [ https://runtime.panda3d.org/contents.xml?1427296685 ]
:downloader: [0xe37de0] begin GET [ http://127.0.0.1:9009/runtime/contents.xml?1427296685 ]
:downloader: [0xe607e0] begin GET [ http://127.0.0.1:9009/runtime/contents.xml?1427296685 ]
:downloader: [0xe8c7c0] begin GET [ http://127.0.0.1:9009/runtime/egg/mese79_1.9/linux_amd64/egg.mese79_1.9.linux_amd64.xml ]
:downloader: [0xe37de0] begin GET [ http://127.0.0.1:9009/runtime/panda3d/mese79_1.9/linux_amd64/panda3d.mese79_1.9.linux_amd64.xml ]
:downloader: [0xe8c7c0] begin GET [ http://127.0.0.1:9009/runtime/panda3d/mese79_1.9/linux_amd64/panda3d.mese79_1.9.linux_amd64.mf.pz ]
Installing Panda3D
:downloader: [0xe49880] begin GET [ http://runtime.panda3d.org/images/images.xml ]
:downloader: [0xe49880] begin GET [ http://runtime.panda3d.org/images/images.mf.1.pz ]
:downloader: [0xe6f1f0] begin GET [ http://127.0.0.1:9009/runtime/egg/mese79_1.9/linux_amd64/egg.mese79_1.9.linux_amd64.mf.pz ]
Installing Panda3D egg loader
/home/mehdi/.panda3d/hosts/127.0.0.1_4c79d8622b5584be/panda3d/mese79_1.9/p3dpython: error while loading shared libraries: core.so: cannot open shared object file: No such file or directory
Install complete.
Failed to execute.

And in p3dcore.log:

...
PANDA3D_ROOT=/home/mehdi/.panda3d/hosts/127.0.0.1_4c79d8622b5584be/panda3d/mese79_1.9
  EGG_ROOT=/home/mehdi/.panda3d/hosts/127.0.0.1_4c79d8622b5584be/egg/mese79_1.9
Attempting to start python from /home/mehdi/.panda3d/hosts/127.0.0.1_4c79d8622b5584be/panda3d/mese79_1.9/p3dpython
Not changing working directory.
Python process stopped immediately.
  exited normally, status = 127
Failed to create process.
setting background to failed, splash_window = 0
send_notify(onfail)
notify: ondownloadcomplete 
notify: onready 
notify: onfail 

The created packp3d.p3d file doesn’t work even online. also i’ve noticed that in this built panda3d/core.so only has 10.5mb file size while in former built(without --rtdist) core.so has about 18.7mb. i’m confused maybe i missed an option.

Anyway i’m gonna use normal built and run my app first time online, then copy ~/.panda3d in target system and run my app offline. i guess this way should work. also i’ll try to turn off certification alarm, even though i’m not a C/C++ developer! but it would be nice to add a localizable certification dialog by supporting different languages.

I really appreciate your help and support here.

I just checked in fixes to the binding generator that should cover the issues reported previously.

I’ve just checked in another fix that should resolve this issue. We’re getting close to making a new release, so I’ve been merging in a lot of different changes, so this type of breakage is bound to happen. Sorry about the noise.

That’s to be expected, since --rtdist uses optimize level 4 by default (rather than 3). In fact, I’m a bit surprised it isn’t smaller.

I would recommend against this. If you ship a version of the plug-in without certification alarm, you are putting your customers in danger since their browser will automatically run arbitrary code in .p3d files on other people’s web sites as well.

If you want, you can pre-approve your certificate by putting it in the “certlist” package, hosted at the location that is compiled into the plug-in. You can then ship your own version of the plug-in pointing at that host URL.

This is a great idea. The strings are defined in direct/src/plugin/p3dCert.cxx - I would be in favour of adding localized strings for each language.

I’m trying not to install my customized plugin but deliver it beside my portable app(by using cefpython). but it seems npapi plugins support removed in Chrome on linux and will be removed on Windows soon).
See here: groups.google.com/forum/#!topic … 8UuEA2nvQw

Could you explain more about certlist? in my custom rtdist stage folder i have a certlist folder with 3 files. i guess “certlist.xml” must be edited, right?

<?xml version="1.0" encoding="utf-8" ?>
<package name="certlist" per_platform="1" seq="1">
    <uncompressed_archive filename="certlist.mf" size="22" timestamp="1427284644" hash="ef22d24cc462dcb6bc021418a3e2542c" />
    <compressed_archive filename="certlist.mf.pz" size="19" timestamp="1427284644" hash="afd5b01fc22dd2dcc78d6e4f18402a61" />
</package>

Then how can i add pre-approved “mycert.pam” into it?
Thanks.