You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@labs.apache.org by dr...@apache.org on 2007/12/12 22:48:41 UTC
svn commit: r603749 - in /labs/badca: build/ssl.m4 openssl/setup.py.in
tests/01KeysTestCase.py tests/03CertTestCase.py
Author: dreid
Date: Wed Dec 12 13:48:31 2007
New Revision: 603749
URL: http://svn.apache.org/viewvc?rev=603749&view=rev
Log:
Handle Solaris niggles
Set the path to use for OpenSSL libs when building python
extensions [ Mads Toftum ]
Correct a couple of minor issues with the tests
Modified:
labs/badca/build/ssl.m4
labs/badca/openssl/setup.py.in
labs/badca/tests/01KeysTestCase.py
labs/badca/tests/03CertTestCase.py
Modified: labs/badca/build/ssl.m4
URL: http://svn.apache.org/viewvc/labs/badca/build/ssl.m4?rev=603749&r1=603748&r2=603749&view=diff
==============================================================================
--- labs/badca/build/ssl.m4 (original)
+++ labs/badca/build/ssl.m4 Wed Dec 12 13:48:31 2007
@@ -109,6 +109,14 @@
CPPFLAGS="-I$1/include $CPPFLAGS"
LDFLAGS="-L$1/lib -lssl -lcrypto $LDFLAGS"
+ # Apparently Solaris doesn't have /usr/sfw (default location for the
+ # OpenSSL install) in it's LD_LIBRARY_PATH so we need to add it
+ # or this will fail!
+ os=`uname -s`
+ if test "$os" = "SunOS"; then
+ LDFLAGS="$LDFLAGS -R$1/lib"
+ fi
+
AC_TRY_RUN([
#include "openssl/x509.h"
int main(void) {
Modified: labs/badca/openssl/setup.py.in
URL: http://svn.apache.org/viewvc/labs/badca/openssl/setup.py.in?rev=603749&r1=603748&r2=603749&view=diff
==============================================================================
--- labs/badca/openssl/setup.py.in (original)
+++ labs/badca/openssl/setup.py.in Wed Dec 12 13:48:31 2007
@@ -5,6 +5,7 @@
include_dirs= ['@openssl_INCDIR@'],
library_dirs= ['@openssl_LIBDIR@'],
libraries = [@openssl_LIBSONLY@],
+ runtime_library_dirs = ['@openssl_LIBDIR@'],
sources = ['rsamodule.c']
)
csrModule = Extension('csr',
@@ -12,6 +13,7 @@
include_dirs= ['@openssl_INCDIR@'],
library_dirs= ['@openssl_LIBDIR@'],
libraries = [@openssl_LIBSONLY@],
+ runtime_library_dirs = ['@openssl_LIBDIR@'],
sources = ['csrmodule.c']
)
certModule = Extension('cert',
@@ -19,6 +21,7 @@
include_dirs= ['@openssl_INCDIR@'],
library_dirs= ['@openssl_LIBDIR@'],
libraries = [@openssl_LIBSONLY@],
+ runtime_library_dirs = ['@openssl_LIBDIR@'],
sources = ['certmodule.c']
)
Modified: labs/badca/tests/01KeysTestCase.py
URL: http://svn.apache.org/viewvc/labs/badca/tests/01KeysTestCase.py?rev=603749&r1=603748&r2=603749&view=diff
==============================================================================
--- labs/badca/tests/01KeysTestCase.py (original)
+++ labs/badca/tests/01KeysTestCase.py Wed Dec 12 13:48:31 2007
@@ -27,13 +27,11 @@
self.assertRaises(Keys.rsa.keySize, self.obj.create, 8193)
def test03(self):
- """ Test reading in a public key we have a private key available for """
+ """ Test reading in a public key """
assert self.obj.readPublicKey('tests/keys/test1.public.key') == 1, \
"Failed to read public key"
assert self.obj.isValid(), "Invalid key object created"
assert self.obj.hasPublic(), "No public key available"
- assert self.obj.hasPrivate(), "No private key available"
-
def test04(self):
""" Test reading of private key """
Modified: labs/badca/tests/03CertTestCase.py
URL: http://svn.apache.org/viewvc/labs/badca/tests/03CertTestCase.py?rev=603749&r1=603748&r2=603749&view=diff
==============================================================================
--- labs/badca/tests/03CertTestCase.py (original)
+++ labs/badca/tests/03CertTestCase.py Wed Dec 12 13:48:31 2007
@@ -113,10 +113,7 @@
"Failed to read the CA certificate"
self.obj.addKeyPath('tests/keys/private')
print str(self.obj.info)
- key = self.obj.getKey()
- assert key is not None, "Failed to get key object from certificate"
- assert key.hasPublic(), "Not public key"
- assert key.hasPrivate(), "No private key available!"
+ assert self.obj.key.hasPrivate(), "Failed to find private key!"
newcert = self.obj.signRequest(csr)
assert newcert is not None, \
"Failed to create a certificate object from the CSR"
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@labs.apache.org
For additional commands, e-mail: commits-help@labs.apache.org