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

Luvit Support for RSA-SHA1 #2

Open
dlannan opened this issue May 10, 2017 · 0 comments
Open

Luvit Support for RSA-SHA1 #2

dlannan opened this issue May 10, 2017 · 0 comments

Comments

@dlannan
Copy link

dlannan commented May 10, 2017

Not really an issue, but I'm adding it here. When using Luvit you can correctly X509 sign the signature like so. In the oath.lua file around line 301:

  elseif self.signature_method == 'RSA-SHA1' then
    local cdata = lfs.readFileSync(< privatekey.pem >)
    local prikey = openssl.pkey.read( cdata, true )
    hash = openssl.pkey.sign(prikey, signatureBase)
    hash = base64Encode(hash)

Obviously you need to provide your private key for signing. All of the methods are part of Luvit's installed system. I successfully use this for accessing Xero using the private method.

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

1 participant