Skip to content

Commit

Permalink
Changes for deployment and code clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
joachimmetz committed Feb 5, 2023
1 parent 51abf32 commit 5fddc76
Show file tree
Hide file tree
Showing 49 changed files with 11,852 additions and 8,975 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -128,10 +128,15 @@ stamp-h[1-9]
/hmactools/hmacsum
/tests/*.exe
/tests/hmac_test_error
/tests/hmac_test_md5
/tests/hmac_test_md5_context
/tests/hmac_test_sha1
/tests/hmac_test_sha1_context
/tests/hmac_test_sha224
/tests/hmac_test_sha224_context
/tests/hmac_test_sha256
/tests/hmac_test_sha256_context
/tests/hmac_test_sha512
/tests/hmac_test_sha512_context
/tests/hmac_test_support
/tests/input
Expand Down
1 change: 0 additions & 1 deletion ChangeLog
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
TODO
* Move X context functions to separate source file like python binding
* just read input if size is 0 ?
- test update with 0 byte buffer
* add support for the macosx replacement for libcrypto
Expand Down
7 changes: 7 additions & 0 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
environment:
PYPI_TOKEN:
secure: VHuZiUWgTqTciKE2nsv/LrJNUqN/CftteuhwemKDrv8SkWe3OwkH5XZFQkOC69mw3ezyiMjaGbndChV6gnTJv7sJnZ4y1icQHiW3qn4EBSwgMTkrXVEEfE0ZVQ1mY6b9MtrxAGgY9Fl0P00gn0N1bsaNeMbUsL2wMecDwUCFZOAydsCsu9hviixwzEpjzuI0nefkazJ1aW13YArnjrbcFBlgCnLZPWko0nj91Bz7YBFZHaMN9h71qpmHMImPoCoSEjTSyQClmT+0oubYpztTM2nE78wx4H4dOz3s8iRoQVg=
matrix:
- TARGET: vs2008
BUILD_ENVIRONMENT: msbuild
Expand Down Expand Up @@ -213,3 +215,8 @@ after_test:
artifacts:
- path: dist\*.whl

deploy_script:
- ps: If ($env:APPVEYOR_REPO_TAG -eq "true" -and $isWindows -and $env:BUILD_ENVIRONMENT -eq "python") {
Invoke-Expression "${env:PYTHON} -m twine upload dist/*.whl --username __token__ --password ${env:PYPI_TOKEN} --skip-existing" }
- sh: if test ${APPVEYOR_REPO_TAG} = "true" && test ${BUILD_ENVIRONMENT} = "python-tox"; then twine upload dist/*.whl --username __token__ --password ${PYPI_TOKEN} --skip-existing; fi

44 changes: 22 additions & 22 deletions hmactools/sum_handle.c
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ int sum_handle_free(
{
if( ( *sum_handle )->md5_context != NULL )
{
if( libhmac_md5_free(
if( libhmac_md5_context_free(
&( ( *sum_handle )->md5_context ),
error ) != 1 )
{
Expand All @@ -191,7 +191,7 @@ int sum_handle_free(
}
if( ( *sum_handle )->sha1_context != NULL )
{
if( libhmac_sha1_free(
if( libhmac_sha1_context_free(
&( ( *sum_handle )->sha1_context ),
error ) != 1 )
{
Expand All @@ -212,7 +212,7 @@ int sum_handle_free(
}
if( ( *sum_handle )->sha224_context != NULL )
{
if( libhmac_sha224_free(
if( libhmac_sha224_context_free(
&( ( *sum_handle )->sha224_context ),
error ) != 1 )
{
Expand All @@ -233,7 +233,7 @@ int sum_handle_free(
}
if( ( *sum_handle )->sha256_context != NULL )
{
if( libhmac_sha256_free(
if( libhmac_sha256_context_free(
&( ( *sum_handle )->sha256_context ),
error ) != 1 )
{
Expand All @@ -254,7 +254,7 @@ int sum_handle_free(
}
if( ( *sum_handle )->sha512_context != NULL )
{
if( libhmac_sha512_free(
if( libhmac_sha512_context_free(
&( ( *sum_handle )->sha512_context ),
error ) != 1 )
{
Expand Down Expand Up @@ -489,7 +489,7 @@ int sum_handle_initialize_integrity_hash(
}
if( sum_handle->calculate_md5 != 0 )
{
if( libhmac_md5_initialize(
if( libhmac_md5_context_initialize(
&( sum_handle->md5_context ),
error ) != 1 )
{
Expand All @@ -506,7 +506,7 @@ int sum_handle_initialize_integrity_hash(
}
if( sum_handle->calculate_sha1 != 0 )
{
if( libhmac_sha1_initialize(
if( libhmac_sha1_context_initialize(
&( sum_handle->sha1_context ),
error ) != 1 )
{
Expand All @@ -523,7 +523,7 @@ int sum_handle_initialize_integrity_hash(
}
if( sum_handle->calculate_sha224 != 0 )
{
if( libhmac_sha224_initialize(
if( libhmac_sha224_context_initialize(
&( sum_handle->sha224_context ),
error ) != 1 )
{
Expand All @@ -540,7 +540,7 @@ int sum_handle_initialize_integrity_hash(
}
if( sum_handle->calculate_sha256 != 0 )
{
if( libhmac_sha256_initialize(
if( libhmac_sha256_context_initialize(
&( sum_handle->sha256_context ),
error ) != 1 )
{
Expand All @@ -557,7 +557,7 @@ int sum_handle_initialize_integrity_hash(
}
if( sum_handle->calculate_sha512 != 0 )
{
if( libhmac_sha512_initialize(
if( libhmac_sha512_context_initialize(
&( sum_handle->sha512_context ),
error ) != 1 )
{
Expand All @@ -577,13 +577,13 @@ int sum_handle_initialize_integrity_hash(
on_error:
if( sum_handle->sha1_context != NULL )
{
libhmac_sha1_free(
libhmac_sha1_context_free(
&( sum_handle->sha1_context ),
NULL );
}
if( sum_handle->md5_context != NULL )
{
libhmac_md5_free(
libhmac_md5_context_free(
&( sum_handle->md5_context ),
NULL );
}
Expand Down Expand Up @@ -637,7 +637,7 @@ int sum_handle_update_integrity_hash(
}
if( sum_handle->calculate_md5 != 0 )
{
if( libhmac_md5_update(
if( libhmac_md5_context_update(
sum_handle->md5_context,
buffer,
buffer_size,
Expand All @@ -655,7 +655,7 @@ int sum_handle_update_integrity_hash(
}
if( sum_handle->calculate_sha1 != 0 )
{
if( libhmac_sha1_update(
if( libhmac_sha1_context_update(
sum_handle->sha1_context,
buffer,
buffer_size,
Expand All @@ -673,7 +673,7 @@ int sum_handle_update_integrity_hash(
}
if( sum_handle->calculate_sha224 != 0 )
{
if( libhmac_sha224_update(
if( libhmac_sha224_context_update(
sum_handle->sha224_context,
buffer,
buffer_size,
Expand All @@ -691,7 +691,7 @@ int sum_handle_update_integrity_hash(
}
if( sum_handle->calculate_sha256 != 0 )
{
if( libhmac_sha256_update(
if( libhmac_sha256_context_update(
sum_handle->sha256_context,
buffer,
buffer_size,
Expand All @@ -709,7 +709,7 @@ int sum_handle_update_integrity_hash(
}
if( sum_handle->calculate_sha512 != 0 )
{
if( libhmac_sha512_update(
if( libhmac_sha512_context_update(
sum_handle->sha512_context,
buffer,
buffer_size,
Expand Down Expand Up @@ -767,7 +767,7 @@ int sum_handle_finalize_integrity_hash(

return( -1 );
}
if( libhmac_md5_finalize(
if( libhmac_md5_context_finalize(
sum_handle->md5_context,
calculated_md5_hash,
LIBHMAC_MD5_HASH_SIZE,
Expand Down Expand Up @@ -812,7 +812,7 @@ int sum_handle_finalize_integrity_hash(

return( -1 );
}
if( libhmac_sha1_finalize(
if( libhmac_sha1_context_finalize(
sum_handle->sha1_context,
calculated_sha1_hash,
LIBHMAC_SHA1_HASH_SIZE,
Expand Down Expand Up @@ -857,7 +857,7 @@ int sum_handle_finalize_integrity_hash(

return( -1 );
}
if( libhmac_sha224_finalize(
if( libhmac_sha224_context_finalize(
sum_handle->sha224_context,
calculated_sha224_hash,
LIBHMAC_SHA224_HASH_SIZE,
Expand Down Expand Up @@ -902,7 +902,7 @@ int sum_handle_finalize_integrity_hash(

return( -1 );
}
if( libhmac_sha256_finalize(
if( libhmac_sha256_context_finalize(
sum_handle->sha256_context,
calculated_sha256_hash,
LIBHMAC_SHA256_HASH_SIZE,
Expand Down Expand Up @@ -947,7 +947,7 @@ int sum_handle_finalize_integrity_hash(

return( -1 );
}
if( libhmac_sha512_finalize(
if( libhmac_sha512_context_finalize(
sum_handle->sha512_context,
calculated_sha512_hash,
LIBHMAC_SHA512_HASH_SIZE,
Expand Down
Loading

0 comments on commit 5fddc76

Please sign in to comment.