Skip to content

api: Add SetRootCAsFromPEM method#3972

Open
prziborowski wants to merge 1 commit intovmware:mainfrom
prziborowski:main
Open

api: Add SetRootCAsFromPEM method#3972
prziborowski wants to merge 1 commit intovmware:mainfrom
prziborowski:main

Conversation

@prziborowski
Copy link
Copy Markdown
Contributor

Add SetRootCAsFromPEM to allow passing in-memory PEM-encoded certificates instead of requiring them to be on disk. This is useful for read-only filesystems where CA contents are already available in memory.

Description

Add SetRootCAsFromPEM to allow passing in-memory PEM-encoded
certificates instead of requiring them to be on disk. This is
useful for read-only filesystems where CA contents are already
available in memory.

How Has This Been Tested?

Tested with a container doing:

	if len(config.CAContents) != 0 {
		if err = soapClient.SetRootCAsFromPEM([][]byte{config.CAContents}); err != nil {
			return fmt.Errorf("failed to set root CA %s: %w", config.CAFilePath, err)
		}
	}

and was able to connect to vCenter properly.

Guidelines

Please read and follow the CONTRIBUTION guidelines of this project.

Add SetRootCAsFromPEM to allow passing in-memory PEM-encoded
certificates instead of requiring them to be on disk. This is
useful for read-only filesystems where CA contents are already
available in memory.

Signed-off-by: Nathan Prziborowski <prziborowski@gmail.com>
@prziborowski prziborowski marked this pull request as ready for review March 2, 2026 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant