summaryrefslogtreecommitdiffstats
path: root/crypto/openssh/scard
diff options
context:
space:
mode:
authordes <des@FreeBSD.org>2008-07-22 17:13:05 +0000
committerdes <des@FreeBSD.org>2008-07-22 17:13:05 +0000
commit624d93001f28e236c027516d88282351eb7bffbe (patch)
tree4b825dc642cb6eb9a060e54bf8d69288fbee4904 /crypto/openssh/scard
parentf591b3e29c677bff2b0f0d482490554c419128fd (diff)
downloadFreeBSD-src-624d93001f28e236c027516d88282351eb7bffbe.zip
FreeBSD-src-624d93001f28e236c027516d88282351eb7bffbe.tar.gz
Flatten the OpenSSH vendor tree for 3.x and newer.
Diffstat (limited to 'crypto/openssh/scard')
-rw-r--r--crypto/openssh/scard/Makefile20
-rw-r--r--crypto/openssh/scard/Makefile.in29
-rw-r--r--crypto/openssh/scard/Ssh.binbin600 -> 0 bytes
-rw-r--r--crypto/openssh/scard/Ssh.bin.uu17
-rw-r--r--crypto/openssh/scard/Ssh.java164
5 files changed, 0 insertions, 230 deletions
diff --git a/crypto/openssh/scard/Makefile b/crypto/openssh/scard/Makefile
deleted file mode 100644
index 1cf7bbd..0000000
--- a/crypto/openssh/scard/Makefile
+++ /dev/null
@@ -1,20 +0,0 @@
-# $OpenBSD: Makefile,v 1.2 2001/06/29 07:02:09 markus Exp $
-
-.PATH: ${.CURDIR}/..
-
-CARDLET= Ssh.bin
-DATADIR= /usr/libdata/ssh
-
-all: ${CARDLET}
-
-clean:
- rm -f ${CARDLET}
-
-install: ${CARDLET}
- install -c -m ${LIBMODE} -o ${LIBOWN} -g ${LIBGRP} \
- ${CARDLET} ${DESTDIR}${DATADIR}
-
-Ssh.bin: ${.CURDIR}/Ssh.bin.uu
- uudecode ${.CURDIR}/$@.uu
-
-.include <bsd.prog.mk>
diff --git a/crypto/openssh/scard/Makefile.in b/crypto/openssh/scard/Makefile.in
deleted file mode 100644
index 8519e20..0000000
--- a/crypto/openssh/scard/Makefile.in
+++ /dev/null
@@ -1,29 +0,0 @@
-# $Id: Makefile.in,v 1.5 2006/10/23 21:44:47 tim Exp $
-
-prefix=@prefix@
-datadir=@datadir@
-datarootdir=@datarootdir@
-srcdir=@srcdir@
-top_srcdir=@top_srcdir@
-
-INSTALL=@INSTALL@
-
-VPATH=@srcdir@
-
-all:
-
-#Ssh.bin: Ssh.bin.uu
-# uudecode Ssh.bin.uu
-
-clean:
-# rm -rf Ssh.bin
-
-distprep:
- uudecode Ssh.bin.uu
-
-distclean: clean
- rm -f Makefile *~
-
-install: $(srcdir)/Ssh.bin
- $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir)
- $(INSTALL) -m 0644 $(srcdir)/Ssh.bin $(DESTDIR)$(datadir)/Ssh.bin
diff --git a/crypto/openssh/scard/Ssh.bin b/crypto/openssh/scard/Ssh.bin
deleted file mode 100644
index edbadc6..0000000
--- a/crypto/openssh/scard/Ssh.bin
+++ /dev/null
Binary files differ
diff --git a/crypto/openssh/scard/Ssh.bin.uu b/crypto/openssh/scard/Ssh.bin.uu
deleted file mode 100644
index ea3986a..0000000
--- a/crypto/openssh/scard/Ssh.bin.uu
+++ /dev/null
@@ -1,17 +0,0 @@
-begin 644 Ssh.bin
-M`P)!&P`801X`>``!`E@"`/Y@\`4`_J'P!0!!&T$=`?Z@\`4`01M!'`'^>/,!
-M`4$;01X!_G#S%P'^0],1`?Y@\!0`_G/S'0#^<]4``D$;L`4`_F'3``#^8=,%
-M`/ZAT`$!_J#0)P'^H],*`?ZCTPD`_G/5"P7^8=,'`OZAT`H`_J#0$@3^:-,@
-M`T$;`P`%`/Y@`<P``$$<\@\``$$=\B$``$$>\A```/`0__(%`@8!`0H``&``
-M0205!!D)I$L`"0J0`&``*!4$&58``````.P````%____P````.D````0````
-M,P```"````#'````,````(T````R````V!4#&0A*``D*;@!@`"@5!QD*`/\]
-M(6``1A)*``D*9P!@`"@*/P!@`$LK"1)@`$LK!6``4!P$#00#2@`.#01@`%5@
-M`%I@`"@37``>%0@2%0A>`%\($F``9%(`:`H_`&``2RL*<VA@`$LK8`!I"1`U
-M(14#`Q)@`&X<!`T$`TL`"P,28`!D4@`.#01@`%5@`%I@`"A2`"X5`PH$`&``
-M<RL#!6``9%(`'14#"@$"8`!S*P,%8`!D4@`,4@`)"FT`8``H60``\`+_\@$!
-M`0D`"```"I``8``H60#P$__R`0$""0`,``!B01LM7P`\*UD```#P$O_V`0$#
-M`0`8```37``>7@`R10`/$UP`'@H`R`D07@`W!%>P!?_R`0$$`@`\```37P``
-M$V+^H2U?``5=``H38OZ@+5\`#UT`%!-B_G@M"@0`7P`970`>"@0`8``C10`)
-/"F<`8``H$UX`+5D`````
-`
-end
diff --git a/crypto/openssh/scard/Ssh.java b/crypto/openssh/scard/Ssh.java
deleted file mode 100644
index 6418957..0000000
--- a/crypto/openssh/scard/Ssh.java
+++ /dev/null
@@ -1,164 +0,0 @@
-// $Id: Ssh.java,v 1.3 2002/05/22 04:24:02 djm Exp $
-//
-// Ssh.java
-// SSH / smartcard integration project, smartcard side
-//
-// Tomoko Fukuzawa, created, Feb., 2000
-//
-// Naomaru Itoi, modified, Apr., 2000
-//
-
-// copyright 2000
-// the regents of the university of michigan
-// all rights reserved
-//
-// permission is granted to use, copy, create derivative works
-// and redistribute this software and such derivative works
-// for any purpose, so long as the name of the university of
-// michigan is not used in any advertising or publicity
-// pertaining to the use or distribution of this software
-// without specific, written prior authorization. if the
-// above copyright notice or any other identification of the
-// university of michigan is included in any copy of any
-// portion of this software, then the disclaimer below must
-// also be included.
-//
-// this software is provided as is, without representation
-// from the university of michigan as to its fitness for any
-// purpose, and without warranty by the university of
-// michigan of any kind, either express or implied, including
-// without limitation the implied warranties of
-// merchantability and fitness for a particular purpose. the
-// regents of the university of michigan shall not be liable
-// for any damages, including special, indirect, incidental, or
-// consequential damages, with respect to any claim arising
-// out of or in connection with the use of the software, even
-// if it has been or is hereafter advised of the possibility of
-// such damages.
-
-import javacard.framework.*;
-import javacardx.framework.*;
-import javacardx.crypto.*;
-
-public class Ssh extends javacard.framework.Applet
-{
- // Change this when the applet changes; hi byte is major, low byte is minor
- static final short applet_version = (short)0x0102;
-
- /* constants declaration */
- // code of CLA byte in the command APDU header
- static final byte Ssh_CLA =(byte)0x05;
-
- // codes of INS byte in the command APDU header
- static final byte DECRYPT = (byte) 0x10;
- static final byte GET_KEYLENGTH = (byte) 0x20;
- static final byte GET_PUBKEY = (byte) 0x30;
- static final byte GET_VERSION = (byte) 0x32;
- static final byte GET_RESPONSE = (byte) 0xc0;
-
- static final short keysize = 1024;
- static final short root_fid = (short)0x3f00;
- static final short privkey_fid = (short)0x0012;
- static final short pubkey_fid = (short)(('s'<<8)|'h');
-
- /* instance variables declaration */
- AsymKey rsakey;
- CyberflexFile file;
- CyberflexOS os;
-
- private Ssh()
- {
- file = new CyberflexFile();
- os = new CyberflexOS();
-
- rsakey = new RSA_CRT_PrivateKey (keysize);
-
- if ( ! rsakey.isSupportedLength (keysize) )
- ISOException.throwIt (ISO.SW_WRONG_LENGTH);
-
- register();
- } // end of the constructor
-
- public boolean select() {
- if (!rsakey.isInitialized())
- rsakey.setKeyInstance ((short)0xc8, (short)0x10);
-
- return true;
- }
-
- public static void install(APDU apdu)
- {
- new Ssh(); // create a Ssh applet instance (card)
- } // end of install method
-
- public static void main(String args[]) {
- ISOException.throwIt((short) 0x9000);
- }
-
- public void process(APDU apdu)
- {
- // APDU object carries a byte array (buffer) to
- // transfer incoming and outgoing APDU header
- // and data bytes between card and CAD
- byte buffer[] = apdu.getBuffer();
- short size, st;
-
- // verify that if the applet can accept this
- // APDU message
- // NI: change suggested by Wayne Dyksen, Purdue
- if (buffer[ISO.OFFSET_INS] == ISO.INS_SELECT)
- ISOException.throwIt(ISO.SW_NO_ERROR);
-
- switch (buffer[ISO.OFFSET_INS]) {
- case DECRYPT:
- if (buffer[ISO.OFFSET_CLA] != Ssh_CLA)
- ISOException.throwIt(ISO.SW_CLA_NOT_SUPPORTED);
- //decrypt (apdu);
- size = (short) (buffer[ISO.OFFSET_LC] & 0x00FF);
-
- if (apdu.setIncomingAndReceive() != size)
- ISOException.throwIt (ISO.SW_WRONG_LENGTH);
-
- // check access; depends on bit 2 (x/a)
- file.selectFile(root_fid);
- file.selectFile(privkey_fid);
- st = os.checkAccess(ACL.EXECUTE);
- if (st != ST.ACCESS_CLEARED) {
- CyberflexAPDU.prepareSW1SW2(st);
- ISOException.throwIt(CyberflexAPDU.getSW1SW2());
- }
-
- rsakey.cryptoUpdate (buffer, (short) ISO.OFFSET_CDATA, size,
- buffer, (short) ISO.OFFSET_CDATA);
-
- apdu.setOutgoingAndSend ((short) ISO.OFFSET_CDATA, size);
- break;
- case GET_PUBKEY:
- file.selectFile(root_fid); // select root
- file.selectFile(pubkey_fid); // select public key file
- size = (short)(file.getFileSize() - 16);
- st = os.readBinaryFile(buffer, (short)0, (short)0, size);
- if (st == ST.SUCCESS)
- apdu.setOutgoingAndSend((short)0, size);
- else {
- CyberflexAPDU.prepareSW1SW2(st);
- ISOException.throwIt(CyberflexAPDU.getSW1SW2());
- }
- break;
- case GET_KEYLENGTH:
- Util.setShort(buffer, (short)0, keysize);
- apdu.setOutgoingAndSend ((short)0, (short)2);
- break;
- case GET_VERSION:
- Util.setShort(buffer, (short)0, applet_version);
- apdu.setOutgoingAndSend ((short)0, (short)2);
- break;
- case GET_RESPONSE:
- break;
- default:
- ISOException.throwIt (ISO.SW_INS_NOT_SUPPORTED);
- }
-
- } // end of process method
-
-} // end of class Ssh
OpenPOWER on IntegriCloud