Can  you create jira issue for this ? i'll take a  look if i can do
anything with it.

On 3/14/07, Raf177 <[EMAIL PROTECTED]> wrote:

I have found the solution : in my log, i've seen that my certificate was
expired. What is interesting is that Xfire+WSS4J don't react the same way if
i use DirectReference or IssuerSerial.


Tomek Sztelak wrote:
>
> Feel free to post on that list :)
>
> On 3/13/07, Raf177 <[EMAIL PROTECTED]> wrote:
>>
>> The only WSS4J mailing list I've found is a dev level !
>>
>>
>> Tomek Sztelak wrote:
>> >
>> > You should try to ask this question on WSS4j mailing list :) There are
>> > real experts in such stuff.
>> >
>> > On 3/13/07, Raf177 <[EMAIL PROTECTED]> wrote:
>> >>
>> >> I sign my messages using DirectReference method ; the problem is that
>> i
>> >> can't
>> >> get the certificate's common name using the code below. The same code
>> >> works
>> >> fine if I use IssuerSerial method.
>> >>
>> >> public class SecurityHandler extends AbstractHandler {
>> >>         private static final Log Log =
>> >> LogFactory.getLog(SecurityHandler.class);
>> >>
>> >>         public void invoke(MessageContext context) throws Exception {
>> >>                 try {
>> >>                 Vector result = (Vector)
>> >> context.getProperty(WSHandlerConstants.RECV_RESULTS);
>> >>                 if (result != null) {
>> >>                         for (int i = 0; i < result.size(); i++)
>> >>                         {
>> >>                             WSHandlerResult res = (WSHandlerResult)
>> >> result.get(i);
>> >>                             for (int j = 0; j <
>> res.getResults().size();
>> >> j++)
>> >>                             {
>> >>                                 WSSecurityEngineResult secRes =
>> >> (WSSecurityEngineResult)
>> >> res.getResults().get(j);
>> >>                                 int action  = secRes.getAction();
>> >>
>> >>                                 // SIGNATURE
>> >>                                 if( ( action & WSConstants.SIGN ) > 0
>> ){
>> >>                                     //X509Certificate cert =
>> >> secRes.getCertificate();
>> >>                                     X500Name principal = (X500Name)
>> >> secRes.getPrincipal();
>> >>                                     // Do something whith cert
>> >>                                     Log.info("Signature for : "  +
>> >> principal.getCommonName());
>> >>
>> >> context.getInMessage().setProperty("net.gicm.astral.commonname",
>> >> principal.getCommonName());
>> >>                                 }
>> >>                             }
>> >>                         }
>> >>                 }
>> >>                 } catch (Throwable e) {
>> >>                 Log.error("Erreur lors de la récupération du common
>> name
>> >> du
>> >> certificat", e);
>> >>         }
>> >>         }
>> >> }
>> >> --
>> >> View this message in context:
>> >>
>> 
http://www.nabble.com/WS-Security-%3A-getting-commmon-name-with-DirectReference-or-IssuerSerial-method-tf3397006.html#a9458054
>> >> Sent from the XFire - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe from this list please visit:
>> >>
>> >>     http://xircles.codehaus.org/manage_email
>> >>
>> >>
>> >
>> >
>> > --
>> > -----
>> > When one of our products stops working, we'll blame another vendor
>> > within 24 hours.
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe from this list please visit:
>> >
>> >     http://xircles.codehaus.org/manage_email
>> >
>> >
>> >
>>
>> --
>> View this message in context:
>> 
http://www.nabble.com/WS-Security-%3A-getting-commmon-name-with-DirectReference-or-IssuerSerial-method-tf3397006.html#a9458428
>> Sent from the XFire - User mailing list archive at Nabble.com.
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list please visit:
>>
>>     http://xircles.codehaus.org/manage_email
>>
>>
>
>
> --
> -----
> When one of our products stops working, we'll blame another vendor
> within 24 hours.
>
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>
>

--
View this message in context: 
http://www.nabble.com/WS-Security-%3A-getting-commmon-name-with-DirectReference-or-IssuerSerial-method-tf3397006.html#a9477887
Sent from the XFire - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email




--
-----
When one of our products stops working, we'll blame another vendor
within 24 hours.

---------------------------------------------------------------------
To unsubscribe from this list please visit:

   http://xircles.codehaus.org/manage_email

Reply via email to