Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Key Pair didn't work - UNKNOWN_ALGORITHM #53

Open
kardizzone opened this issue Aug 22, 2022 · 2 comments
Open

Key Pair didn't work - UNKNOWN_ALGORITHM #53

kardizzone opened this issue Aug 22, 2022 · 2 comments

Comments

@kardizzone
Copy link

It seems PKCS8 is not supported? It was the default suggested by Snowflake when following their instructions here:
https://docs.snowflake.com/en/user-guide/key-pair-auth.html

Error output from VS Code is:

[1661205581755] INFO (ls): Connection instance created for SFKeyPair.
ns: "conn-manager"
[1661205581756] ERROR (ls): Connecting error: {"code":-32001,"data":{"driver":"Snowflake","driverOptions":{}},"name":"Error"}
ns: "conn-manager"
[1661205581757] ERROR (ext): ERROR: Error opening connection error:13000077:PKCS8 routines:OPENSSL_internal:UNKNOWN_ALGORITHM, {"code":-32001,"data":{"driver":"Snowflake","driverOptions":{}}}
ns: "error-handler"

@alexnorton
Copy link

I was able to work around this by converting my encrypted private key to an unencrypted version, and configuring the connection to use that:

openssl pkcs8 -in rsa_key.p8 -topk8 -out rsa_key_unencrypted.p8 -nocrypt

@rmenendezm
Copy link

When I try @alexnorton solution I get this other error:

Could not read key from my_rsa_key.p8
8045180501000000:error:1608010C:STORE routines:ossl_store_handle_load_result:unsupported:crypto/store/store_result.c:151:
8045180501000000:error:0308010C:digital envelope routines:inner_evp_generic_fetch:unsupported:crypto/evp/evp_fetch.c:341:Global default library context, Algorithm (PBKDF1 : 0), Properties ()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants