Commit 6212597b authored by Boris Glimcher's avatar Boris Glimcher Committed by Jim Harris
Browse files

sock/ssl: Add psk_key and psk_identity options to spdk_sock_impl_opts



Note, this change only sets defaults for the ID/KEY,
more specific use cases like NVMe/TCP may set the ID and KEY on a per connection basis.

Also simplify PSK identity string, that isn't NVMe focused.
NVMe libraries using this will need to construct more complicated
identity strings and pass them to the sock layer.

Example:
  rpc.py sock_impl_set_options -i ssl --psk-key 4321DEADBEEF1234
  rpc.py sock_impl_set_options -i ssl --psk-identity psk.spdk.io

  ./build/examples/perf --psk-key 4321DEADBEEF1234 --psk-identity psk.spdk.io

  ./build/examples/hello_sock --psk-key 4321DEADBEEF1234 --psk-identity psk.spdk.io

Change-Id: I1cb5b0b706bdeafbccbc71f8320bc8e2961cbb55
Signed-off-by: default avatarBoris Glimcher <Boris.Glimcher@emc.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13759


Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarPaul Luse <paul.e.luse@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Mellanox Build Bot
parent 21d9b32f
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -138,6 +138,16 @@ struct spdk_sock_impl_opts {
	 * Enable or disable kernel TLS. Used by ssl socket modules.
	 */
	bool enable_ktls;

	/**
	 * Set default PSK key. Used by ssl socket module.
	 */
	char *psk_key;

	/**
	 * Set default PSK identity. Used by ssl socket module.
	 */
	char *psk_identity;
};

/**
Loading