Исходные коды спецификаций для LSB Core 3.1

/*
 * Copyright (c) 2005-2006 Institute for System Programming
 * Russian Academy of Sciences
 * All rights reserved. 
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at 
 * 
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

/*
 * Portions of this text are reprinted and reproduced in electronic form
 * from IEEE Std 1003.1, 2004 Edition, Standard for Information Technology
 * -- Portable Operating System Interface (POSIX), The Open Group Base
 * Specifications Issue 6, Copyright (C) 2001-2004 by the Institute of
 * Electrical and Electronics Engineers, Inc and The Open Group. In the
 * event of any discrepancy between this version and the original IEEE and
 * The Open Group Standard, the original IEEE and The Open Group Standard
 * is the referee document. The original Standard can be obtained online at
 * http://www.opengroup.org/unix/online.html.
 */



#include "socket/rpc/secure_model.seh"


#pragma SEC subsystem rpc "socket.rpc"



/* 
   The group of functions 'socket.rpc.secure' consists of: 
       key_decryptsession [2]
 */

/********************************************************************/
/**                      Interface Functions                       **/
/********************************************************************/

/*
Linux Standard Base Core Specification 3.1
Copyright (c) 2004, 2005 Free Standards Group

    refers

System V Interface Definition, Fourth Edition
FINAL COPY June 15, 1995
Copyright  1983, 1984, 1985, 1986,1987, 1988, 1995 Novell, Inc.
-------------------------------------------------------------------------------

NAME  

    key_decryptsession

SYNOPSIS

    #include <rpc/auth.h>
    int key_decryptsession(const char *remotename, des_block *deskey);

DESCRIPTION

    This function is an interface to the keyserver daemon, which is associated 
    with RPCs secure  authentication system (AUTH_DES authentication). User 
    programs rarely need to call key_decryptsession() or the associated 
    functions key_encryptsession(), key_gendes(), and key_setsecret().

    The key_decryptsession() function takes a server netname remotename and a
    DES key deskey, and decrypts the key by using the the public key of the 
    server and the secret key associated with the effective UID of the 
    calling process. The key_decryptsession() function is the inverse of 
    key_encryptsession() function.
*/

specification typedef struct DesBlock DesBlock = {};

specification
IntT key_decryptsession_spec( CallContext context, CString* remotename, DesBlock* deskey)
{
    pre
    {
        return true;
    }
    coverage C
    {
        return { TheOnlyBranch, "The only branch" };
    }
    post
    {
       /*
         * The key_decryptsession() function takes a server netname remotename and a DES
         * key deskey, and decrypts the key by using the the public key of the server and
         * the secret key associated with the effective UID of the calling process.
         */
        REQ("key_decryptsession.01", "", TODO_REQ());

        /*
         * The key_decryptsession() function is the inverse of key_encryptsession()
         * function.
         */
        REQ("key_decryptsession.02", "", TODO_REQ());

        return true;
    }
}


/********************************************************************/
/**                       Helper Functions                         **/
/********************************************************************/
DesBlock* create_DesBlock(UInt32T high, UInt32T low)
{
    return create(&type_DesBlock, high, low);
}