Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update cobhan-go #57

Merged
merged 1 commit into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ module github.com/godaddy/asherah-cobhan
go 1.20

require (
github.com/aws/aws-sdk-go v1.44.193
github.com/go-sql-driver/mysql v1.6.0
github.com/godaddy/asherah/go/appencryption v0.2.6
github.com/aws/aws-sdk-go v1.45.21
github.com/go-sql-driver/mysql v1.7.1
github.com/godaddy/asherah/go/appencryption v0.3.0
github.com/godaddy/asherah/go/securememory v0.1.4
github.com/godaddy/cobhan-go v0.4.0
github.com/godaddy/cobhan-go v0.4.2
)

require (
Expand All @@ -17,6 +17,6 @@ require (
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
golang.org/x/crypto v0.5.0 // indirect
golang.org/x/sys v0.4.0 // indirect
golang.org/x/crypto v0.13.0 // indirect
golang.org/x/sys v0.12.0 // indirect
)
14 changes: 14 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,28 @@ github.com/awnumar/memguard v0.22.3 h1:b4sgUXtbUjhrGELPbuC62wU+BsPQy+8lkWed9Z+pj
github.com/awnumar/memguard v0.22.3/go.mod h1:mmGunnffnLHlxE5rRgQc3j+uwPZ27eYb61ccr8Clz2Y=
github.com/aws/aws-sdk-go v1.44.193 h1:qJBu5TGkTcaKrl4SGRq4Qy/wEBk/Pi1y9TbB+T9Wz8U=
github.com/aws/aws-sdk-go v1.44.193/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
github.com/aws/aws-sdk-go v1.45.21 h1:9LN2/pMQY2qwGJgSMzv0xNGnstFHCgpSfenvsurX2nk=
github.com/aws/aws-sdk-go v1.45.21/go.mod h1:aVsgQcEevwlmQ7qHE9I3h+dtQgpqhFB+i8Phjh7fkwI=
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE=
github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg=
github.com/go-sql-driver/mysql v1.7.1 h1:lUIinVbN1DY0xBg0eMOzmmtGoHwWBbvnWubQUrtU8EI=
github.com/go-sql-driver/mysql v1.7.1/go.mod h1:OXbVy3sEdcQ2Doequ6Z5BW6fXNQTmx+9S1MCJN5yJMI=
github.com/goburrow/cache v0.1.4 h1:As4KzO3hgmzPlnaMniZU9+VmoNYseUhuELbxy9mRBfw=
github.com/goburrow/cache v0.1.4/go.mod h1:cDFesZDnIlrHoNlMYqqMpCRawuXulgx+y7mXU8HZ+/c=
github.com/godaddy/asherah/go/appencryption v0.2.6 h1:4Julkowk/oL2xspt6XvcT0i93RASSU5k2kmauBSTV2U=
github.com/godaddy/asherah/go/appencryption v0.2.6/go.mod h1:T4QuD/LuWnFxaro5K7n6VzXAtII5fjVed5el4j6hMns=
github.com/godaddy/asherah/go/appencryption v0.3.0 h1:TApHL8U32rIOpUCP0AA7EUIacgBtBxbhJmhRDQ+UQcs=
github.com/godaddy/asherah/go/appencryption v0.3.0/go.mod h1:DD8VwbRBqEOL+SOQ4Bb258ZljWkiG95phAdFh3ldp3A=
github.com/godaddy/asherah/go/securememory v0.1.4 h1:1UlEPE5Q2wK1fbGwjIBtlGO02teLFBFk7dNIvdWOzNQ=
github.com/godaddy/asherah/go/securememory v0.1.4/go.mod h1:grCFdMhT5CY8h+E+Qb1Abhd6uBDIxrwVh6Tulsc9gj4=
github.com/godaddy/cobhan-go v0.4.0 h1:1gdD6Z0u737B357eVwf80DbX0EWs8I3n70ecuPkpLco=
github.com/godaddy/cobhan-go v0.4.0/go.mod h1:07aRS3E5apQ9gmpSn2e/BmniBDk8AU67QtmQda8uoNI=
github.com/godaddy/cobhan-go v0.4.1 h1:PFoVeP8pyhEtBW8xlZK12HuzZPpohcrg3icYJgbwAwc=
github.com/godaddy/cobhan-go v0.4.1/go.mod h1:07aRS3E5apQ9gmpSn2e/BmniBDk8AU67QtmQda8uoNI=
github.com/godaddy/cobhan-go v0.4.2 h1:SiEt9Xv2WV9OKOK/NutGzA65PeeE+PTWio8O38ziaas=
github.com/godaddy/cobhan-go v0.4.2/go.mod h1:07aRS3E5apQ9gmpSn2e/BmniBDk8AU67QtmQda8uoNI=
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
github.com/jmespath/go-jmespath v0.4.0 h1:BEgLn5cpjn8UN1mAw4NjwDrS35OdebyEtFe+9YPoQUg=
github.com/jmespath/go-jmespath v0.4.0/go.mod h1:T8mJZnbsbmF+m6zOOFylbeCJqk5+pHWvzYPziyZiYoo=
Expand All @@ -35,6 +45,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk
golang.org/x/crypto v0.0.0-20210921155107-089bfa567519/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
golang.org/x/crypto v0.5.0 h1:U/0M97KRkSFvyD/3FSmdP5W5swImpNgle/EHFhOsQPE=
golang.org/x/crypto v0.5.0/go.mod h1:NK/OQwhpMQP3MwtdjgLlYHnH9ebylxKWv3e0fK+mkQU=
golang.org/x/crypto v0.13.0 h1:mvySKfSWJ+UKUii46M40LOvyWfN0s2U+46/jDd0e6Ck=
golang.org/x/crypto v0.13.0/go.mod h1:y6Z2r+Rw4iayiXXAIxJIDAJ1zMW4yaTpebo8fPOliYc=
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4/go.mod h1:jJ57K6gSWd91VN4djpZkiMVwK6gcyfeH4XE8wZrZaV4=
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
Expand All @@ -51,6 +63,8 @@ golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBc
golang.org/x/sys v0.1.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.4.0 h1:Zr2JFtRQNX3BCZ8YtxRE9hNJYC8J6I1MVbMg6owUp18=
golang.org/x/sys v0.4.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/sys v0.12.0 h1:CM0HF96J0hcLAwsHPJZjfdNzs0gftsLfgKt57wWHJ0o=
golang.org/x/sys v0.12.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
golang.org/x/term v0.0.0-20210927222741-03fcf44c2211/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
golang.org/x/term v0.1.0/go.mod h1:jbD1KX2456YbFQfuXm/mYQcufACuNUgVhRMnK/tPxf8=
Expand Down
20 changes: 10 additions & 10 deletions internal/asherah/asherah.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ var ErrAsherahFailedInitialization = errors.New("asherah failed initialization")

func Setup(options *Options) error {
if atomic.LoadInt32(&globalInitialized) == 1 {
output.StderrDebugOutputf("Failed to initialize asherah: already initialized")
output.StderrDebugOutput("Failed to initialize asherah: already initialized")
return ErrAsherahAlreadyInitialized
}

Expand Down Expand Up @@ -60,7 +60,7 @@ func Setup(options *Options) error {
)

if globalSessionFactory == nil {
output.StderrDebugOutputf("Failed to create session factory")
output.StderrDebugOutput("Failed to create session factory")
return ErrAsherahFailedInitialization
}

Expand All @@ -77,13 +77,13 @@ func Shutdown() {

func Encrypt(partitionId string, data []byte) (*appencryption.DataRowRecord, error) {
if globalInitialized == 0 {
output.StderrDebugOutputf("Failed to encrypt data: asherah is not initialized")
output.StderrDebugOutput("Failed to encrypt data: asherah is not initialized")
return nil, ErrAsherahNotInitialized
}

session, err := globalSessionFactory.GetSession(partitionId)
if err != nil {
output.StderrDebugOutputf("Failed to get session for partition %v: %v", partitionId, err)
output.StderrDebugOutputf("Failed to get session for partition %v: %v", partitionId, err.Error())
return nil, err
}
defer session.Close()
Expand All @@ -99,7 +99,7 @@ func Decrypt(partitionId string, drr *appencryption.DataRowRecord) ([]byte, erro

session, err := globalSessionFactory.GetSession(partitionId)
if err != nil {
output.StderrDebugOutputf("Failed to get session for partition %v: %v", partitionId, err)
output.StderrDebugOutputf("Failed to get session for partition %v: %v", partitionId, err.Error())
return nil, err
}
defer session.Close()
Expand All @@ -114,15 +114,15 @@ func NewMetastore(opts *Options) appencryption.Metastore {
// TODO: support other databases
db, err := newMysql(opts.ConnectionString)
if err != nil {
output.StderrDebugOutputf("PANIC: Failed to connect to database: %v", err)
output.StderrDebugOutputf("PANIC: Failed to connect to database: %v", err.Error())
panic(err)
}

// set optional replica read consistency
if len(opts.ReplicaReadConsistency) > 0 {
err := setRdbmsReplicaReadConsistencyValue(opts.ReplicaReadConsistency)
if err != nil {
output.StderrDebugOutputf("PANIC: Failed to set replica read consistency: %v", err)
output.StderrDebugOutputf("PANIC: Failed to set replica read consistency: %v", err.Error())
panic(err)
}
}
Expand Down Expand Up @@ -153,11 +153,11 @@ func NewMetastore(opts *Options) appencryption.Metastore {

func NewKMS(opts *Options, crypto appencryption.AEAD) appencryption.KeyManagementService {
if opts.KMS == "static" {
output.StderrDebugOutputf("*** WARNING WARNING WARNING USING STATIC MASTER KEY - THIS IS FOR DEBUG ONLY ***")
output.StderrDebugOutput("*** WARNING WARNING WARNING USING STATIC MASTER KEY - THIS IS FOR DEBUG ONLY ***")

m, err := kms.NewStatic("thisIsAStaticMasterKeyForTesting", aead.NewAES256GCM())
if err != nil {
output.StderrDebugOutputf("PANIC: Failed to create static master key: %v", err)
output.StderrDebugOutputf("PANIC: Failed to create static master key: %v", err.Error())
panic(err)
}

Expand All @@ -166,7 +166,7 @@ func NewKMS(opts *Options, crypto appencryption.AEAD) appencryption.KeyManagemen

m, err := kms.NewAWS(crypto, opts.PreferredRegion, opts.RegionMap)
if err != nil {
output.StderrDebugOutputf("PANIC: Failed to create AWS KMS: %v", err)
output.StderrDebugOutputf("PANIC: Failed to create AWS KMS: %v", err.Error())
panic(err)
}

Expand Down
46 changes: 23 additions & 23 deletions libasherah.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func SetEnv(envJson unsafe.Pointer) int32 {

result := cobhan.BufferToJsonStruct(envJson, &env)
if result != cobhan.ERR_NONE {
output.StderrDebugOutputf("Failed to deserialize environment JSON string %v", result)
output.StderrDebugOutputf("Failed to deserialize environment JSON string %v", cobhan.CobhanErrorToString(result))
return result
}

Expand All @@ -61,10 +61,10 @@ func SetupJson(configJson unsafe.Pointer) int32 {
options := &asherah.Options{}
result := cobhan.BufferToJsonStruct(configJson, options)
if result != cobhan.ERR_NONE {
output.StderrDebugOutputf("Failed to deserialize configuration string %v", result)
output.StderrDebugOutputf("Failed to deserialize configuration string %v", cobhan.CobhanErrorToString(result))
configString, stringResult := cobhan.BufferToString(configJson)
if stringResult != cobhan.ERR_NONE {
output.StderrDebugOutputf("Could not convert configJson to string: %v", stringResult)
output.StderrDebugOutputf("Could not convert configJson to string: %v", cobhan.CobhanErrorToString(result))
return result
}
output.StderrDebugOutputf("Could not deserialize: %v", configString)
Expand Down Expand Up @@ -108,19 +108,19 @@ func Decrypt(partitionIdPtr unsafe.Pointer, encryptedDataPtr unsafe.Pointer, enc
created int64, parentKeyIdPtr unsafe.Pointer, parentKeyCreated int64, outputDecryptedDataPtr unsafe.Pointer) int32 {
encryptedData, result := cobhan.BufferToBytes(encryptedDataPtr)
if result != cobhan.ERR_NONE {
output.StderrDebugOutputf("Failed to convert encryptedDataPtr cobhan buffer to bytes %v", result)
output.StderrDebugOutputf("Failed to convert encryptedDataPtr cobhan buffer to bytes %v", cobhan.CobhanErrorToString(result))
return result
}

encryptedKey, result := cobhan.BufferToBytes(encryptedKeyPtr)
if result != cobhan.ERR_NONE {
output.StderrDebugOutputf("Failed to convert encryptedKeyPtr cobhan buffer to bytes %v", result)
output.StderrDebugOutputf("Failed to convert encryptedKeyPtr cobhan buffer to bytes %v", cobhan.CobhanErrorToString(result))
return result
}

parentKeyId, result := cobhan.BufferToString(parentKeyIdPtr)
if result != cobhan.ERR_NONE {
output.StderrDebugOutputf("Failed to convert parentKeyIdPtr cobhan buffer to string %v", result)
output.StderrDebugOutputf("Failed to convert parentKeyIdPtr cobhan buffer to string %v", cobhan.CobhanErrorToString(result))
return result
}

Expand All @@ -138,7 +138,7 @@ func Decrypt(partitionIdPtr unsafe.Pointer, encryptedDataPtr unsafe.Pointer, enc

data, result := decryptData(partitionIdPtr, &drr)
if result != cobhan.ERR_NONE {
output.StderrDebugOutputf("Failed to decrypt data %v", result)
output.StderrDebugOutputf("Failed to decrypt data %v", cobhan.CobhanErrorToString(result))
return result
}

Expand All @@ -152,38 +152,38 @@ func Encrypt(partitionIdPtr unsafe.Pointer, dataPtr unsafe.Pointer, outputEncryp

drr, result := encryptData(partitionIdPtr, dataPtr)
if result != cobhan.ERR_NONE {
output.StderrDebugOutputf("Failed to encrypt data %v", result)
output.StderrDebugOutputf("Failed to encrypt data %v", cobhan.CobhanErrorToString(result))
return result
}

result = cobhan.BytesToBuffer(drr.Data, outputEncryptedDataPtr)
if result != cobhan.ERR_NONE {
output.StderrDebugOutputf("Encrypted data length: %v", len(drr.Data))
output.StderrDebugOutputf("Encrypt: BytesToBuffer returned %v for outputEncryptedDataPtr", result)
output.StderrDebugOutputf("Encrypt: BytesToBuffer returned %v for outputEncryptedDataPtr", cobhan.CobhanErrorToString(result))
return result
}

result = cobhan.BytesToBuffer(drr.Key.EncryptedKey, outputEncryptedKeyPtr)
if result != cobhan.ERR_NONE {
output.StderrDebugOutputf("Encrypt: BytesToBuffer returned %v for outputEncryptedKeyPtr", result)
output.StderrDebugOutputf("Encrypt: BytesToBuffer returned %v for outputEncryptedKeyPtr", cobhan.CobhanErrorToString(result))
return result
}

result = cobhan.Int64ToBuffer(drr.Key.Created, outputCreatedPtr)
if result != cobhan.ERR_NONE {
output.StderrDebugOutputf("Encrypt: Int64ToBuffer returned %v for outputCreatedPtr", result)
output.StderrDebugOutputf("Encrypt: Int64ToBuffer returned %v for outputCreatedPtr", cobhan.CobhanErrorToString(result))
return result
}

result = cobhan.StringToBuffer(drr.Key.ParentKeyMeta.ID, outputParentKeyIdPtr)
if result != cobhan.ERR_NONE {
output.StderrDebugOutputf("Encrypt: BytesToBuffer returned %v for outputParentKeyIdPtr", result)
output.StderrDebugOutputf("Encrypt: BytesToBuffer returned %v for outputParentKeyIdPtr", cobhan.CobhanErrorToString(result))
return result
}

result = cobhan.Int64ToBuffer(drr.Key.ParentKeyMeta.Created, outputParentKeyCreatedPtr)
if result != cobhan.ERR_NONE {
output.StderrDebugOutputf("Encrypt: BytesToBuffer returned %v for outputParentKeyCreatedPtr", result)
output.StderrDebugOutputf("Encrypt: BytesToBuffer returned %v for outputParentKeyCreatedPtr", cobhan.CobhanErrorToString(result))
return result
}

Expand All @@ -194,7 +194,7 @@ func Encrypt(partitionIdPtr unsafe.Pointer, dataPtr unsafe.Pointer, outputEncryp
func EncryptToJson(partitionIdPtr unsafe.Pointer, dataPtr unsafe.Pointer, jsonPtr unsafe.Pointer) int32 {
drr, result := encryptData(partitionIdPtr, dataPtr)
if result != cobhan.ERR_NONE {
output.StderrDebugOutputf("Failed to encrypt data %v", result)
output.StderrDebugOutputf("Failed to encrypt data %v", cobhan.CobhanErrorToString(result))
return result
}

Expand All @@ -207,7 +207,7 @@ func EncryptToJson(partitionIdPtr unsafe.Pointer, dataPtr unsafe.Pointer, jsonPt
return result
}
}
output.StderrDebugOutputf("EncryptToJson: JsonToBuffer returned %v for jsonPtr", result)
output.StderrDebugOutputf("EncryptToJson: JsonToBuffer returned %v for jsonPtr", cobhan.CobhanErrorToString(result))
return result
}

Expand All @@ -219,13 +219,13 @@ func DecryptFromJson(partitionIdPtr unsafe.Pointer, jsonPtr unsafe.Pointer, data
var drr appencryption.DataRowRecord
result := cobhan.BufferToJsonStruct(jsonPtr, &drr)
if result != cobhan.ERR_NONE {
output.StderrDebugOutputf("Failed to convert cobhan buffer to JSON structs %v", result)
output.StderrDebugOutputf("Failed to convert cobhan buffer to JSON structs %v", cobhan.CobhanErrorToString(result))
return result
}

data, result := decryptData(partitionIdPtr, &drr)
if result != cobhan.ERR_NONE {
output.StderrDebugOutputf("Failed to decrypt data %v", result)
output.StderrDebugOutputf("Failed to decrypt data %v", cobhan.CobhanErrorToString(result))
return result
}

Expand All @@ -235,7 +235,7 @@ func DecryptFromJson(partitionIdPtr unsafe.Pointer, jsonPtr unsafe.Pointer, data
output.StderrDebugOutputf("DecryptFromJson: BytesToBuffer: Output buffer needed %v bytes", len(data))
return result
}
output.StderrDebugOutputf("DecryptFromJson: BytesToBuffer returned %v for dataPtr", result)
output.StderrDebugOutputf("DecryptFromJson: BytesToBuffer returned %v for dataPtr", cobhan.CobhanErrorToString(result))
return result
}

Expand All @@ -245,13 +245,13 @@ func DecryptFromJson(partitionIdPtr unsafe.Pointer, jsonPtr unsafe.Pointer, data
func encryptData(partitionIdPtr unsafe.Pointer, dataPtr unsafe.Pointer) (*appencryption.DataRowRecord, int32) {
partitionId, result := cobhan.BufferToString(partitionIdPtr)
if result != cobhan.ERR_NONE {
output.StderrDebugOutputf("Failed to convert cobhan buffer to string %v", result)
output.StderrDebugOutputf("Failed to convert cobhan buffer to string %v", cobhan.CobhanErrorToString(result))
return nil, result
}

data, result := cobhan.BufferToBytes(dataPtr)
if result != cobhan.ERR_NONE {
output.StderrDebugOutputf("Failed to convert cobhan buffer to bytes %v", result)
output.StderrDebugOutputf("Failed to convert cobhan buffer to bytes %v", cobhan.CobhanErrorToString(result))
return nil, result
}

Expand All @@ -261,7 +261,7 @@ func encryptData(partitionIdPtr unsafe.Pointer, dataPtr unsafe.Pointer) (*appenc
output.StderrDebugOutput("Encrypt failed: asherah is not initialized")
return nil, ERR_NOT_INITIALIZED
}
output.StderrDebugOutputf("Encrypt failed: %v", err)
output.StderrDebugOutputf("Encrypt failed: %v", err.Error())
return nil, ERR_ENCRYPT_FAILED
}

Expand All @@ -271,7 +271,7 @@ func encryptData(partitionIdPtr unsafe.Pointer, dataPtr unsafe.Pointer) (*appenc
func decryptData(partitionIdPtr unsafe.Pointer, drr *appencryption.DataRowRecord) ([]byte, int32) {
partitionId, result := cobhan.BufferToString(partitionIdPtr)
if result != cobhan.ERR_NONE {
output.StderrDebugOutputf("Failed to convert cobhan buffer to string %v", result)
output.StderrDebugOutputf("Failed to convert cobhan buffer to string %v", cobhan.CobhanErrorToString(result))
return nil, result
}

Expand All @@ -281,7 +281,7 @@ func decryptData(partitionIdPtr unsafe.Pointer, drr *appencryption.DataRowRecord
output.StderrDebugOutput("Decrypt failed: asherah is not initialized")
return nil, ERR_NOT_INITIALIZED
}
output.StderrDebugOutputf("Decrypt failed: %v", err)
output.StderrDebugOutputf("Decrypt failed: %v", err.Error())
return nil, ERR_DECRYPT_FAILED
}

Expand Down
Loading