]> andersk Git - openssh.git/blobdiff - scard-opensc.c
- djm@cvs.openbsd.org 2003/11/21 11:57:03
[openssh.git] / scard-opensc.c
index 2489fec457da5f90e2a2b77fe3c3c12d0111e44f..ff3017f5ed1a5866ed1d68c73f654d7c54d31b3a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * Copyright (c) 2002 Juha Yrjölä.  All rights reserved.
  * Copyright (c) 2001 Markus Friedl.
- * 
+ *
  * Redistribution and use in source and binary forms, with or without
  * modification, are permitted provided that the following conditions
  * are met:
@@ -81,7 +81,7 @@ sc_close(void)
        }
 }
 
-static int 
+static int
 sc_init(void)
 {
        int r;
@@ -91,7 +91,7 @@ sc_init(void)
                goto err;
        if (sc_reader_id >= ctx->reader_count) {
                r = SC_ERROR_NO_READERS_FOUND;
-               error("Illegal reader number %d (max %d)", sc_reader_id, 
+               error("Illegal reader number %d (max %d)", sc_reader_id,
                    ctx->reader_count -1);
                goto err;
        }
@@ -131,7 +131,7 @@ sc_prkey_op_init(RSA *rsa, struct sc_pkcs15_object **key_obj_out,
                        goto err;
                }
        }
-       r = sc_pkcs15_find_prkey_by_id_usage(p15card, &priv->cert_id, 
+       r = sc_pkcs15_find_prkey_by_id_usage(p15card, &priv->cert_id,
                usage, &key_obj);
        if (r) {
                error("Unable to find private key from SmartCard: %s",
@@ -193,7 +193,7 @@ sc_private_decrypt(int flen, u_char *from, u_char *to, RSA *rsa,
        r = sc_prkey_op_init(rsa, &key_obj, SC_USAGE_DECRYPT);
        if (r)
                return -1;
-       r = sc_pkcs15_decipher(p15card, key_obj, SC_ALGORITHM_RSA_PAD_PKCS1, 
+       r = sc_pkcs15_decipher(p15card, key_obj, SC_ALGORITHM_RSA_PAD_PKCS1,
            from, flen, to, flen);
        sc_unlock(card);
        if (r < 0) {
@@ -223,7 +223,7 @@ sc_sign(int type, u_char *m, unsigned int m_len,
         * the key will be rejected as using a non-repudiation key
         * for authentication is not recommended. Note: This does not
         * prevent the use of a non-repudiation key for authentication
-        * if the sign or signrecover flag is set as well. 
+        * if the sign or signrecover flag is set as well.
         */
        r = sc_prkey_op_init(rsa, &key_obj, SC_USAGE_SIGN);
        if (r)
@@ -337,7 +337,7 @@ convert_rsa_to_rsa1(Key * in, Key * out)
        return;
 }
 
-static int 
+static int
 sc_read_pubkey(Key * k, const struct sc_pkcs15_object *cert_obj)
 {
        int r;
@@ -358,7 +358,7 @@ sc_read_pubkey(Key * k, const struct sc_pkcs15_object *cert_obj)
        }
        x509 = X509_new();
        if (x509 == NULL) {
-               r = -1; 
+               r = -1;
                goto err;
        }
        p = cert->data;
This page took 0.035611 seconds and 4 git commands to generate.