Skip to content

Commit

Permalink
Merge pull request #68 from renedecandido/fix/signature-check
Browse files Browse the repository at this point in the history
fix: skip signature check if base64PublicKey is null
  • Loading branch information
serggl committed Mar 3, 2015
2 parents 5e6d420 + a7fb7da commit 8573e18
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion library/src/com/anjlab/android/iab/v3/BillingProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,15 @@ public boolean handleActivityResult(int requestCode, int resultCode, Intent data

private boolean verifyPurchaseSignature(String productId, String purchaseData, String dataSignature) {
try {
return Security.verifyPurchase(productId, signatureBase64, purchaseData, dataSignature);
/*
* Skip the signature check if the provided License Key is NULL and return true in order to
* continue the purchase flow
*/
if (TextUtils.isEmpty(signatureBase64)) {
return true;
} else {
return Security.verifyPurchase(productId, signatureBase64, purchaseData, dataSignature);
}
} catch (Exception e) {
return false;
}
Expand Down

0 comments on commit 8573e18

Please sign in to comment.