1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-10-20 20:09:11 +00:00

Fix compile on CURRENT - finally. We have to check for the engine.h

header to get the things right.
This commit is contained in:
Martin Blapp 2003-02-19 11:27:51 +00:00
parent 7841fb15f6
commit 2cf58edd9b
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=75881
3 changed files with 87 additions and 0 deletions

View File

@ -22,6 +22,9 @@ WRKSRC= ${WRKDIR}
post-patch:
@${SED} -i orig -e 's#%%PREFIX%%#${PREFIX}#g' ${WRKDIR}/saferpay/Makefile
.if exists(/usr/include/openssl/engine.h)
CFLAGS+= -DHAVE_SSLENGINE_H
.endif
.if !defined(WITH_P5_API)
pre-build:

View File

@ -0,0 +1,62 @@
--- saferpay/IcctSign.cpp.orig Wed Feb 19 12:17:14 2003
+++ saferpay/IcctSign.cpp Wed Feb 19 12:19:52 2003
@@ -32,7 +32,11 @@
#define RSA_generate_key_S RSA_generate_key
#endif
+#ifdef HAVE_SSLENGINE_H
+HRESULT ICCT_Signature(const UCHAR* pucPrivateKey, int cbPrivateKey, UCHAR* pMessage,
+#else
HRESULT ICCT_Signature(UCHAR* pucPrivateKey, int cbPrivateKey, UCHAR* pMessage,
+#endif
ULONG cbMessage, /*[out]*/ UCHAR* pDigest, ULONG* pcbDigest)
{
RSA *pPrivateKey = RSA_new();
@@ -59,7 +63,11 @@
return -1;
}
+#ifdef HAVE_SSLENGINE_H
+HRESULT ICCT_Verify(const UCHAR* pucPublicKey, int cbPublicKey, UCHAR* pMessage, ULONG cbMessage,
+#else
HRESULT ICCT_Verify(UCHAR* pucPublicKey, int cbPublicKey, UCHAR* pMessage, ULONG cbMessage,
+#endif
/*[in]*/ UCHAR* pDigest, ULONG cbDigest)
{
RSA *pPublicKey = RSA_new();
@@ -91,7 +99,11 @@
return -1;
}
+#ifdef HAVE_SSLENGINE_H
+HRESULT ICCT_CryptDigest(const UCHAR* pucPublicKey, int cbPublicKey,
+#else
HRESULT ICCT_CryptDigest(UCHAR* pucPublicKey, int cbPublicKey,
+#endif
UCHAR* pDigest, ULONG cbDigest, UCHAR * pOut, ULONG * cbOut)
{
RSA *pPublicKey = RSA_new();
@@ -126,7 +138,11 @@
return -1;
}
+#ifdef HAVE_SSLENGINE_H
+HRESULT ICCT_DecryptDigest(const UCHAR* pucPrivateKey, int cbPrivateKey,
+#else
HRESULT ICCT_DecryptDigest(UCHAR* pucPrivateKey, int cbPrivateKey,
+#endif
UCHAR * pIn, ULONG cbIn, UCHAR* pDigest, ULONG * cbDigest)
{
RSA *pPrivateKey = RSA_new();
@@ -158,7 +174,11 @@
int* cbPrivateKey, UCHAR* Seed,
int cbSeed)
{
+#ifdef HAVE_SSLENGINE_H
+ RSA *pPrivateKey = RSA_new_method((ENGINE *)RSA_PKCS1_SSLeay());
+#else
RSA *pPrivateKey = RSA_new_method(RSA_PKCS1_SSLeay());
+#endif
UCHAR* pPubK = pucPublicKey;
UCHAR* pPrivK = pucPrivateKey;

View File

@ -0,0 +1,22 @@
--- saferpay/IcctSign.h.orig Wed Apr 17 13:40:14 2002
+++ saferpay/IcctSign.h Wed Feb 19 12:22:17 2003
@@ -11,11 +11,19 @@
int* cbPrivateKey, UCHAR* Seed,
int cbSeed = 0);
+#ifdef HAVE_SSLENGINE_H
+HRESULT ICCT_Signature(const UCHAR* pucPrivateKey, int cbPrivateKey, UCHAR* pMessage,
+ ULONG cbMessage, /*[out]*/ UCHAR* pDigest, ULONG* pcbDigest);
+
+HRESULT ICCT_Verify(const UCHAR* pucPublicKey, int cbPublicKey, UCHAR* pMessage,
+ ULONG cbMessage, /*[in]*/ UCHAR* pDigest, ULONG cbDigest);
+#else
HRESULT ICCT_Signature(UCHAR* pucPrivateKey, int cbPrivateKey, UCHAR* pMessage,
ULONG cbMessage, /*[out]*/ UCHAR* pDigest, ULONG* pcbDigest);
HRESULT ICCT_Verify(UCHAR* pucPublicKey, int cbPublicKey, UCHAR* pMessage,
ULONG cbMessage, /*[in]*/ UCHAR* pDigest, ULONG cbDigest);
+#endif
HRESULT ICCT_CryptDigest(UCHAR* pucPublicKey, int cbPublicKey,