Changeset 575 in code for trunk


Ignore:
Timestamp:
Jul 6, 2021, 2:34:15 PM (4 years ago)
Author:
yyp
Message:

service: show SHA-512 fingerprint

Closes: https://todo.sr.ht/~emersion/soju/130

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/service.go

    r573 r575  
    1010        "crypto/sha1"
    1111        "crypto/sha256"
     12        "crypto/sha512"
    1213        "crypto/x509"
    1314        "crypto/x509/pkix"
     
    663664        sha256Sum := sha256.Sum256(derBytes)
    664665        sendServicePRIVMSG(dc, "SHA-256 fingerprint: "+hex.EncodeToString(sha256Sum[:]))
     666        sha512Sum := sha512.Sum512(derBytes)
     667        sendServicePRIVMSG(dc, "SHA-512 fingerprint: "+hex.EncodeToString(sha512Sum[:]))
    665668
    666669        return nil
     
    681684        sha256Sum := sha256.Sum256(net.SASL.External.CertBlob)
    682685        sendServicePRIVMSG(dc, "SHA-256 fingerprint: "+hex.EncodeToString(sha256Sum[:]))
     686        sha512Sum := sha512.Sum512(net.SASL.External.CertBlob)
     687        sendServicePRIVMSG(dc, "SHA-512 fingerprint: "+hex.EncodeToString(sha512Sum[:]))
    683688        return nil
    684689}
Note: See TracChangeset for help on using the changeset viewer.