Skip to content

Commit

Permalink
return nil when key is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
shreemaan-abhishek committed Jan 29, 2023
1 parent 44208dc commit 41db740
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apisix/plugins/jwt-auth.lua
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,9 @@ local function get_rsa_or_ecdsa_keypair(conf, consumer_name)
if public_key and private_key then
return public_key, private_key
elseif public_key and not private_key then
return public_key, nil, "missing private key"
return nil, nil, "missing private key"
elseif not public_key and private_key then
return nil, private_key, "missing public key"
return nil, nil, "missing public key"
else
return nil, nil, "public and private keys are missing"
end
Expand Down

0 comments on commit 41db740

Please sign in to comment.