@@ -193,7 +193,7 @@ func (c *Client) getRemote(server string) (Remote, error) {
193193// ski, sni, serverIP, and certID are used to identify the key by the remote
194194// keyserver.
195195func NewRemoteSignerWithCertID (ctx context.Context , c * Client , keyserver string , ski protocol.SKI ,
196- pub crypto.PublicKey , sni string , certID string , serverIP net.IP ) (crypto.Signer , error ) {
196+ pub crypto.PublicKey , sni string , certID string , serverIP net.IP , complianceRegion ... protocol. ComplianceRegion ) (crypto.Signer , error ) {
197197 span , _ := opentracing .StartSpanFromContext (ctx , "client.NewRemoteSignerWithCertID" )
198198 defer span .Finish ()
199199 priv := PrivateKey {
@@ -205,6 +205,9 @@ func NewRemoteSignerWithCertID(ctx context.Context, c *Client, keyserver string,
205205 keyserver : keyserver ,
206206 certID : certID ,
207207 }
208+ if len (complianceRegion ) > 0 {
209+ priv .complianceRegion = complianceRegion [0 ]
210+ }
208211 var err error
209212 priv .JaegerSpan , err = tracing .SpanContextToBinary (span .Context ())
210213 if err != nil {
@@ -223,7 +226,7 @@ func NewRemoteSignerWithCertID(ctx context.Context, c *Client, keyserver string,
223226// ski, sni, and serverIP are used to identified the key by the remote
224227// keyserver.
225228func NewRemoteSigner (ctx context.Context , c * Client , keyserver string , ski protocol.SKI ,
226- pub crypto.PublicKey , sni string , serverIP net.IP ) (crypto.Signer , error ) {
229+ pub crypto.PublicKey , sni string , serverIP net.IP , complianceRegion ... protocol. ComplianceRegion ) (crypto.Signer , error ) {
227230
228231 span , _ := opentracing .StartSpanFromContext (ctx , "client.NewRemoteSignerWithCertID" )
229232 defer span .Finish ()
@@ -235,6 +238,10 @@ func NewRemoteSigner(ctx context.Context, c *Client, keyserver string, ski proto
235238 serverIP : serverIP ,
236239 keyserver : keyserver ,
237240 }
241+
242+ if len (complianceRegion ) > 0 {
243+ priv .complianceRegion = complianceRegion [0 ]
244+ }
238245 var err error
239246 priv .JaegerSpan , err = tracing .SpanContextToBinary (span .Context ())
240247 if err != nil {
@@ -254,24 +261,24 @@ func NewRemoteSigner(ctx context.Context, c *Client, keyserver string, ski proto
254261// SKI is computed from the public key and along with sni and serverIP,
255262// the remote Signer uses those key identification info to contact the
256263// remote keyserver for keyless operations.
257- func (c * Client ) NewRemoteSignerTemplate (ctx context.Context , keyserver string , pub crypto.PublicKey , sni string , serverIP net.IP ) (crypto.Signer , error ) {
264+ func (c * Client ) NewRemoteSignerTemplate (ctx context.Context , keyserver string , pub crypto.PublicKey , sni string , serverIP net.IP , complianceRegion ... protocol. ComplianceRegion ) (crypto.Signer , error ) {
258265 ski , err := protocol .GetSKI (pub )
259266 if err != nil {
260267 return nil , err
261268 }
262- return NewRemoteSigner (ctx , c , keyserver , ski , pub , sni , serverIP )
269+ return NewRemoteSigner (ctx , c , keyserver , ski , pub , sni , serverIP , complianceRegion ... )
263270}
264271
265272// NewRemoteSignerTemplateWithCertID returns a remote keyserver
266273// based crypto.Signer with the public key.
267274// SKI is computed from public key, and along with sni, serverIP, and
268275// certID the remote signer uses these to contact the remote keyserver.
269- func (c * Client ) NewRemoteSignerTemplateWithCertID (ctx context.Context , keyserver string , pub crypto.PublicKey , sni string , serverIP net.IP , certID string ) (crypto.Signer , error ) {
276+ func (c * Client ) NewRemoteSignerTemplateWithCertID (ctx context.Context , keyserver string , pub crypto.PublicKey , sni string , serverIP net.IP , certID string , complianceRegion ... protocol. ComplianceRegion ) (crypto.Signer , error ) {
270277 ski , err := protocol .GetSKI (pub )
271278 if err != nil {
272279 return nil , err
273280 }
274- return NewRemoteSignerWithCertID (ctx , c , keyserver , ski , pub , sni , certID , serverIP )
281+ return NewRemoteSignerWithCertID (ctx , c , keyserver , ski , pub , sni , certID , serverIP , complianceRegion ... )
275282}
276283
277284// NewRemoteSignerByPublicKey returns a remote keyserver based signer
0 commit comments