"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/crypto/x509/x509.go" between
go1.19.src.tar.gz and go1.19.1.src.tar.gz

About: Google’s Go is a compiled, garbage-collected, concurrent programming language.
Latest stable release (1.19).

x509.go  (go1.19.src):x509.go  (go1.19.1.src)
skipping to change at line 87 skipping to change at line 87
E: pub.E, E: pub.E,
}) })
if err != nil { if err != nil {
return nil, pkix.AlgorithmIdentifier{}, err return nil, pkix.AlgorithmIdentifier{}, err
} }
publicKeyAlgorithm.Algorithm = oidPublicKeyRSA publicKeyAlgorithm.Algorithm = oidPublicKeyRSA
// This is a NULL parameters value which is required by // This is a NULL parameters value which is required by
// RFC 3279, Section 2.3.1. // RFC 3279, Section 2.3.1.
publicKeyAlgorithm.Parameters = asn1.NullRawValue publicKeyAlgorithm.Parameters = asn1.NullRawValue
case *ecdsa.PublicKey: case *ecdsa.PublicKey:
publicKeyBytes = elliptic.Marshal(pub.Curve, pub.X, pub.Y)
oid, ok := oidFromNamedCurve(pub.Curve) oid, ok := oidFromNamedCurve(pub.Curve)
if !ok { if !ok {
return nil, pkix.AlgorithmIdentifier{}, errors.New("x509: unsupported elliptic curve") return nil, pkix.AlgorithmIdentifier{}, errors.New("x509: unsupported elliptic curve")
} }
if !pub.Curve.IsOnCurve(pub.X, pub.Y) {
return nil, pkix.AlgorithmIdentifier{}, errors.New("x509:
invalid elliptic curve public key")
}
publicKeyBytes = elliptic.Marshal(pub.Curve, pub.X, pub.Y)
publicKeyAlgorithm.Algorithm = oidPublicKeyECDSA publicKeyAlgorithm.Algorithm = oidPublicKeyECDSA
var paramBytes []byte var paramBytes []byte
paramBytes, err = asn1.Marshal(oid) paramBytes, err = asn1.Marshal(oid)
if err != nil { if err != nil {
return return
} }
publicKeyAlgorithm.Parameters.FullBytes = paramBytes publicKeyAlgorithm.Parameters.FullBytes = paramBytes
case ed25519.PublicKey: case ed25519.PublicKey:
publicKeyBytes = pub publicKeyBytes = pub
publicKeyAlgorithm.Algorithm = oidPublicKeyEd25519 publicKeyAlgorithm.Algorithm = oidPublicKeyEd25519
 End of changes. 2 change blocks. 
1 lines changed or deleted 5 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)