• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (C) 2009, The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *     http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package android.net.vpn;
18 
19 import android.os.Parcel;
20 
21 /**
22  * The profile for certificate-based L2TP-over-IPSec type of VPN.
23  * {@hide}
24  */
25 public class L2tpIpsecProfile extends L2tpProfile {
26     private static final long serialVersionUID = 1L;
27 
28     private String mUserCertificate;
29     private String mCaCertificate;
30 
31     @Override
getType()32     public VpnType getType() {
33         return VpnType.L2TP_IPSEC;
34     }
35 
setCaCertificate(String name)36     public void setCaCertificate(String name) {
37         mCaCertificate = name;
38     }
39 
getCaCertificate()40     public String getCaCertificate() {
41         return mCaCertificate;
42     }
43 
setUserCertificate(String name)44     public void setUserCertificate(String name) {
45         mUserCertificate = name;
46     }
47 
getUserCertificate()48     public String getUserCertificate() {
49         return mUserCertificate;
50     }
51 
52     @Override
readFromParcel(Parcel in)53     protected void readFromParcel(Parcel in) {
54         super.readFromParcel(in);
55         mCaCertificate = in.readString();
56         mUserCertificate = in.readString();
57     }
58 
59     @Override
writeToParcel(Parcel parcel, int flags)60     public void writeToParcel(Parcel parcel, int flags) {
61         super.writeToParcel(parcel, flags);
62         parcel.writeString(mCaCertificate);
63         parcel.writeString(mUserCertificate);
64     }
65 }
66