static void p5_auth_pgp_change_server_key(ApplicationContext context, ActiveEventArgs e) { if (context.Ticket.Role != "root") { throw new LambdaSecurityException("Only a root account can change the server's PGP keypair", e.Args, context); } PGPKey.ChangeServerPGPKey(context, e.Args.Get <string> (context), e.Args); }
static void p5_auth_pgp_get_fingerprint(ApplicationContext context, ActiveEventArgs e) { e.Args.Value = PGPKey.GetFingerprint(context); }
static void p5_auth__set_server_pgp_key(ApplicationContext context, ActiveEventArgs e) { PGPKey.SetFingerprint(context, e.Args, e.Args.GetExValue <string> (context)); }
static void p5_auth__has_server_pgp_key(ApplicationContext context, ActiveEventArgs e) { e.Args.Value = !string.IsNullOrEmpty(PGPKey.GetFingerprint(context)); }