Issue #17717: Pull NASM from svn.python.org for OpenSSL build.
diff --git a/PCbuild/build_ssl.py b/PCbuild/build_ssl.py
index 151aa54..53c7e35 100644
--- a/PCbuild/build_ssl.py
+++ b/PCbuild/build_ssl.py
@@ -170,6 +170,17 @@
     if ssl_dir is None:
         sys.exit(1)
 
+    # add our copy of NASM to PATH.  It will be on the same level as openssl
+    for dir in os.listdir(os.path.join(ssl_dir, os.pardir)):
+        if dir.startswith('nasm'):
+            nasm_dir = os.path.join(ssl_dir, os.pardir, dir)
+            nasm_dir = os.path.abspath(nasm_dir)
+            os.environ['PATH'] += os.pathsep.join(['', nasm_dir])
+            break
+    else:
+        print('NASM was not found, make sure it is on PATH')
+
+
     old_cd = os.getcwd()
     try:
         os.chdir(ssl_dir)
diff --git a/PCbuild/readme.txt b/PCbuild/readme.txt
index c38f990..a65926d 100644
--- a/PCbuild/readme.txt
+++ b/PCbuild/readme.txt
@@ -144,7 +144,9 @@
 
     You must install the NASM assembler from
         http://nasm.sf.net
-    for x86 builds.  Put nasm.exe anywhere in your PATH.
+    for x86 builds.  Put nasm.exe anywhere in your PATH.  If you use the
+    Tools\buildbot\external(-amd64).bat method for getting sources, it also
+    downloads a version of NASM, which the ssl build script will add to PATH.
 
     You can also install ActivePerl from
         http://www.activestate.com/activeperl/