This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 156056 - Code bug, enhancement in Saml20HOKCallbackHandler
Summary: Code bug, enhancement in Saml20HOKCallbackHandler
Status: NEW
Alias: None
Product: webservices
Classification: Unclassified
Component: WSIT (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Martin Grebac
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-12-25 03:23 UTC by gmazza
Modified: 2009-02-19 23:28 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gmazza 2008-12-25 03:23:30 UTC
Hello, one bug to report and one possible place for optimization:

1.) (bug) The initTrustStore() method in the autogenerated Saml20HOKCallbackHandler class (and very possibly the
others--HOK 1.0 and SV 1.0 and SV 2.0) created when you have a SOAP client using SAML has a bug.  It should be
trustStore = TrustStore.getInstance(...) in the first line of the code below.

Example from Saml20HOKCallbackHandler

    private void initTrustStore() throws IOException {
        try {
            trustStore = KeyStore.getInstance(trustStoreType);  <-- bug
            trustStore.load(new FileInputStream(trustStoreURL), trustStorePassword.toCharArray());
        } catch (Exception e) {
            throw new IOException(e.getMessage());
        }
    }


2. (possible optimization) getDefaultPrivKeyCert() is calling keyStore.getCertificate(...) twice on the certificate it
actually needs (once with currentAlias, once with uniqueAlias)--I wonder if that could be easily optimized to once.
Comment 1 Martin Grebac 2009-01-07 09:44:17 UTC
1) J2SE does not have a separate class called TrustStore. A Java Keystore can be used as a TrustStore. 
2) I'm changing this issue to an enhancement and will try to implement it for 7.0.