Tcl pki::pkcs::parse_key error Using Google Auth Service Account Key

Viewed 78

I'm trying to create a small script where I am able to use google's "OAuth 2.0 for Server to Server Applications" with Tcl. After setting up my service account and making a private key in the format of JSON, I copy and pasted the private key that was within that JSON file. (i.e. screen shot of a part of the private key)

Then I placed the private key within my Tcl script which looks like this:

set keydata "PRIVATEKEY"
set key [::pki::pkcs::parse_key $keydata]

After doing that, I get the following error:

    Expected Integer (0x02), but got 30
    while executing
"::asn::asnGetBigInteger key ret(n)"
    (procedure "::pki::pkcs::parse_key" line 8)
    invoked from within
"::pki::pkcs::parse_key $keydata"
    ("uplevel" body line 45)
    invoked from within

I believe I am doing everything correctly. I cannot figure out what I am doing wrong. .

1 Answers
Related