General codebase clean-ups (no code changes)

* Remove trailing spaces
* Replace TABs with spaces
* Add missing indentation
This commit is contained in:
Hugo Hromic
2019-09-29 13:04:36 +01:00
parent c8e090a5e1
commit 434dba31de
19 changed files with 72 additions and 72 deletions

View File

@@ -345,24 +345,24 @@ static bool verifySignature(const char *data, int dataLength, char *signature, i
BIO* bio = BIO_new(BIO_s_mem());
BIO_puts(bio, cert);
x509 = PEM_read_bio_X509(bio, NULL, NULL, NULL);
BIO_free(bio);
if (!x509) {
return false;
}
EVP_PKEY* pubKey = X509_get_pubkey(x509);
EVP_MD_CTX *mdctx = NULL;
mdctx = EVP_MD_CTX_create();
EVP_DigestVerifyInit(mdctx, NULL, EVP_sha256(), NULL, pubKey);
EVP_DigestVerifyUpdate(mdctx, data, dataLength);
int result = EVP_DigestVerifyFinal(mdctx, signature, signatureLength);
X509_free(x509);
EVP_PKEY_free(pubKey);
EVP_MD_CTX_destroy(mdctx);
return result > 0;
}
@@ -618,7 +618,7 @@ int gs_pair(PSERVER_DATA server, char* pin) {
cleanup:
if (ret != GS_OK)
gs_unpair(server);
if (result != NULL)
free(result);