]> andersk Git - gssapi-openssh.git/blobdiff - openssh/scard.c
The man2html from jbasney on pkilab2 works whereas the standard one doesn't.
[gssapi-openssh.git] / openssh / scard.c
index e8319314c681b7d861613ced29ba133fa8126484..251e5d30af995cee47251abceb58bfccee4cf78e 100644 (file)
@@ -24,7 +24,7 @@
 
 #include "includes.h"
 #ifdef SMARTCARD
-RCSID("$OpenBSD: scard.c,v 1.17 2001/12/27 18:22:16 markus Exp $");
+RCSID("$OpenBSD: scard.c,v 1.15 2001/09/28 09:49:31 djm Exp $");
 
 #include <openssl/engine.h>
 #include <sectok.h>
@@ -48,7 +48,7 @@ static int cla = 0x00;        /* class */
 
 /* interface to libsectok */
 
-static int
+static int 
 sc_open(void)
 {
        int sw;
@@ -79,7 +79,7 @@ sc_open(void)
        return sc_fd;
 }
 
-static int
+static int 
 sc_enable_applet(void)
 {
        static u_char aid[] = {0xfc, 0x53, 0x73, 0x68, 0x2e, 0x62, 0x69, 0x6e};
@@ -95,7 +95,7 @@ sc_enable_applet(void)
        return 0;
 }
 
-static int
+static int 
 sc_init(void)
 {
        int status;
@@ -115,7 +115,7 @@ sc_init(void)
        return 0;
 }
 
-static int
+static int 
 sc_read_pubkey(Key * k)
 {
        u_char buf[2], *n;
@@ -133,7 +133,7 @@ sc_read_pubkey(Key * k)
 
        /* get key size */
        sectok_apdu(sc_fd, CLA_SSH, INS_GET_KEYLENGTH, 0, 0, 0, NULL,
-           sizeof(buf), buf, &sw);
+            sizeof(buf), buf, &sw);
        if (!sectok_swOK(sw)) {
                error("could not obtain key length: %s", sectok_get_sw(sw));
                goto err;
@@ -204,7 +204,7 @@ sc_private_decrypt(int flen, u_char *from, u_char *to, RSA *rsa, int padding)
                goto err;
        }
        sectok_apdu(sc_fd, CLA_SSH, INS_GET_RESPONSE, 0, 0, 0, NULL,
-           len, padded, &sw);
+            len, padded, &sw);
        if (!sectok_swOK(sw)) {
                error("sc_private_decrypt: INS_GET_RESPONSE failed: %s",
                    sectok_get_sw(sw));
@@ -249,7 +249,7 @@ sc_private_encrypt(int flen, u_char *from, u_char *to, RSA *rsa, int padding)
                goto err;
        }
        sectok_apdu(sc_fd, CLA_SSH, INS_GET_RESPONSE, 0, 0, 0, NULL,
-           len, to, &sw);
+            len, to, &sw);
        if (!sectok_swOK(sw)) {
                error("sc_private_decrypt: INS_GET_RESPONSE failed: %s",
                    sectok_get_sw(sw));
@@ -320,8 +320,7 @@ sc_get_engine(void)
        smart_rsa.rsa_sign      = def->rsa_sign;
        smart_rsa.rsa_verify    = def->rsa_verify;
 
-       if ((smart_engine = ENGINE_new()) == NULL)
-               fatal("ENGINE_new failed");
+       smart_engine = ENGINE_new();
 
        ENGINE_set_id(smart_engine, "sectok");
        ENGINE_set_name(smart_engine, "libsectok");
This page took 0.747574 seconds and 4 git commands to generate.