@@ -54,7 +54,7 @@ func TestEnroll(t *testing.T) {
5454 oidcExpiresAt := time .Now ()
5555 counter := uint (5 )
5656 ca , _ := dnapitest .NebulaCACert ()
57- caPEM , err := ca .MarshalToPEM ()
57+ caPEM , err := ca .MarshalPEM ()
5858 require .NoError (t , err )
5959
6060 ts .ExpectEnrollment (code , message .NetworkCurve25519 , func (req message.EnrollRequest ) []byte {
@@ -78,7 +78,7 @@ func TestEnroll(t *testing.T) {
7878 HostID : hostID ,
7979 Counter : counter ,
8080 Config : cfg ,
81- TrustedKeys : marshalCAPublicKey (ca .Details . Curve , ca .Details . PublicKey ),
81+ TrustedKeys : marshalCAPublicKey (ca .Curve () , ca .PublicKey () ),
8282 Organization : message.HostOrgMetadata {
8383 ID : orgID ,
8484 Name : orgName ,
@@ -109,7 +109,7 @@ func TestEnroll(t *testing.T) {
109109 assert .Empty (t , ts .Errors ())
110110 assert .Equal (t , 0 , ts .RequestsRemaining ())
111111
112- tk , err := keys .NewTrustedKey (ed25519 .PublicKey (ca .Details . PublicKey ))
112+ tk , err := keys .NewTrustedKey (ed25519 .PublicKey (ca .PublicKey () ))
113113 require .NoError (t , err )
114114
115115 assert .Equal (t , hostID , creds .HostID )
@@ -129,7 +129,7 @@ func TestEnroll(t *testing.T) {
129129 }
130130 err = yaml .Unmarshal (cfg , & y )
131131 require .NoError (t , err )
132- _ , rest , err := cert .UnmarshalX25519PublicKey (y .Test .DHPubkey )
132+ _ , rest , _ , err := cert .UnmarshalPublicKeyFromPEM (y .Test .DHPubkey )
133133 assert .NoError (t , err )
134134 assert .Len (t , rest , 0 )
135135 assert .Equal (t , code , y .Test .Code )
@@ -182,7 +182,7 @@ func TestDoUpdate(t *testing.T) {
182182 t .Cleanup (func () { ts .Close () })
183183
184184 ca , caPrivkey := dnapitest .NebulaCACert ()
185- caPEM , err := ca .MarshalToPEM ()
185+ caPEM , err := ca .MarshalPEM ()
186186 require .NoError (t , err )
187187
188188 c := NewClient (useragent , ts .URL )
@@ -209,7 +209,7 @@ func TestDoUpdate(t *testing.T) {
209209 HostID : "foobar" ,
210210 Counter : 1 ,
211211 Config : cfg ,
212- TrustedKeys : marshalCAPublicKey (ca .Details . Curve , ca .Details . PublicKey ),
212+ TrustedKeys : marshalCAPublicKey (ca .Curve () , ca .PublicKey () ),
213213 Organization : message.HostOrgMetadata {
214214 ID : "foobaz" ,
215215 Name : "foobar's foo org" ,
@@ -278,7 +278,7 @@ func TestDoUpdate(t *testing.T) {
278278 Config : dnapitest .NebulaCfg (caPEM ),
279279 Counter : 2 ,
280280 Nonce : dnapitest .GetNonce (r ),
281- TrustedKeys : marshalCAPublicKey (ca .Details . Curve , ca .Details . PublicKey ),
281+ TrustedKeys : marshalCAPublicKey (ca .Curve () , ca .PublicKey () ),
282282 Organization : message.HostOrgMetadata {
283283 ID : "foobaz" ,
284284 Name : "foobar's foo org" ,
@@ -333,7 +333,7 @@ func TestDoUpdate(t *testing.T) {
333333 Config : dnapitest .NebulaCfg (caPEM ),
334334 Counter : 0 ,
335335 Nonce : dnapitest .GetNonce (r ),
336- TrustedKeys : marshalCAPublicKey (ca .Details . Curve , ca .Details . PublicKey ),
336+ TrustedKeys : marshalCAPublicKey (ca .Curve () , ca .PublicKey () ),
337337 Organization : message.HostOrgMetadata {
338338 ID : "foobaz" ,
339339 Name : "foobar's foo org" ,
@@ -393,7 +393,7 @@ func TestDoUpdate(t *testing.T) {
393393 Config : dnapitest .NebulaCfg (caPEM ),
394394 Counter : 3 ,
395395 Nonce : dnapitest .GetNonce (r ),
396- TrustedKeys : marshalCAPublicKey (ca .Details . Curve , ca .Details . PublicKey ),
396+ TrustedKeys : marshalCAPublicKey (ca .Curve () , ca .PublicKey () ),
397397 Organization : message.HostOrgMetadata {
398398 ID : orgID ,
399399 Name : orgName ,
@@ -453,7 +453,7 @@ func TestDoUpdate_P256(t *testing.T) {
453453 t .Cleanup (func () { ts .Close () })
454454
455455 ca , caPrivkey := dnapitest .NebulaCACertP256 ()
456- caPEM , err := ca .MarshalToPEM ()
456+ caPEM , err := ca .MarshalPEM ()
457457 require .NoError (t , err )
458458
459459 c := NewClient (useragent , ts .URL )
@@ -480,7 +480,7 @@ func TestDoUpdate_P256(t *testing.T) {
480480 HostID : "foobar" ,
481481 Counter : 1 ,
482482 Config : cfg ,
483- TrustedKeys : marshalCAPublicKey (ca .Details . Curve , ca .Details . PublicKey ),
483+ TrustedKeys : marshalCAPublicKey (ca .Curve () , ca .PublicKey () ),
484484 Organization : message.HostOrgMetadata {
485485 ID : "foobaz" ,
486486 Name : "foobar's foo org" ,
@@ -638,7 +638,7 @@ func TestDoUpdate_P256(t *testing.T) {
638638 Config : dnapitest .NebulaCfg (caPEM ),
639639 Counter : 3 ,
640640 Nonce : dnapitest .GetNonce (r ),
641- TrustedKeys : marshalCAPublicKey (ca .Details . Curve , ca .Details . PublicKey ),
641+ TrustedKeys : marshalCAPublicKey (ca .Curve () , ca .PublicKey () ),
642642 Organization : message.HostOrgMetadata {
643643 ID : "foobaz" ,
644644 Name : "foobar's foo org" ,
@@ -693,7 +693,7 @@ func TestCommandResponse(t *testing.T) {
693693 t .Cleanup (func () { ts .Close () })
694694
695695 ca , _ := dnapitest .NebulaCACert ()
696- caPEM , err := ca .MarshalToPEM ()
696+ caPEM , err := ca .MarshalPEM ()
697697 require .NoError (t , err )
698698
699699 c := NewClient (useragent , ts .URL )
@@ -720,7 +720,7 @@ func TestCommandResponse(t *testing.T) {
720720 HostID : "foobar" ,
721721 Counter : 1 ,
722722 Config : cfg ,
723- TrustedKeys : marshalCAPublicKey (ca .Details . Curve , ca .Details . PublicKey ),
723+ TrustedKeys : marshalCAPublicKey (ca .Curve () , ca .PublicKey () ),
724724 Organization : message.HostOrgMetadata {
725725 ID : "foobaz" ,
726726 Name : "foobar's foo org" ,
@@ -798,7 +798,7 @@ func TestStreamCommandResponse(t *testing.T) {
798798 t .Cleanup (func () { ts .Close () })
799799
800800 ca , _ := dnapitest .NebulaCACert ()
801- caPEM , err := ca .MarshalToPEM ()
801+ caPEM , err := ca .MarshalPEM ()
802802 require .NoError (t , err )
803803
804804 c := NewClient (useragent , ts .URL )
@@ -825,7 +825,7 @@ func TestStreamCommandResponse(t *testing.T) {
825825 HostID : "foobar" ,
826826 Counter : 1 ,
827827 Config : cfg ,
828- TrustedKeys : marshalCAPublicKey (ca .Details . Curve , ca .Details . PublicKey ),
828+ TrustedKeys : marshalCAPublicKey (ca .Curve () , ca .PublicKey () ),
829829 Organization : message.HostOrgMetadata {
830830 ID : "foobaz" ,
831831 Name : "foobar's foo org" ,
@@ -924,7 +924,7 @@ func TestReauthenticate(t *testing.T) {
924924 t .Cleanup (func () { ts .Close () })
925925
926926 ca , caPrivkey := dnapitest .NebulaCACert ()
927- caPEM , err := ca .MarshalToPEM ()
927+ caPEM , err := ca .MarshalPEM ()
928928 require .NoError (t , err )
929929
930930 c := NewClient (useragent , ts .URL )
@@ -951,7 +951,7 @@ func TestReauthenticate(t *testing.T) {
951951 HostID : "foobar" ,
952952 Counter : 1 ,
953953 Config : cfg ,
954- TrustedKeys : marshalCAPublicKey (ca .Details . Curve , ca .Details . PublicKey ),
954+ TrustedKeys : marshalCAPublicKey (ca .Curve () , ca .PublicKey () ),
955955 Organization : message.HostOrgMetadata {
956956 ID : "foobaz" ,
957957 Name : "foobar's foo org" ,
0 commit comments