Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(31)

Side by Side Diff: src/pkg/crypto/x509/x509.go

Issue 224062: code review 224062: strings: delete Runes, Bytes (Closed)
Patch Set: code review 224062: strings: delete Runes, Bytes Created 15 years ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/pkg/crypto/tls/prf.go ('k') | src/pkg/crypto/x509/x509_test.go » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2009 The Go Authors. All rights reserved. 1 // Copyright 2009 The Go Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style 2 // Use of this source code is governed by a BSD-style
3 // license that can be found in the LICENSE file. 3 // license that can be found in the LICENSE file.
4 4
5 // This package parses X.509-encoded keys and certificates. 5 // This package parses X.509-encoded keys and certificates.
6 package x509 6 package x509
7 7
8 import ( 8 import (
9 "asn1" 9 "asn1"
10 "big" 10 "big"
(...skipping 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 if err != nil { 728 if err != nil {
729 return 729 return
730 } 730 }
731 n++ 731 n++
732 } 732 }
733 733
734 if len(template.DNSNames) > 0 { 734 if len(template.DNSNames) > 0 {
735 ret[n].Id = oidExtensionSubjectAltName 735 ret[n].Id = oidExtensionSubjectAltName
736 rawValues := make([]asn1.RawValue, len(template.DNSNames)) 736 rawValues := make([]asn1.RawValue, len(template.DNSNames))
737 for i, name := range template.DNSNames { 737 for i, name := range template.DNSNames {
738 » » » rawValues[i] = asn1.RawValue{Tag: 2, Class: 2, Bytes: st rings.Bytes(name)} 738 » » » rawValues[i] = asn1.RawValue{Tag: 2, Class: 2, Bytes: [] byte(name)}
739 } 739 }
740 ret[n].Value, err = asn1.MarshalToMemory(rawValues) 740 ret[n].Value, err = asn1.MarshalToMemory(rawValues)
741 if err != nil { 741 if err != nil {
742 return 742 return
743 } 743 }
744 n++ 744 n++
745 } 745 }
746 746
747 // Adding another extension here? Remember to update the maximum number 747 // Adding another extension here? Remember to update the maximum number
748 // of elements in the make() at the top of the function. 748 // of elements in the make() at the top of the function.
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
810 return 810 return
811 } 811 }
812 812
813 cert, err = asn1.MarshalToMemory(certificate{ 813 cert, err = asn1.MarshalToMemory(certificate{
814 c, 814 c,
815 algorithmIdentifier{oidSHA1WithRSA}, 815 algorithmIdentifier{oidSHA1WithRSA},
816 asn1.BitString{Bytes: signature, BitLength: len(signature) * 8}, 816 asn1.BitString{Bytes: signature, BitLength: len(signature) * 8},
817 }) 817 })
818 return 818 return
819 } 819 }
OLDNEW
« no previous file with comments | « src/pkg/crypto/tls/prf.go ('k') | src/pkg/crypto/x509/x509_test.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b