Skip to content

Commit

Permalink
Fix: Rename nrfCertPem
Browse files Browse the repository at this point in the history
  • Loading branch information
andy89923 committed Dec 9, 2023
1 parent eec538e commit a6fb146
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions internal/context/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ type UDMContext struct {
NFDiscoveryClient *Nnrf_NFDiscovery.APIClient
UdmUePool sync.Map // map[supi]*UdmUeContext
NrfUri string
NrfCerPem string
NrfCertPem string
GpsiSupiList models.IdentityData
SharedSubsDataMap map[string]models.SharedData // sharedDataIds as key
SubscriptionOfSharedDataChange sync.Map // subscriptionID as key
Expand Down Expand Up @@ -123,8 +123,8 @@ func InitUdmContext(context *UDMContext) {
}
}
udmContext.NrfUri = configuration.NrfUri
if configuration.NrfCerPem != "" {
context.NrfCerPem = configuration.NrfCerPem
if configuration.NrfCertPem != "" {
context.NrfCertPem = configuration.NrfCertPem
}
servingNameList := configuration.ServiceNameList

Expand Down
4 changes: 2 additions & 2 deletions internal/sbi/consumer/nf_management.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,8 +74,8 @@ func SendRegisterNFInstance(nrfUri, nfInstanceId string, profile models.NfProfil
oauth2 := nf.CustomInfo["oauth2"].(bool)
udm_context.GetSelf().OAuth2Required = oauth2
logger.MainLog.Infoln("OAuth2 setting receive from NRF:", oauth2)
if oauth2 && udm_context.GetSelf().NrfCerPem == "" {
logger.CfgLog.Error("OAuth2 enable but no nrfCerPem provided in config.")
if oauth2 && udm_context.GetSelf().NrfCertPem == "" {
logger.CfgLog.Error("OAuth2 enable but no nrfCertPem provided in config.")
}
break
} else {
Expand Down
2 changes: 1 addition & 1 deletion pkg/factory/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ type Configuration struct {
Sbi *Sbi `yaml:"sbi,omitempty" valid:"required"`
ServiceNameList []string `yaml:"serviceNameList,omitempty" valid:"required"`
NrfUri string `yaml:"nrfUri,omitempty" valid:"required, url"`
NrfCerPem string `yaml:"nrfCerPem,omitempty" valid:"type(string),minstringlength(1),optional"`
NrfCertPem string `yaml:"nrfCertPem,omitempty" valid:"type(string),minstringlength(1),optional"`
SuciProfiles []suci.SuciProfile `yaml:"SuciProfile,omitempty"`
}
type Logger struct {
Expand Down

0 comments on commit a6fb146

Please sign in to comment.