[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [p2-dev] P2 security warning in headless RCP applications

Hi Pascal, 

I would prefer the second solution. I've created now the following service: 

public class ValidationDialogService extends UIServices {

@Override
public AuthenticationInfo getUsernamePassword(String location) {
return null;
}

@Override
public AuthenticationInfo getUsernamePassword(String location,
AuthenticationInfo previousInfo) {
return null;
}

@Override
public TrustInfo getTrustInfo(Certificate[][] untrustedChain,
String[] unsignedDetail) {
return null;
}

}

1. Do I have to re-implement all of these methods or can they return null? If I have to re-implement them, how would a minimal implementation look like?
2. What is the appropriate interface I have to register the service with? org.eclipse.equinox.p2.core.UIServices ?

Eugen



Am 05.01.2011 um 14:40 schrieb Pascal Rapicault:

This dialog results from the execution of the checkTrust phase that is responsible for checking the signatures of everything being installed.
There are two ways to get rid of it:
1) When the engine is invoked, specify a phase set that does not include the checktrust phase
IEngine#perform(IPPlan, IPhaseSet, IProgressMonitor)
see PhaseSetFactory#createDefaultPhaseSetExcludin()
This will cause the signature check to not be performed and thus no dialog will be opened

2) Register a different UIServices service to replace the default one that prompts (ValidationDialogServiceUI).
In this case the signature verification is still performed by then engine but the user is not prompted since your code would not do that.


On 2011-01-05, at 8:02 AM, Eugen Reiswich wrote:

Hi folks,

we are working on a P2 based installation app for headless RCP applications. So far P2 works fine but sometimes the installation process blocks because P2 opens a dialog with some security warnings (see attachment). As we are developing a headless RCP application there is no one who can confirm or cancel this dialog.

Is there any possibility to avoid this dialog?

Cheers,
Eugen


<p2_security_warning.png>_______________________________________________
p2-dev mailing list
p2-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/p2-dev

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