Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] The org.eclipse.equinox.security.secureStorage extension point

Hi Oleg,
I still see the problem but its a fairly complex setup. I'll try to create something simpler that simulates the same flow.

Thanks,
Thomas Hallgren

Oleg Besedin wrote:

Hi Thomas,
It has been tested without SWT; I just re-checked it to be sure - works fine for me.

Regarding your concerns on the optional dependency: Consider that to get to the code you copied you need:

- Not be in a headless run (the secure storage sets an option to suppress prompts for headless runs and JUnits), and - Have a error in the secure storage where the master password can not be decrypted

Next, if execution path does get to that code, it catches the NoClassDefFoundError and eventually translates it into StorageException(StorageException.NO_PASSWORD).

In principle, VM could be constructed to load class files eagerly. Practically, VMs try to load as little as they can to speed up the processing. To be on the safe side, the usual approach is to isolate code dealing with optional bundles into a separate class. (This is not always necessary but saves a lot of thinking.)

So, that code works without SWT. As for "been thoroughly tested" I'll leave that to the Eclipse QA team to answer.

Back to secure storage: do you still see the problem? If you see it with the current version of the x86 fragment, please open a bug with steps to reproduce.

Thanks,
Oleg Besedin




*Thomas Hallgren <thomas@xxxxxxx>*
Sent by: equinox-dev-bounces@xxxxxxxxxxx

07/03/2008 10:36 AM
Please respond to
Equinox development mailing list <equinox-dev@xxxxxxxxxxx>


	
To
	Equinox development mailing list <equinox-dev@xxxxxxxxxxx>
cc
	
Subject
Re: [equinox-dev] The org.eclipse.equinox.security.secureStorage extension point



	





Hi Oleg,
I confused the extension id with the class name. I'm using the 3.4
release of the delta pack. The fragment.xml declares:

extension id="WindowsPasswordProvider"

which should be OK since the comparison that is made when finding it is
case insensitive.

Now I'm starting to wonder, could this be caused by the optional
dependency on org.eclipse.swt? This bundle is deliberately omitted from
my setup. I found this piece of code:

try {
   if (!WinCryptoUI.canRecreatePassword())
       return null;
} catch (NoClassDefFoundError exception) {
   return null;
}

and that makes me wonder. Does this really work? Isn't there a fair
chance that the JVM will attempt to resolve the class before it enters
the try/catch? I wouldn't be surprised if the optimizer, while doing
first pass rudimentary inlining, in fact attempts to resolve this class
too early and thus fails. Has this been thoroughly tested without swt
present?

Regards,
Thomas Hallgren


Oleg Besedin wrote:
>
> Hi Thomas,
> You are on the right path; the
> "org.eclipse.equinox.security.win32.x86" fragment provides
> "WindowsPasswordProvider". Did you by chance get an old version of the
> fragment from the incubator?
>
> The up-to-date graduated version is in the
> ":pserver:anonymous@xxxxxxxxxxxxxxx:/cvsroot/eclipse" repository under
> Head/org.eclipse.equinox/security/bundles.
>
> As a side note, we need to discuss during the Equinox meeting if it is
> better to remove old bundles that have been graduated from the
> repository (less confusion) or keep them (more history).
>
> Thanks,
> Oleg Besedin
>
>
>
> *Thomas Hallgren <thomas@xxxxxxx>*
> Sent by: equinox-dev-bounces@xxxxxxxxxxx
>
> 07/03/2008 05:17 AM
> Please respond to
> Equinox development mailing list <equinox-dev@xxxxxxxxxxx>
>
>
> > To > Equinox development mailing list <equinox-dev@xxxxxxxxxxx>
> cc
> > Subject > [equinox-dev] The org.eclipse.equinox.security.secureStorage > extension point
>
>
>
> >
>
>
>
>
> When running headlessly I get an exception with the following message:
>
> "Unable to locate secure storage module
> (org.eclipse.equinox.security.windowspasswordprovider)"
>
> First I thought that I'd forgotten to include the fragment
> org.eclipse.equinox.security.win32.x86 but when I look more closely I
> see that this fragment only adds a module with the id
> "org.eclipse.equinox.internal.security.win32.WinCrypto"
>
> So what bundle is it that defines the module with id
> "org.eclipse.equinox.security.windowspasswordprovider" ?
>
> Regards,
> Thomas Hallgren
>
>
> _______________________________________________
> equinox-dev mailing list
> equinox-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/equinox-dev
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> equinox-dev mailing list
> equinox-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/equinox-dev
>
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev

------------------------------------------------------------------------

_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev



Back to the top