blob: 2d68eda1924c2007b4539ce4389389ceacb3a542 [file] [log] [blame]
David K. Bainbridgebd6b2882021-08-26 13:31:02 +00001package kadmin
2
3import (
4 "github.com/jcmturner/gofork/encoding/asn1"
5 "github.com/jcmturner/gokrb5/v8/types"
6)
7
8// ChangePasswdData is the payload to a password change message.
9type ChangePasswdData struct {
10 NewPasswd []byte `asn1:"explicit,tag:0"`
11 TargName types.PrincipalName `asn1:"explicit,optional,tag:1"`
12 TargRealm string `asn1:"generalstring,optional,explicit,tag:2"`
13}
14
15// Marshal ChangePasswdData into a byte slice.
16func (c *ChangePasswdData) Marshal() ([]byte, error) {
17 b, err := asn1.Marshal(*c)
18 if err != nil {
19 return []byte{}, err
20 }
21 //b = asn1tools.AddASNAppTag(b, asnAppTag.)
22 return b, nil
23}