superhawk610 opened a new issue, #1198:
URL: https://github.com/apache/arrow-adbc/issues/1198
Private key files commonly use PEM encoding (`-----BEGIN PRIVATE KEY-----`)
instead of storing the raw bytes directly. When using the Snowflake ODBC
driver, for example, you may point to a `.p8` or `.pem` file for the JWT
private key.
## Expected Behaviour
I can provide a PEM key for
`adbc.snowflake.sql.client_option.jwt_private_key`.
## Actual Behaviour
A rather cryptic error message is generated:
```plain
failed parsing private key file 'snowflake.pem': asn1: structure error: tags
don't match (16 vs {class:0 tag:13 length:45 isCompound:true}) {optional:false
explicit:false application:false private:false defaultValue:<nil> tag:<nil>
stringType:0 timeType:0 set:false omitEmpty:false} pkcs1PrivateKey @2
```
This can be resolved by PEM decoding the keyfile and pointing
`adbc.snowflake.sql.client_option.jwt_private_key` to `snowflake.bin` instead:
```go
data, _ := os.ReadFile("snowflake.pem")
block, _ := pem.Decode([]byte(data))
os.WriteFile("snowflake.bin", block.Bytes, os.FileMode(777))
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]