BitShares Forum

Main => General Discussion => Topic started by: ByronP on October 16, 2015, 05:20:14 pm

Title: cli unlock command returns aes error
Post by: ByronP on October 16, 2015, 05:20:14 pm
this is my request

Code: [Select]
{"jsonrpc":"2.0","id":1,"method":"unlock","params":["MyPasswordHere"]}
which seems correct according to http://docs.bitshares.eu/api/cli_wallet.html

Code: [Select]
{"id":1,"error":{"code":1,"message":"18 aes_exception: AES error\nerror during aes 256 cbc decrypt final\n    {\"s\":\"error:0606506D:digital envelope routines:EVP_DecryptFinal_ex:wrong final block length\"}\n    th_a  aes.cpp:263 fc::aes_decrypt\n\n    {}\n    th_a  wallet.cpp:3122 graphene::wallet::wallet_api::unlock","data":{"code":18,"name":"aes_exception","message":"AES error","stack":[{"context":{"level":"error","file":"aes.cpp","line":263,"method":"fc::aes_decrypt","hostname":"","thread_name":"th_a","timestamp":"2015-10-16T17:12:49"},"format":"error during aes 256 cbc decrypt final","data":{"s":"error:0606506D:digital envelope routines:EVP_DecryptFinal_ex:wrong final block length"}},{"context":{"level":"warn","file":"wallet.cpp","line":3122,"method":"graphene::wallet::wallet_api::unlock","hostname":"","thread_name":"th_a","timestamp":"2015-10-16T17:12:49"},"format":"","data":{}}]}}}
any idea why this is failing? my lite client has no problem unlocking with my password and wrong final block height seems meaningless since the system is synced and should have nothing to do with unlocking.
any help appreciated :-)
Title: Re: cli unlock command returns aes error
Post by: ByronP on October 16, 2015, 08:18:06 pm
So no one is using the rpc api? :-( this stinks I can't bring bts back up on the exchange until I get this solved :-(
Title: Re: cli unlock command returns aes error
Post by: brads on October 16, 2015, 08:23:58 pm
I would say bad password but I guess you already checked it.

Can you try with cli_wallet (console), you just have to type : unlock your_password

I'm far to be an expert but I spent this afternoon with cli.
Title: Re: cli unlock command returns aes error
Post by: brads on October 16, 2015, 08:27:51 pm
If I remember correctly, cli_wallet cannot import GUI wallet. You have to create a new wallet in cli and import your privates keys (I did it a few hours ago).
Title: Re: cli unlock command returns aes error
Post by: ByronP on October 16, 2015, 08:35:03 pm
I figured it out... it needs a better error message. Even though i can use the light client against it the cli client needs to have set_password run before hand as they don't share data.
Title: Re: cli unlock command returns aes error
Post by: ByronP on October 16, 2015, 08:41:44 pm
BTW it would be nice if in the future this returned a state value (success) instead of just NULL. IMHO