@@ -52,7 +52,7 @@ func TestEnroll(t *testing.T) {
5252 hostIP := "192.168.100.1"
5353 counter := uint (5 )
5454 ca , _ := dnapitest .NebulaCACert ()
55- caPEM , err := ca .MarshalToPEM ()
55+ caPEM , err := ca .MarshalPEM ()
5656 require .NoError (t , err )
5757
5858 ts .ExpectEnrollment (code , message .NetworkCurve25519 , func (req message.EnrollRequest ) []byte {
@@ -76,7 +76,7 @@ func TestEnroll(t *testing.T) {
7676 HostID : hostID ,
7777 Counter : counter ,
7878 Config : cfg ,
79- TrustedKeys : marshalCAPublicKey (ca .Details . Curve , ca .Details . PublicKey ),
79+ TrustedKeys : marshalCAPublicKey (ca .Curve () , ca .PublicKey () ),
8080 Organization : message.HostOrgMetadata {
8181 ID : orgID ,
8282 Name : orgName ,
@@ -103,7 +103,7 @@ func TestEnroll(t *testing.T) {
103103 assert .Empty (t , ts .Errors ())
104104 assert .Equal (t , 0 , ts .RequestsRemaining ())
105105
106- tk , err := keys .NewTrustedKey (ed25519 .PublicKey (ca .Details . PublicKey ))
106+ tk , err := keys .NewTrustedKey (ed25519 .PublicKey (ca .PublicKey () ))
107107 require .NoError (t , err )
108108
109109 assert .Equal (t , hostID , creds .HostID )
@@ -123,7 +123,7 @@ func TestEnroll(t *testing.T) {
123123 }
124124 err = yaml .Unmarshal (cfg , & y )
125125 require .NoError (t , err )
126- _ , rest , err := cert .UnmarshalX25519PublicKey (y .Test .DHPubkey )
126+ _ , rest , _ , err := cert .UnmarshalPublicKeyFromPEM (y .Test .DHPubkey )
127127 assert .NoError (t , err )
128128 assert .Len (t , rest , 0 )
129129 assert .Equal (t , code , y .Test .Code )
@@ -174,7 +174,7 @@ func TestDoUpdate(t *testing.T) {
174174 t .Cleanup (func () { ts .Close () })
175175
176176 ca , caPrivkey := dnapitest .NebulaCACert ()
177- caPEM , err := ca .MarshalToPEM ()
177+ caPEM , err := ca .MarshalPEM ()
178178 require .NoError (t , err )
179179
180180 c := NewClient (useragent , ts .URL )
@@ -201,7 +201,7 @@ func TestDoUpdate(t *testing.T) {
201201 HostID : "foobar" ,
202202 Counter : 1 ,
203203 Config : cfg ,
204- TrustedKeys : marshalCAPublicKey (ca .Details . Curve , ca .Details . PublicKey ),
204+ TrustedKeys : marshalCAPublicKey (ca .Curve () , ca .PublicKey () ),
205205 Organization : message.HostOrgMetadata {
206206 ID : "foobaz" ,
207207 Name : "foobar's foo org" ,
@@ -270,7 +270,7 @@ func TestDoUpdate(t *testing.T) {
270270 Config : dnapitest .NebulaCfg (caPEM ),
271271 Counter : 2 ,
272272 Nonce : dnapitest .GetNonce (r ),
273- TrustedKeys : marshalCAPublicKey (ca .Details . Curve , ca .Details . PublicKey ),
273+ TrustedKeys : marshalCAPublicKey (ca .Curve () , ca .PublicKey () ),
274274 Organization : message.HostOrgMetadata {
275275 ID : "foobaz" ,
276276 Name : "foobar's foo org" ,
@@ -325,7 +325,7 @@ func TestDoUpdate(t *testing.T) {
325325 Config : dnapitest .NebulaCfg (caPEM ),
326326 Counter : 0 ,
327327 Nonce : dnapitest .GetNonce (r ),
328- TrustedKeys : marshalCAPublicKey (ca .Details . Curve , ca .Details . PublicKey ),
328+ TrustedKeys : marshalCAPublicKey (ca .Curve () , ca .PublicKey () ),
329329 Organization : message.HostOrgMetadata {
330330 ID : "foobaz" ,
331331 Name : "foobar's foo org" ,
@@ -384,7 +384,7 @@ func TestDoUpdate(t *testing.T) {
384384 Config : dnapitest .NebulaCfg (caPEM ),
385385 Counter : 3 ,
386386 Nonce : dnapitest .GetNonce (r ),
387- TrustedKeys : marshalCAPublicKey (ca .Details . Curve , ca .Details . PublicKey ),
387+ TrustedKeys : marshalCAPublicKey (ca .Curve () , ca .PublicKey () ),
388388 Organization : message.HostOrgMetadata {
389389 ID : orgID ,
390390 Name : orgName ,
@@ -438,7 +438,7 @@ func TestDoUpdate_P256(t *testing.T) {
438438 t .Cleanup (func () { ts .Close () })
439439
440440 ca , caPrivkey := dnapitest .NebulaCACertP256 ()
441- caPEM , err := ca .MarshalToPEM ()
441+ caPEM , err := ca .MarshalPEM ()
442442 require .NoError (t , err )
443443
444444 c := NewClient (useragent , ts .URL )
@@ -465,7 +465,7 @@ func TestDoUpdate_P256(t *testing.T) {
465465 HostID : "foobar" ,
466466 Counter : 1 ,
467467 Config : cfg ,
468- TrustedKeys : marshalCAPublicKey (ca .Details . Curve , ca .Details . PublicKey ),
468+ TrustedKeys : marshalCAPublicKey (ca .Curve () , ca .PublicKey () ),
469469 Organization : message.HostOrgMetadata {
470470 ID : "foobaz" ,
471471 Name : "foobar's foo org" ,
@@ -623,7 +623,7 @@ func TestDoUpdate_P256(t *testing.T) {
623623 Config : dnapitest .NebulaCfg (caPEM ),
624624 Counter : 3 ,
625625 Nonce : dnapitest .GetNonce (r ),
626- TrustedKeys : marshalCAPublicKey (ca .Details . Curve , ca .Details . PublicKey ),
626+ TrustedKeys : marshalCAPublicKey (ca .Curve () , ca .PublicKey () ),
627627 Organization : message.HostOrgMetadata {
628628 ID : "foobaz" ,
629629 Name : "foobar's foo org" ,
@@ -678,7 +678,7 @@ func TestCommandResponse(t *testing.T) {
678678 t .Cleanup (func () { ts .Close () })
679679
680680 ca , _ := dnapitest .NebulaCACert ()
681- caPEM , err := ca .MarshalToPEM ()
681+ caPEM , err := ca .MarshalPEM ()
682682 require .NoError (t , err )
683683
684684 c := NewClient (useragent , ts .URL )
@@ -705,7 +705,7 @@ func TestCommandResponse(t *testing.T) {
705705 HostID : "foobar" ,
706706 Counter : 1 ,
707707 Config : cfg ,
708- TrustedKeys : marshalCAPublicKey (ca .Details . Curve , ca .Details . PublicKey ),
708+ TrustedKeys : marshalCAPublicKey (ca .Curve () , ca .PublicKey () ),
709709 Organization : message.HostOrgMetadata {
710710 ID : "foobaz" ,
711711 Name : "foobar's foo org" ,
@@ -780,7 +780,7 @@ func TestStreamCommandResponse(t *testing.T) {
780780 t .Cleanup (func () { ts .Close () })
781781
782782 ca , _ := dnapitest .NebulaCACert ()
783- caPEM , err := ca .MarshalToPEM ()
783+ caPEM , err := ca .MarshalPEM ()
784784 require .NoError (t , err )
785785
786786 c := NewClient (useragent , ts .URL )
@@ -807,7 +807,7 @@ func TestStreamCommandResponse(t *testing.T) {
807807 HostID : "foobar" ,
808808 Counter : 1 ,
809809 Config : cfg ,
810- TrustedKeys : marshalCAPublicKey (ca .Details . Curve , ca .Details . PublicKey ),
810+ TrustedKeys : marshalCAPublicKey (ca .Curve () , ca .PublicKey () ),
811811 Organization : message.HostOrgMetadata {
812812 ID : "foobaz" ,
813813 Name : "foobar's foo org" ,
0 commit comments