How to disable the verbose mode in HTTPS ?

Hello Everybody,
I'd like to know how I can make an https connection in which the text of the transaction with the distant server doesn't show in the console
here is my code :
URL rawURL = new URL(url);
if(rawURL.getProtocol().startsWith("https"))
     System.setProperty("java.protocol.handler.pkgs","com.sun.net.ssl.internal.www.protocol");
     System.setProperty("javax.net.debug","ssl,handshake,data,trustmanager");
     Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());
     TrustManager[] trustAllCerts = new TrustManager[]{
     new X509TrustManager()
          public void checkClientTrusted(X509Certificate[] chain, String authType) {}
          public void checkServerTrusted(X509Certificate[] chain, String authType) {}
          public X509Certificate[] getAcceptedIssuers() {
               return null;
     HostnameVerifier hv = new HostnameVerifier()
                     public boolean verify(String urlHostName, SSLSession session)
                          return true;
     /*Initialisation de la connection*/
     try
          SSLContext sc = SSLContext.getInstance("SSL");
          sc.init(null, trustAllCerts, new java.security.SecureRandom());                         HttpsURLConnection.setDefaultSSLSocketFactory(sc.getSocketFactory());
          HttpsURLConnection.setDefaultHostnameVerifier(hv);
          HttpsURLConnection.setFollowRedirects(false);
     catch(NoSuchAlgorithmException nsae){}
     catch(KeyManagementException kme)
                     kme.printStackTrace();
     /* creation de la connection */
     urlCon = ((HttpsURLConnection)rawURL.openConnection());
urlCon.setInstanceFollowRedirects(true);
urlCon.setReadTimeout(12000);
urlCon.setConnectTimeout(7000);
urlCon.addRequestProperty("User-Agent","Mozilla/5.0 (X11; U; Linux i686; fr; rv:1.7.12) Gecko/20050922 Firefox/1.0.7 (Debian package 1.0.7-1)");
urlCon.addRequestProperty("Host",urlCon.getURL().getHost());
urlCon.addRequestProperty("Accept-Language", "fr,fr-fr;q=0.8,en-us;q=0.5,en;q=0.3");
switch (urlCon.getResponseCode())
}Thank's !

     System.setProperty("java.protocol.handler.pkgs","com.sun.net.ssl.internal.www.protocol");You don't need that unless you're running 1.3 or earlier.
     System.setProperty("javax.net.debug","ssl,handshake,data,trustmanager");You don't need that unless you want verbose mode.
     Security.addProvider(new com.sun.net.ssl.internal.ssl.Provider());You don't need that unless you're running 1.3 or earlier.
     TrustManager[] trustAllCerts = new TrustManager[]{You don't need this thing at all unless you like (a) code that doesn't implement its specification correctly and (b) insecure code. If your truststore doesn't trust the server certificate, that's the server's problem. Get them to fix it, by getting their certificate signed by a recognized CA.
     HostnameVerifier hv = new HostnameVerifier()Much the same remarks. This piece of code is insecure and it just addresses a problem with the server certificate. Get the problem fixed.
Otherwise in both cases you may as well not be using HTTPS at all - there is no security.
     catch(NoSuchAlgorithmException nsae){}Never ignore an exception.
urlCon.setInstanceFollowRedirects(true);If you have that you don't need the global setFollowRedirects call above, so you should remove it.

Similar Messages

  • How to disable the Calculation mode in oracle form

    hi All,
    i have 2 text items in one block.say TEXT_A, TEXT_B
    TEXT_B is showing the SUM of TEXT_A where TEX_A is poulated by DB query and showing UOM(unit of measure for an item).
    But
    on some condition, i dont want to do SUM (like if the UOM are differents).
    how can we disable or off the calculation mode for TEXT_B.
    Nitn

    hi Craig
    thanks for your reply but its not working-
    please agn read the scenario , i have added more details -
    suppose in a single block we have 3 TEXT_ITEM
    I have one text item TEXT_A which is populated by EXECUTE_QUERY .TEXT_A having 3 lines and values may be-
    first case
    KG
    KG
    KG
    Second case
    KG
    KG
    METER
    TEXT_B also having 3 lines and USer can enter values in this field.
    TEXT_C is the sum of text_B and TEX_C is having one line as to show sum of B .
    i have set the TEXT_C property palette properties to show sum of TEXT_B and it is working fine.
    now if the values are same in TEXT_A, TEXT_C should show SUM of text_b.
    but if it is second case if the values are different then TEXT_C should not poulate .
    do we have any SET_ITEM_PROPERTY(':blk_name',???????????,prperty_false)
    ?????????= so it can disable the Summary function whihc i set from property pallettle
    hoping for reply.

  • How I disable the iPad picture frame mode?

    Several times I looked in the settings but could not find this option, just in the passcode settings, but I turned off the passcode, the picture frame is turned on WHY? And how I disable the picture frame? I looked this on youtube in an iPad review video at 2:35 min: http://www.youtube.com/watch?v=Aly5Q_mUhVI
    Thanks for the help.

    Of course you can.
    If you don't want the little flower icon appearing on the unlock screen, set the Allow Picture Frame to Off under Passcode in General Settings.
    If you want to deactivate the Pcitrue Frame mode while its running, tap the home button once, and click on the Flower icon at the bottom right whihc should be blue since its on.

  • How to disable mac book sleep for when I close the lid. I have a monitor attached to the mac book and as soon as I close the lid on the mac book it goes toi sleep. Any way to disable the sleep mode? Thanks

    Boss bought a new monitor for his mac book. We connected it but he rather keep the mac book lid closed in order to work on the bigger monitor screen. Soon as he closes the lid, the mac book goes to sleep mode.
    Is there a free way to disable the sleep mode?

    When the MacBook goes to sleep just hit a key on your external keyboard and the monitor will come back on.
    http://support.apple.com/kb/HT3131

  • How to disable the extended display mode on iMac?

    how to disable the extended display mode on imac

    I downloaded one of the PDF form (IMM5490) from cic.gc.ca and saved it on my computer after filling it up. Later on the following message popped up when I tried to open the form again later to in order to make some changes.
    "This document enabled extended features in Adobe Reader. The document has been changed since it was created and use of extended features is no longer available. Please contact the author for the original version of this document"
    Your help in this regard will be greatly appreciated, since, I have already filled the form with a lot of information and I will not be able to edit the form with additional information unless I disable the extended features ( I guess).

  • How to disable the archive logs in SAP IDES(Windows) using SQL Server

    can any body tell us How to disable the archive logs in SAP IDES(Windows 2003) using SQL Server 2000.SP4.?

    Hi,
    Unfortunately, SQL Server does not have the option to turn off transaction logging. You can set the recovery mode to SIMPLE, instead of FULL. This will result in the transaction log being truncated on checkpoint.
    http://support.microsoft.com/kb/873235 - check this microsoft article
    This will help in reduction of the size of the transcation log.
    - Regards, Dibya

  • How to disable the ipod even if connected to itunes

    how to disable the ipod even if connected itunes and not responded

    If you mean your iPod is disabled, try restoring in Recovery Mode to remedy it: http://support.apple.com/kb/HT1808

  • How to disable the previously entered user ID's that automatically appear. For example ; when logging into email , first letter of user ID promts the previously used email user IDs... Want to disable this feature---How can ot be done ?

    Question
    How to disable the previously entered user ID's that automatically appear. For example ; when logging into email , first letter of user ID prompts the previously used email user IDs... Want to disable this feature---How can it be done ?

    *Click the (empty) input field on the web page to open the drop down list
    *Highlight an entry in the drop down list
    *Press the Delete key (on Mac: Shift+Delete) to remove it.
    *http://kb.mozillazine.org/Deleting_autocomplete_entries
    * Tools > Options > Security: Passwords: "Saved Passwords" > "Show Passwords"
    * Tools > Options > Privacy > History: "Remember search and form history"
    * https://support.mozilla.com/kb/Remembering+passwords
    * https://support.mozilla.com/kb/Form+autocomplete

  • How to disable the selection of "Title and logo URL of a SharePoint 2013 site" from browser

    how to disable the selection of "Title and logo URL of a SharePoint 2013 site" from browser or How can we able to set our custom default log to the sp2013 site using code.So that users are not allowed to change from browser again.
    Thanks & Regards, Krishna

    Hi  Krishna,
    For your issue, you need to deploy a farm solution using HideCustomAction to hide site settings link. For example to hide “Title, description, and logo” link you can use below code:
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <HideCustomAction
    GroupId="Customization"
    HideActionId = "ProjectSettings"
    Location = "Microsoft.SharePoint.SiteSettings">
    </HideCustomAction>
    </Elements>
    Reference:
    http://social.msdn.microsoft.com/Forums/sharepoint/en-US/92f002b7-0e9c-424e-836a-de40c4e5d81f/hide-option-from-site-settings-page-in-sharepoint-2010?forum=sharepointdevelopmentprevious
    http://blog.milanchauhan.com/2013/06/add-custom-section-in-site-settings.html
    Best Regards,
    Eric
    Eric Tao
    TechNet Community Support

  • How to disable the status icon in Skype 4 for Andr...

    Dear Skypers,
    How to disable the status icon in Skype 4 for Android phones?
    The guide on this following support page not working anymore: https://support.skype.com/en/faq/FA12359/how-do-i-enable-or-disable-the-status-icon-in-skype-4-for-a...
    Older version has the option to disable Skype Status and get rid of the Skype icon on Android status bar. But latest 4.4.0.31835 could not disable Skype Status in notifications settings. :/
    Device: Google Nexus 4
    Android: 4.3 JWR66Y
    Skype: 4.4.0.31835
    Please bring back the option to disable the Skype icon on Android status bar. This is the main reason I uninstall Skype. :/
    Kudos to the team, the apps is really smooth and fluid to use. Would be nice if you guys are following the Android Design Principles and using Google Cloud Messaging for push notification to improve User Experience and battery life.
    Kind regards,
    /chrone
    everytime i get ahead, i feel more dead.
    Solved!
    Go to Solution.
    Attachments:
    how to get rid of skype icon on android status bar.png ‏46 KB

    Long click on this notification a sub menu having field "App info" would appear goto App Info. You can goto there by "Manage Apps">"Skype" also. 
    Uncheck Option "Show Notifications" A dialog will open. Don't worry about notifications for now just click OK. Now the notification icon skype has also been removed. 
    Now simply check "Show notification again". After doing this you would get notifications but skype icon would not be shown in the status bar anymore.
    Issue: this is just a trick you need to repeat this every time sign out and sign in again. Mostly you don't do that so no need to worry.

  • How to disable the cancel button in InputDialogBox?

    Can someone please tell me how to disable the cancel button in an input dialog box?
    thanks,

    Cross posted: [http://www.coderanch.com/t/487888/Swing-AWT-SWT-JFace/java/disable-cancel-button-input-dialog]

  • How to disable the password asked everytime I try to acces my contacts

    Hi, I'd like to know how to disable the password asked everytime I try to acces my contacts (another lousy feature of that lousy os!) Thanks!

    Settings>General>Restrictions...are yours on? Read here:
    http://support.apple.com/kb/ht4213

  • How to disable the Selection screens of LDB's ?

    Hi,
             How to disable the Selection screens of LDB's when we r using the predefined LDB for our executable pgm ? and how to include the predefined LDB  can u write the Code for including LDb or if possible give an example of a Pgm using a Predefined LDB?
    Thanks & Regards,
    Gopi.

    Hi Gopi,
    Go through the link,
    http://www.sapdevelopment.co.uk/hr/hrhome.htm
    Regards,
    Azaz Ali.

  • I need to know how to disable the forget about this site feature.

    I have disabled the inprivate browsing feature and I need to know how to disable the forget about this site feature. I have a teenager and this is not a feature that I want available.

    Some info here (group policy) --> http://www.unidesk.com/blog/how-disable-firefox-auto-updates<br />
    Above article refers to --> http://sourceforge.net/projects/firefoxadm/
    '''If this reply solves your problem, please click "Solved It" next to this reply when <u>signed-in</u> to the forum.'''

  • UCM - WEBDAV - How to Disable the New Folder option in the action popup

    I am trying to implement WebDav functionality. I don't want the users to create folders in the folder mapped to a security group. As long as the user has privilege to contribute to the security group he/she can checkin documents but they should not be able to create folder under it. I did not find documentation as to how to disable the new folder option in the context action menu that pops up on mouse right click. Is there any way we can do that?
    Thanx.
    Edited by: user10991492 on Nov 1, 2010 11:24 AM

    This is the boilerplate text often used in connection to networks in general. It is impossible to troubleshoot someone else's network remotely, and that's why it's not supported by Adobe:
    If you are opening files over a network or saving them to a network server, please cease and desist immediately in the event you are currently experiencing problems with one or more files.
    Working across a network in general is not supported by Adobe.
    See: 
    http://kb2.adobe.com/cps/406/kb406793.html
      Copy the CLOSED file from your server to your local hard disk, work on it, save it again to your local hard disk, close it, and copy the closed file back to the server.
        Of course, the fact that Adobe does not support working across a network does not necessarily mean it won't work.  It should.
        Adobe's position is that there are too many variables in a network environment for them to guarantee that everything will work correctly in every network, especially given the fact that if something does not work properly, it's probably the network's fault, and Adobe has no way of troubleshooting your network.
      If you can't work locally, you are on your own, and if something happens, you're on your own. If you must work from a server, make sure your network administrator is a competent professional.

Maybe you are looking for

  • Server Error in '/' Application - The resource cannot be found

    Using VS 2008 with Framework 3.5, I built a web-service that runs perfectly on the development PC.  When I build and run the web service, it runs in a virtual port as "ASP.Net Development Server Port 49259".  All the methods will invoke no problem. 

  • "There are no photos in this library."

    I recently upgraded to WIndows 7 Home Premium, updated my Apple TV to 3.0 and then 3.0.1. I am using iTunes 9.0.2. I can no longer stream photos to my television. I get a message that my library is loading and then "There are no photos in this librar

  • Large pdf files only work in single-page mode

    Does anyone know how to sort this out? I have a 3500 page PDF file and as I scroll to the *** end of the file, I can no longer view it in continuous mode as it keeps flickering. It loads properly in single-page mode, though.

  • Nokia WH 930 and Lumia 1020

    I just bought the Nokia Purity HD on ear headphones (WH 930) and the in line volume and playback controls don't work with my Lumia 1020. Was I wrong in assuming that they would be compatible?

  • Connect to Projector

    I got the DVI to VGA connector for my MBA and connected it to my Toshiba XD2000. But I'm not seeing anything on the projector other than the Toshiba logo. If I go into System Preferences > Displays it shows two desktops. And if I click the Gather Win