Can you please provide some more details, Pascal, on how to register the
provisioningAgent? Thanks a lot.

Best Regards

Samuel Wu



|------------>
| From:      |
|------------>
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
  |Pascal Rapicault <[email protected]>                                       
                                                                     |
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| To:        |
|------------>
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
  |P2 developer discussions <[email protected]>                                
                                                                     |
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Date:      |
|------------>
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
  |05/29/2011 09:32 PM                                                          
                                                                     |
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Subject:   |
|------------>
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
  |Re: [p2-dev] How to turn of the security warning during a feature    
installation                                                                    
|
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
|------------>
| Sent by:   |
|------------>
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|
  |[email protected]                                                   
                                                                     |
  
>--------------------------------------------------------------------------------------------------------------------------------------------------|





You need to have a bundle that registers the service against the
provisioningAgent before the p2 UI gets called.

On 2011-05-27, at 9:07 AM, Samuel Wu wrote:



      Thank you, Eugen, for the suggestion. But I'm running the update
      through UI. Wonder how to override UIService in this situation.

      Best Regards

      Samuel Wu


      <graycol.gif>Eugen Reiswich ---05/27/2011 08:46:25 AM---Hi Samuel, I
      had the same problem while invoking the update operation
      programmatically. To overcome
                                                                       
 <ecblank.gif <ecblank.gif>                                            
 >            Eugen Reiswich <[email protected]>                
 From:                                                                 
                                                                       
 <ecblank.gif <ecblank.gif>                                            
 >            P2 developer discussions <[email protected]>            
 To:                                                                   
                                                                       
 <ecblank.gif <ecblank.gif>                                            
 >            05/27/2011 08:46 AM                                      
 Date:                                                                 
                                                                       
 <ecblank.gif <ecblank.gif>                                            
 >            Re: [p2-dev] How to turn of the security warning during a
 Subject:     feature installation                                     
                                                                       
 <ecblank.gif <ecblank.gif>                                            
 >            [email protected]                               
 Sent by:                                                              
                                                                       







      Hi Samuel,

      I had the same problem while invoking the update operation
      programmatically. To overcome this issue the P2 community suggested
      to override UIService within the ProvisioningAgent:

      /**
      * This service forces P2 not to open a validation dialog ("...you're
      installing
      * untrusted content..."). Otherwise the dialog will block headless
      RCP
      * applications during install/update operations.
      *
      * @author e.reiswich
      * @date 2011-02-14
      *
      */
      public class ValidationDialogService extends UIServices {

      private final Logger LOGGER = Logger
      .getLogger(ValidationDialogService.class.getName());

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

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

      @Override
      public TrustInfo getTrustInfo(Certificate[][] untrustedChain,
      String[] unsignedDetail) {
      LOGGER.info("TrustedInfo overridden");
      boolean trustUnsigned = true;
      boolean persistTrust = true;

      Certificate[] trusted = new Certificate[0];
      TrustInfo trustInfo = new TrustInfo(trusted, trustUnsigned,
      persistTrust);
      return trustInfo;
      }

      /**
      * This method will override the default UIServices instance within
      the
      * provisioning agent. This will prevent the blocking "...you're
      installing
      * untrusted content..." dialog to appear.
      *
      * @param agent
      * The P2 provisioning agent.
      */
      public void bindProvisioningAgent(IProvisioningAgent agent) {
      LOGGER.info("ValidationDialogService: UIServices overridden");
      agent.registerService(UIServices.SERVICE_NAME, this);
      }

      }

      The IProvisioningAgent instance is retrieved using DS.

      Eugen

      Am 27.05.2011 um 14:35 schrieb Samuel Wu:
                  Hello there,
                  When install a feature, we got the following security
                  warning since we didn't sign the feature we built. It's
                  quite annoying. Is there a way to turn it off? Thanks.
                  <23497438.gif>

                  Best Regards

                  Samuel Wu


                  _______________________________________________
                  p2-dev mailing list
                  [email protected]
                  https://dev.eclipse.org/mailman/listinfo/p2-dev


      _______________________________________________
      p2-dev mailing list
      [email protected]
      https://dev.eclipse.org/mailman/listinfo/p2-dev


      _______________________________________________
      p2-dev mailing list
      [email protected]
      https://dev.eclipse.org/mailman/listinfo/p2-dev
_______________________________________________
p2-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/p2-dev

<<inline: graycol.gif>>

<<inline: ecblank.gif>>

_______________________________________________
p2-dev mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/p2-dev

Reply via email to