view auto/lib/openssl/make @ 9274:46ecad404a29 default tip

Mail: reset imap tag to empty after authentication attempt. We need to reset the imap tag to empty after an authentication attempt completes, otherwise if the next line parsed is incomplete with no tag (e.g. empty line) then we use the "tag" from the previous buffer which is now definitely wrong and has been partially overwritten with the most recently read data (e.g. CRLF). An example before this patch: S: * OK IMAP4 ready C: foobar login a b S: foobar NO Incorrect username or password. C: S: S: obar BAD invalid command Then with this patch: S: * OK IMAP4 ready C: foobar login a b S: foobar NO Incorrect username or password. C: S: * BAD invalid command
author Rob Mueller <robm@fastmailteam.com>
date Wed, 15 May 2024 10:06:00 +0300
parents 3c4d81ea1338
children
line wrap: on
line source


# Copyright (C) Igor Sysoev
# Copyright (C) Nginx, Inc.


case "$CC" in

    cl)

        case "$NGX_MACHINE" in

            amd64)
                OPENSSL_TARGET=VC-WIN64A
            ;;

            *)
                OPENSSL_TARGET=VC-WIN32
            ;;

        esac

        cat << END                                            >> $NGX_MAKEFILE

$OPENSSL/openssl/include/openssl/ssl.h:	$NGX_MAKEFILE
	\$(MAKE) -f auto/lib/openssl/makefile.msvc			\
		OPENSSL="$OPENSSL" OPENSSL_OPT="$OPENSSL_OPT"		\
		OPENSSL_TARGET="$OPENSSL_TARGET"

END

    ;;

    bcc32)

        ngx_opt=`echo "-DOPENSSL=\"$OPENSSL\" -DOPENSSL_OPT=\"$OPENSSL_OPT\"" \
            | sed -e "s/\//$ngx_regex_dirsep/g"`

        cat << END                                            >> $NGX_MAKEFILE

`echo "$OPENSSL\\openssl\\lib\\libeay32.lib:				\
	$OPENSSL\\openssl\\include\\openssl\\ssl.h"			\
	| sed -e "s/\//$ngx_regex_dirsep/g"`

`echo "$OPENSSL\\openssl\\lib\\ssleay32.lib:				\
	$OPENSSL\\openssl\\include\\openssl\\ssl.h"			\
	| sed -e "s/\//$ngx_regex_dirsep/g"`

`echo "$OPENSSL\\openssl\\include\\openssl\\ssl.h:	$NGX_MAKEFILE"	\
	| sed -e "s/\//$ngx_regex_dirsep/g"`
	\$(MAKE) -f auto/lib/openssl/makefile.bcc $ngx_opt

END

    ;;

    *)
        case $OPENSSL in
            /*) ngx_prefix="$OPENSSL/.openssl" ;;
            *)  ngx_prefix="$PWD/$OPENSSL/.openssl" ;;
        esac

        cat << END                                            >> $NGX_MAKEFILE

$OPENSSL/.openssl/include/openssl/ssl.h:	$NGX_MAKEFILE
	cd $OPENSSL \\
	&& if [ -f Makefile ]; then \$(MAKE) clean; fi \\
	&& ./config --prefix=$ngx_prefix no-shared no-threads $OPENSSL_OPT \\
	&& \$(MAKE) \\
	&& \$(MAKE) install_sw LIBDIR=lib

END

    ;;

esac