/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#include <stdio.h>
#include <stdarg.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <signal.h>
#include <locale.h>
#include <libinst.h>
#include <pkglib.h>
#include <pkgerr.h>
#include <keystore.h>
#include "pkgadm.h"
#include "pkgadm_msgs.h"
/*
* Name: removecert
* Desc: Removes a user certificate and associated private key,
* or a trusted certificate, from the keystore.
* Syntax: addcert [-a app] [-k keystore] -n name [-P passarg] [-R altroot]
*/
int
{
int i;
char *homedir;
switch (i) {
case 'a':
break;
case 'k':
break;
case 'n':
break;
case 'P':
break;
case 'R':
break;
case ':':
/* fallthrough intentional */
case '?':
default:
goto cleanup;
}
}
/* we require a name */
goto cleanup;
}
/* should be no arguments left */
goto cleanup;
}
/* set up proper keystore */
if (keystore_base == NULL) {
/*
* If we have an alternate
* root, then we have no choice but to use
* root's keystore on that alternate root,
* since there is no way to resolve a
* user's home dir given an alternate root
*/
MAXPATHLEN) >= MAXPATHLEN) {
goto cleanup;
}
} else {
/*
* not superuser, but no home dir, so
* use superuser's keystore
*/
MAXPATHLEN) >= MAXPATHLEN) {
goto cleanup;
}
} else {
MAXPATHLEN) >= MAXPATHLEN) {
homedir);
goto cleanup;
}
MAXPATHLEN) >= MAXPATHLEN) {
goto cleanup;
}
}
}
} else {
MAXPATHLEN) >= MAXPATHLEN) {
goto cleanup;
}
}
err = pkgerr_new();
/* now load the key store */
goto cleanup;
}
/* now remove the selected certs */
alias);
goto cleanup;
}
/* now write it back out */
goto cleanup;
}
ret = 0;
/* fallthrough intentional */
return (ret);
}