Skip to content

Commit

Permalink
Merge branch 'release/v0.5.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
DerAndereAndi committed Jul 16, 2024
2 parents 0037fc7 + e8c7aab commit 23931b8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
6 changes: 3 additions & 3 deletions cert/cert.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,14 @@ func CreateCertificate(organizationalUnit, organization, country, commonName str
return tls.Certificate{}, err
}

// Create the EEBUS service SKI using the private key
asn1, err := x509.MarshalECPrivateKey(privateKey)
// Create the EEBUS service SKI using the public key
publicKey, err := privateKey.PublicKey.ECDH()
if err != nil {
return tls.Certificate{}, err
}
// SHIP 12.2: Required to be created according to RFC 3280 4.2.1.2
// #nosec G401
ski := sha1.Sum(asn1)
ski := sha1.Sum(publicKey.Bytes())

subject := pkix.Name{
OrganizationalUnit: []string{organizationalUnit},
Expand Down
6 changes: 3 additions & 3 deletions cert/cert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,14 @@ func createInvalidCertificate(organizationalUnit, organization, country, commonN
return tls.Certificate{}, err
}

// Create the EEBUS service SKI using the private key
asn1, err := x509.MarshalECPrivateKey(privateKey)
// Create the EEBUS service SKI using the public key
publicKey, err := privateKey.PublicKey.ECDH()
if err != nil {
return tls.Certificate{}, err
}
// SHIP 12.2: Required to be created according to RFC 3280 4.2.1.2
// #nosec G401
ski := sha1.Sum(asn1)
ski := sha1.Sum(publicKey.Bytes())

subject := pkix.Name{
OrganizationalUnit: []string{organizationalUnit},
Expand Down
4 changes: 4 additions & 0 deletions mdns/mdns.go
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,10 @@ func (m *MdnsManager) processMdnsEntry(elements map[string]string, name, host st
}

func (m *MdnsManager) RequestMdnsEntries() {
if m.report == nil {
return
}

entries := m.copyMdnsEntries()
go m.report.ReportMdnsEntries(entries)
}

0 comments on commit 23931b8

Please sign in to comment.