Skip to content

Commit

Permalink
These appear to be unused (#278)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebbASF authored Nov 23, 2023
1 parent b90c754 commit 53d910b
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 43 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -46,22 +46,6 @@
} \
}

/* Helper macro to return if an exception is pending */
#define PASS_EXCEPTIONS(env) \
{ \
if ((*env)->ExceptionCheck(env)) return; \
}

#define PASS_EXCEPTIONS_GOTO(env, target) \
{ \
if ((*env)->ExceptionCheck(env)) goto target; \
}

#define PASS_EXCEPTIONS_RET(env, ret) \
{ \
if ((*env)->ExceptionCheck(env)) return (ret); \
}

void close_library();

/**
Expand Down Expand Up @@ -260,38 +244,13 @@ static FARPROC WINAPI do_dlsym_fallback(JNIEnv *env, HMODULE handle, LPCSTR symb
#endif
// Windows part end


#define LOCK_CLASS(env, clazz, classname) \
if ((*env)->MonitorEnter(env, clazz) != 0) { \
char exception_msg[128]; \
snprintf(exception_msg, sizeof(exception_msg), "Failed to lock %s", classname); \
THROW(env, "java/lang/InternalError", exception_msg); \
}

#define UNLOCK_CLASS(env, clazz, classname) \
if ((*env)->MonitorExit(env, clazz) != 0) { \
char exception_msg[128]; \
snprintf(exception_msg, sizeof(exception_msg), "Failed to unlock %s", classname); \
THROW(env, "java/lang/InternalError", exception_msg); \
}

#define RETRY_ON_EINTR(ret, expr) do { \
ret = expr; \
} while ((ret == -1) && (errno == EINTR));

#include "config.h"

#include <openssl/aes.h>
#include <openssl/evp.h>
#include <openssl/err.h>
#include <openssl/opensslv.h>

/**
* A helper macro to convert the java 'context-handle'
* to a EVP_CIPHER_CTX pointer.
*/
#define CONTEXT(context) ((EVP_CIPHER_CTX*)((ptrdiff_t)(context)))

/**
* A helper macro to convert the EVP_CIPHER_CTX pointer to the
* java 'context-handle'.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@

#include "org_apache_commons_crypto.h"

#define UNUSED(x) ((void)(x))

#include <openssl/crypto.h>
#include <openssl/engine.h>
#include <openssl/rand.h>
Expand Down

0 comments on commit 53d910b

Please sign in to comment.