@@ -1001,9 +1001,9 @@ func (yk *YubiKey) PrivateKey(slot Slot, public crypto.PublicKey, auth KeyAuth)
1001
1001
case * ecdsa.PublicKey :
1002
1002
return & ECDSAPrivateKey {yk , slot , pub , auth , pp }, nil
1003
1003
case ed25519.PublicKey :
1004
- return & keyEd25519 {yk , slot , pub , auth , pp }, nil
1004
+ return & KeyEd25519 {yk , slot , pub , auth , pp }, nil
1005
1005
case * rsa.PublicKey :
1006
- return & keyRSA {yk , slot , pub , auth , pp }, nil
1006
+ return & KeyRSA {yk , slot , pub , auth , pp }, nil
1007
1007
case * ecdh.PublicKey :
1008
1008
if crv := pub .Curve (); crv != ecdh .X25519 () {
1009
1009
return nil , fmt .Errorf ("unsupported ecdh curve: %v" , crv )
@@ -1283,43 +1283,43 @@ func (k *X25519PrivateKey) ECDH(peer *ecdh.PublicKey) ([]byte, error) {
1283
1283
})
1284
1284
}
1285
1285
1286
- type keyEd25519 struct {
1286
+ type KeyEd25519 struct {
1287
1287
yk * YubiKey
1288
1288
slot Slot
1289
1289
pub ed25519.PublicKey
1290
1290
auth KeyAuth
1291
1291
pp PINPolicy
1292
1292
}
1293
1293
1294
- func (k * keyEd25519 ) Public () crypto.PublicKey {
1294
+ func (k * KeyEd25519 ) Public () crypto.PublicKey {
1295
1295
return k .pub
1296
1296
}
1297
1297
1298
- func (k * keyEd25519 ) Sign (rand io.Reader , message []byte , opts crypto.SignerOpts ) ([]byte , error ) {
1298
+ func (k * KeyEd25519 ) Sign (rand io.Reader , message []byte , opts crypto.SignerOpts ) ([]byte , error ) {
1299
1299
return k .auth .do (k .yk , k .pp , func (tx * scTx ) ([]byte , error ) {
1300
1300
return ykSignEd25519 (tx , k .slot , k .pub , message , opts )
1301
1301
})
1302
1302
}
1303
1303
1304
- type keyRSA struct {
1304
+ type KeyRSA struct {
1305
1305
yk * YubiKey
1306
1306
slot Slot
1307
1307
pub * rsa.PublicKey
1308
1308
auth KeyAuth
1309
1309
pp PINPolicy
1310
1310
}
1311
1311
1312
- func (k * keyRSA ) Public () crypto.PublicKey {
1312
+ func (k * KeyRSA ) Public () crypto.PublicKey {
1313
1313
return k .pub
1314
1314
}
1315
1315
1316
- func (k * keyRSA ) Sign (rand io.Reader , digest []byte , opts crypto.SignerOpts ) ([]byte , error ) {
1316
+ func (k * KeyRSA ) Sign (rand io.Reader , digest []byte , opts crypto.SignerOpts ) ([]byte , error ) {
1317
1317
return k .auth .do (k .yk , k .pp , func (tx * scTx ) ([]byte , error ) {
1318
1318
return ykSignRSA (tx , rand , k .slot , k .pub , digest , opts )
1319
1319
})
1320
1320
}
1321
1321
1322
- func (k * keyRSA ) Decrypt (rand io.Reader , msg []byte , opts crypto.DecrypterOpts ) ([]byte , error ) {
1322
+ func (k * KeyRSA ) Decrypt (rand io.Reader , msg []byte , opts crypto.DecrypterOpts ) ([]byte , error ) {
1323
1323
return k .auth .do (k .yk , k .pp , func (tx * scTx ) ([]byte , error ) {
1324
1324
return ykDecryptRSA (tx , k .slot , k .pub , msg )
1325
1325
})
0 commit comments