Finally the problem is solved!
There was two errors:
1.- The fields for key lengths, when keys are labels, must be set to 64,
instead of the label length.
2.- The enciphered key I was trying to decipher was not ciphered in
PCKS-1.2.

The question now is...why are the messages/return codes so general? I think
my two errors are quite different, but the message is the same for each
one...(I solved problem 1 some days ago but the error message did not
change!)

Thanks to all!

Saludos!
Best regards!
     Víctor de la Fuente Seivane
     Departamento de Sistemas
     Caixa Galicia


-----Mensaje original-----
De: De La Fuente Seivane, Victor 
Enviado el: martes, 19 de julio de 2005 9:36
Para: [email protected]
Asunto: Re: Help needed with ICSF


I forgot to say I'm using CCF. Is there any problem here?

Best regards!
     Víctor de la Fuente Seivane


-----Mensaje original-----
De: Paul Hanrahan [mailto:[EMAIL PROTECTED] 
Enviado el: lunes, 18 de julio de 2005 13:58
Para: [email protected]
Asunto: Re: Help needed with ICSF


You may have posted this already. Sorry if I missed it.  Don't know if I'll
be of help but I'll look it over.

Paul Hanrahan

-----Original Message-----
From: IBM Mainframe Discussion List [mailto:[EMAIL PROTECTED] On Behalf
Of De La Fuente Seivane, Victor
Sent: Monday, July 18, 2005 7:54 AM
To: [email protected]
Subject: Re: Help needed with ICSF


Sorry! I thought I already put it on Friday...

The code (only the part where I use ICSF) is:

ENCIPHEREDKEY=SUBSTR(COMAREA,17,LENTRADA-16);                     
ENCIPHEREDKEYLENGTH=LENTRADA-16;                                  
[EMAIL PROTECTED]('D',ENCIPHEREDKEY,ENCIPHEREDKEYLENGTH,                
            NENCIPHEREDKEY,NENCIPHEREDKEYLENGTH);                 
NENCIPHEREDKEYLENGTH = RES;                                       
PRIVKEYID='XXX.XXX.XXXX.XXXXXXX.XXXXXXXX';                        
PRIVKEYIDLENGTH=29;                                               
                                                                  
RULARRC=3;                                                        
CALL CSNBKTB(CRYRETC,CRYRESC,CERO,'',KEYTOKEN,'EXPORTER',         
             RULARRC,'INTERNALNOCV-KEKKEYLN16 ','',0,0,           
             '','','',0,'','');                                   
RULARRC=1;                                                        
KEYTOKENLENGTH=64;                                                
CALL CSNDSYI(CRYRETC,CRYRESC,CERO,'',RULARRC,'PKCS-1.2',          
             NENCIPHEREDKEYLENGTH,NENCIPHEREDKEY,PRIVKEYIDLENGTH, 
             PRIVKEYID,KEYTOKENLENGTH,KEYTOKEN);                  



And the variables are:
DCL ENCIPHEREDKEY CHAR(256) INIT('');                  
DCL ENCIPHEREDKEYLENGTH BIN FIXED(31) INIT(0);         

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email
to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the
archives at http://bama.ua.edu/archives/ibm-main.html

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions, send email
to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO Search the
archives at http://bama.ua.edu/archives/ibm-main.html

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [EMAIL PROTECTED] with the message: GET IBM-MAIN INFO
Search the archives at http://bama.ua.edu/archives/ibm-main.html

Reply via email to