Skip to content
This repository was archived by the owner on Apr 21, 2019. It is now read-only.

Silence clang warnings. #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions PyECC.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
Metadata-Version: 1.0
Name: PyECC
Version: 1.0
Summary: A CPython module to enable Elliptical Curve Cryptography in Python
Home-page: UNKNOWN
Author: R. Tyler Ballance
Author-email: [email protected]
License: UNKNOWN
Description: UNKNOWN
Platform: UNKNOWN
16 changes: 16 additions & 0 deletions PyECC.egg-info/SOURCES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
README.rst
_pyecc.c
py_objects.c
pyecc.py
setup.py
PyECC.egg-info/PKG-INFO
PyECC.egg-info/SOURCES.txt
PyECC.egg-info/dependency_links.txt
PyECC.egg-info/top_level.txt
seccure/aes256ctr.c
seccure/curves.c
seccure/ecc.c
seccure/libseccure.c
seccure/numtheory.c
seccure/protocol.c
seccure/serialize.c
1 change: 1 addition & 0 deletions PyECC.egg-info/dependency_links.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

2 changes: 2 additions & 0 deletions PyECC.egg-info/top_level.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
_pyecc
pyecc
Binary file added dist/PyECC-1.0-py2.7-macosx-10.10-x86_64.egg
Binary file not shown.
15 changes: 13 additions & 2 deletions seccure/libseccure.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,12 @@ bool __verify_keypair(ECC_KeyPair keypair, bool require_private, bool require_pu
return false;
}
if (require_public) {
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wparentheses"
#pragma clang diagnostic ignored "-Wconversion"
if ( (keypair->pub == NULL) )
return false;
#pragma clang diagnostic pop
return false;
}
return true;
}
Expand Down Expand Up @@ -470,8 +474,11 @@ ECC_Data ecc_encrypt(void *data, int databytes, ECC_KeyPair keypair, ECC_State s
void *plaintext = NULL;
unsigned int offset = 0;
gcry_md_hd_t digest;

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wparentheses"
#pragma clang diagnostic ignored "-Wconversion"
if ( (data == NULL) ) {
#pragma clang diagnostic pop
__warning("Invalid or empty `data` argument passed to ecc_verify()");
goto exit;
}
Expand Down Expand Up @@ -679,7 +686,11 @@ bool ecc_verify(char *data, char *signature, ECC_KeyPair keypair, ECC_State stat
/*
* Preliminary argument checks, just for sanity of the library
*/
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wparentheses"
#pragma clang diagnostic ignored "-Wconversion"
if ( (data == NULL) ) {
#pragma clang diagnostic pop
__warning("Invalid or empty `data` argument passed to ecc_verify()");
goto exit;
}
Expand Down
2 changes: 1 addition & 1 deletion seccure/libseccure.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/

#ifndef _LIBSECFURE_H_
#ifndef _LIBSECCURE_H_
#define _LIBSECCURE_H_

#include <gcrypt.h>
Expand Down