Denis,
Confirming.... the STC running the Python code did not have enough
"ASSIZEMAX". Easy fix, happy customer :)
For those looking to do JWT signage, and running into same problems, I'll
paste pieces of relevant python here... to feed future 'SRCHFOR'-actions :)
*Bash actions to create the key-files*
> # Create privkey
> openssl ecparam -name secp256k1 -genkey -noout -out privkey
>
> # Extract pubkey
> openssl pkey -in privkey -pubout -out pubkey
>
*Python-code to use them*
> import jwt
> from time import time
>
> with open('privkey') as p:
> privkey = p.read()
>
> payload = {"some": "data", "in": "our", "awesome": "payload"), 'exp':
> time() + 30}
> datoken = jwt.encode(payload, privkey, algorithm='ES256K').encode('utf-8')
> print(f"TOKEN -==> {datoken}")
>
>
> with open('pubkey', 'r') as pubkeyfile:
> pubkey = pubkeyfile.read()
> try:
> payload2 = jwt.decode(datoken, pubkey, algorithms=['ES256K'],
> options={'require':['exp','some','in','awesome']})
> except Exception as e:
> print("Not signed with requried privkey")
>
> print(payload2)
>
Now to find the proper route to get those docs changed :)
Met vriendelijke groeten,
*Henri Kuiper*
*zdevops*
On Sat, Nov 11, 2023 at 9:04 PM Henri Kuiper <[email protected]>
wrote:
> Nice!
>
> thanks... I will give that a try.....
>
>
> Met vriendelijke groeten,
>
> *Henri Kuiper*
>
> *zdevops*
>
>
> On Fri, Nov 10, 2023 at 7:39 AM Denis <
> [email protected]> wrote:
>
>> Hi Henri,
>> if you google the reason code you find other entries that point to not
>> enough region size. So try increasing the region size?
>> Denis.
>>
>> On Thursday, November 9, 2023 at 10:31:52 PM GMT+1, Henri Kuiper <
>> [email protected]> wrote:
>>
>> Heya Fellow Mainframers,
>>
>> I'm trying to do some 'normal ES256K' JWT token signage with python...
>>
>> on my 'test SYSPLEX' this works like a charm.....yet one hop over I get
>> the
>> following
>>
>> CEE3512S An HFS load of module
>> /......./site-packages/cryptography/hazmat/bindings/_openssl.abi3.so
>> failed. The system return code was 0000000157; the reason code was
>> 0BDF019B.
>>
>> MSGTXT: CSV034I PGMF FETCH FAILED FOR THE REQUESTED MODULE. RETURN CODE
>> 14,
>> REASON CODE 26110021 PATHNAME =
>> /....../site-packages/cryptography/hazmat/bindings/_openssl.abi3.so
>>
>> I've checked all the obvious stuff : perms, openssl versions,
>> module/package versions for cryptography, python version etc. and they're
>> all the same...
>>
>> . Does anyone have another idea where to look?...
>>
>> Thanks!
>>
>> *Henri Kuiper*
>> *zdevops*
>>
>> ----------------------------------------------------------------------
>> For IBM-MAIN subscribe / signoff / archive access instructions,
>> send email to [email protected] with the message: INFO IBM-MAIN
>>
>> ----------------------------------------------------------------------
>> For IBM-MAIN subscribe / signoff / archive access instructions,
>> send email to [email protected] with the message: INFO IBM-MAIN
>>
>>
----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN