Skip to content

Commit

Permalink
user : Tolower openssl version strings.
Browse files Browse the repository at this point in the history
fixes : #249
Signed-off-by: CFC4N <[email protected]>
  • Loading branch information
cfc4n committed Oct 26, 2022
1 parent 9a52168 commit dcb9821
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions user/module/probe_openssl_lib.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ func (this *MOpenSSLProbe) detectOpenssl(soPath string) error {
}

versionKey := ""
isAndroid := this.conf.(*config.OpensslConfig).IsAndroid

for _, v := range dumpStrings {
if strings.Contains(string(v), "OpenSSL") {
Expand All @@ -125,19 +124,20 @@ func (this *MOpenSSLProbe) detectOpenssl(soPath string) error {
}
}

this.logger.Printf("versionKey:%s", versionKey)

var bpfFile string
var found bool
if versionKey != "" {
versionKeyLower := strings.ToLower(versionKey)
this.logger.Printf("%s\torigin version:%s, as key:%s", this.Name(), versionKey, versionKeyLower)
// find the sslVersion bpfFile from sslVersionBpfMap
bpfFile, found = this.sslVersionBpfMap[versionKey]
bpfFile, found = this.sslVersionBpfMap[versionKeyLower]
if found {
this.sslBpfFile = bpfFile
return nil
}
}

isAndroid := this.conf.(*config.OpensslConfig).IsAndroid
// if not found, use default
if isAndroid {
bpfFile, _ = this.sslVersionBpfMap[AndroidDefauleFilename]
Expand Down

0 comments on commit dcb9821

Please sign in to comment.