× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Hello

the trick is related to translation but in this case,
ASCII, CP 819 or UTF-8 are all working..

my mistake was to send the base64 of the (ebcdic) nonce
instead of the base64 of the translation to ASCII of the nonce...


Thanks to all who answered, that helped me to clarify...
it works now.

Paul




From: rpg400-l-request@xxxxxxxxxxxx
To: rpg400-l@xxxxxxxxxxxx
Date: 24/09/2018 19:00
Subject: RPG400-L Digest, Vol 17, Issue 498
Sent by: "RPG400-L" <rpg400-l-bounces@xxxxxxxxxxxx>



Send RPG400-L mailing list submissions to
rpg400-l@xxxxxxxxxxxx

T

message: 1
date: Mon, 24 Sep 2018 17:55:56 +0200
from: Tools/400 <thomas.raddatz@xxxxxxxxxxx>
subject: Re: WS security password digest

Paul,

Based on the following documentation I assume the password to be
converted to UTF-8 instead of whatever Ascii codepage:

http://docs.oasis-open.org/wss-m/wss/v1.1.1/os/wss-UsernameTokenProfile-v1.1.1-os.html


Thomas.

Am 20.09.2018 um 17:46 schrieb Paul Roy:
Hi

I am trying to call a webservice that requires ws security

the password needs to be sent as a password digest ... so i am trying
to
do this in RPGLE
from google, I found that a password digest is created as digest =
base64_encode( sha1 ( nonce + TimeStampCreated + pwd ) )

I also suspect I have to make some translation to/from ASCII/EBCDIC

I am only converting the initial string to ASCII then calculate the
hash,
encode in base 64 then use the value in the soap payload and post using
LIBHTTP...

here is some extract of my code

todig = %trim(snonce)+%trim(fmttmp(tmpCreate))+%trim(pwd) ;
//convert to ASCII using QDCXLATE
translate(%len(todig) : todig : 'QTCPASC');
p_recv = %addr(digest);
p_src = %addr(todig);
// calculate sha1 using _CIPHER
cipher( p_recv: sha_controls : p_src);
// translate to base 64 using BASE64R4 (LIBHTTP SK)
base64_encode(%addr(digest ): digestLen :%addr(digest64) : d64Len) ;


but until now I have had no success.... so posting here to receive some

hint...

any help welcome
thank you

Paul

..






As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.