kieraneglin / encrypted_secrets_ex

Store your application's secrets inside your VCS
MIT License
46 stars 5 forks source link

Compilation Error: :crypto #16

Closed sepowitz closed 3 years ago

sepowitz commented 3 years ago

Hey there,

Firstly, I just wanted to thank you for this lib, it's really great.

Recently, however, we have been getting a compilation error, and it seems to be related to some of the internals in this lib. Specifically, calls using the :crypto module, which seem to be undefined.

I've tried upgrading to 0.2.4 (currently on 0.2.0) but still seeing the same issue.

I've attached the compilation error below.

** (Mix) Could not start application level: exited in: Level.Application.start(:normal, [])
    ** (EXIT) an exception was raised:
        ** (UndefinedFunctionError) function :crypto.block_decrypt/4 is undefined or private
            (crypto 5.0.2) :crypto.block_decrypt(:aes_cbc256, <<244, 203, 226, 136, 206, 30, 167, 22, 25, 175, 47, 69, 15, 28, 59, 146, 187, 3, 44, 11, 143, 153, 14, 31, 51, 221, 147, 241, 87, 73, 38, 242>>, <<152, 1, 76, 234, 104, 214, 26, 121, 211, 72, 157, 35, 139, 39, 205, 118>>, <<145, 204, 135, 213, 239, 203, 69, 205, 115, 53, 71, 249, 32, 251, 239, 101, 126, 237, 5, 78, 182, 150, 116, 163, 154, 17, 147, 164, 174, 190, 248, 210, 123, 185, 102, 246, 214, 144, 88, 209, 122, 198, 129, 15, 153, 219, 124, 244, 142, 76, ...>>)
            (encrypted_secrets 0.2.4) lib/encrypted_secrets/encryption.ex:45: EncryptedSecrets.Encryption.decrypt/3
            (encrypted_secrets 0.2.4) lib/encrypted_secrets/read_secrets.ex:58: EncryptedSecrets.ReadSecrets.unencrypt_file_contents/2
            (encrypted_secrets 0.2.4) lib/encrypted_secrets/read_secrets.ex:18: EncryptedSecrets.ReadSecrets.read_into_map/2
            (encrypted_secrets 0.2.4) lib/encrypted_secrets.ex:97: EncryptedSecrets.read!/2
            (level 0.1.0) lib/level/application.ex:18: Level.Application.start/2
            (kernel 8.0.1) application_master.erl:293: :application_master.start_it_old/4
conordavidson commented 3 years ago

PR to fix this: https://github.com/kieraneglin/encrypted_secrets_ex/pull/18

kieraneglin commented 3 years ago

Resolved in #18 with release 0.3.0