d9719e1d52b657fec9bf6676c85a4d2458fd7e89
galt
  Thu Apr 27 15:54:31 2017 -0700
Remove optional compile switch USE_SSL so that openssl is now an official kent repo dependency. Also using openssl sha1 in hgTracks multiregion. refs #17358.

diff --git src/hg/hgTracks/hgTracks.c src/hg/hgTracks/hgTracks.c
index 39ffef5..539caa6 100644
--- src/hg/hgTracks/hgTracks.c
+++ src/hg/hgTracks/hgTracks.c
@@ -58,31 +58,32 @@
 #include "agpFrag.h"
 #include "imageV2.h"
 #include "suggest.h"
 #include "search.h"
 #include "errCatch.h"
 #include "iupac.h"
 #include "botDelay.h"
 #include "chromInfo.h"
 #include "extTools.h"
 #include "basicBed.h"
 #include "customFactory.h"
 #include "genbank.h"
 #include "bigWarn.h"
 #include "wigCommon.h"
 #include "knetUdc.h"
-#include "rSha1.h"
+#include "hex.h"
+#include <openssl/sha.h>
 
 /* Other than submit and Submit all these vars should start with hgt.
  * to avoid weeding things out of other program's namespaces.
  * Because the browser is a central program, most of its cart
  * variables are not hgt. qualified.  It's a good idea if other
  * program's unique variables be qualified with a prefix though. */
 char *excludeVars[] = { "submit", "Submit", "dirty", "hgt.reset",
             "hgt.in1", "hgt.in2", "hgt.in3", "hgt.inBase",
             "hgt.out1", "hgt.out2", "hgt.out3", "hgt.out4",
             "hgt.left1", "hgt.left2", "hgt.left3",
             "hgt.right1", "hgt.right2", "hgt.right3",
             "hgt.dinkLL", "hgt.dinkLR", "hgt.dinkRL", "hgt.dinkRR",
             "hgt.tui", "hgt.hideAll", "hgt.visAllFromCt",
 	    "hgt.psOutput", "hideControls", "hgt.toggleRevCmplDisp",
 	    "hgt.collapseGroups", "hgt.expandGroups", "hgt.suggest",
@@ -3985,35 +3986,37 @@
 	}
     break;
     }
 lineFileClose(&lf);
 if (newType != url)
     {
     if (lineCount == 0)  // there are no non-blank lines
 	{	
 	newMultiRegionsBedUrl = "";
 	newType = empty;
 	}
     else
 	newType = trashFile;
     }
 
-char *newSha1 = NULL;
+char newSha1[(SHA_DIGEST_LENGTH + 1) * 2];
 if (newType==trashFile)
     {
     // calculate sha1 checksum on new input.
-    newSha1 = rSha1HexForString(dyInput->string);
+    unsigned char hash[SHA_DIGEST_LENGTH];
+    SHA1((const unsigned char *)dyInput->string, dyInput->stringSize, hash);
+    hexBinaryString(hash, SHA_DIGEST_LENGTH, newSha1, (SHA_DIGEST_LENGTH + 1) * 2);
     }
 
 // compare input sha1 to trashFile sha1 to see if same
 boolean filesAreSame = FALSE;
 if (oldType==trashFile && newType==trashFile)
     {
     lf = lineFileMayOpen(multiRegionsBedUrlSha1Name, TRUE);
     while (lineFileNext(lf, &line, &lineSize))
 	{
 	if (sameString(line, newSha1))
 	    filesAreSame = TRUE;
 	}
     lineFileClose(&lf);
     }