Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

user : Tolower openssl version strings. #250

Merged
merged 1 commit into from
Oct 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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