Need help with WinGate SDK

Use this forum to post questions relating to WinGate, feature requests, technical or configuration problems

Moderator: Qbik Staff

Need help with WinGate SDK

Postby f0rtung » Sep 21 15 1:38 am

Hello!
I want to create some plugin for WinGate. I downloaded Wingate SDK from here http://www.wingate.com/download/wingate ... wnload.php and I began to study your materials about it (http://docs.qbik.com/display/WINGATESDK/WinGate+SDK). But now i have some problem with making a manifest-file:
I build VS project, then i copy ManifestPrep.exe to source folder, where i see TestPlugin2.manifest.xml (for example), i run cmd and execute command (i try a lot of difference options):
ManifestPrep.exe TestPlugin2.manifest.xml TestPlugin2.manifest "My"
ManifestPrep.exe TestPlugin2.manifest.xml TestPlugin2.manifest "TrustedPublisher"
ManifestPrep.exe TestPlugin2.manifest.xml TestPlugin2.manifest Qbik New Zealand Limited
and so on...
And then I get an error:
C:\TestPlugin2>ManifestPrep.exe -P TestPlugin2.manifest.xml TestPlugin2.manifest Qbik New Zealand Limited
TCHAR > 1
Manifest compilation utility
Copyright (c) 2010 Qbik New Zealand Limited
===========================================
Reading manifest: TestPlugin2.manifest.xml
Validating XML for package 'TestPlugin2Engine'
Validating XML for module 'TestPlugin2 (Engine)'
Validating XML for module 'TestPlugin2 (UI)'
Removing developer information from <TestPlugin2Engine> package.
Removing developer information from <TestPlugin2 (Engine)> module.
Removing developer information from <TestPlugin2 (UI)> module.
Generating dependencing hashes for module files
Generating hashes for files in module 'TestPlugin2 (Engine)'.
Generated MD5 for .\TestPlugin2Engine\Release\TestPlugin2Engine.dll
Generating hashes for files in module 'TestPlugin2 (UI)'.
Generated MD5 for .\TestPlugin2UI\Release\TestPlugin2UI.dll
Signing and writing manifest: TestPlugin2.manifest
Could not find the specified signing certificate.

I try to use different certificates in my OS, but It does not help me.
Please, can you explain what am I doing wrong?
Thank you!
f0rtung
 
Posts: 7
Joined: Sep 21 15 1:11 am

Re: Need help with WinGate SDK

Postby Aaron Koolen-Bourke » Sep 21 15 10:31 am

Hi there.

Your first two examples are using a certificate store instead of a certificate. The third one is our certificate but you cannot sign with that because you need the version with the private key which we dno't ship. If anyone could sign with anyone else's certificate it would defeat the whole purpose of trust.

So to sign your manifest file you will need to get your own certificate. Either purchase one from a certificate authority or generate a self signing certificate. There are lots of instructions online how to do the latter, with openssl being an option.

Also, if you are just developing your plugin (And not releasing it to the world yet) you can run WinGate and the WinGate Management Console in developer mode (You need a developer license from our website here) and you don't need to sign your manifest file.

Let us know if you need any other help.

Thanks
Aaron
Aaron Koolen-Bourke
Qbik Staff
 
Posts: 56
Joined: Dec 01 10 2:48 pm

Re: Need help with WinGate SDK

Postby f0rtung » Sep 23 15 3:27 am

Hi!
Thanks for you reply!
I did certificate by this instruction http://www.jayway.com/2014/09/03/creating-self-signed-certificates-with-makecert-exe-for-development/, and now i have in "My"-section 1 certificate, called CARoot.
I run ManifestPrep with key -L and see there it:

C:\TestPlug>ManifestPrep.exe -L
TCHAR > 1

Manifest compilation utility
Copyright (c) 2010 Qbik New Zealand Limited
===========================================
Store 'My'
CARoot

Then i try to sign my Manifest file, but it fail again:
C:\TestPlug>ManifestPrep.exe -D TestPlug.manifest.xml TestPlug.manifest CARoot
TCHAR > 1

Manifest compilation utility
Copyright (c) 2010 Qbik New Zealand Limited
===========================================
Command Line: ManifestPrep.exe -D TestPlug.manifest.xml TestPlug.manifest CARoot

File root directory: .
List certificate stores:NO
List certificates:NO
Store:Default
Show Progress:YES

Reading manifest: TestPlug.manifest.xml
Length of file: 1290 bytes
Found root '<wingatePackage>' element'
Found '<package>' element'
Package name:TestPlugEngine
UUID '{A5D49F66-FF9D-47E1-BD50-612DC7744D16}' validated OK
Found <modules> element
Validating XML for package 'TestPlugEngine'

Validating XML for module 'TestPlug (Engine)'
UUID '{0B90574C-7BAB-4396-91C5-D7C7788209C6}' validated OK
Host:Engine
Dependency file: TestPlugEngine.dll
EntryPoint:YES
File destination type: local

Validating XML for module 'TestPlug (UI)'
UUID '{2857E804-AA96-494A-B3E5-2270E798FEA0}' validated OK
Host:UI
Dependency file: TestPlugUI.dll
EntryPoint:YES
File destination type: local
Removing developer information from <TestPlugEngine> package.
Removing developer information from <TestPlug (Engine)> module.
Removing developer information from <TestPlug (UI)> module.
Generating dependencing hashes for module files
Generating hashes for files in module 'TestPlug (Engine)'.
Generated MD5 for .\TestPlugEngine\Release\TestPlugEngine.dll
Generating hashes for files in module 'TestPlug (UI)'.
Generated MD5 for .\TestPlugUI\Release\TestPlugUI.dll
Signing and writing manifest: TestPlug.manifest
Can't sign data

There were errors:
Can't sign data

Sorry for my stupid question, but i can't understand, what I should do :( May be my certificate is bad, or i did it wrong.
f0rtung
 
Posts: 7
Joined: Sep 21 15 1:11 am

Re: Need help with WinGate SDK

Postby f0rtung » Sep 23 15 10:04 pm

Hello!
I did it! :) I just forgot to export the .pfx file.
Thanks!
f0rtung
 
Posts: 7
Joined: Sep 21 15 1:11 am

Re: Need help with WinGate SDK

Postby f0rtung » Sep 23 15 11:37 pm

Well...it is again me :) Hi!
I managed to sign manifest-file, but now i dont see the plugin in control panel. I builded default project in VS2010.
After i signed manifest-file, i created folder in C:\Program Files\WinGate\Packages - TestPlugin, after that i
copied 3 files there: TestPlugin.manifest, TestPlginEngine.dll and TestPluginUI.dll. Then i changed in reg-branch
path to the manifest-file on C:\Program Files\WinGate\Packages\TestPlugin\TestPlugin.manifest and restarted WinGate service.
Could you give me some advice, what should i do ?
f0rtung
 
Posts: 7
Joined: Sep 21 15 1:11 am

Re: Need help with WinGate SDK

Postby adrien » Sep 23 15 11:49 pm

Hi

does your module load in the engine or GUI?

If in the engine, and it's not loading you should see:

a) something in windows event log (application log) with information about the error.

in both cases you should also see

b) something in the modules panel in WinGate Management

Regards

Adrien
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: Need help with WinGate SDK

Postby f0rtung » Oct 01 15 8:31 pm

Hello!
I found a problem: in manifest file need to change <platform os="Any" /> to <platform os="WinAny" /> , without it plug-in doesn't work.
I begun to make plugin from user interface, and now i need some information, could you give me some advices: i need to get statuses from http\smtp\pop\http filters (enable\disable in Services), but i dont know how. I try reading attentively SDK documentation (from here http://docs.qbik.com/pages/viewpage.act ... Id=5767184 and further), but didn't find the answer. May be you can give me some link on SDK-page or some simple example?
Thank you very much in advance!
f0rtung
 
Posts: 7
Joined: Sep 21 15 1:11 am

Re: Need help with WinGate SDK

Postby adrien » Oct 02 15 12:41 am

Hi

so you want to enumerate filters and see what is enabled on a service?

There's no API for that sorry, I can't think of a way to figure that out.

Are you writing a filter and want to see what other filters are in the service and whether they are enabled?

Adrien
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland

Re: Need help with WinGate SDK

Postby f0rtung » Oct 02 15 1:23 am

I write my filter. And I need to add in main plugin page some indicators (for example red and green icons), when the filter has been chosen in Service's options (when I choose Enable - green icon, else red ).
As I know, in previous version (6 ver) i could get this information from Windows Registry (branch Software\\Qbik Software\\WinGate\\Services\\WWW Proxy Server\\Data Scanning Plugins), now there I see the same (HKEY_LOCAL_MACHINE\SOFTWARE\Qbik Software\WinGate\Services\WWW Proxy Server\Filters\{7AAA4062-7038-4485-9D1A-2758B24FB6AB} has DWORD value Enabled (1 or 0) ). What is this {7AAA4062-7038-4485-9D1A-2758B24FB6AB}? It isnt id from manifest file. Can i know this id for my filter?
Thank you very much in advance!
Last edited by f0rtung on Oct 02 15 3:43 am, edited 1 time in total.
f0rtung
 
Posts: 7
Joined: Sep 21 15 1:11 am

Re: Need help with WinGate SDK

Postby f0rtung » Oct 02 15 1:38 am

Sorry again :( I found this.
f0rtung
 
Posts: 7
Joined: Sep 21 15 1:11 am

Re: Need help with WinGate SDK

Postby adrien » Oct 02 15 7:36 am

Hi

the ID is the one you give WinGate when you register your filter.

Adrien
adrien
Qbik Staff
 
Posts: 5448
Joined: Sep 03 03 2:54 pm
Location: Auckland


Return to WinGate

Who is online

Users browsing this forum: No registered users and 7 guests

cron