Skip to content

Commit

Permalink
fix dsa selection
Browse files Browse the repository at this point in the history
  • Loading branch information
qmuntal committed Jan 22, 2024
1 parent d64d722 commit fc8d088
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions dsa.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,23 +260,22 @@ func newDSA3(params DSAParameters, X, Y BigInt) (C.GO_EVP_PKEY_PTR, error) {
C.go_openssl_OSSL_PARAM_BLD_push_BN(bld, paramG, g) != 1 {
return nil, newOpenSSLError("OSSL_PARAM_BLD_push_BN")
}
selection := C.int(C.GO_EVP_PKEY_KEYPAIR)
selection := C.int(C.GO_EVP_PKEY_KEY_PARAMETERS)

Check failure on line 263 in dsa.go

View workflow job for this annotation

GitHub Actions / mactest (1.20.x, libcrypto.3.dylib)

could not determine kind of name for C.GO_EVP_PKEY_KEY_PARAMETERS

Check failure on line 263 in dsa.go

View workflow job for this annotation

GitHub Actions / wintest (1.20.x, libcrypto-1_1-x64.dll)

could not determine kind of name for C.GO_EVP_PKEY_KEY_PARAMETERS

Check failure on line 263 in dsa.go

View workflow job for this annotation

GitHub Actions / test (1.20.x, 1.0.2)

could not determine kind of name for C.GO_EVP_PKEY_KEY_PARAMETERS

Check failure on line 263 in dsa.go

View workflow job for this annotation

GitHub Actions / wintest (1.20.x, libcrypto-3-x64.dll)

could not determine kind of name for C.GO_EVP_PKEY_KEY_PARAMETERS

Check failure on line 263 in dsa.go

View workflow job for this annotation

GitHub Actions / wintest (1.20.x, libcrypto-1_1-x64.dll)

could not determine kind of name for C.GO_EVP_PKEY_KEY_PARAMETERS

Check failure on line 263 in dsa.go

View workflow job for this annotation

GitHub Actions / test (1.20.x, 1.1.0)

could not determine kind of name for C.GO_EVP_PKEY_KEY_PARAMETERS

Check failure on line 263 in dsa.go

View workflow job for this annotation

GitHub Actions / test (1.20.x, 1.0.2)

could not determine kind of name for C.GO_EVP_PKEY_KEY_PARAMETERS

Check failure on line 263 in dsa.go

View workflow job for this annotation

GitHub Actions / wintest (1.20.x, libcrypto-3-x64.dll)

could not determine kind of name for C.GO_EVP_PKEY_KEY_PARAMETERS

Check failure on line 263 in dsa.go

View workflow job for this annotation

GitHub Actions / test (1.20.x, 1.1.1)

could not determine kind of name for C.GO_EVP_PKEY_KEY_PARAMETERS

Check failure on line 263 in dsa.go

View workflow job for this annotation

GitHub Actions / test (1.20.x, 1.1.0)

could not determine kind of name for C.GO_EVP_PKEY_KEY_PARAMETERS

Check failure on line 263 in dsa.go

View workflow job for this annotation

GitHub Actions / test (1.20.x, 3.0.1)

could not determine kind of name for C.GO_EVP_PKEY_KEY_PARAMETERS

Check failure on line 263 in dsa.go

View workflow job for this annotation

GitHub Actions / test (1.20.x, 3.0.9)

could not determine kind of name for C.GO_EVP_PKEY_KEY_PARAMETERS

Check failure on line 263 in dsa.go

View workflow job for this annotation

GitHub Actions / mactest (1.20.x, libcrypto.3.dylib)

could not determine kind of name for C.GO_EVP_PKEY_KEY_PARAMETERS

Check failure on line 263 in dsa.go

View workflow job for this annotation

GitHub Actions / test (1.20.x, 1.1.1)

could not determine kind of name for C.GO_EVP_PKEY_KEY_PARAMETERS

Check failure on line 263 in dsa.go

View workflow job for this annotation

GitHub Actions / test (1.20.x, 3.0.1)

could not determine kind of name for C.GO_EVP_PKEY_KEY_PARAMETERS

Check failure on line 263 in dsa.go

View workflow job for this annotation

GitHub Actions / test (1.20.x, 3.0.9)

could not determine kind of name for C.GO_EVP_PKEY_KEY_PARAMETERS
if Y != nil {
pub := bigToBN(Y)
defer C.go_openssl_BN_free(pub)
if C.go_openssl_OSSL_PARAM_BLD_push_BN(bld, paramPubKey, pub) != 1 {
return nil, newOpenSSLError("OSSL_PARAM_BLD_push_BN")
}
if X == nil {
selection = C.int(C.GO_EVP_PKEY_PUBLIC_KEY)
}
selection = C.int(C.GO_EVP_PKEY_PUBLIC_KEY)
}
if X != nil {
priv := bigToBN(X)
defer C.go_openssl_BN_clear_free(priv)
if C.go_openssl_OSSL_PARAM_BLD_push_BN(bld, paramPrivKey, priv) != 1 {
return nil, newOpenSSLError("OSSL_PARAM_BLD_push_BN")
}
selection = C.int(C.GO_EVP_PKEY_KEYPAIR)
}
bldparams := C.go_openssl_OSSL_PARAM_BLD_to_param(bld)
if bldparams == nil {
Expand All @@ -297,7 +296,6 @@ func newDSA3(params DSAParameters, X, Y BigInt) (C.GO_EVP_PKEY_PTR, error) {
if ctx == nil {
return nil, newOpenSSLError("EVP_PKEY_CTX_new_from_pkey")
}
defer C.go_openssl_EVP_PKEY_CTX_free(ctx)
if C.go_openssl_EVP_PKEY_keygen_init(ctx) != 1 {
return nil, newOpenSSLError("EVP_PKEY_keygen_init")
}
Expand Down

0 comments on commit fc8d088

Please sign in to comment.