Recent changes from 0.9.6-stable.
authorRichard Levitte <levitte@openssl.org>
Thu, 13 Jun 2002 20:08:29 +0000 (20:08 +0000)
committerRichard Levitte <levitte@openssl.org>
Thu, 13 Jun 2002 20:08:29 +0000 (20:08 +0000)
Makefile.org
apps/Makefile.ssl
crypto/Makefile.ssl
crypto/objects/Makefile.ssl
doc/ssl/SSL_CTX_set_client_cert_cb.pod
test/Makefile.ssl

index f545b11595a14d971c9c871ff6affca4c0958788..0d977715eec46cae49d35950deb5ea939d549f5f 100644 (file)
@@ -545,7 +545,7 @@ test:   tests
 
 tests: rehash
        @(cd test && echo "testing..." && \
-       $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SDIRS='${SDIRS}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PERL='${PERL}' EXE_EXT='${EXE_EXT}' tests );
+       $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' TESTS='${TESTS}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' OPENSSL_DEBUG_MEMORY=on tests );
        @apps/openssl version -a
 
 report:
@@ -556,7 +556,7 @@ depend:
        do \
        if [ -d "$$i" ]; then \
                (cd $$i && echo "making dependencies $$i..." && \
-               $(MAKE) SDIRS='${SDIRS}' DEPFLAG='${DEPFLAG}' depend ) || exit 1; \
+               $(MAKE) SDIRS='${SDIRS}' DEPFLAG='${DEPFLAG}' PERL='${PERL}' depend ) || exit 1; \
        fi; \
        done;
 
@@ -601,20 +601,26 @@ TABLE: Configure
 
 update: depend errors stacks util/libeay.num util/ssleay.num crypto/objects/obj_dat.h TABLE
 
+# Build distribution tar-file. As the list of files returned by "find" is
+# pretty long, on several platforms a "too many arguments" error or similar
+# would occur. Therefore the list of files is temporarily stored into a file
+# and read directly, requiring GNU-Tar. Call "make TAR=gtar dist" if the normal
+# tar does not support the --files-from option.
 tar:
-       @$(TAR) $(TARFLAGS) -cvf - \
-               `find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE | sort` |\
+       find * \! -path CVS/\* \! -path \*/CVS/\* \! -name CVS \! -name .cvsignore \! -name STATUS \! -name TABLE | sort > ../$(TARFILE).list; \
+       $(TAR) $(TARFLAGS) --files-from ../$(TARFILE).list -cvf - | \
        tardy --user_number=0  --user_name=openssl \
              --group_number=0 --group_name=openssl \
              --prefix=openssl-$(VERSION) - |\
        gzip --best >../$(TARFILE).gz; \
+       rm -f ../$(TARFILE).list; \
        ls -l ../$(TARFILE).gz
 
 dist:   
        $(PERL) Configure dist
        @$(MAKE) dist_pem_h
        @$(MAKE) SDIRS='${SDIRS}' clean
-       @$(MAKE) tar
+       @$(MAKE) TAR='${TAR}' TARFLAGS='${TARFLAGS}' tar
 
 dist_pem_h:
        (cd crypto/pem; $(MAKE) CC='${CC}' SDIRS='${SDIRS}' CFLAG='${CFLAG}' pem.h; $(MAKE) clean)
index b09ff68ee2f31e88c5cb73cb774449d1d6ea2e77..c8c4dc6fbc1ef87b04116b316237331277ab342c 100644 (file)
@@ -13,6 +13,7 @@ OPENSSLDIR=   /usr/local/ssl
 MAKE=          make -f Makefile.ssl
 MAKEDEPEND=    $(TOP)/util/domd $(TOP)
 MAKEFILE=      Makefile.ssl
+PERL=          perl
 RM=            rm -f
 
 PEX_LIBS=
@@ -127,10 +128,10 @@ clean:
        rm -f req
 
 $(DLIBSSL):
-       (cd ../ssl; $(MAKE))
+       (cd ../ssl; $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' TESTS='${TESTS}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}')
 
 $(DLIBCRYPTO):
-       (cd ../crypto; $(MAKE))
+       (cd ../crypto; $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' TESTS='${TESTS}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}')
 
 $(PROGRAM): progs.h $(E_OBJ) $(PROGRAM).o $(DLIBCRYPTO) $(DLIBSSL)
        $(RM) $(PROGRAM)
index 0cc666b73de9ae915e26bb419f54f135f7813cd0..351e3b34dad5ffdfd060ea9c740ebf494887e78b 100644 (file)
@@ -134,7 +134,7 @@ depend:
        @for i in $(SDIRS) ;\
        do \
        (cd $$i; echo "making depend in crypto/$$i..."; \
-       $(MAKE) MAKEFILE='${MAKEFILE}' INCLUDES='${INCLUDES}' DEPFLAG='${DEPFLAG}' depend ); \
+       $(MAKE) MAKEFILE='${MAKEFILE}' INCLUDES='${INCLUDES}' DEPFLAG='${DEPFLAG}' PERL='${PERL}' depend ); \
        done;
 
 clean:
index 562b127467c6d534fe5116d225eaddd804741dd3..7b1c51cdb128c50ae63671cd08499d45a66b5b0a 100644 (file)
@@ -14,6 +14,7 @@ MAKE=         make -f Makefile.ssl
 MAKEDEPEND=    $(TOP)/util/domd $(TOP)
 MAKEFILE=      Makefile.ssl
 AR=            ar r
+PERL=          perl
 
 CFLAGS= $(INCLUDES) $(CFLAG)
 
index 53e182771388ddc2540ae7a7a5ce62d875473150..3465b5c7bbaf806bd3de82459970a1546dcf7722 100644 (file)
@@ -15,8 +15,10 @@ SSL_CTX_set_client_cert_cb, SSL_CTX_get_client_cert_cb - handle client certifica
 =head1 DESCRIPTION
 
 SSL_CTX_set_client_cert_cb() sets the B<client_cert_cb()> callback, that is
-called when a client certificate is requested by a server.
-When B<client_cert_cb()> is NULL, not callback function is used.
+called when a client certificate is requested by a server and no certificate
+was yet set for the SSL object.
+
+When B<client_cert_cb()> is NULL, no callback function is used.
 
 SSL_CTX_get_client_cert_cb() returns a pointer to the currently set callback
 function.
@@ -25,9 +27,13 @@ client_cert_cb() is the application defined callback. If it wants to
 set a certificate, a certificate/private key combination must be set
 using the B<x509> and B<pkey> arguments and "1" must be returned. The
 certificate will be installed into B<ssl>, see the NOTES and BUGS sections.
-If no certificate should be set, "0" has to be returned and the default
-certificate will be sent. A fatal error can be indicated by returning
-a negative value, in which case the handshake will be canceled.
+If no certificate should be set, "0" has to be returned and no certificate
+will be sent. A negative return value will suspend the handshake and the
+handshake function will return immediatly. L<SSL_get_error(3)|SSL_get_error(3)>
+will return SSL_ERROR_WANT_X509_LOOKUP to indicate, that the handshake was
+suspended. The next call to the handshake function will again lead to the call
+of client_cert_cb(). It is the job of the client_cert_cb() to store information
+about the state of the last call, if required to continue.
 
 =head1 NOTES
 
@@ -35,26 +41,24 @@ During a handshake (or renegotiation) a server may request a certificate
 from the client. A client certificate must only be sent, when the server
 did send the request.
 
-When no callback function is set, an OpenSSL client will send the certificate
-that was set using the
-L<SSL_CTX_use_certificate(3)|SSL_CTX_use_certificate(3)> family of functions.
-The TLS standard requires that only a certificate is sent, if it matches
-the list of acceptable CAs sent by the server. This constraint is
-violated by the default behavior of the OpenSSL library. Using the
-callback function it is possible to implement a proper selection routine
-or to allow a user interaction to choose the certificate to be sent.
-The callback function can obtain the list of acceptable CAs using the
-L<SSL_get_client_CA_list(3)|SSL_get_client_CA_list(3)> function.
-
-If a callback function is defined, the callback function will be called.
+When a certificate was set using the
+L<SSL_CTX_use_certificate(3)|SSL_CTX_use_certificate(3)> family of functions,
+it will be sent to the server. The TLS standard requires that only a
+certificate is sent, if it matches the list of acceptable CAs sent by the
+server. This constraint is violated by the default behavior of the OpenSSL
+library. Using the callback function it is possible to implement a proper
+selection routine or to allow a user interaction to choose the certificate to
+be sent.
+
+If a callback function is defined and no certificate was yet defined for the
+SSL object, the callback function will be called.
 If the callback function returns a certificate, the OpenSSL library
 will try to load the private key and certificate data into the SSL
-object using SSL_use_certificate() and SSL_use_private_key() functions.
-Thus it will permanently override the certificate and key previously
-installed and will not be reset by calling L<SSL_clear(3)|SSL_clear(3)>.
-If the callback returns no certificate, the OpenSSL library will send
-the certificate previously installed for the SSL_CTX object or the specific
-certificate of the SSL object, if available.
+object using the SSL_use_certificate() and SSL_use_private_key() functions.
+Thus it will permanently install the certificate and key for this SSL
+object. It will not be reset by calling L<SSL_clear(3)|SSL_clear(3)>.
+If the callback returns no certificate, the OpenSSL library will not send
+a certificate.
 
 =head1 BUGS
 
index bb91b9c595c000b32b3cfa5cd51eaa17109b17ae..7b02a38ca83258a9fd95ae2108fc58da2e6f807e 100644 (file)
@@ -13,6 +13,7 @@ INSTALLTOP=   /usr/local/ssl
 MAKEFILE=      Makefile.ssl
 MAKE=          make -f $(MAKEFILE)
 MAKEDEPEND=    $(TOP)/util/domd $(TOP)
+PERL=          perl
 
 PEX_LIBS=
 EX_LIBS= #-lnsl -lsocket
@@ -109,7 +110,7 @@ tests:      exe apps \
        test_ss test_ca test_engine test_ssl
 
 apps:
-       @(cd ../apps; $(MAKE)  CC='${CC}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' all)
+       @(cd ../apps; $(MAKE)  CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' TESTS='${TESTS}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}' all)
 
 test_des:
        ./$(DESTEST)
@@ -247,10 +248,10 @@ clean:
        rm -f .rnd tmp.bntest tmp.bctest *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff $(EXE) *.ss log
 
 $(DLIBSSL):
-       (cd ../ssl; $(MAKE))
+       (cd ../ssl; $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' TESTS='${TESTS}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}')
 
 $(DLIBCRYPTO):
-       (cd ../crypto; $(MAKE))
+       (cd ../crypto; $(MAKE) CC='${CC}' PLATFORM='${PLATFORM}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_ASM='${BN_ASM}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' PROCESSOR='${PROCESSOR}' PERL='${PERL}' RANLIB='${RANLIB}' TESTS='${TESTS}' EXE_EXT='${EXE_EXT}' SHARED_LIBS='${SHARED_LIBS}' SHLIB_EXT='${SHLIB_EXT}' SHLIB_TARGET='${SHLIB_TARGET}')
 
 $(RSATEST): $(RSATEST).o $(DLIBCRYPTO)
        $(CC) -o $(RSATEST) $(CFLAGS) $(RSATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS)