Skip to content
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
10 changes: 4 additions & 6 deletions src/scitokens_internal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -527,8 +527,6 @@ std::string rs256_from_coords(const std::string &e_str,
throw UnsupportedKeyException("Failed to serialize RSA public key");
}
#endif
e_bignum.release();
n_bignum.release();

char *mem_data;
size_t mem_len = BIO_get_mem_data(pubkey_bio.get(), &mem_data);
Expand Down Expand Up @@ -951,12 +949,12 @@ bool scitokens::Validator::store_public_ec_key(const std::string &issuer,
"Unable to get OpenSSL public key parameters");
}

void *buf = NULL;
size_t buf_len, max_len = 256;
const void *buf = NULL;
size_t buf_len;
OSSL_PARAM *p = OSSL_PARAM_locate(params, "pub");
if (!p || !OSSL_PARAM_get_octet_string(p, &buf, max_len, &buf_len) ||
if (!p || !OSSL_PARAM_get_octet_string_ptr(p, &buf, &buf_len) ||
!EC_POINT_oct2point(ec_group.get(), q_point.get(),
static_cast<unsigned char *>(buf), buf_len,
static_cast<const unsigned char *>(buf), buf_len,
nullptr)) {
throw UnsupportedKeyException(
"Failed to to set OpenSSL EC point with public key information");
Expand Down
1 change: 1 addition & 0 deletions src/verify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ int main(int argc, char *const *argv) {
std::cout << "Failed to deserialize a token: " << err_msg << std::endl;
return 1;
}
scitoken_destroy(scitoken);
std::cout << "Token deserialization successful." << std::endl;

return 0;
Expand Down
Loading