Skip to content

Thread Safety #260

Closed
Closed
@daxpedda

Description

@daxpedda

AFAIK you can't initialize Cryptoki while one instance already is and you can't create sessions to the same slot. However, currently doing so doesn't always return CryptokiAlreadyInitialized or SessionExists, but instead sometimes causes various UBs.

Here is a simple reproducible integration test I created:

mod common;

#[test]
fn test1() {
    common::init_pins();
}

#[test]
fn test2() {
    common::init_pins();
}

This almost never succeeds in my environment.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions