You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
closes#1514
hi!
I had the same problem as #1514 and I wanted to fix it, I found
When asserting *crypto/rsa.PublicKey, using the typ attribute of node to get an nil rtype, resulting in the assertion result being nok
This code contains the same problem
```go
package main
import (
"log"
"crypto/rsa"
)
func main() {
var pKey interface{} = &rsa.PublicKey{}
if _, ok := pKey.(*rsa.PublicKey); ok {
log.Println("ok")
} else {
log.Println("nok")
}
}
```
So I submitted this Pull Request, hope it will be merged
The following program
sample.go
triggers an unexpected resultExpected result
Empty output (public key is correct)
Got
2023/02/15 15:04:52 key is not a valid RSA public key
Yaegi Version
v0.15.0
Additional Notes
it seems that the error comes from https://github.com/golang-jwt/jwt/blob/9358574a7a1a2c8d644f22b6e8de627ba85c58d0/rsa_utils.go#L100
The text was updated successfully, but these errors were encountered: