search

Home  >  Q&A  >  body text

python - Openssl key signature results are inconsistent under linux and windows

Q1: Use under linux

echo aaaaa | openssl rsautl -sign -inkey xxxx.pem | openssl enc -base64 

The value obtained is
different from the value obtained by the same operation under windows.

Q2: How to write the above command under Linux if it is processed in python?

ps: I tried a variety of methods, but the signed values ​​are different from those under Linux.

某草草某草草2719 days ago1160

reply all(1)I'll reply

  • 大家讲道理

    大家讲道理2017-06-20 10:08:23

    The output result of "echo aaaaa" is carried back to the carriage, that is, "aaaaan". To output the pure string "aaaaa", you need to use "echo -n aaaaa". I am not sure if this is the reason. It is for reference only

    reply
    0
  • Cancelreply